Skip to content

Commit

Permalink
GH-1382: Sonar Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Oct 31, 2022
1 parent 79808a8 commit 8a47862
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -110,7 +110,9 @@ public RepublishMessageRecoverer(AmqpTemplate errorTemplate, String errorExchang
* @param errorExchange the exchange.
* @param errorRoutingKey the routing key.
*/
public RepublishMessageRecoverer(AmqpTemplate errorTemplate, String errorExchange, String errorRoutingKey) {
public RepublishMessageRecoverer(AmqpTemplate errorTemplate, @Nullable String errorExchange,
@Nullable String errorRoutingKey) {

this(errorTemplate, new LiteralExpression(errorExchange), new LiteralExpression(errorRoutingKey));
}

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

Assert.notNull(errorTemplate, "'errorTemplate' cannot be null");
this.errorTemplate = errorTemplate;
this.errorExchangeNameExpression = errorExchange != null ? errorExchange : new LiteralExpression(null);
this.errorRoutingKeyExpression = errorRoutingKey != null ? errorRoutingKey : new LiteralExpression(null);
this.errorExchangeNameExpression = errorExchange != null ? errorExchange : new LiteralExpression(null); // NOSONAR
this.errorRoutingKeyExpression = errorRoutingKey != null ? errorRoutingKey : new LiteralExpression(null); // NOSONAR
if (!(this.errorTemplate instanceof RabbitTemplate)) {
this.maxStackTraceLength = Integer.MAX_VALUE;
}
Expand Down

0 comments on commit 8a47862

Please sign in to comment.