Skip to content

Commit 64e9f13

Browse files
committed
GH-1382: Sonar Issues
1 parent ddc32a3 commit 64e9f13

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/RepublishMessageRecoverer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ public RepublishMessageRecoverer(AmqpTemplate errorTemplate, String errorExchang
110110
* @param errorExchange the exchange.
111111
* @param errorRoutingKey the routing key.
112112
*/
113-
public RepublishMessageRecoverer(AmqpTemplate errorTemplate, String errorExchange, String errorRoutingKey) {
113+
public RepublishMessageRecoverer(AmqpTemplate errorTemplate, @Nullable String errorExchange,
114+
@Nullable String errorRoutingKey) {
115+
114116
this(errorTemplate, new LiteralExpression(errorExchange), new LiteralExpression(errorRoutingKey));
115117
}
116118

@@ -126,8 +128,8 @@ public RepublishMessageRecoverer(AmqpTemplate errorTemplate, @Nullable Expressio
126128

127129
Assert.notNull(errorTemplate, "'errorTemplate' cannot be null");
128130
this.errorTemplate = errorTemplate;
129-
this.errorExchangeNameExpression = errorExchange != null ? errorExchange : new LiteralExpression(null);
130-
this.errorRoutingKeyExpression = errorRoutingKey != null ? errorRoutingKey : new LiteralExpression(null);
131+
this.errorExchangeNameExpression = errorExchange != null ? errorExchange : new LiteralExpression(null); // NOSONAR
132+
this.errorRoutingKeyExpression = errorRoutingKey != null ? errorRoutingKey : new LiteralExpression(null); // NOSONAR
131133
if (!(this.errorTemplate instanceof RabbitTemplate)) {
132134
this.maxStackTraceLength = Integer.MAX_VALUE;
133135
}

0 commit comments

Comments
 (0)