From 4e4a8680c85a44179eed46189c9fdb523365c0ab Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 18 Apr 2020 11:54:51 +0900 Subject: [PATCH] Remove this keyword on member method invocations --- .../boot/build/bom/BomExtension.java | 4 +- .../UnstructuredDependencyVersion.java | 6 +-- .../build/test/IntegrationTestPlugin.java | 2 +- ...loudFoundryWebEndpointDiscovererTests.java | 2 +- .../FilterRegistrationMappingDescription.java | 4 +- .../WebEndpointDiscovererTests.java | 2 +- .../data/neo4j/Neo4jProperties.java | 2 +- ...ditionEvaluationReportLoggingListener.java | 2 +- .../oauth2/client/OAuth2ClientProperties.java | 2 +- .../autoconfigure/web/ServerProperties.java | 40 +++++++++---------- .../error/AbstractErrorController.java | 2 +- .../SendGridAutoConfigurationTests.java | 2 +- .../boot/cli/command/run/RunCommand.java | 4 +- .../cli/compiler/grape/AetherGrapeEngine.java | 2 +- .../grape/AetherGrapeEngineTests.java | 2 +- ...ToolsDataSourceAutoConfigurationTests.java | 4 +- .../boot/test/json/BasicJsonTester.java | 2 +- .../boot/test/json/JacksonTester.java | 2 +- .../boot/test/mock/mockito/SpyDefinition.java | 2 +- .../platform/build/LifecycleVersion.java | 2 +- .../docker/transport/ErrorsTests.java | 4 +- .../boot/gradle/dsl/SpringBootExtension.java | 2 +- .../boot/gradle/tasks/run/BootRun.java | 2 +- .../boot/loader/tools/AbstractJarWriter.java | 2 +- .../boot/loader/tools/Repackager.java | 2 +- .../loader/ExecutableArchiveLauncher.java | 2 +- .../boot/cloud/CloudPlatform.java | 2 +- .../source/ConfigurationPropertyName.java | 4 +- .../boot/jdbc/DatabaseDriver.java | 2 +- .../jetty/JettyServletWebServerFactory.java | 2 +- .../TomcatReactiveWebServerFactory.java | 4 +- .../tomcat/TomcatServletWebServerFactory.java | 4 +- ...igReactiveWebServerApplicationContext.java | 3 +- .../FilteredReactiveWebContextResource.java | 2 +- .../error/DefaultErrorAttributes.java | 2 +- .../boot/web/server/ErrorPage.java | 2 +- ...ionConfigServletWebApplicationContext.java | 3 +- ...figServletWebServerApplicationContext.java | 3 +- ...XmlServletWebServerApplicationContext.java | 4 +- .../servlet/error/DefaultErrorAttributes.java | 2 +- .../boot/web/servlet/view/MustacheView.java | 4 +- ...ractJettyServletWebServerFactoryTests.java | 2 +- .../UndertowServletWebServerFactoryTests.java | 2 +- ...AbstractReactiveWebServerFactoryTests.java | 2 +- .../AbstractServletWebServerFactoryTests.java | 2 +- 45 files changed, 76 insertions(+), 79 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java index 4144cde12e7a..65129da3bfa7 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomExtension.java @@ -107,12 +107,12 @@ private void addLibrary(Library library) { this.properties.put(library.getVersionProperty(), library.getVersion()); for (Group group : library.getGroups()) { for (Module module : group.getModules()) { - this.putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty()); + putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty()); this.dependencyHandler.getConstraints().add(JavaPlatformPlugin.API_CONFIGURATION_NAME, createDependencyNotation(group.getId(), module.getName(), library.getVersion())); } for (String bomImport : group.getBoms()) { - this.putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty()); + putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty()); String bomDependency = createDependencyNotation(group.getId(), bomImport, library.getVersion()); this.dependencyHandler.add(JavaPlatformPlugin.API_CONFIGURATION_NAME, this.dependencyHandler.platform(bomDependency)); diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/UnstructuredDependencyVersion.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/UnstructuredDependencyVersion.java index 02822beaec99..a39d8a3843fa 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/UnstructuredDependencyVersion.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/UnstructuredDependencyVersion.java @@ -35,17 +35,17 @@ private UnstructuredDependencyVersion(String version) { @Override public boolean isNewerThan(DependencyVersion other) { - return this.compareTo(other) > 0; + return compareTo(other) > 0; } @Override public boolean isSameMajorAndNewerThan(DependencyVersion other) { - return this.compareTo(other) > 0; + return compareTo(other) > 0; } @Override public boolean isSameMinorAndNewerThan(DependencyVersion other) { - return this.compareTo(other) > 0; + return compareTo(other) > 0; } @Override diff --git a/buildSrc/src/main/java/org/springframework/boot/build/test/IntegrationTestPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/test/IntegrationTestPlugin.java index 5bae3a88093d..66c796762959 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/test/IntegrationTestPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/test/IntegrationTestPlugin.java @@ -46,7 +46,7 @@ public class IntegrationTestPlugin implements Plugin { @Override public void apply(Project project) { - project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> this.configureIntegrationTesting(project)); + project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> configureIntegrationTesting(project)); } private void configureIntegrationTesting(Project project) { diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java index bc487df92857..fcad933a8236 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java @@ -79,7 +79,7 @@ private WebOperation findMainReadOperation(ExposableWebEndpoint endpoint) { } private void load(Class configuration, Consumer consumer) { - this.load((id) -> null, EndpointId::toString, configuration, consumer); + load((id) -> null, EndpointId::toString, configuration, consumer); } private void load(Function timeToLive, PathMapper endpointPathMapper, Class configuration, diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java index 8943b3d1bf51..a32bd4f8e4f9 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java @@ -42,7 +42,7 @@ public FilterRegistrationMappingDescription(FilterRegistration filterRegistratio * @return the mappings */ public Collection getServletNameMappings() { - return this.getRegistration().getServletNameMappings(); + return getRegistration().getServletNameMappings(); } /** @@ -50,7 +50,7 @@ public Collection getServletNameMappings() { * @return the mappings */ public Collection getUrlPatternMappings() { - return this.getRegistration().getUrlPatternMappings(); + return getRegistration().getUrlPatternMappings(); } } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java index c513128b8e84..21c120422cef 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/WebEndpointDiscovererTests.java @@ -217,7 +217,7 @@ void getEndpointsWhenHasCustomPathShouldReturnCustomPath() { } private void load(Class configuration, Consumer consumer) { - this.load((id) -> null, EndpointId::toString, configuration, consumer); + load((id) -> null, EndpointId::toString, configuration, consumer); } private void load(Function timeToLive, PathMapper endpointPathMapper, Class configuration, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java index 2daa0391838d..57bf0660d4da 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jProperties.java @@ -145,7 +145,7 @@ private void configure(Builder builder) { if (this.username != null && this.password != null) { builder.credentials(this.username, this.password); } - builder.autoIndex(this.getAutoIndex().getName()); + builder.autoIndex(getAutoIndex().getName()); if (this.useNativeTypes) { builder.useNativeTypes(); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java index ea72312dfd66..aca549a9c073 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java @@ -113,7 +113,7 @@ public void logAutoConfigurationReport(boolean isCrashReport) { this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory()); } if (!this.report.getConditionAndOutcomesBySource().isEmpty()) { - if (this.getLogLevelForReport().equals(LogLevel.INFO)) { + if (getLogLevelForReport().equals(LogLevel.INFO)) { if (this.logger.isInfoEnabled()) { this.logger.info(new ConditionEvaluationReportMessage(this.report)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java index 8b16e6b2fd88..a78e0bc98d63 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java @@ -57,7 +57,7 @@ public Map getRegistration() { @PostConstruct public void validate() { - this.getRegistration().values().forEach(this::validateRegistration); + getRegistration().values().forEach(this::validateRegistration); } private void validateRegistration(Registration registration) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 1b254ae21c13..df3424d342de 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -424,23 +424,23 @@ public static class Tomcat { @Deprecated @DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.max") public int getMaxThreads() { - return this.getThreads().getMax(); + return getThreads().getMax(); } @Deprecated public void setMaxThreads(int maxThreads) { - this.getThreads().setMax(maxThreads); + getThreads().setMax(maxThreads); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.min-spare") public int getMinSpareThreads() { - return this.getThreads().getMinSpare(); + return getThreads().getMinSpare(); } @Deprecated public void setMinSpareThreads(int minSpareThreads) { - this.getThreads().setMinSpare(minSpareThreads); + getThreads().setMinSpare(minSpareThreads); } @Deprecated @@ -1106,65 +1106,65 @@ public void setMaxHttpFormPostSize(DataSize maxHttpFormPostSize) { @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors") public Integer getAcceptors() { - return this.getThreads().getAcceptors(); + return getThreads().getAcceptors(); } public void setAcceptors(Integer acceptors) { - this.getThreads().setAcceptors(acceptors); + getThreads().setAcceptors(acceptors); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.selectors") public Integer getSelectors() { - return this.getThreads().getSelectors(); + return getThreads().getSelectors(); } public void setSelectors(Integer selectors) { - this.getThreads().setSelectors(selectors); + getThreads().setSelectors(selectors); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.min") public Integer getMinThreads() { - return this.getThreads().getMin(); + return getThreads().getMin(); } @Deprecated public void setMinThreads(Integer minThreads) { - this.getThreads().setMin(minThreads); + getThreads().setMin(minThreads); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max") public Integer getMaxThreads() { - return this.getThreads().getMax(); + return getThreads().getMax(); } @Deprecated public void setMaxThreads(Integer maxThreads) { - this.getThreads().setMax(maxThreads); + getThreads().setMax(maxThreads); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max-queue-capacity") public Integer getMaxQueueCapacity() { - return this.getThreads().getMaxQueueCapacity(); + return getThreads().getMaxQueueCapacity(); } @Deprecated public void setMaxQueueCapacity(Integer maxQueueCapacity) { - this.getThreads().setMaxQueueCapacity(maxQueueCapacity); + getThreads().setMaxQueueCapacity(maxQueueCapacity); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.idle-timeout") public Duration getThreadIdleTimeout() { - return this.getThreads().getIdleTimeout(); + return getThreads().getIdleTimeout(); } @Deprecated public void setThreadIdleTimeout(Duration threadIdleTimeout) { - this.getThreads().setIdleTimeout(threadIdleTimeout); + getThreads().setIdleTimeout(threadIdleTimeout); } public Duration getConnectionIdleTimeout() { @@ -1520,23 +1520,23 @@ public void setBufferSize(DataSize bufferSize) { @Deprecated @DeprecatedConfigurationProperty(replacement = "server.undertow.threads.io") public Integer getIoThreads() { - return this.getThreads().getIo(); + return getThreads().getIo(); } @Deprecated public void setIoThreads(Integer ioThreads) { - this.getThreads().setIo(ioThreads); + getThreads().setIo(ioThreads); } @Deprecated @DeprecatedConfigurationProperty(replacement = "server.undertow.threads.worker") public Integer getWorkerThreads() { - return this.getThreads().getWorker(); + return getThreads().getWorker(); } @Deprecated public void setWorkerThreads(Integer workerThreads) { - this.getThreads().setWorker(workerThreads); + getThreads().setWorker(workerThreads); } public Boolean getDirectBuffers() { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java index ffccf3fa5985..4c57f01bf71e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/AbstractErrorController.java @@ -78,7 +78,7 @@ private List sortErrorViewResolvers(List r */ @Deprecated protected Map getErrorAttributes(HttpServletRequest request, boolean includeStackTrace) { - return this.getErrorAttributes(request, includeStackTrace, false); + return getErrorAttributes(request, includeStackTrace, false); } protected Map getErrorAttributes(HttpServletRequest request, boolean includeStackTrace, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java index f7e64268952c..5cd87fe1a8b5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java @@ -79,7 +79,7 @@ void expectedSendGridBeanWithProxyCreated() { } private void loadContext(String... environment) { - this.loadContext(null, environment); + loadContext(null, environment); } private void loadContext(Class additionalConfiguration, String... environment) { diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java index 1649e5a1ec94..28327b9c426c 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/RunCommand.java @@ -55,8 +55,8 @@ public String getUsageHelp() { } public void stop() { - if (this.getHandler() != null) { - ((RunOptionHandler) this.getHandler()).stop(); + if (getHandler() != null) { + ((RunOptionHandler) getHandler()).stop(); } } diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java index 592414735501..3451bcccc21c 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java @@ -266,7 +266,7 @@ public Map>> enumerateGrapes() { @Override public URI[] resolve(Map args, Map... dependencyMaps) { - return this.resolve(args, null, dependencyMaps); + return resolve(args, null, dependencyMaps); } @Override diff --git a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java index ffd135f0beda..44848ed2c164 100644 --- a/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java +++ b/spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngineTests.java @@ -139,7 +139,7 @@ void dependencyResolutionWithCustomClassLoader() { @Test void resolutionWithCustomResolver() { Map args = new HashMap<>(); - AetherGrapeEngine grapeEngine = this.createGrapeEngine(); + AetherGrapeEngine grapeEngine = createGrapeEngine(); grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release")); Map dependency = createDependency("io.spring.docresources", "spring-doc-resources", "0.1.1.RELEASE"); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java index cafee7a80d32..e482f66ff32f 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/AbstractDevToolsDataSourceAutoConfigurationTests.java @@ -101,11 +101,11 @@ protected ConfigurableApplicationContext getContext(Supplier... classes) { - return this.createContext(null, classes); + return createContext(null, classes); } protected final ConfigurableApplicationContext createContext(String driverClassName, Class... classes) { - return this.createContext(driverClassName, null, classes); + return createContext(driverClassName, null, classes); } protected final ConfigurableApplicationContext createContext(String driverClassName, String url, diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/BasicJsonTester.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/BasicJsonTester.java index ae593fbb8321..774dfb088666 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/BasicJsonTester.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/BasicJsonTester.java @@ -81,7 +81,7 @@ public BasicJsonTester(Class resourceLoadClass, Charset charset) { * resources */ protected final void initialize(Class resourceLoadClass) { - this.initialize(resourceLoadClass, null); + initialize(resourceLoadClass, null); } /** diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JacksonTester.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JacksonTester.java index 79ba54bdf1b4..87514061e30b 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JacksonTester.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JacksonTester.java @@ -165,7 +165,7 @@ public static void initFields(Object testInstance, ObjectFactory o * @return the new instance */ public JacksonTester forView(Class view) { - return new JacksonTester<>(this.getResourceLoadClass(), this.getType(), this.objectMapper, view); + return new JacksonTester<>(getResourceLoadClass(), getType(), this.objectMapper, view); } /** diff --git a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java index 937230df23a4..cc6e86b7a1ac 100644 --- a/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java +++ b/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/mock/mockito/SpyDefinition.java @@ -97,7 +97,7 @@ T createSpy(String name, Object instance) { } settings.spiedInstance(instance); settings.defaultAnswer(Mockito.CALLS_REAL_METHODS); - if (this.isProxyTargetAware()) { + if (isProxyTargetAware()) { settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener()); } return (T) mock(instance.getClass(), settings); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java index 8c0b725439ac..375879263fa3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/LifecycleVersion.java @@ -80,7 +80,7 @@ public String toString() { * version */ boolean isEqualOrGreaterThan(LifecycleVersion other) { - return this.compareTo(other) >= 0; + return compareTo(other) >= 0; } @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/ErrorsTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/ErrorsTests.java index 705a2ffc942c..8d47ba063362 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/ErrorsTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/transport/ErrorsTests.java @@ -34,7 +34,7 @@ class ErrorsTests extends AbstractJsonTests { @Test void readValueDeserializesJson() throws Exception { - Errors errors = this.getObjectMapper().readValue(getContent("errors.json"), Errors.class); + Errors errors = getObjectMapper().readValue(getContent("errors.json"), Errors.class); Iterator iterator = errors.iterator(); Error error1 = iterator.next(); Error error2 = iterator.next(); @@ -47,7 +47,7 @@ void readValueDeserializesJson() throws Exception { @Test void toStringHasErrorDetails() throws Exception { - Errors errors = this.getObjectMapper().readValue(getContent("errors.json"), Errors.class); + Errors errors = getObjectMapper().readValue(getContent("errors.json"), Errors.class); assertThat(errors.toString()).isEqualTo("[TEST1: Test One, TEST2: Test Two]"); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java index 4fd036bf2c11..05bbf68ced1e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/dsl/SpringBootExtension.java @@ -78,7 +78,7 @@ public void setMainClassName(String mainClassName) { * artifact will be the base name of the {@code bootWar} or {@code bootJar} task. */ public void buildInfo() { - this.buildInfo(null); + buildInfo(null); } /** diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java index 3a9b47832abd..2eb18367e31d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java @@ -78,7 +78,7 @@ public void exec() { } if (System.console() != null) { // Record that the console is available here for AnsiOutput to detect later - this.getEnvironment().put("spring.output.ansi.console-available", true); + getEnvironment().put("spring.output.ansi.console-available", true); } super.exec(); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/AbstractJarWriter.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/AbstractJarWriter.java index d5cdcdda269f..d27316a592f2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/AbstractJarWriter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/AbstractJarWriter.java @@ -76,7 +76,7 @@ public void writeManifest(Manifest manifest) throws IOException { * @throws IOException if the entries cannot be written */ public void writeEntries(JarFile jarFile) throws IOException { - this.writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER); + writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER); } final void writeEntries(JarFile jarFile, EntryTransformer entryTransformer, UnpackHandler unpackHandler) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java index 249347370361..e2a2a7e6129b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Repackager.java @@ -84,7 +84,7 @@ public void repackage(File destination, Libraries libraries) throws IOException * @since 1.3.0 */ public void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException { - this.repackage(destination, libraries, launchScript, null); + repackage(destination, libraries, launchScript, null); } /** diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/ExecutableArchiveLauncher.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/ExecutableArchiveLauncher.java index c3f0d6726284..879fccbe786e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/ExecutableArchiveLauncher.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/ExecutableArchiveLauncher.java @@ -89,7 +89,7 @@ protected ClassLoader createClassLoader(Iterator archives) throws Excep if (this.classPathIndex != null) { urls.addAll(this.classPathIndex.getUrls()); } - return this.createClassLoader(urls.toArray(new URL[0])); + return createClassLoader(urls.toArray(new URL[0])); } private int guessClassPathSize() { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudPlatform.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudPlatform.java index 00b5fb811f2d..d55f1f13c022 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudPlatform.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudPlatform.java @@ -149,7 +149,7 @@ public boolean isActive(Environment environment) { */ public boolean isEnforced(Environment environment) { String platform = environment.getProperty("spring.main.cloud-platform"); - return (platform != null) ? this.name().equalsIgnoreCase(platform) : false; + return (platform != null) ? name().equalsIgnoreCase(platform) : false; } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java index 1f8ba7b2f3b0..bd74ee50c161 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java @@ -213,7 +213,7 @@ public ConfigurationPropertyName chop(int size) { */ public boolean isParentOf(ConfigurationPropertyName name) { Assert.notNull(name, "Name must not be null"); - if (this.getNumberOfElements() != name.getNumberOfElements() - 1) { + if (getNumberOfElements() != name.getNumberOfElements() - 1) { return false; } return isAncestorOf(name); @@ -227,7 +227,7 @@ public boolean isParentOf(ConfigurationPropertyName name) { */ public boolean isAncestorOf(ConfigurationPropertyName name) { Assert.notNull(name, "Name must not be null"); - if (this.getNumberOfElements() >= name.getNumberOfElements()) { + if (getNumberOfElements() >= name.getNumberOfElements()) { return false; } return elementsEqual(name); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java index 3470154b5a38..57674a324ae5 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java @@ -246,7 +246,7 @@ protected boolean matchProductName(String productName) { } protected Collection getUrlPrefixes() { - return Collections.singleton(this.name().toLowerCase(Locale.ENGLISH)); + return Collections.singleton(name().toLowerCase(Locale.ENGLISH)); } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java index 211d943fb4e6..2f457f1b4e9a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java @@ -260,7 +260,7 @@ private void configureDocumentRoot(WebAppContext handler) { Resource rootResource = (docBase.isDirectory() ? Resource.newResource(docBase.getCanonicalFile()) : JarResource.newJarResource(Resource.newResource(docBase))); resources.add((root != null) ? new LoaderHidingResource(rootResource) : rootResource); - for (URL resourceJarUrl : this.getUrlsOfJarsWithMetaInfResources()) { + for (URL resourceJarUrl : getUrlsOfJarsWithMetaInfResources()) { Resource resource = createResource(resourceJarUrl); if (resource.exists() && resource.isDirectory()) { resources.add(resource); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java index bf57e3a40a0b..6fa858331335 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java @@ -178,8 +178,8 @@ protected void configureContext(Context context) { protected void customizeConnector(Connector connector) { int port = Math.max(getPort(), 0); connector.setPort(port); - if (StringUtils.hasText(this.getServerHeader())) { - connector.setAttribute("server", this.getServerHeader()); + if (StringUtils.hasText(getServerHeader())) { + connector.setAttribute("server", getServerHeader()); } if (connector.getProtocolHandler() instanceof AbstractProtocol) { customizeProtocol((AbstractProtocol) connector.getProtocolHandler()); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java index a14e86a3a257..acb52c875415 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java @@ -301,8 +301,8 @@ private void addJasperInitializer(TomcatEmbeddedContext context) { protected void customizeConnector(Connector connector) { int port = Math.max(getPort(), 0); connector.setPort(port); - if (StringUtils.hasText(this.getServerHeader())) { - connector.setAttribute("server", this.getServerHeader()); + if (StringUtils.hasText(getServerHeader())) { + connector.setAttribute("server", getServerHeader()); } if (connector.getProtocolHandler() instanceof AbstractProtocol) { customizeProtocol((AbstractProtocol) connector.getProtocolHandler()); diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java index cf2459ae10de..108ef2fc67c7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/AnnotationConfigReactiveWebServerApplicationContext.java @@ -144,8 +144,7 @@ public void setEnvironment(ConfigurableEnvironment environment) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { this.reader.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator); - this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, - beanNameGenerator); + getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator); } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/FilteredReactiveWebContextResource.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/FilteredReactiveWebContextResource.java index facf90e05129..aea1bb5d3d8e 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/FilteredReactiveWebContextResource.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/FilteredReactiveWebContextResource.java @@ -60,7 +60,7 @@ public String getDescription() { @Override public InputStream getInputStream() throws IOException { - throw new FileNotFoundException(this.getDescription() + " cannot be opened because it does not exist"); + throw new FileNotFoundException(getDescription() + " cannot be opened because it does not exist"); } } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java index c06213d31818..81535d06f6a2 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/DefaultErrorAttributes.java @@ -82,7 +82,7 @@ public DefaultErrorAttributes(boolean includeException) { @Override @Deprecated public Map getErrorAttributes(ServerRequest request, boolean includeStackTrace) { - return this.getErrorAttributes(request, includeStackTrace, false); + return getErrorAttributes(request, includeStackTrace, false); } @Override diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java index b49cee29d592..a03855bb2d26 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/ErrorPage.java @@ -129,7 +129,7 @@ public int hashCode() { int result = 1; result = prime * result + ObjectUtils.nullSafeHashCode(getExceptionName()); result = prime * result + ObjectUtils.nullSafeHashCode(this.path); - result = prime * result + this.getStatusCode(); + result = prime * result + getStatusCode(); return result; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java index f1a05e3f9e8c..f233e88a779c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebApplicationContext.java @@ -143,8 +143,7 @@ public void setEnvironment(ConfigurableEnvironment environment) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { this.reader.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator); - this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, - beanNameGenerator); + getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator); } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java index 9a510d2de872..d5f26714bd05 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/AnnotationConfigServletWebServerApplicationContext.java @@ -141,8 +141,7 @@ public void setEnvironment(ConfigurableEnvironment environment) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { this.reader.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator); - this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, - beanNameGenerator); + getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator); } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java index 147f4ea9728f..2b0ae84ac3a1 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java @@ -47,7 +47,7 @@ public class XmlServletWebServerApplicationContext extends ServletWebServerAppli * {@linkplain #load loaded} and then manually {@link #refresh refreshed}. */ public XmlServletWebServerApplicationContext() { - this.reader.setEnvironment(this.getEnvironment()); + this.reader.setEnvironment(getEnvironment()); } /** @@ -101,7 +101,7 @@ public void setValidating(boolean validating) { @Override public void setEnvironment(ConfigurableEnvironment environment) { super.setEnvironment(environment); - this.reader.setEnvironment(this.getEnvironment()); + this.reader.setEnvironment(getEnvironment()); } /** diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributes.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributes.java index 1d5d717febab..c7fbc3e660dd 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributes.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributes.java @@ -103,7 +103,7 @@ private void storeErrorAttributes(HttpServletRequest request, Exception ex) { @Override @Deprecated public Map getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) { - return this.getErrorAttributes(webRequest, includeStackTrace, false); + return getErrorAttributes(webRequest, includeStackTrace, false); } @Override diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheView.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheView.java index e9a4f134b6b9..ecf19fba7180 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheView.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/MustacheView.java @@ -68,14 +68,14 @@ public void setCharset(String charset) { @Override public boolean checkResource(Locale locale) throws Exception { - Resource resource = getApplicationContext().getResource(this.getUrl()); + Resource resource = getApplicationContext().getResource(getUrl()); return (resource != null && resource.exists()); } @Override protected void renderMergedTemplateModel(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { - Template template = createTemplate(getApplicationContext().getResource(this.getUrl())); + Template template = createTemplate(getApplicationContext().getResource(getUrl())); if (template != null) { template.execute(model, response.getWriter()); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/AbstractJettyServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/AbstractJettyServletWebServerFactoryTests.java index 7abd2152291c..a8923e0de7d3 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/AbstractJettyServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/jetty/AbstractJettyServletWebServerFactoryTests.java @@ -88,7 +88,7 @@ protected void handleExceptionCausedByBlockedPortOnPrimaryConnector(RuntimeExcep @Override protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) { - this.handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); + handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); } @Override diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java index 3952436ad533..3bc296a87e10 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java @@ -307,7 +307,7 @@ protected void handleExceptionCausedByBlockedPortOnPrimaryConnector(RuntimeExcep @Override protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) { - this.handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); + handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); } @Override diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java index f232c32d61a2..6bad7271c3f1 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java @@ -485,7 +485,7 @@ protected Future initiateGracefulShutdown() { } protected void awaitInGracefulShutdown() { - while (!this.inGracefulShutdown()) { + while (!inGracefulShutdown()) { try { Thread.sleep(100); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java index e67f16dd88aa..7ab0efd7a9bf 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java @@ -1162,7 +1162,7 @@ protected Future initiateGetRequest(HttpClient httpClient, int port, Str } protected void awaitInGracefulShutdown() { - while (!this.inGracefulShutdown()) { + while (!inGracefulShutdown()) { try { Thread.sleep(100); }