SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-1355

Sonar doesn't support inner classes in a Java Flex application

    Details

    • Number of attachments :
      0

      Description

      Hi,

      I'm using sonar 2.10 in jenkins and when trying to analyse a flex project I have the following error (Java inner classes are not supported) :

      Embedded error: Java inner classes are not supported : Agence$Type
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
          at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
          at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
          at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
          at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
          ... 17 more
      Caused by: java.lang.IllegalArgumentException: Java inner classes are not supported : Agence$Type
          at org.sonar.plugins.flex.FlexFile.<init>(FlexFile.java:79)
          at org.sonar.plugins.flex.FlexFile.fromIOFile(FlexFile.java:165)
          at org.sonar.plugins.flex.FlexSourceImporter.createResource(FlexSourceImporter.java:37)
          at org.sonar.api.batch.AbstractSourceImporter.parseDirs(AbstractSourceImporter.java:76)
          at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:70)
          at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:61)
          at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
          at org.sonar.batch.phases.Phases.execute(Phases.java:93)
          at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
          at org.sonar.batch.bootstrap.Module.start(Module.java:89)
          at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110)
          at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:105)
          at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100)
          at org.sonar.batch.bootstrap.Module.start(Module.java:89)
          at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)
          at org.sonar.batch.bootstrap.Module.start(Module.java:89)
          at org.sonar.batch.Batch.execute(Batch.java:74)
          at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:154)
          at org.sonar.maven.SonarMojo.execute(SonarMojo.java:143)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
          at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
          ... 21 more
      

      I think this issue is related to sonar flex plugin!
      Can you help please ?

      Thank you in advance.

      Best regards,

      Riadh

        Issue Links

          Activity

          Hide
          Riadh MNASRI added a comment -

          I'm using The Flex plugin 0.4

          Show
          Riadh MNASRI added a comment - I'm using The Flex plugin 0.4
          Hide
          Fabrice Bellingard added a comment -

          This error was actually due to a copy-paste from the Java-related plugins.
          Nested classes are not allowed in ActionScript, so the plugin doesn't need to support this.

          Show
          Fabrice Bellingard added a comment - This error was actually due to a copy-paste from the Java-related plugins. Nested classes are not allowed in ActionScript, so the plugin doesn't need to support this.
          Hide
          Freddy Mallet added a comment -

          Manually tested

          Show
          Freddy Mallet added a comment - Manually tested

            People

            • Assignee:
              Fabrice Bellingard
              Reporter:
              Riadh MNASRI
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: