From 8a44d4da0b09bfc4307869465d771bafab61ba99 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Fri, 2 May 2014 12:18:56 -0400 Subject: [PATCH] INT-3399 Update spring-retry to 1.1.0 JIRA: https://jira.spring.io/browse/INT-3399 Fix `MessagingTemplate` javadoc warn --- build.gradle | 2 +- .../integration/core/MessagingTemplate.java | 1 + .../handler/advice/RequestHandlerRetryAdvice.java | 13 +++++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 7d642f1a5c..3d203d0fd6 100644 --- a/build.gradle +++ b/build.gradle @@ -104,7 +104,7 @@ subprojects { subproject -> springGemfireVersion = '1.3.4.RELEASE' springSecurityVersion = '3.2.3.RELEASE' springSocialTwitterVersion = '1.1.0.RELEASE' - springRetryVersion = '1.0.3.RELEASE' + springRetryVersion = '1.1.0.RELEASE' springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.0.3.RELEASE' springWsVersion = '2.1.4.RELEASE' xmlUnitVersion = '1.5' diff --git a/spring-integration-core/src/main/java/org/springframework/integration/core/MessagingTemplate.java b/spring-integration-core/src/main/java/org/springframework/integration/core/MessagingTemplate.java index 041a5de88b..f287e03394 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/core/MessagingTemplate.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/core/MessagingTemplate.java @@ -44,6 +44,7 @@ public class MessagingTemplate extends GenericMessagingTemplate { /** * Create a MessagingTemplate with the given default channel. + * @param defaultChannel the default {@link MessageChannel} for {@code send} operations */ public MessagingTemplate(MessageChannel defaultChannel) { this.setDefaultChannel(defaultChannel); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/RequestHandlerRetryAdvice.java b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/RequestHandlerRetryAdvice.java index 68e1258725..5e2e80ce68 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/RequestHandlerRetryAdvice.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/handler/advice/RequestHandlerRetryAdvice.java @@ -49,6 +49,7 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice // Stateless unless a state generator is provided private volatile RetryStateGenerator retryStateGenerator = new RetryStateGenerator() { + @Override public RetryState determineRetryState(Message message) { return null; } @@ -81,7 +82,8 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice messageHolder.set(message); try { - return retryTemplate.execute(new RetryCallback() { + return retryTemplate.execute(new RetryCallback() { + @Override public Object doWithRetry(RetryContext context) throws Exception { return callback.cloneAndExecute(); } @@ -102,15 +104,18 @@ public class RequestHandlerRetryAdvice extends AbstractRequestHandlerAdvice } } - public boolean open(RetryContext context, RetryCallback callback) { + @Override + public boolean open(RetryContext context, RetryCallback callback) { context.setAttribute("message", messageHolder.get()); return true; } - public void close(RetryContext context, RetryCallback callback, Throwable throwable) { + @Override + public void close(RetryContext context, RetryCallback callback, Throwable throwable) { } - public void onError(RetryContext context, RetryCallback callback, Throwable throwable) { + @Override + public void onError(RetryContext context, RetryCallback callback, Throwable throwable) { } }