Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-20673

Arquillian deployment validation does not consider nested classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 4.3.0.CR1
    • 4.3.0.Beta2
    • arquillian
    • None

      The Arquillian plugin validates deployments to ensure they contain all of the classes that are referenced by the test. But the validation logic does not consider nested classes.

      I'm currently working on a patch for the Apache DeltaSpike project and decided to add a few tests. One test references a class object:

          @Test
          public void testNoSecuredAnnotation()
          {
              testViewAccessHandlerMethods(Pages.NoSecurity.class, true, 0, 0);
          }
      

      The Arquillian plugin incorrectly flags the class name with this warning:

      Arquillian: The org.apache.deltaspike.test.jsf.impl.config.view.security.Pages.NoSecurity type is not included in any deployment.
      

      Changing the class to Pages.class removes the warning, so the plugin does know about that class, but is not noticing its nested classes. For reference, this is what Pages looks like:

      interface Pages extends ViewConfig
      {
      
          class NoSecurity implements ViewConfig
          {
          }
          
          @Secured(AlwaysSucceedsVoter.class)
          class AlwaysSucceeds implements ViewConfig
          {
          }
          
          @Secured(AlwaysDeniedVoter.class)
          class AlwaysDenied implements ViewConfig
          {
          }
          
          @Secured(AlwaysDeniedVoter.class)
          interface DeniedFolder
          {
              
              class InheritsDeniedFromFolder implements ViewConfig
              {
              }
              
              @Secured(AlwaysSucceedsVoter.class)
              class CompositionWithFolder implements ViewConfig
              {
              }
              
          }
          
          @Secured(AlwaysDeniedVoter.class)
          interface SuperConfig extends ViewConfig
          {
          }
          
          class InheritsDeniedFromSuper implements SuperConfig
          {
          }
          
          @Secured(AlwaysSucceedsVoter.class)
          class CompositionWithSuper implements SuperConfig
          {
          }
          
      }
      

              snjeza_jira Snjezana Peco (Inactive)
              rdicroce Richard DiCroce (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: