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/19 13:40:44 UTC
[camel] branch main updated: CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8731)
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 4a6fe53d445 CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8731)
4a6fe53d445 is described below
commit 4a6fe53d445f71eef64891fcd4d0143f9c8c33a1
Author: Nicolas Filotto <es...@users.noreply.github.com>
AuthorDate: Sat Nov 19 14:40:37 2022 +0100
CAMEL-18730: camel-report-maven-plugin - Fix import issue (#8731)
## 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 0392711bfb8..f64279bd1a8 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;
@@ -249,7 +248,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);