GH-3132: Remove usage of super();
Fixes https://github.com/spring-projects/spring-integration/issues/3132 It turns out that Checkstyle EmptyBlock doesn't complain about empty default ctor. Plus a new check for `super();` call treats it as a violation * Remove `super();` from all the no-arg ctors * Code style clean up in the affected classes according IDEA suggestions * Fix new Sonar smells
This commit is contained in:
committed by
Gary Russell
parent
9c68ae4a7d
commit
5ac262f866
@@ -91,22 +91,22 @@ public abstract class AbstractStompSessionManager implements StompSessionManager
|
||||
|
||||
private ApplicationEventPublisher applicationEventPublisher;
|
||||
|
||||
private volatile StompHeaders connectHeaders;
|
||||
private StompHeaders connectHeaders;
|
||||
|
||||
private volatile ListenableFuture<StompSession> stompSessionListenableFuture;
|
||||
private boolean autoReceipt;
|
||||
|
||||
private volatile boolean autoReceipt;
|
||||
private long recoveryInterval = DEFAULT_RECOVERY_INTERVAL;
|
||||
|
||||
private String name;
|
||||
|
||||
private volatile boolean connecting;
|
||||
|
||||
private volatile boolean connected;
|
||||
|
||||
private volatile long recoveryInterval = DEFAULT_RECOVERY_INTERVAL;
|
||||
private volatile ListenableFuture<StompSession> stompSessionListenableFuture;
|
||||
|
||||
private volatile ScheduledFuture<?> reconnectFuture;
|
||||
|
||||
private String name;
|
||||
|
||||
public AbstractStompSessionManager(StompClientSupport stompClient) {
|
||||
Assert.notNull(stompClient, "'stompClient' is required.");
|
||||
this.stompClient = stompClient;
|
||||
@@ -359,7 +359,6 @@ public abstract class AbstractStompSessionManager implements StompSessionManager
|
||||
private volatile StompSession session;
|
||||
|
||||
CompositeStompSessionHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
void addHandler(StompSessionHandler delegate) {
|
||||
|
||||
@@ -87,7 +87,7 @@ public class StompMessageHandler extends AbstractMessageHandler implements Appli
|
||||
|
||||
public void setDestination(String destination) {
|
||||
Assert.hasText(destination, "'destination' must not be empty.");
|
||||
this.destinationExpression = new ValueExpression<String>(destination);
|
||||
this.destinationExpression = new ValueExpression<>(destination);
|
||||
}
|
||||
|
||||
public void setDestinationExpression(Expression destinationExpression) {
|
||||
@@ -142,9 +142,9 @@ public class StompMessageHandler extends AbstractMessageHandler implements Appli
|
||||
StompHeaders stompHeaders = new StompHeaders();
|
||||
this.headerMapper.fromHeaders(message.getHeaders(), stompHeaders);
|
||||
if (stompHeaders.getDestination() == null) {
|
||||
Assert.state(this.destinationExpression != null, "One of 'destination' or 'destinationExpression' must " +
|
||||
"be" +
|
||||
" provided, if message header doesn't supply 'destination' STOMP header.");
|
||||
Assert.state(this.destinationExpression != null,
|
||||
"One of 'destination' or 'destinationExpression' must be provided, " +
|
||||
"if message header doesn't supply 'destination' STOMP header.");
|
||||
String destination = this.destinationExpression.getValue(this.evaluationContext, message, String.class);
|
||||
stompHeaders.setDestination(destination);
|
||||
}
|
||||
@@ -219,7 +219,6 @@ public class StompMessageHandler extends AbstractMessageHandler implements Appli
|
||||
private class IntegrationOutboundStompSessionHandler extends StompSessionHandlerAdapter {
|
||||
|
||||
IntegrationOutboundStompSessionHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user