This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e712dd0350e237828dcff18059e9770dbeae9013
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Nov 23 15:57:09 2023 +0100

    CAMEL-20140: Fix camel-report:route-coverage to be able to output coverage 
data (#12184)
---
 .../java/org/apache/camel/parser/helper/RouteCoverageHelper.java     | 5 +----
 .../java/org/apache/camel/management/mbean/ManagedCamelContext.java  | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
 
b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
index f4e9e53a490..ec4cbcd20d3 100644
--- 
a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
+++ 
b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
@@ -68,10 +68,7 @@ public final class RouteCoverageHelper {
                 for (int i = 0; i < routes.getLength(); i++) {
                     Node route = routes.item(i);
                     String id = 
route.getAttributes().getNamedItem("id").getNodeValue();
-                    String customId = 
route.getAttributes().getNamedItem("customId") != null
-                            ? 
route.getAttributes().getNamedItem("customId").getNodeValue() : "false";
-                    // must be the target route and the route must be explicit 
assigned with that route id (not anonymous route)
-                    if ("true".equals(customId) && routeId.equals(id)) {
+                    if (routeId.equals(id)) {
                         // parse each route and build a List<CoverageData> for 
line by line coverage data
                         AtomicInteger counter = new AtomicInteger();
                         parseRouteData(catalog, route, answer, counter);
diff --git 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index 382f54fa0c0..5bc37f74959 100644
--- 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -678,7 +678,7 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
                         getExchangesTotal(), getTotalProcessingTime()))
                 .append(">\n");
 
-        String xml = dumpRoutesAsXml();
+        String xml = dumpRoutesAsXml(false, false);
         if (xml != null) {
             // use the coverage xml parser to dump the routes and enrich with 
coverage stats
             Document dom = RouteCoverageXmlParser.parseXml(context, new 
ByteArrayInputStream(xml.getBytes()));

Reply via email to