Skip to content

Commit e9a2168

Browse files
committed
Fix Sonar Issues
1 parent 4d2b9b8 commit e9a2168

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/ConnectionFactoryUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444
public final class ConnectionFactoryUtils {
4545

46-
private static final ThreadLocal<AfterCompletionFailedException> failures = new ThreadLocal<>();
46+
private static final ThreadLocal<AfterCompletionFailedException> COMPLETION_EXCEPTIONS = new ThreadLocal<>();
4747

4848
private static boolean captureAfterCompletionExceptions;
4949

@@ -193,7 +193,7 @@ public static RabbitResourceHolder bindResourceToTransaction(RabbitResourceHolde
193193

194194
private static void completionFailed(AfterCompletionFailedException ex) {
195195
if (captureAfterCompletionExceptions) {
196-
failures.set(ex);
196+
COMPLETION_EXCEPTIONS.set(ex);
197197
}
198198
}
199199

@@ -215,9 +215,9 @@ public static void enableAfterCompletionFailureCapture(boolean enable) {
215215
* @since 2.3.10
216216
*/
217217
public static void checkAfterCompletion() {
218-
AfterCompletionFailedException ex = failures.get();
218+
AfterCompletionFailedException ex = COMPLETION_EXCEPTIONS.get();
219219
if (ex != null) {
220-
failures.remove();
220+
COMPLETION_EXCEPTIONS.remove();
221221
throw ex;
222222
}
223223
}

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/adapter/MessagingMessageListenerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void onMessage(org.springframework.amqp.core.Message amqpMessage, Channel
143143
catch (ListenerExecutionFailedException ex) {
144144
handleException(amqpMessage, channel, message, ex);
145145
}
146-
catch (ReplyFailureException ex) {
146+
catch (ReplyFailureException ex) { // NOSONAR
147147
throw ex;
148148
}
149149
catch (Exception ex) { // NOSONAR

0 commit comments

Comments
 (0)