mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge pull request #21007 from izeye
* pr/21007: Update copyright year of changed files Remove this keyword on member method invocations Closes gh-21007
This commit is contained in:
commit
5b1b7bcb9b
@ -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));
|
||||
|
@ -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
|
||||
|
@ -46,7 +46,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
|
||||
|
||||
@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) {
|
||||
|
@ -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.
|
||||
@ -79,7 +79,7 @@ class CloudFoundryWebEndpointDiscovererTests {
|
||||
}
|
||||
|
||||
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,
|
||||
|
@ -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.
|
||||
@ -42,7 +42,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes
|
||||
* @return the mappings
|
||||
*/
|
||||
public Collection<String> getServletNameMappings() {
|
||||
return this.getRegistration().getServletNameMappings();
|
||||
return getRegistration().getServletNameMappings();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,7 +50,7 @@ public class FilterRegistrationMappingDescription extends RegistrationMappingDes
|
||||
* @return the mappings
|
||||
*/
|
||||
public Collection<String> getUrlPatternMappings() {
|
||||
return this.getRegistration().getUrlPatternMappings();
|
||||
return getRegistration().getUrlPatternMappings();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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.
|
||||
@ -217,7 +217,7 @@ class WebEndpointDiscovererTests {
|
||||
}
|
||||
|
||||
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,
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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.
|
||||
@ -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));
|
||||
}
|
||||
|
@ -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.
|
||||
@ -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) {
|
||||
|
@ -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() {
|
||||
|
@ -78,7 +78,7 @@ public abstract class AbstractErrorController implements ErrorController {
|
||||
*/
|
||||
@Deprecated
|
||||
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,
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
@ -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
|
||||
|
@ -139,7 +139,7 @@ class AetherGrapeEngineTests {
|
||||
@Test
|
||||
void resolutionWithCustomResolver() {
|
||||
Map<String, Object> args = new HashMap<>();
|
||||
AetherGrapeEngine grapeEngine = this.createGrapeEngine();
|
||||
AetherGrapeEngine grapeEngine = createGrapeEngine();
|
||||
grapeEngine.addResolver(createResolver("spring-releases", "https://repo.spring.io/release"));
|
||||
Map<String, Object> dependency = createDependency("io.spring.docresources", "spring-doc-resources",
|
||||
"0.1.1.RELEASE");
|
||||
|
@ -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.
|
||||
@ -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,
|
||||
|
@ -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.
|
||||
@ -81,7 +81,7 @@ public class BasicJsonTester {
|
||||
* resources
|
||||
*/
|
||||
protected final void initialize(Class<?> resourceLoadClass) {
|
||||
this.initialize(resourceLoadClass, null);
|
||||
initialize(resourceLoadClass, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -165,7 +165,7 @@ public class JacksonTester<T> extends AbstractJsonMarshalTester<T> {
|
||||
* @return the new instance
|
||||
*/
|
||||
public JacksonTester<T> forView(Class<?> view) {
|
||||
return new JacksonTester<>(this.getResourceLoadClass(), this.getType(), this.objectMapper, view);
|
||||
return new JacksonTester<>(getResourceLoadClass(), getType(), this.objectMapper, view);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -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);
|
||||
|
@ -80,7 +80,7 @@ class LifecycleVersion implements Comparable<LifecycleVersion> {
|
||||
* version
|
||||
*/
|
||||
boolean isEqualOrGreaterThan(LifecycleVersion other) {
|
||||
return this.compareTo(other) >= 0;
|
||||
return compareTo(other) >= 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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<Error> 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]");
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -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();
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -213,7 +213,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
|
||||
*/
|
||||
public boolean isParentOf(ConfigurationPropertyName name) {
|
||||
Assert.notNull(name, "Name must not be null");
|
||||
if (this.getNumberOfElements() != name.getNumberOfElements() - 1) {
|
||||
if (getNumberOfElements() != name.getNumberOfElements() - 1) {
|
||||
return false;
|
||||
}
|
||||
return isAncestorOf(name);
|
||||
@ -227,7 +227,7 @@ public final class ConfigurationPropertyName implements Comparable<Configuration
|
||||
*/
|
||||
public boolean isAncestorOf(ConfigurationPropertyName name) {
|
||||
Assert.notNull(name, "Name must not be null");
|
||||
if (this.getNumberOfElements() >= name.getNumberOfElements()) {
|
||||
if (getNumberOfElements() >= name.getNumberOfElements()) {
|
||||
return false;
|
||||
}
|
||||
return elementsEqual(name);
|
||||
|
@ -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.
|
||||
@ -246,7 +246,7 @@ public enum DatabaseDriver {
|
||||
}
|
||||
|
||||
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
|
||||
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);
|
||||
|
@ -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());
|
||||
|
@ -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());
|
||||
|
@ -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.
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class DefaultErrorAttributes implements ErrorAttributes {
|
||||
@Override
|
||||
@Deprecated
|
||||
public Map<String, Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace) {
|
||||
return this.getErrorAttributes(request, includeStackTrace, false);
|
||||
return getErrorAttributes(request, includeStackTrace, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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.
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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.
|
||||
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ public class DefaultErrorAttributes implements ErrorAttributes, HandlerException
|
||||
@Override
|
||||
@Deprecated
|
||||
public Map<String, Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace) {
|
||||
return this.getErrorAttributes(webRequest, includeStackTrace, false);
|
||||
return getErrorAttributes(webRequest, includeStackTrace, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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.
|
||||
@ -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<String, Object> 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());
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -307,7 +307,7 @@ class UndertowServletWebServerFactoryTests extends AbstractServletWebServerFacto
|
||||
|
||||
@Override
|
||||
protected void handleExceptionCausedByBlockedPortOnSecondaryConnector(RuntimeException ex, int blockedPort) {
|
||||
this.handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort);
|
||||
handleExceptionCausedByBlockedPortOnPrimaryConnector(ex, blockedPort);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -485,7 +485,7 @@ public abstract class AbstractReactiveWebServerFactoryTests {
|
||||
}
|
||||
|
||||
protected void awaitInGracefulShutdown() {
|
||||
while (!this.inGracefulShutdown()) {
|
||||
while (!inGracefulShutdown()) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
|
@ -1174,7 +1174,7 @@ public abstract class AbstractServletWebServerFactoryTests {
|
||||
}
|
||||
|
||||
protected void awaitInGracefulShutdown() {
|
||||
while (!this.inGracefulShutdown()) {
|
||||
while (!inGracefulShutdown()) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user