From 29717423a33f6bfbe45f0d2dcb52b321abf89c08 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 18 Apr 2020 11:54:51 +0900 Subject: [PATCH 1/2] Remove this keyword on member method invocations See gh-21007 --- .../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 4144cde12e..65129da3bf 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 @@ public class BomExtension { 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 02822beaec..a39d8a3843 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 @@ final class UnstructuredDependencyVersion extends AbstractDependencyVersion impl @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 5bae3a8809..66c7967629 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 bc487df928..fcad933a82 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 @@ class CloudFoundryWebEndpointDiscovererTests { } 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 8943b3d1bf..a32bd4f8e4 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 class FilterRegistrationMappingDescription extends RegistrationMappingDes * @return the mappings */ public Collection getServletNameMappings() { - return this.getRegistration().getServletNameMappings(); + return getRegistration().getServletNameMappings(); } /** @@ -50,7 +50,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes * @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 c513128b8e..21c120422c 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 @@ class WebEndpointDiscovererTests { } 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 2daa039183..57bf0660d4 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 @@ public class Neo4jProperties implements ApplicationContextAware { 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 ea72312dfd..aca549a9c0 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 class ConditionEvaluationReportLoggingListener 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 8b16e6b2fd..a78e0bc98d 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 class OAuth2ClientProperties { @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 fd3a6136a6..bb12a7063a 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 @@ -394,23 +394,23 @@ public class ServerProperties { @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); } public DataSize getMaxHttpFormPostSize() { @@ -1066,67 +1066,67 @@ public class ServerProperties { @Deprecated @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors") public Integer getAcceptors() { - return this.getThreads().getAcceptors(); + return getThreads().getAcceptors(); } @Deprecated 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(); } @Deprecated 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() { @@ -1482,23 +1482,23 @@ public class ServerProperties { @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 ffccf3fa59..4c57f01bf7 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 @@ public abstract class AbstractErrorController implements ErrorController { */ @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 f7e6426895..5cd87fe1a8 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 @@ class SendGridAutoConfigurationTests { } 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 1649e5a1ec..28327b9c42 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 class RunCommand extends OptionParsingCommand { } 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 5924147355..3451bcccc2 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 class AetherGrapeEngine implements GrapeEngine { @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 ffd135f0be..44848ed2c1 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 @@ class AetherGrapeEngineTests { @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 cafee7a80d..e482f66ff3 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 @@ abstract class AbstractDevToolsDataSourceAutoConfigurationTests { } protected final ConfigurableApplicationContext createContext(Class... 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 ae593fbb83..774dfb0886 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 class BasicJsonTester { * 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 79ba54bdf1..87514061e3 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 class JacksonTester extends AbstractJsonMarshalTester { * @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 937230df23..cc6e86b7a1 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 @@ class SpyDefinition extends Definition { } 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 8c0b725439..375879263f 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 @@ class LifecycleVersion implements Comparable { * 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 705a2ffc94..8d47ba0633 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 @@ class ErrorsTests extends AbstractJsonTests { @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 4fd036bf2c..05bbf68ced 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 class SpringBootExtension { * 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 3a9b47832a..2eb18367e3 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 class BootRun extends JavaExec { } 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 3cbf908346..e03d170b00 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 abstract class AbstractJarWriter implements LoaderClassesWriter { * @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 2493473703..e2a2a7e612 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 class Repackager extends Packager { * @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 c3f0d67262..879fccbe78 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 @@ public abstract class ExecutableArchiveLauncher extends Launcher { 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 00b5fb811f..d55f1f13c0 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 enum CloudPlatform { */ 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 1f8ba7b2f3..bd74ee50c1 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 final class ConfigurationPropertyName implements Comparable= 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 3470154b5a..57674a324a 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 @@ public enum DatabaseDriver { } 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 211d943fb4..2f457f1b4e 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 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor 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 bf57e3a40a..6fa8583313 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 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac 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 a14e86a3a2..acb52c8754 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 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto 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 cf2459ae10..108ef2fc67 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 class AnnotationConfigReactiveWebServerApplicationContext extends Reactiv 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 facf90e051..aea1bb5d3d 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 @@ class FilteredReactiveWebContextResource extends AbstractResource { @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 c06213d318..81535d06f6 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 class DefaultErrorAttributes implements ErrorAttributes { @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 b49cee29d5..a03855bb2d 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 class ErrorPage { 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 f1a05e3f9e..f233e88a77 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 class AnnotationConfigServletWebApplicationContext extends GenericWebAppl 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 9a510d2de8..d5f26714bd 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 class AnnotationConfigServletWebServerApplicationContext extends ServletW 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 147f4ea972..2b0ae84ac3 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 class XmlServletWebServerApplicationContext extends ServletWebServerAppli @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 9254a6637c..51cd65f8cb 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 @@ -104,7 +104,7 @@ public class DefaultErrorAttributes implements ErrorAttributes, HandlerException @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 e9a4f134b6..ecf19fba71 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 class MustacheView extends AbstractTemplateView { @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 7abd215229..a8923e0de7 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 @@ abstract class AbstractJettyServletWebServerFactoryTests extends AbstractServlet @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 3952436ad5..3bc296a87e 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 @@ class UndertowServletWebServerFactoryTests extends AbstractServletWebServerFacto @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 f232c32d61..6bad7271c3 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 @@ public abstract class AbstractReactiveWebServerFactoryTests { } 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 62e7432e63..8f37a1fa93 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 @@ -1174,7 +1174,7 @@ public abstract class AbstractServletWebServerFactoryTests { } protected void awaitInGracefulShutdown() { - while (!this.inGracefulShutdown()) { + while (!inGracefulShutdown()) { try { Thread.sleep(100); } From 85e9f713b04a60811204c82fba415059b0557325 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sat, 25 Apr 2020 08:50:51 +0200 Subject: [PATCH 2/2] Update copyright year of changed files See gh-21007 --- .../cloudfoundry/CloudFoundryWebEndpointDiscovererTests.java | 2 +- .../mappings/servlet/FilterRegistrationMappingDescription.java | 2 +- .../endpoint/web/annotation/WebEndpointDiscovererTests.java | 2 +- .../logging/ConditionEvaluationReportLoggingListener.java | 2 +- .../security/oauth2/client/OAuth2ClientProperties.java | 2 +- .../org/springframework/boot/cli/command/run/RunCommand.java | 2 +- .../boot/cli/compiler/grape/AetherGrapeEngine.java | 2 +- .../AbstractDevToolsDataSourceAutoConfigurationTests.java | 2 +- .../org/springframework/boot/test/json/BasicJsonTester.java | 2 +- .../java/org/springframework/boot/test/json/JacksonTester.java | 2 +- .../springframework/boot/test/mock/mockito/SpyDefinition.java | 2 +- .../java/org/springframework/boot/gradle/tasks/run/BootRun.java | 2 +- .../context/properties/source/ConfigurationPropertyName.java | 2 +- .../main/java/org/springframework/boot/jdbc/DatabaseDriver.java | 2 +- .../AnnotationConfigReactiveWebServerApplicationContext.java | 2 +- .../reactive/context/FilteredReactiveWebContextResource.java | 2 +- .../java/org/springframework/boot/web/server/ErrorPage.java | 2 +- .../context/AnnotationConfigServletWebApplicationContext.java | 2 +- .../AnnotationConfigServletWebServerApplicationContext.java | 2 +- .../servlet/context/XmlServletWebServerApplicationContext.java | 2 +- .../org/springframework/boot/web/servlet/view/MustacheView.java | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) 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 fcad933a82..84b9f4c62b 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 a32bd4f8e4..61a4cd503c 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 21c120422c..552c7a09cb 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 aca549a9c0..00328e129a 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 a78e0bc98d..29535453a1 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 28327b9c42..6fb408657d 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 3451bcccc2..a95fa1bbfb 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 e482f66ff3..8faac9ba2d 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 774dfb0886..9b9bf84b3a 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 87514061e3..e382be5722 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 cc6e86b7a1..a39632ff9d 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 2eb18367e3..99fe3d5d35 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 bd74ee50c1..466f0d0c98 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 57674a324a..d32870da90 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 108ef2fc67..8a2f68865f 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 aea1bb5d3d..e051d1d4a6 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 a03855bb2d..2951405884 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 f233e88a77..b9a5ff0bd6 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 d5f26714bd..0b1775b9a6 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 2b0ae84ac3..3543e19e14 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. 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 ecf19fba71..738440b50b 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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.