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
@@ -78,7 +78,6 @@ public final class HeaderMatcher<T> extends TypeSafeMatcher<Message<T>> {
|
||||
* @param matcher the target matcher to delegate
|
||||
*/
|
||||
private HeaderMatcher(Matcher<?> matcher) {
|
||||
super();
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ import org.springframework.messaging.Message;
|
||||
public final class MockitoMessageMatchers {
|
||||
|
||||
private MockitoMessageMatchers() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static <T> Message<?> messageWithPayload(Matcher<? super T> payloadMatcher) {
|
||||
|
||||
@@ -68,7 +68,6 @@ public final class PayloadMatcher<T> extends TypeSafeMatcher<Message<?>> {
|
||||
* Create a PayloadMatcher that matches the payload of messages against the given matcher
|
||||
*/
|
||||
private PayloadMatcher(Matcher<T> matcher) {
|
||||
super();
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,7 @@ public class OnlyOnceTrigger implements Trigger {
|
||||
|
||||
|
||||
public OnlyOnceTrigger() {
|
||||
super();
|
||||
executionTime = new Date();
|
||||
this.executionTime = new Date();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,8 +60,7 @@ public class OnlyOnceTrigger implements Trigger {
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((executionTime == null) ? 0 : executionTime.hashCode());
|
||||
result = prime * result + this.executionTime.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -78,15 +76,7 @@ public class OnlyOnceTrigger implements Trigger {
|
||||
return false;
|
||||
}
|
||||
OnlyOnceTrigger other = (OnlyOnceTrigger) obj;
|
||||
if (executionTime == null) {
|
||||
if (other.executionTime != null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!executionTime.equals(other.executionTime)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return this.executionTime.equals(other.executionTime);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
||||
@@ -162,7 +162,6 @@ public abstract class TestUtils {
|
||||
public static class TestApplicationContext extends GenericApplicationContext {
|
||||
|
||||
TestApplicationContext() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void registerChannel(@Nullable String channelNameArg, final MessageChannel channel) {
|
||||
|
||||
Reference in New Issue
Block a user