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:
Artem Bilan
2019-12-27 13:04:10 -05:00
committed by Gary Russell
parent 9c68ae4a7d
commit 5ac262f866
127 changed files with 386 additions and 490 deletions

View File

@@ -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;
}

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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() {

View File

@@ -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) {