You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/11/21 09:50:39 UTC

[camel] branch camel-3.18.x updated: CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8737)

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

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


The following commit(s) were added to refs/heads/camel-3.18.x by this push:
     new b0368703528 CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8737)
b0368703528 is described below

commit b0368703528688da99e498683fa813820258ed19
Author: Nicolas Filotto <es...@users.noreply.github.com>
AuthorDate: Mon Nov 21 10:50:30 2022 +0100

    CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8737)
    
    ## Motivation
    
    After generating the route coverage of the tests, if we launch the maven command `mvn camel-report:route-coverage`, the plugin fails due to an import issue.
    
    ## Modifications:
    
    * Remove the bad import and replace it with `List.of`.
---
 .../src/main/java/org/apache/camel/maven/RouteCoverageMojo.java        | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
index c65d0efcb3e..48e04caba73 100644
--- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
+++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java
@@ -47,7 +47,6 @@ import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import edu.emory.mathcs.backport.java.util.Collections;
 import org.apache.camel.maven.model.RouteCoverageNode;
 import org.apache.camel.parser.RouteBuilderParser;
 import org.apache.camel.parser.XmlRouteParser;
@@ -250,7 +249,7 @@ public class RouteCoverageMojo extends AbstractExecMojo {
                     getLog().warn("No route coverage data found for route: " + routeId
                         + ". Make sure to enable route coverage in your unit tests and assign unique route ids to your routes. Also remember to run unit tests first.");
                 } else {
-                    List<RouteCoverageNode> coverage = gatherRouteCoverageSummary(Collections.singletonList(t), coverageData);
+                    List<RouteCoverageNode> coverage = gatherRouteCoverageSummary(List.of(t), coverageData);
                     totalNumberOfNodes += coverage.size();
                     String out = templateCoverageData(fileName, routeId, coverage, notCovered, coveredNodes);
                     getLog().info("Route coverage summary:\n\n" + out);