Skip to content

Commit 7750324

Browse files
committed
Remove this keyword on member method invocations
1 parent 555132e commit 7750324

File tree

45 files changed

+76
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+76
-76
lines changed

buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ private void addLibrary(Library library) {
107107
this.properties.put(library.getVersionProperty(), library.getVersion());
108108
for (Group group : library.getGroups()) {
109109
for (Module module : group.getModules()) {
110-
this.putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty());
110+
putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty());
111111
this.dependencyHandler.getConstraints().add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
112112
createDependencyNotation(group.getId(), module.getName(), library.getVersion()));
113113
}
114114
for (String bomImport : group.getBoms()) {
115-
this.putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty());
115+
putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty());
116116
String bomDependency = createDependencyNotation(group.getId(), bomImport, library.getVersion());
117117
this.dependencyHandler.add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
118118
this.dependencyHandler.platform(bomDependency));

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/UnstructuredDependencyVersion.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ private UnstructuredDependencyVersion(String version) {
3535

3636
@Override
3737
public boolean isNewerThan(DependencyVersion other) {
38-
return this.compareTo(other) > 0;
38+
return compareTo(other) > 0;
3939
}
4040

4141
@Override
4242
public boolean isSameMajorAndNewerThan(DependencyVersion other) {
43-
return this.compareTo(other) > 0;
43+
return compareTo(other) > 0;
4444
}
4545

4646
@Override
4747
public boolean isSameMinorAndNewerThan(DependencyVersion other) {
48-
return this.compareTo(other) > 0;
48+
return compareTo(other) > 0;
4949
}
5050

5151
@Override

buildSrc/src/main/java/org/springframework/boot/build/test/IntegrationTestPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
4646

4747
@Override
4848
public void apply(Project project) {
49-
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> this.configureIntegrationTesting(project));
49+
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> configureIntegrationTesting(project));
5050
}
5151

5252
private void configureIntegrationTesting(Project project) {

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private WebOperation findMainReadOperation(ExposableWebEndpoint endpoint) {
7979
}
8080

8181
private void load(Class<?> configuration, Consumer<CloudFoundryWebEndpointDiscoverer> consumer) {
82-
this.load((id) -> null, EndpointId::toString, configuration, consumer);
82+
load((id) -> null, EndpointId::toString, configuration, consumer);
8383
}
8484

8585
private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration,

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ public FilterRegistrationMappingDescription(FilterRegistration filterRegistratio
4242
* @return the mappings
4343
*/
4444
public Collection<String> getServletNameMappings() {
45-
return this.getRegistration().getServletNameMappings();
45+
return getRegistration().getServletNameMappings();
4646
}
4747

4848
/**
4949
* Returns the URL pattern mappings for the registered filter.
5050
* @return the mappings
5151
*/
5252
public Collection<String> getUrlPatternMappings() {
53-
return this.getRegistration().getUrlPatternMappings();
53+
return getRegistration().getUrlPatternMappings();
5454
}
5555

5656
}

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void getEndpointsWhenHasCustomPathShouldReturnCustomPath() {
217217
}
218218

219219
private void load(Class<?> configuration, Consumer<WebEndpointDiscoverer> consumer) {
220-
this.load((id) -> null, EndpointId::toString, configuration, consumer);
220+
load((id) -> null, EndpointId::toString, configuration, consumer);
221221
}
222222

223223
private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration,

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private void configure(Builder builder) {
145145
if (this.username != null && this.password != null) {
146146
builder.credentials(this.username, this.password);
147147
}
148-
builder.autoIndex(this.getAutoIndex().getName());
148+
builder.autoIndex(getAutoIndex().getName());
149149
if (this.useNativeTypes) {
150150
builder.useNativeTypes();
151151
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void logAutoConfigurationReport(boolean isCrashReport) {
113113
this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory());
114114
}
115115
if (!this.report.getConditionAndOutcomesBySource().isEmpty()) {
116-
if (this.getLogLevelForReport().equals(LogLevel.INFO)) {
116+
if (getLogLevelForReport().equals(LogLevel.INFO)) {
117117
if (this.logger.isInfoEnabled()) {
118118
this.logger.info(new ConditionEvaluationReportMessage(this.report));
119119
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Map<String, Registration> getRegistration() {
5757

5858
@PostConstruct
5959
public void validate() {
60-
this.getRegistration().values().forEach(this::validateRegistration);
60+
getRegistration().values().forEach(this::validateRegistration);
6161
}
6262

6363
private void validateRegistration(Registration registration) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -424,23 +424,23 @@ public static class Tomcat {
424424
@Deprecated
425425
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.max")
426426
public int getMaxThreads() {
427-
return this.getThreads().getMax();
427+
return getThreads().getMax();
428428
}
429429

430430
@Deprecated
431431
public void setMaxThreads(int maxThreads) {
432-
this.getThreads().setMax(maxThreads);
432+
getThreads().setMax(maxThreads);
433433
}
434434

435435
@Deprecated
436436
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.min-spare")
437437
public int getMinSpareThreads() {
438-
return this.getThreads().getMinSpare();
438+
return getThreads().getMinSpare();
439439
}
440440

441441
@Deprecated
442442
public void setMinSpareThreads(int minSpareThreads) {
443-
this.getThreads().setMinSpare(minSpareThreads);
443+
getThreads().setMinSpare(minSpareThreads);
444444
}
445445

446446
@Deprecated
@@ -1106,65 +1106,65 @@ public void setMaxHttpFormPostSize(DataSize maxHttpFormPostSize) {
11061106
@Deprecated
11071107
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors")
11081108
public Integer getAcceptors() {
1109-
return this.getThreads().getAcceptors();
1109+
return getThreads().getAcceptors();
11101110
}
11111111

11121112
public void setAcceptors(Integer acceptors) {
1113-
this.getThreads().setAcceptors(acceptors);
1113+
getThreads().setAcceptors(acceptors);
11141114
}
11151115

11161116
@Deprecated
11171117
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.selectors")
11181118
public Integer getSelectors() {
1119-
return this.getThreads().getSelectors();
1119+
return getThreads().getSelectors();
11201120
}
11211121

11221122
public void setSelectors(Integer selectors) {
1123-
this.getThreads().setSelectors(selectors);
1123+
getThreads().setSelectors(selectors);
11241124
}
11251125

11261126
@Deprecated
11271127
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.min")
11281128
public Integer getMinThreads() {
1129-
return this.getThreads().getMin();
1129+
return getThreads().getMin();
11301130
}
11311131

11321132
@Deprecated
11331133
public void setMinThreads(Integer minThreads) {
1134-
this.getThreads().setMin(minThreads);
1134+
getThreads().setMin(minThreads);
11351135
}
11361136

11371137
@Deprecated
11381138
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max")
11391139
public Integer getMaxThreads() {
1140-
return this.getThreads().getMax();
1140+
return getThreads().getMax();
11411141
}
11421142

11431143
@Deprecated
11441144
public void setMaxThreads(Integer maxThreads) {
1145-
this.getThreads().setMax(maxThreads);
1145+
getThreads().setMax(maxThreads);
11461146
}
11471147

11481148
@Deprecated
11491149
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max-queue-capacity")
11501150
public Integer getMaxQueueCapacity() {
1151-
return this.getThreads().getMaxQueueCapacity();
1151+
return getThreads().getMaxQueueCapacity();
11521152
}
11531153

11541154
@Deprecated
11551155
public void setMaxQueueCapacity(Integer maxQueueCapacity) {
1156-
this.getThreads().setMaxQueueCapacity(maxQueueCapacity);
1156+
getThreads().setMaxQueueCapacity(maxQueueCapacity);
11571157
}
11581158

11591159
@Deprecated
11601160
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.idle-timeout")
11611161
public Duration getThreadIdleTimeout() {
1162-
return this.getThreads().getIdleTimeout();
1162+
return getThreads().getIdleTimeout();
11631163
}
11641164

11651165
@Deprecated
11661166
public void setThreadIdleTimeout(Duration threadIdleTimeout) {
1167-
this.getThreads().setIdleTimeout(threadIdleTimeout);
1167+
getThreads().setIdleTimeout(threadIdleTimeout);
11681168
}
11691169

11701170
public Duration getConnectionIdleTimeout() {
@@ -1520,23 +1520,23 @@ public void setBufferSize(DataSize bufferSize) {
15201520
@Deprecated
15211521
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.io")
15221522
public Integer getIoThreads() {
1523-
return this.getThreads().getIo();
1523+
return getThreads().getIo();
15241524
}
15251525

15261526
@Deprecated
15271527
public void setIoThreads(Integer ioThreads) {
1528-
this.getThreads().setIo(ioThreads);
1528+
getThreads().setIo(ioThreads);
15291529
}
15301530

15311531
@Deprecated
15321532
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.worker")
15331533
public Integer getWorkerThreads() {
1534-
return this.getThreads().getWorker();
1534+
return getThreads().getWorker();
15351535
}
15361536

15371537
@Deprecated
15381538
public void setWorkerThreads(Integer workerThreads) {
1539-
this.getThreads().setWorker(workerThreads);
1539+
getThreads().setWorker(workerThreads);
15401540
}
15411541

15421542
public Boolean getDirectBuffers() {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private List<ErrorViewResolver> sortErrorViewResolvers(List<ErrorViewResolver> r
7878
*/
7979
@Deprecated
8080
protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace) {
81-
return this.getErrorAttributes(request, includeStackTrace, false);
81+
return getErrorAttributes(request, includeStackTrace, false);
8282
}
8383

8484
protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace,

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void expectedSendGridBeanWithProxyCreated() {
7979
}
8080

8181
private void loadContext(String... environment) {
82-
this.loadContext(null, environment);
82+
loadContext(null, environment);
8383
}
8484

8585
private void loadContext(Class<?> additionalConfiguration, String... environment) {

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public String getUsageHelp() {
5555
}
5656

5757
public void stop() {
58-
if (this.getHandler() != null) {
59-
((RunOptionHandler) this.getHandler()).stop();
58+
if (getHandler() != null) {
59+
((RunOptionHandler) getHandler()).stop();
6060
}
6161
}
6262

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public Map<String, Map<String, List<String>>> enumerateGrapes() {
266266

267267
@Override
268268
public URI[] resolve(Map args, Map... dependencyMaps) {
269-
return this.resolve(args, null, dependencyMaps);
269+
return resolve(args, null, dependencyMaps);
270270
}
271271

272272
@Override

spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void dependencyResolutionWithCustomClassLoader() {
139139
@Test
140140
void resolutionWithCustomResolver() {
141141
Map<String, Object> args = new HashMap<>();
142-
AetherGrapeEngine grapeEngine = this.createGrapeEngine();
142+
AetherGrapeEngine grapeEngine = createGrapeEngine();
143143
grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release"));
144144
Map<String, Object> dependency = createDependency("io.spring.docresources", "spring-doc-resources",
145145
"0.1.1.RELEASE");

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ protected ConfigurableApplicationContext getContext(Supplier<ConfigurableApplica
101101
}
102102

103103
protected final ConfigurableApplicationContext createContext(Class<?>... classes) {
104-
return this.createContext(null, classes);
104+
return createContext(null, classes);
105105
}
106106

107107
protected final ConfigurableApplicationContext createContext(String driverClassName, Class<?>... classes) {
108-
return this.createContext(driverClassName, null, classes);
108+
return createContext(driverClassName, null, classes);
109109
}
110110

111111
protected final ConfigurableApplicationContext createContext(String driverClassName, String url,

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/BasicJsonTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public BasicJsonTester(Class<?> resourceLoadClass, Charset charset) {
8181
* resources
8282
*/
8383
protected final void initialize(Class<?> resourceLoadClass) {
84-
this.initialize(resourceLoadClass, null);
84+
initialize(resourceLoadClass, null);
8585
}
8686

8787
/**

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JacksonTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static void initFields(Object testInstance, ObjectFactory<ObjectMapper> o
165165
* @return the new instance
166166
*/
167167
public JacksonTester<T> forView(Class<?> view) {
168-
return new JacksonTester<>(this.getResourceLoadClass(), this.getType(), this.objectMapper, view);
168+
return new JacksonTester<>(getResourceLoadClass(), getType(), this.objectMapper, view);
169169
}
170170

171171
/**

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <T> T createSpy(String name, Object instance) {
9797
}
9898
settings.spiedInstance(instance);
9999
settings.defaultAnswer(Mockito.CALLS_REAL_METHODS);
100-
if (this.isProxyTargetAware()) {
100+
if (isProxyTargetAware()) {
101101
settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener());
102102
}
103103
return (T) mock(instance.getClass(), settings);

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public String toString() {
8080
* version
8181
*/
8282
boolean isEqualOrGreaterThan(LifecycleVersion other) {
83-
return this.compareTo(other) >= 0;
83+
return compareTo(other) >= 0;
8484
}
8585

8686
@Override

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/ErrorsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ErrorsTests extends AbstractJsonTests {
3434

3535
@Test
3636
void readValueDeserializesJson() throws Exception {
37-
Errors errors = this.getObjectMapper().readValue(getContent("errors.json"), Errors.class);
37+
Errors errors = getObjectMapper().readValue(getContent("errors.json"), Errors.class);
3838
Iterator<Error> iterator = errors.iterator();
3939
Error error1 = iterator.next();
4040
Error error2 = iterator.next();
@@ -47,7 +47,7 @@ void readValueDeserializesJson() throws Exception {
4747

4848
@Test
4949
void toStringHasErrorDetails() throws Exception {
50-
Errors errors = this.getObjectMapper().readValue(getContent("errors.json"), Errors.class);
50+
Errors errors = getObjectMapper().readValue(getContent("errors.json"), Errors.class);
5151
assertThat(errors.toString()).isEqualTo("[TEST1: Test One, TEST2: Test Two]");
5252
}
5353

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void setMainClassName(String mainClassName) {
7878
* artifact will be the base name of the {@code bootWar} or {@code bootJar} task.
7979
*/
8080
public void buildInfo() {
81-
this.buildInfo(null);
81+
buildInfo(null);
8282
}
8383

8484
/**

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void exec() {
7878
}
7979
if (System.console() != null) {
8080
// Record that the console is available here for AnsiOutput to detect later
81-
this.getEnvironment().put("spring.output.ansi.console-available", true);
81+
getEnvironment().put("spring.output.ansi.console-available", true);
8282
}
8383
super.exec();
8484
}

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/AbstractJarWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void writeManifest(Manifest manifest) throws IOException {
7676
* @throws IOException if the entries cannot be written
7777
*/
7878
public void writeEntries(JarFile jarFile) throws IOException {
79-
this.writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER);
79+
writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER);
8080
}
8181

8282
final void writeEntries(JarFile jarFile, EntryTransformer entryTransformer, UnpackHandler unpackHandler)

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void repackage(File destination, Libraries libraries) throws IOException
8484
* @since 1.3.0
8585
*/
8686
public void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException {
87-
this.repackage(destination, libraries, launchScript, null);
87+
repackage(destination, libraries, launchScript, null);
8888
}
8989

9090
/**

0 commit comments

Comments
 (0)