[
https://issues.apache.org/jira/browse/CAMEL-21239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883088#comment-17883088
]
Matthew Robson commented on CAMEL-21239:
----------------------------------------
[~davsclaus] Built a 4.4.4 snapshot locally to test. The NPE is fixed, but
there is still a regression in behaviour.
Route coverage only detects the initial from with the id on the route... None
of the subsequent steps are verified.
{code:java}
[INFO] --- camel-report:4.4.4-SNAPSHOT:route-coverage (route-coverage) @
mustunderstand_reproducer ---
[INFO] Discovered 3 routes
[INFO] Route coverage summary:
File: camel/camel-context.xml
Route: hcp.directory.v2.route.main
Line # Count Route
------ ----- -----
7 1 from
8 0 log
10 0 setProperty
13 0 setBody
18 0 to
21 0 to
23 0 log
24 0 log
Coverage: 1 out of 8 (12.5% / threshold 100.0%)
Status: Failed
{code}
>From the reproducer:
{code:java}
<route id="hcp.directory.v2.route.main">
<from
uri="cxf:bean:hcp.directory.v2.proxy?headerFilterStrategy=#cxfHeaderFilterStrategy"/>
<log message="${routeId} ${body}"/>
<setProperty name="originalBody">
<simple>${body}</simple>
</setProperty>
<setBody>
<simple>null</simple>
</setBody>
<!-- call the second web service -->
<to id="mail" uri="direct:rm.mail.invoker"/>
<!-- call the third web service -->
<to id="fac" uri="direct:rm.fax.invoker"/>
<log message="Final step"/>
<log message="${routeId} ${body}"/>
</route>
{code}
You would now need to add id:'s to every single step as well. This was not
needed or was handled transparently previously.
> camel-report-maven-plugin - NPE if route does not have id
> ---------------------------------------------------------
>
> Key: CAMEL-21239
> URL: https://issues.apache.org/jira/browse/CAMEL-21239
> Project: Camel
> Issue Type: Bug
> Components: tooling
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.4.4, 4.8.1, 4.9.0
>
>
> Caused by: java.lang.NullPointerException: Cannot invoke
> "org.w3c.dom.Node.getNodeValue()" because the return value of
> "org.w3c.dom.NamedNodeMap.getNamedItem(String)" is null
> at
> org.apache.camel.parser.helper.RouteCoverageHelper.parseDumpRouteCoverageByRouteId
> (RouteCoverageHelper.java:70)
> at org.apache.camel.maven.RouteCoverageMojo.grabDumpData
> (RouteCoverageMojo.java:263)
> at org.apache.camel.maven.RouteCoverageMojo.execute
> (RouteCoverageMojo.java:228)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:126)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)