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

@@ -80,7 +80,7 @@ public class FailoverClientConnectionFactory extends AbstractClientConnectionFac
* the real listener supplied here, with the modified message.
*/
@Override
public void registerListener(TcpListener listener) {
public void registerListener(TcpListener listener) { // NOSONAR - not useless, custom Javadoc
super.registerListener(listener);
}

View File

@@ -138,7 +138,7 @@ public abstract class TcpConnectionSupport implements TcpConnection {
this.connectionFactoryName = connectionFactoryName;
}
if (this.logger.isDebugEnabled()) {
this.logger.debug("New connection " + this.getConnectionId());
this.logger.debug("New connection " + this.connectionId);
}
}

View File

@@ -358,9 +358,9 @@ public class TcpNioConnection extends TcpConnectionSupport {
throw new IOException("Timed out waiting for IO");
}
}
catch (@SuppressWarnings(UNUSED) InterruptedException e) {
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IOException("Interrupted waiting for IO");
throw new IOException("Interrupted waiting for IO", e);
}
}
Message<?> message = null;

View File

@@ -421,7 +421,7 @@ public class TcpNioSSLConnection extends TcpNioConnection {
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new MessagingException("Interrupted during SSL Handshaking");
throw new MessagingException("Interrupted during SSL Handshaking", e);
}
}