You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/04/18 10:10:22 UTC
(camel) 01/02: CAMEL-20685: Tidy up code a little bit
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch trydebug
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 756ebadb1ee46aa8d90d5b460f8ec34c9a0b4bd6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Apr 18 08:41:26 2024 +0200
CAMEL-20685: Tidy up code a little bit
---
.../src/main/java/org/apache/camel/processor/TryProcessor.java | 2 +-
.../src/main/java/org/apache/camel/management/mbean/ManagedDoTry.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/TryProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/TryProcessor.java
index 8db60f2cfcc..8dd9bd9aefc 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/TryProcessor.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/TryProcessor.java
@@ -160,7 +160,7 @@ public class TryProcessor extends AsyncProcessorSupport implements Navigate<Proc
if (tryProcessor != null) {
answer.add(tryProcessor);
}
- if (catchClauses != null) {
+ if (catchClauses != null && !catchClauses.isEmpty()) {
answer.addAll(catchClauses);
}
if (finallyProcessor != null) {
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDoTry.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDoTry.java
index c05e7b856d0..f126eff9cea 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDoTry.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedDoTry.java
@@ -48,7 +48,7 @@ public class ManagedDoTry extends ManagedProcessor implements ManagedDoTryMBean
super(context, processor, definition);
this.processor = processor;
- if (processor.getCatchClauses() != null) {
+ if (processor.getCatchClauses() != null && !processor.getCatchClauses().isEmpty()) {
catchProcessors = new ArrayList<>();
for (Processor p : processor.getCatchClauses()) {
Channel c = (Channel) p;