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 16:49:14 UTC
[camel] 02/02: (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 camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 78055afd0efeea6fe7e45db3f75ef3969605a643
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 353b8fc08cf..1191772a1aa 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
@@ -1812,6 +1812,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();