Commit 29717423 authored by Johnny Lim's avatar Johnny Lim Committed by Stephane Nicoll

Remove this keyword on member method invocations

See gh-21007
parent f0d4192d
...@@ -107,12 +107,12 @@ public class BomExtension { ...@@ -107,12 +107,12 @@ public class BomExtension {
this.properties.put(library.getVersionProperty(), library.getVersion()); this.properties.put(library.getVersionProperty(), library.getVersion());
for (Group group : library.getGroups()) { for (Group group : library.getGroups()) {
for (Module module : group.getModules()) { 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, this.dependencyHandler.getConstraints().add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
createDependencyNotation(group.getId(), module.getName(), library.getVersion())); createDependencyNotation(group.getId(), module.getName(), library.getVersion()));
} }
for (String bomImport : group.getBoms()) { 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()); String bomDependency = createDependencyNotation(group.getId(), bomImport, library.getVersion());
this.dependencyHandler.add(JavaPlatformPlugin.API_CONFIGURATION_NAME, this.dependencyHandler.add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
this.dependencyHandler.platform(bomDependency)); this.dependencyHandler.platform(bomDependency));
......
...@@ -35,17 +35,17 @@ final class UnstructuredDependencyVersion extends AbstractDependencyVersion impl ...@@ -35,17 +35,17 @@ final class UnstructuredDependencyVersion extends AbstractDependencyVersion impl
@Override @Override
public boolean isNewerThan(DependencyVersion other) { public boolean isNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0; return compareTo(other) > 0;
} }
@Override @Override
public boolean isSameMajorAndNewerThan(DependencyVersion other) { public boolean isSameMajorAndNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0; return compareTo(other) > 0;
} }
@Override @Override
public boolean isSameMinorAndNewerThan(DependencyVersion other) { public boolean isSameMinorAndNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0; return compareTo(other) > 0;
} }
@Override @Override
......
...@@ -46,7 +46,7 @@ public class IntegrationTestPlugin implements Plugin<Project> { ...@@ -46,7 +46,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
@Override @Override
public void apply(Project project) { 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) { private void configureIntegrationTesting(Project project) {
......
...@@ -79,7 +79,7 @@ class CloudFoundryWebEndpointDiscovererTests { ...@@ -79,7 +79,7 @@ class CloudFoundryWebEndpointDiscovererTests {
} }
private void load(Class<?> configuration, Consumer<CloudFoundryWebEndpointDiscoverer> consumer) { private void load(Class<?> configuration, Consumer<CloudFoundryWebEndpointDiscoverer> consumer) {
this.load((id) -> null, EndpointId::toString, configuration, consumer); load((id) -> null, EndpointId::toString, configuration, consumer);
} }
private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration, private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration,
......
...@@ -42,7 +42,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes ...@@ -42,7 +42,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes
* @return the mappings * @return the mappings
*/ */
public Collection<String> getServletNameMappings() { public Collection<String> getServletNameMappings() {
return this.getRegistration().getServletNameMappings(); return getRegistration().getServletNameMappings();
} }
/** /**
...@@ -50,7 +50,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes ...@@ -50,7 +50,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes
* @return the mappings * @return the mappings
*/ */
public Collection<String> getUrlPatternMappings() { public Collection<String> getUrlPatternMappings() {
return this.getRegistration().getUrlPatternMappings(); return getRegistration().getUrlPatternMappings();
} }
} }
...@@ -217,7 +217,7 @@ class WebEndpointDiscovererTests { ...@@ -217,7 +217,7 @@ class WebEndpointDiscovererTests {
} }
private void load(Class<?> configuration, Consumer<WebEndpointDiscoverer> consumer) { private void load(Class<?> configuration, Consumer<WebEndpointDiscoverer> consumer) {
this.load((id) -> null, EndpointId::toString, configuration, consumer); load((id) -> null, EndpointId::toString, configuration, consumer);
} }
private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration, private void load(Function<EndpointId, Long> timeToLive, PathMapper endpointPathMapper, Class<?> configuration,
......
...@@ -145,7 +145,7 @@ public class Neo4jProperties implements ApplicationContextAware { ...@@ -145,7 +145,7 @@ public class Neo4jProperties implements ApplicationContextAware {
if (this.username != null && this.password != null) { if (this.username != null && this.password != null) {
builder.credentials(this.username, this.password); builder.credentials(this.username, this.password);
} }
builder.autoIndex(this.getAutoIndex().getName()); builder.autoIndex(getAutoIndex().getName());
if (this.useNativeTypes) { if (this.useNativeTypes) {
builder.useNativeTypes(); builder.useNativeTypes();
} }
......
...@@ -113,7 +113,7 @@ public class ConditionEvaluationReportLoggingListener ...@@ -113,7 +113,7 @@ public class ConditionEvaluationReportLoggingListener
this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory()); this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory());
} }
if (!this.report.getConditionAndOutcomesBySource().isEmpty()) { if (!this.report.getConditionAndOutcomesBySource().isEmpty()) {
if (this.getLogLevelForReport().equals(LogLevel.INFO)) { if (getLogLevelForReport().equals(LogLevel.INFO)) {
if (this.logger.isInfoEnabled()) { if (this.logger.isInfoEnabled()) {
this.logger.info(new ConditionEvaluationReportMessage(this.report)); this.logger.info(new ConditionEvaluationReportMessage(this.report));
} }
......
...@@ -57,7 +57,7 @@ public class OAuth2ClientProperties { ...@@ -57,7 +57,7 @@ public class OAuth2ClientProperties {
@PostConstruct @PostConstruct
public void validate() { public void validate() {
this.getRegistration().values().forEach(this::validateRegistration); getRegistration().values().forEach(this::validateRegistration);
} }
private void validateRegistration(Registration registration) { private void validateRegistration(Registration registration) {
......
...@@ -394,23 +394,23 @@ public class ServerProperties { ...@@ -394,23 +394,23 @@ public class ServerProperties {
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.max") @DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.max")
public int getMaxThreads() { public int getMaxThreads() {
return this.getThreads().getMax(); return getThreads().getMax();
} }
@Deprecated @Deprecated
public void setMaxThreads(int maxThreads) { public void setMaxThreads(int maxThreads) {
this.getThreads().setMax(maxThreads); getThreads().setMax(maxThreads);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.min-spare") @DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.min-spare")
public int getMinSpareThreads() { public int getMinSpareThreads() {
return this.getThreads().getMinSpare(); return getThreads().getMinSpare();
} }
@Deprecated @Deprecated
public void setMinSpareThreads(int minSpareThreads) { public void setMinSpareThreads(int minSpareThreads) {
this.getThreads().setMinSpare(minSpareThreads); getThreads().setMinSpare(minSpareThreads);
} }
public DataSize getMaxHttpFormPostSize() { public DataSize getMaxHttpFormPostSize() {
...@@ -1066,67 +1066,67 @@ public class ServerProperties { ...@@ -1066,67 +1066,67 @@ public class ServerProperties {
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors")
public Integer getAcceptors() { public Integer getAcceptors() {
return this.getThreads().getAcceptors(); return getThreads().getAcceptors();
} }
@Deprecated @Deprecated
public void setAcceptors(Integer acceptors) { public void setAcceptors(Integer acceptors) {
this.getThreads().setAcceptors(acceptors); getThreads().setAcceptors(acceptors);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.selectors") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.selectors")
public Integer getSelectors() { public Integer getSelectors() {
return this.getThreads().getSelectors(); return getThreads().getSelectors();
} }
@Deprecated @Deprecated
public void setSelectors(Integer selectors) { public void setSelectors(Integer selectors) {
this.getThreads().setSelectors(selectors); getThreads().setSelectors(selectors);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.min") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.min")
public Integer getMinThreads() { public Integer getMinThreads() {
return this.getThreads().getMin(); return getThreads().getMin();
} }
@Deprecated @Deprecated
public void setMinThreads(Integer minThreads) { public void setMinThreads(Integer minThreads) {
this.getThreads().setMin(minThreads); getThreads().setMin(minThreads);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max")
public Integer getMaxThreads() { public Integer getMaxThreads() {
return this.getThreads().getMax(); return getThreads().getMax();
} }
@Deprecated @Deprecated
public void setMaxThreads(Integer maxThreads) { public void setMaxThreads(Integer maxThreads) {
this.getThreads().setMax(maxThreads); getThreads().setMax(maxThreads);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max-queue-capacity") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max-queue-capacity")
public Integer getMaxQueueCapacity() { public Integer getMaxQueueCapacity() {
return this.getThreads().getMaxQueueCapacity(); return getThreads().getMaxQueueCapacity();
} }
@Deprecated @Deprecated
public void setMaxQueueCapacity(Integer maxQueueCapacity) { public void setMaxQueueCapacity(Integer maxQueueCapacity) {
this.getThreads().setMaxQueueCapacity(maxQueueCapacity); getThreads().setMaxQueueCapacity(maxQueueCapacity);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.idle-timeout") @DeprecatedConfigurationProperty(replacement = "server.jetty.threads.idle-timeout")
public Duration getThreadIdleTimeout() { public Duration getThreadIdleTimeout() {
return this.getThreads().getIdleTimeout(); return getThreads().getIdleTimeout();
} }
@Deprecated @Deprecated
public void setThreadIdleTimeout(Duration threadIdleTimeout) { public void setThreadIdleTimeout(Duration threadIdleTimeout) {
this.getThreads().setIdleTimeout(threadIdleTimeout); getThreads().setIdleTimeout(threadIdleTimeout);
} }
public Duration getConnectionIdleTimeout() { public Duration getConnectionIdleTimeout() {
...@@ -1482,23 +1482,23 @@ public class ServerProperties { ...@@ -1482,23 +1482,23 @@ public class ServerProperties {
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.io") @DeprecatedConfigurationProperty(replacement = "server.undertow.threads.io")
public Integer getIoThreads() { public Integer getIoThreads() {
return this.getThreads().getIo(); return getThreads().getIo();
} }
@Deprecated @Deprecated
public void setIoThreads(Integer ioThreads) { public void setIoThreads(Integer ioThreads) {
this.getThreads().setIo(ioThreads); getThreads().setIo(ioThreads);
} }
@Deprecated @Deprecated
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.worker") @DeprecatedConfigurationProperty(replacement = "server.undertow.threads.worker")
public Integer getWorkerThreads() { public Integer getWorkerThreads() {
return this.getThreads().getWorker(); return getThreads().getWorker();
} }
@Deprecated @Deprecated
public void setWorkerThreads(Integer workerThreads) { public void setWorkerThreads(Integer workerThreads) {
this.getThreads().setWorker(workerThreads); getThreads().setWorker(workerThreads);
} }
public Boolean getDirectBuffers() { public Boolean getDirectBuffers() {
......
...@@ -78,7 +78,7 @@ public abstract class AbstractErrorController implements ErrorController { ...@@ -78,7 +78,7 @@ public abstract class AbstractErrorController implements ErrorController {
*/ */
@Deprecated @Deprecated
protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace) { protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace) {
return this.getErrorAttributes(request, includeStackTrace, false); return getErrorAttributes(request, includeStackTrace, false);
} }
protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace, protected Map<String, Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace,
......
...@@ -79,7 +79,7 @@ class SendGridAutoConfigurationTests { ...@@ -79,7 +79,7 @@ class SendGridAutoConfigurationTests {
} }
private void loadContext(String... environment) { private void loadContext(String... environment) {
this.loadContext(null, environment); loadContext(null, environment);
} }
private void loadContext(Class<?> additionalConfiguration, String... environment) { private void loadContext(Class<?> additionalConfiguration, String... environment) {
......
...@@ -55,8 +55,8 @@ public class RunCommand extends OptionParsingCommand { ...@@ -55,8 +55,8 @@ public class RunCommand extends OptionParsingCommand {
} }
public void stop() { public void stop() {
if (this.getHandler() != null) { if (getHandler() != null) {
((RunOptionHandler) this.getHandler()).stop(); ((RunOptionHandler) getHandler()).stop();
} }
} }
......
...@@ -266,7 +266,7 @@ public class AetherGrapeEngine implements GrapeEngine { ...@@ -266,7 +266,7 @@ public class AetherGrapeEngine implements GrapeEngine {
@Override @Override
public URI[] resolve(Map args, Map... dependencyMaps) { public URI[] resolve(Map args, Map... dependencyMaps) {
return this.resolve(args, null, dependencyMaps); return resolve(args, null, dependencyMaps);
} }
@Override @Override
......
...@@ -139,7 +139,7 @@ class AetherGrapeEngineTests { ...@@ -139,7 +139,7 @@ class AetherGrapeEngineTests {
@Test @Test
void resolutionWithCustomResolver() { void resolutionWithCustomResolver() {
Map<String, Object> args = new HashMap<>(); Map<String, Object> args = new HashMap<>();
AetherGrapeEngine grapeEngine = this.createGrapeEngine(); AetherGrapeEngine grapeEngine = createGrapeEngine();
grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release")); grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release"));
Map<String, Object> dependency = createDependency("io.spring.docresources", "spring-doc-resources", Map<String, Object> dependency = createDependency("io.spring.docresources", "spring-doc-resources",
"0.1.1.RELEASE"); "0.1.1.RELEASE");
......
...@@ -101,11 +101,11 @@ abstract class AbstractDevToolsDataSourceAutoConfigurationTests { ...@@ -101,11 +101,11 @@ abstract class AbstractDevToolsDataSourceAutoConfigurationTests {
} }
protected final ConfigurableApplicationContext createContext(Class<?>... classes) { protected final ConfigurableApplicationContext createContext(Class<?>... classes) {
return this.createContext(null, classes); return createContext(null, classes);
} }
protected final ConfigurableApplicationContext createContext(String driverClassName, Class<?>... 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, protected final ConfigurableApplicationContext createContext(String driverClassName, String url,
......
...@@ -81,7 +81,7 @@ public class BasicJsonTester { ...@@ -81,7 +81,7 @@ public class BasicJsonTester {
* resources * resources
*/ */
protected final void initialize(Class<?> resourceLoadClass) { protected final void initialize(Class<?> resourceLoadClass) {
this.initialize(resourceLoadClass, null); initialize(resourceLoadClass, null);
} }
/** /**
......
...@@ -165,7 +165,7 @@ public class JacksonTester<T> extends AbstractJsonMarshalTester<T> { ...@@ -165,7 +165,7 @@ public class JacksonTester<T> extends AbstractJsonMarshalTester<T> {
* @return the new instance * @return the new instance
*/ */
public JacksonTester<T> forView(Class<?> view) { public JacksonTester<T> forView(Class<?> view) {
return new JacksonTester<>(this.getResourceLoadClass(), this.getType(), this.objectMapper, view); return new JacksonTester<>(getResourceLoadClass(), getType(), this.objectMapper, view);
} }
/** /**
......
...@@ -97,7 +97,7 @@ class SpyDefinition extends Definition { ...@@ -97,7 +97,7 @@ class SpyDefinition extends Definition {
} }
settings.spiedInstance(instance); settings.spiedInstance(instance);
settings.defaultAnswer(Mockito.CALLS_REAL_METHODS); settings.defaultAnswer(Mockito.CALLS_REAL_METHODS);
if (this.isProxyTargetAware()) { if (isProxyTargetAware()) {
settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener()); settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener());
} }
return (T) mock(instance.getClass(), settings); return (T) mock(instance.getClass(), settings);
......
...@@ -80,7 +80,7 @@ class LifecycleVersion implements Comparable<LifecycleVersion> { ...@@ -80,7 +80,7 @@ class LifecycleVersion implements Comparable<LifecycleVersion> {
* version * version
*/ */
boolean isEqualOrGreaterThan(LifecycleVersion other) { boolean isEqualOrGreaterThan(LifecycleVersion other) {
return this.compareTo(other) >= 0; return compareTo(other) >= 0;
} }
@Override @Override
......
...@@ -34,7 +34,7 @@ class ErrorsTests extends AbstractJsonTests { ...@@ -34,7 +34,7 @@ class ErrorsTests extends AbstractJsonTests {
@Test @Test
void readValueDeserializesJson() throws Exception { void readValueDeserializesJson() throws Exception {
Errors errors = this.getObjectMapper().readValue(getContent("errors.json"), Errors.class); Errors errors = getObjectMapper().readValue(getContent("errors.json"), Errors.class);
Iterator<Error> iterator = errors.iterator(); Iterator<Error> iterator = errors.iterator();
Error error1 = iterator.next(); Error error1 = iterator.next();
Error error2 = iterator.next(); Error error2 = iterator.next();
...@@ -47,7 +47,7 @@ class ErrorsTests extends AbstractJsonTests { ...@@ -47,7 +47,7 @@ class ErrorsTests extends AbstractJsonTests {
@Test @Test
void toStringHasErrorDetails() throws Exception { 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]"); assertThat(errors.toString()).isEqualTo("[TEST1: Test One, TEST2: Test Two]");
} }
......
...@@ -78,7 +78,7 @@ public class SpringBootExtension { ...@@ -78,7 +78,7 @@ public class SpringBootExtension {
* artifact will be the base name of the {@code bootWar} or {@code bootJar} task. * artifact will be the base name of the {@code bootWar} or {@code bootJar} task.
*/ */
public void buildInfo() { public void buildInfo() {
this.buildInfo(null); buildInfo(null);
} }
/** /**
......
...@@ -78,7 +78,7 @@ public class BootRun extends JavaExec { ...@@ -78,7 +78,7 @@ public class BootRun extends JavaExec {
} }
if (System.console() != null) { if (System.console() != null) {
// Record that the console is available here for AnsiOutput to detect later // 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(); super.exec();
} }
......
...@@ -76,7 +76,7 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter { ...@@ -76,7 +76,7 @@ public abstract class AbstractJarWriter implements LoaderClassesWriter {
* @throws IOException if the entries cannot be written * @throws IOException if the entries cannot be written
*/ */
public void writeEntries(JarFile jarFile) throws IOException { 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) final void writeEntries(JarFile jarFile, EntryTransformer entryTransformer, UnpackHandler unpackHandler)
......
...@@ -84,7 +84,7 @@ public class Repackager extends Packager { ...@@ -84,7 +84,7 @@ public class Repackager extends Packager {
* @since 1.3.0 * @since 1.3.0
*/ */
public void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException { public void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException {
this.repackage(destination, libraries, launchScript, null); repackage(destination, libraries, launchScript, null);
} }
/** /**
......
...@@ -89,7 +89,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher { ...@@ -89,7 +89,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
if (this.classPathIndex != null) { if (this.classPathIndex != null) {
urls.addAll(this.classPathIndex.getUrls()); urls.addAll(this.classPathIndex.getUrls());
} }
return this.createClassLoader(urls.toArray(new URL[0])); return createClassLoader(urls.toArray(new URL[0]));
} }
private int guessClassPathSize() { private int guessClassPathSize() {
......
...@@ -149,7 +149,7 @@ public enum CloudPlatform { ...@@ -149,7 +149,7 @@ public enum CloudPlatform {
*/ */
public boolean isEnforced(Environment environment) { public boolean isEnforced(Environment environment) {
String platform = environment.getProperty("spring.main.cloud-platform"); String platform = environment.getProperty("spring.main.cloud-platform");
return (platform != null) ? this.name().equalsIgnoreCase(platform) : false; return (platform != null) ? name().equalsIgnoreCase(platform) : false;
} }
/** /**
......
...@@ -213,7 +213,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration ...@@ -213,7 +213,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
*/ */
public boolean isParentOf(ConfigurationPropertyName name) { public boolean isParentOf(ConfigurationPropertyName name) {
Assert.notNull(name, "Name must not be null"); Assert.notNull(name, "Name must not be null");
if (this.getNumberOfElements() != name.getNumberOfElements() - 1) { if (getNumberOfElements() != name.getNumberOfElements() - 1) {
return false; return false;
} }
return isAncestorOf(name); return isAncestorOf(name);
...@@ -227,7 +227,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration ...@@ -227,7 +227,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
*/ */
public boolean isAncestorOf(ConfigurationPropertyName name) { public boolean isAncestorOf(ConfigurationPropertyName name) {
Assert.notNull(name, "Name must not be null"); Assert.notNull(name, "Name must not be null");
if (this.getNumberOfElements() >= name.getNumberOfElements()) { if (getNumberOfElements() >= name.getNumberOfElements()) {
return false; return false;
} }
return elementsEqual(name); return elementsEqual(name);
......
...@@ -246,7 +246,7 @@ public enum DatabaseDriver { ...@@ -246,7 +246,7 @@ public enum DatabaseDriver {
} }
protected Collection<String> getUrlPrefixes() { protected Collection<String> getUrlPrefixes() {
return Collections.singleton(this.name().toLowerCase(Locale.ENGLISH)); return Collections.singleton(name().toLowerCase(Locale.ENGLISH));
} }
/** /**
......
...@@ -260,7 +260,7 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor ...@@ -260,7 +260,7 @@ public class JettyServletWebServerFactory extends AbstractServletWebServerFactor
Resource rootResource = (docBase.isDirectory() ? Resource.newResource(docBase.getCanonicalFile()) Resource rootResource = (docBase.isDirectory() ? Resource.newResource(docBase.getCanonicalFile())
: JarResource.newJarResource(Resource.newResource(docBase))); : JarResource.newJarResource(Resource.newResource(docBase)));
resources.add((root != null) ? new LoaderHidingResource(rootResource) : rootResource); resources.add((root != null) ? new LoaderHidingResource(rootResource) : rootResource);
for (URL resourceJarUrl : this.getUrlsOfJarsWithMetaInfResources()) { for (URL resourceJarUrl : getUrlsOfJarsWithMetaInfResources()) {
Resource resource = createResource(resourceJarUrl); Resource resource = createResource(resourceJarUrl);
if (resource.exists() && resource.isDirectory()) { if (resource.exists() && resource.isDirectory()) {
resources.add(resource); resources.add(resource);
......
...@@ -178,8 +178,8 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac ...@@ -178,8 +178,8 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac
protected void customizeConnector(Connector connector) { protected void customizeConnector(Connector connector) {
int port = Math.max(getPort(), 0); int port = Math.max(getPort(), 0);
connector.setPort(port); connector.setPort(port);
if (StringUtils.hasText(this.getServerHeader())) { if (StringUtils.hasText(getServerHeader())) {
connector.setAttribute("server", this.getServerHeader()); connector.setAttribute("server", getServerHeader());
} }
if (connector.getProtocolHandler() instanceof AbstractProtocol) { if (connector.getProtocolHandler() instanceof AbstractProtocol) {
customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler()); customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler());
......
...@@ -301,8 +301,8 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto ...@@ -301,8 +301,8 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
protected void customizeConnector(Connector connector) { protected void customizeConnector(Connector connector) {
int port = Math.max(getPort(), 0); int port = Math.max(getPort(), 0);
connector.setPort(port); connector.setPort(port);
if (StringUtils.hasText(this.getServerHeader())) { if (StringUtils.hasText(getServerHeader())) {
connector.setAttribute("server", this.getServerHeader()); connector.setAttribute("server", getServerHeader());
} }
if (connector.getProtocolHandler() instanceof AbstractProtocol) { if (connector.getProtocolHandler() instanceof AbstractProtocol) {
customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler()); customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler());
......
...@@ -144,8 +144,7 @@ public class AnnotationConfigReactiveWebServerApplicationContext extends Reactiv ...@@ -144,8 +144,7 @@ public class AnnotationConfigReactiveWebServerApplicationContext extends Reactiv
public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
this.reader.setBeanNameGenerator(beanNameGenerator); this.reader.setBeanNameGenerator(beanNameGenerator);
this.scanner.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator);
this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator);
beanNameGenerator);
} }
/** /**
......
...@@ -60,7 +60,7 @@ class FilteredReactiveWebContextResource extends AbstractResource { ...@@ -60,7 +60,7 @@ class FilteredReactiveWebContextResource extends AbstractResource {
@Override @Override
public InputStream getInputStream() throws IOException { 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");
} }
} }
...@@ -82,7 +82,7 @@ public class DefaultErrorAttributes implements ErrorAttributes { ...@@ -82,7 +82,7 @@ public class DefaultErrorAttributes implements ErrorAttributes {
@Override @Override
@Deprecated @Deprecated
public Map<String, Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace) { public Map<String, Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace) {
return this.getErrorAttributes(request, includeStackTrace, false); return getErrorAttributes(request, includeStackTrace, false);
} }
@Override @Override
......
...@@ -129,7 +129,7 @@ public class ErrorPage { ...@@ -129,7 +129,7 @@ public class ErrorPage {
int result = 1; int result = 1;
result = prime * result + ObjectUtils.nullSafeHashCode(getExceptionName()); result = prime * result + ObjectUtils.nullSafeHashCode(getExceptionName());
result = prime * result + ObjectUtils.nullSafeHashCode(this.path); result = prime * result + ObjectUtils.nullSafeHashCode(this.path);
result = prime * result + this.getStatusCode(); result = prime * result + getStatusCode();
return result; return result;
} }
......
...@@ -143,8 +143,7 @@ public class AnnotationConfigServletWebApplicationContext extends GenericWebAppl ...@@ -143,8 +143,7 @@ public class AnnotationConfigServletWebApplicationContext extends GenericWebAppl
public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
this.reader.setBeanNameGenerator(beanNameGenerator); this.reader.setBeanNameGenerator(beanNameGenerator);
this.scanner.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator);
this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator);
beanNameGenerator);
} }
/** /**
......
...@@ -141,8 +141,7 @@ public class AnnotationConfigServletWebServerApplicationContext extends ServletW ...@@ -141,8 +141,7 @@ public class AnnotationConfigServletWebServerApplicationContext extends ServletW
public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) { public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
this.reader.setBeanNameGenerator(beanNameGenerator); this.reader.setBeanNameGenerator(beanNameGenerator);
this.scanner.setBeanNameGenerator(beanNameGenerator); this.scanner.setBeanNameGenerator(beanNameGenerator);
this.getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, getBeanFactory().registerSingleton(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, beanNameGenerator);
beanNameGenerator);
} }
/** /**
......
...@@ -47,7 +47,7 @@ public class XmlServletWebServerApplicationContext extends ServletWebServerAppli ...@@ -47,7 +47,7 @@ public class XmlServletWebServerApplicationContext extends ServletWebServerAppli
* {@linkplain #load loaded} and then manually {@link #refresh refreshed}. * {@linkplain #load loaded} and then manually {@link #refresh refreshed}.
*/ */
public XmlServletWebServerApplicationContext() { public XmlServletWebServerApplicationContext() {
this.reader.setEnvironment(this.getEnvironment()); this.reader.setEnvironment(getEnvironment());
} }
/** /**
...@@ -101,7 +101,7 @@ public class XmlServletWebServerApplicationContext extends ServletWebServerAppli ...@@ -101,7 +101,7 @@ public class XmlServletWebServerApplicationContext extends ServletWebServerAppli
@Override @Override
public void setEnvironment(ConfigurableEnvironment environment) { public void setEnvironment(ConfigurableEnvironment environment) {
super.setEnvironment(environment); super.setEnvironment(environment);
this.reader.setEnvironment(this.getEnvironment()); this.reader.setEnvironment(getEnvironment());
} }
/** /**
......
...@@ -104,7 +104,7 @@ public class DefaultErrorAttributes implements ErrorAttributes, HandlerException ...@@ -104,7 +104,7 @@ public class DefaultErrorAttributes implements ErrorAttributes, HandlerException
@Override @Override
@Deprecated @Deprecated
public Map<String, Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) { public Map<String, Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) {
return this.getErrorAttributes(webRequest, includeStackTrace, false); return getErrorAttributes(webRequest, includeStackTrace, false);
} }
@Override @Override
......
...@@ -68,14 +68,14 @@ public class MustacheView extends AbstractTemplateView { ...@@ -68,14 +68,14 @@ public class MustacheView extends AbstractTemplateView {
@Override @Override
public boolean checkResource(Locale locale) throws Exception { public boolean checkResource(Locale locale) throws Exception {
Resource resource = getApplicationContext().getResource(this.getUrl()); Resource resource = getApplicationContext().getResource(getUrl());
return (resource != null && resource.exists()); return (resource != null && resource.exists());
} }
@Override @Override
protected void renderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request, protected void renderMergedTemplateModel(Map<String, Object> model, HttpServletRequest request,
HttpServletResponse response) throws Exception { HttpServletResponse response) throws Exception {
Template template = createTemplate(getApplicationContext().getResource(this.getUrl())); Template template = createTemplate(getApplicationContext().getResource(getUrl()));
if (template != null) { if (template != null) {
template.execute(model, response.getWriter()); template.execute(model, response.getWriter());
} }
......
...@@ -88,7 +88,7 @@ abstract class AbstractJettyServletWebServerFactoryTests extends AbstractServlet ...@@ -88,7 +88,7 @@ abstract class AbstractJettyServletWebServerFactoryTests extends AbstractServlet
@Override @Override
protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) { protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) {
this.handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort);
} }
@Override @Override
......
...@@ -307,7 +307,7 @@ class UndertowServletWebServerFactoryTests extends AbstractServletWebServerFacto ...@@ -307,7 +307,7 @@ class UndertowServletWebServerFactoryTests extends AbstractServletWebServerFacto
@Override @Override
protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) { protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) {
this.handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort); handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort);
} }
@Override @Override
......
...@@ -485,7 +485,7 @@ public abstract class AbstractReactiveWebServerFactoryTests { ...@@ -485,7 +485,7 @@ public abstract class AbstractReactiveWebServerFactoryTests {
} }
protected void awaitInGracefulShutdown() { protected void awaitInGracefulShutdown() {
while (!this.inGracefulShutdown()) { while (!inGracefulShutdown()) {
try { try {
Thread.sleep(100); Thread.sleep(100);
} }
......
...@@ -1174,7 +1174,7 @@ public abstract class AbstractServletWebServerFactoryTests { ...@@ -1174,7 +1174,7 @@ public abstract class AbstractServletWebServerFactoryTests {
} }
protected void awaitInGracefulShutdown() { protected void awaitInGracefulShutdown() {
while (!this.inGracefulShutdown()) { while (!inGracefulShutdown()) {
try { try {
Thread.sleep(100); Thread.sleep(100);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment