Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12483

route-coverage : endChoice() problem

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.21.0
    • Fix Version/s: 2.21.2, 2.22.0
    • Component/s: tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When running 

      mvn camel:route-coverage

      on routes that use endChoice() you get a NullPointerException. 

      [WARNING] Error parsing java file c:\workspace\kk\coverage\src\main\java\dk\smor\MySpringBootRouter.java code due null
      java.lang.NullPointerException
      at org.apache.camel.parser.helper.CamelJavaTreeParserHelper.parseCamelRouteTree(CamelJavaTreeParserHelper.java:132)
      at org.apache.camel.parser.RouteBuilderParser.parseRouteBuilderTree(RouteBuilderParser.java:80)
      at org.apache.camel.maven.RouteCoverageMojo.execute(RouteCoverageMojo.java:158)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      

      I have attached a zip file with some example code to re-produce the problem.
      The example code has 2 routes, 1 with endChoice() and 1 without. The 2 route should behave equally.

        Attachments

        1. coverage.zip
          10 kB
          Stephane Mor

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              smor Stephane Mor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: