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 066b0ed9843084d3aa6b0c31ef5ce688b71877ae
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Wed May 22 13:09:52 2024 +0200

    CAMEL-20785: avoid reusing variables
---
 .../main/java/org/apache/camel/test/junit5/CamelTestSupport.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
index 54c014c1537..ed1143855c1 100644
--- 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
+++ 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
@@ -524,15 +524,15 @@ public abstract class CamelTestSupport
     }
 
     private void enableAutoMocking() {
-        String pattern = isMockEndpoints();
+        final String pattern = isMockEndpoints();
         if (pattern != null) {
             context.getCamelContextExtension()
                     .registerEndpointCallback(new 
InterceptSendToMockEndpointStrategy(pattern));
         }
-        pattern = isMockEndpointsAndSkip();
-        if (pattern != null) {
+        final String mockAndSkipPattern = isMockEndpointsAndSkip();
+        if (mockAndSkipPattern != null) {
             context.getCamelContextExtension()
-                    .registerEndpointCallback(new 
InterceptSendToMockEndpointStrategy(pattern, true));
+                    .registerEndpointCallback(new 
InterceptSendToMockEndpointStrategy(mockAndSkipPattern, true));
         }
     }
 

Reply via email to