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 2023/08/07 10:05:25 UTC

[camel] branch main updated: (chores) camel-mock: avoid costly boxing/unboxing operations for integer operations (#11020)

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


The following commit(s) were added to refs/heads/main by this push:
     new 15d731a2081 (chores) camel-mock: avoid costly boxing/unboxing operations for integer operations (#11020)
15d731a2081 is described below

commit 15d731a20814bbeaa7360d8f9a4ecfd2b5a82fd5
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Mon Aug 7 12:05:14 2023 +0200

    (chores) camel-mock: avoid costly boxing/unboxing operations for integer operations (#11020)
---
 .../main/java/org/apache/camel/component/mock/MockEndpoint.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index 44d11ef3f18..533a05a51d5 100644
--- a/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/components/camel-mock/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -1795,6 +1795,14 @@ public class MockEndpoint extends DefaultEndpoint implements BrowsableEndpoint,
         }
     }
 
+    protected void assertEquals(String message, int expectedValue, int actualValue) {
+        if (expectedValue != actualValue) {
+            logReceivedExchanges();
+
+            fail(message + ". Expected: <" + expectedValue + "> but was: <" + actualValue + ">");
+        }
+    }
+
     protected void assertEquals(String message, Object expectedValue, Object actualValue) {
         if (!ObjectHelper.equal(expectedValue, actualValue)) {
             logReceivedExchanges();