You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/12/30 10:15:19 UTC

[camel] 01/02: CAMEL-12974: Polished

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

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

commit 1d45648097b418e5ab280b327fe7835ef521465f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 30 10:59:44 2018 +0100

    CAMEL-12974: Polished
---
 .../java/org/apache/camel/parser/helper/RouteCoverageHelper.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
index 109a2a5..387f713 100644
--- a/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
+++ b/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/RouteCoverageHelper.java
@@ -83,7 +83,7 @@ public final class RouteCoverageHelper {
     }
 
     public static Map<String, List<CoverageData>> parseDumpRouteCoverageByClassAndTestMethod(String directory) throws Exception {
-        Map<String, List<CoverageData>> answer = new LinkedHashMap();
+        Map<String, List<CoverageData>> answer = new LinkedHashMap<>();
 
         File[] files = new File(directory).listFiles(f -> f.getName().endsWith(".xml"));
         if (files == null) {
@@ -138,10 +138,10 @@ public final class RouteCoverageHelper {
 
         // only calculate for elements within the route or children of policy/transaction
         if (!"route".equals(key) && !"policy".equals(key) && !"transacted".equals(key)) {
-            Integer count = 0;
+            int count = 0;
             Node total = node.getAttributes().getNamedItem("exchangesTotal");
             if (total != null) {
-                count = Integer.valueOf(total.getNodeValue());
+                count = Integer.parseInt(total.getNodeValue());
             }
             CoverageData holder = data.size() > counter.get() ? data.get(counter.get()) : null;
             if (holder != null && holder.getNode().equals(key)) {