You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/04 12:25:58 UTC

[camel] 01/07: (chores) camel-report-maven-plugin: apply required cast for intermediate variables

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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4f2de37369c6f0da56022c4d16d865aae3b949bc
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Oct 4 11:33:23 2022 +0200

    (chores) camel-report-maven-plugin: apply required cast for intermediate variables
    
    Among other things, it should prevent overflows
---
 .../src/main/java/org/apache/camel/maven/ValidateMojo.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
index b465fe14e5e..6a32352a996 100644
--- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
+++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java
@@ -457,7 +457,7 @@ public class ValidateMojo extends AbstractExecMojo {
         int sedaDirectErrors = 0;
         String sedaDirectSummary = "";
         if (directOrSedaPairCheck) {
-            long sedaDirectEndpoints = countEndpointPairs(endpoints, "direct") + countEndpointPairs(endpoints, "seda");
+            long sedaDirectEndpoints = (long) countEndpointPairs(endpoints, "direct") + (long) countEndpointPairs(endpoints, "seda");
             sedaDirectErrors += validateEndpointPairs(endpoints, "direct") + validateEndpointPairs(endpoints, "seda");
             if (sedaDirectErrors == 0) {
                 sedaDirectSummary = String.format("Endpoint pair (seda/direct) validation success: (%s = pairs)", sedaDirectEndpoints);