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 d4626e9d9c8 (chores) performance: use native array copying which may 
benefit from intrinsic functions
d4626e9d9c8 is described below

commit d4626e9d9c82c490bf8a49e09c34b6d54492824a
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Wed Apr 26 19:38:05 2023 +0200

    (chores) performance: use native array copying which may benefit from 
intrinsic functions
---
 .../src/main/java/org/apache/camel/support/AbstractExchange.java   | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/AbstractExchange.java
 
b/core/camel-support/src/main/java/org/apache/camel/support/AbstractExchange.java
index 0336f57e462..d125612d4c1 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/AbstractExchange.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/AbstractExchange.java
@@ -689,12 +689,7 @@ class AbstractExchange implements Exchange {
 
     void copyInternalProperties(Exchange target) {
         AbstractExchange ae = (AbstractExchange) target;
-        for (int i = 0; i < internalProperties.length; i++) {
-            Object value = internalProperties[i];
-            if (value != null) {
-                ae.internalProperties[i] = value;
-            }
-        }
+        System.arraycopy(internalProperties, 0, ae.internalProperties, 0, 
INTERNAL_LENGTH);
     }
 
     Map<String, Object> getInternalProperties() {

Reply via email to