Skip to content

Commit

Permalink
Fix new Sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Mar 29, 2019
1 parent 389efc3 commit 9224d34
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
public class RabbitAdmin implements AmqpAdmin, ApplicationContextAware, ApplicationEventPublisherAware,
BeanNameAware, InitializingBean {

private static final String UNUSED = "unused";

private static final int DECLARE_MAX_ATTEMPTS = 5;

private static final int DECLARE_INITIAL_RETRY_INTERVAL = 1000;
Expand Down Expand Up @@ -250,7 +252,7 @@ public boolean deleteExchange(final String exchangeName) {
try {
channel.exchangeDelete(exchangeName);
}
catch (@SuppressWarnings("unused") IOException e) {
catch (@SuppressWarnings(UNUSED) IOException e) {
return false;
}
return true;
Expand Down Expand Up @@ -315,7 +317,7 @@ public boolean deleteQueue(final String queueName) {
try {
channel.queueDelete(queueName);
}
catch (@SuppressWarnings("unused") IOException e) {
catch (@SuppressWarnings(UNUSED) IOException e) {
return false;
}
return true;
Expand Down Expand Up @@ -431,11 +433,11 @@ public QueueInformation getQueueInfo(String queueName) {
((ChannelProxy) channel).getTargetChannel().close();
}
}
catch (@SuppressWarnings("unused") TimeoutException e1) {
catch (@SuppressWarnings(UNUSED) TimeoutException e1) {
}
return null;
}
catch (@SuppressWarnings("unused") Exception e) {
catch (@SuppressWarnings(UNUSED) Exception e) {
if (RabbitAdmin.this.logger.isDebugEnabled()) {
RabbitAdmin.this.logger.debug("Queue '" + queueName + "' does not exist");
}
Expand Down

0 comments on commit 9224d34

Please sign in to comment.