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 2020/02/01 11:02:07 UTC
[camel] 01/03: Polished
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3cd57ef7b7ffdd2949f36c7dd0b760709861a772
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Feb 1 10:58:03 2020 +0100
Polished
---
.../camel/processor/errorhandler/RedeliveryErrorHandler.java | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/core/camel-base/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java b/core/camel-base/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java
index 3863d4c..bd1bf11 100644
--- a/core/camel-base/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java
+++ b/core/camel-base/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java
@@ -347,11 +347,10 @@ public abstract class RedeliveryErrorHandler extends ErrorHandlerSupport impleme
* Simple task to perform calling the processor with no redelivery support
*/
protected class SimpleTask implements Runnable {
- private ExtendedExchange exchange;
- private AsyncCallback callback;
+ private final ExtendedExchange exchange;
+ private final AsyncCallback callback;
public SimpleTask(Exchange exchange, AsyncCallback callback) {
- // init with values from the error handler
this.exchange = (ExtendedExchange) exchange;
this.callback = callback;
}
@@ -565,9 +564,9 @@ public abstract class RedeliveryErrorHandler extends ErrorHandlerSupport impleme
* Task to perform calling the processor and handling redelivery if it fails (more advanced than ProcessTask)
*/
protected class RedeliveryTask implements Runnable {
- private Exchange original;
- private ExtendedExchange exchange;
- private AsyncCallback callback;
+ private final Exchange original;
+ private final ExtendedExchange exchange;
+ private final AsyncCallback callback;
private int redeliveryCounter;
private long redeliveryDelay;
private Predicate retryWhilePredicate;
@@ -583,7 +582,6 @@ public abstract class RedeliveryErrorHandler extends ErrorHandlerSupport impleme
private boolean useOriginalInBody;
public RedeliveryTask(Exchange exchange, AsyncCallback callback) {
- // init with values from the error handler
this.retryWhilePredicate = retryWhilePolicy;
this.currentRedeliveryPolicy = redeliveryPolicy;
this.handledPredicate = getDefaultHandledPredicate();