Fix Sonar Issues

This commit is contained in:
Gary Russell
2021-07-17 08:49:07 -04:00
parent 4d2b9b8172
commit e9a21680b3
2 changed files with 5 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ import com.rabbitmq.client.Channel;
*/
public final class ConnectionFactoryUtils {
private static final ThreadLocal<AfterCompletionFailedException> failures = new ThreadLocal<>();
private static final ThreadLocal<AfterCompletionFailedException> COMPLETION_EXCEPTIONS = new ThreadLocal<>();
private static boolean captureAfterCompletionExceptions;
@@ -193,7 +193,7 @@ public final class ConnectionFactoryUtils {
private static void completionFailed(AfterCompletionFailedException ex) {
if (captureAfterCompletionExceptions) {
failures.set(ex);
COMPLETION_EXCEPTIONS.set(ex);
}
}
@@ -215,9 +215,9 @@ public final class ConnectionFactoryUtils {
* @since 2.3.10
*/
public static void checkAfterCompletion() {
AfterCompletionFailedException ex = failures.get();
AfterCompletionFailedException ex = COMPLETION_EXCEPTIONS.get();
if (ex != null) {
failures.remove();
COMPLETION_EXCEPTIONS.remove();
throw ex;
}
}

View File

@@ -143,7 +143,7 @@ public class MessagingMessageListenerAdapter extends AbstractAdaptableMessageLis
catch (ListenerExecutionFailedException ex) {
handleException(amqpMessage, channel, message, ex);
}
catch (ReplyFailureException ex) {
catch (ReplyFailureException ex) { // NOSONAR
throw ex;
}
catch (Exception ex) { // NOSONAR