RequireThis rule and fixThis Gradle task
* `gradlew clean check -x test --parallel --continue` - to collect reports * `gradlew fixThis --parallel` - to fix all possible vulnerabilities. With `-Dfile.encoding=UTF-8` on Windows Since the `RequireThisCheck` doesn't see parents for anonymous classes (e.g. `Runnable` callback), its report doesn't contains the outer class name with `this.`, therefore we still have to fix those cases manually. Thanks to the wrong `replacer` just with `this.` we have uncompilable code enough easy to find problems. Not so easy to fix for good readability though... * Upgrade to Grade 2.12 * Upgrade to SonarQube native plugin The fix contains at about 300 files. So, will be done on merge. Fix `fixThis.gradle` according PR comments Apply `fixThis` and also `fixModifiers` for test classes. Fix some `this.` inner issues manually. Make code polishing for long lines after `fixThis` Fix conflicts and vulnerabilities after the rebase
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -315,7 +315,7 @@ public class ApplicationEventListeningMessageProducerTests {
|
||||
@SuppressWarnings("serial")
|
||||
private static class TestApplicationEvent1 extends ApplicationEvent {
|
||||
|
||||
public TestApplicationEvent1() {
|
||||
TestApplicationEvent1() {
|
||||
super("event1");
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ public class ApplicationEventListeningMessageProducerTests {
|
||||
@SuppressWarnings("serial")
|
||||
private static class TestApplicationEvent2 extends ApplicationEvent {
|
||||
|
||||
public TestApplicationEvent2() {
|
||||
TestApplicationEvent2() {
|
||||
super("event2");
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public class ApplicationEventListeningMessageProducerTests {
|
||||
@SuppressWarnings("serial")
|
||||
private static class TestMessagingEvent extends ApplicationEvent {
|
||||
|
||||
public TestMessagingEvent(Message<?> message) {
|
||||
TestMessagingEvent(Message<?> message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,7 +83,7 @@ public class ApplicationEventPublishingMessageHandlerTests {
|
||||
@SuppressWarnings("serial")
|
||||
private static class TestEvent extends ApplicationEvent {
|
||||
|
||||
public TestEvent(String text) {
|
||||
TestEvent(String text) {
|
||||
super(text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user