Sonar fixes

- a few complexities
- final method calls from ctor
- raw exception throwing
- useless overrides
- loss of stack trace
This commit is contained in:
Gary Russell
2019-04-29 16:34:39 -04:00
committed by Artem Bilan
parent 7569d0ad79
commit 36c33bb5ab
45 changed files with 134 additions and 114 deletions

View File

@@ -502,12 +502,12 @@ public class ChannelPublishingJmsMessageListener
}
@Override
protected void send(Object request) {
protected void send(Object request) { // NOSONAR - not useless, increases visibility
super.send(request);
}
@Override
protected Message<?> sendAndReceiveMessage(Object request) {
protected Message<?> sendAndReceiveMessage(Object request) { // NOSONAR - not useless, increases visibility
return super.sendAndReceiveMessage(request);
}

View File

@@ -1337,7 +1337,7 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
debugLogger.debug("No pending reply for " + siMessage + " with correlationId: "
+ correlnId + " pending replies: " + this.replies.keySet());
}
throw new RuntimeException("No sender waiting for reply");
throw new IllegalStateException("No sender waiting for reply");
}
synchronized (this.earlyOrLateReplies) {
queue = this.replies.get(correlnId);
@@ -1410,9 +1410,9 @@ public class JmsOutboundGateway extends AbstractReplyProducingMessageHandler imp
try {
Thread.sleep(100);
}
catch (@SuppressWarnings("unused") InterruptedException e) {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Container did not establish a destination");
throw new IllegalStateException("Container did not establish a destination", e);
}
}
if (this.replyDestination == null) {

View File

@@ -45,7 +45,7 @@ public abstract class JmsDestinationAccessorSpec<S extends JmsDestinationAccesso
}
@Override
public S id(String id) {
public S id(String id) { // NOSONAR - not useless, increases visibility
return super.id(id);
}