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

davsclaus 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 234e9b9  CAMEL-16534: camel-core - Multiple doTry ..doCatch in Java 
DSL - issue setting outer doCatch blocks
234e9b9 is described below

commit 234e9b946feee0ffa3bc4d679f32a260fc62b4f4
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Apr 21 09:16:02 2021 +0200

    CAMEL-16534: camel-core - Multiple doTry ..doCatch in Java DSL - issue 
setting outer doCatch blocks
---
 .../src/main/java/org/apache/camel/model/TryDefinition.java            | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/TryDefinition.java 
b/core/camel-core-model/src/main/java/org/apache/camel/model/TryDefinition.java
index 97bf952..d754b3d 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/TryDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/TryDefinition.java
@@ -50,7 +50,7 @@ public class TryDefinition extends 
OutputDefinition<TryDefinition> {
     @XmlTransient
     private List<ProcessorDefinition<?>> outputsWithoutCatches;
     @XmlTransient
-    protected int endCounter;
+    private int endCounter; // used for detecting multiple nested doTry blocks
 
     public TryDefinition() {
     }
@@ -187,6 +187,7 @@ public class TryDefinition extends 
OutputDefinition<TryDefinition> {
     @Override
     public void addOutput(ProcessorDefinition<?> output) {
         initialized = false;
+        // reset end counter as we are adding some outputs
         endCounter = 0;
         super.addOutput(output);
     }

Reply via email to