Skip to content

Remove this keyword on member method invocations #21007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ private void addLibrary(Library library) {
this.properties.put(library.getVersionProperty(), library.getVersion());
for (Group group : library.getGroups()) {
for (Module module : group.getModules()) {
this.putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty());
putArtifactVersionProperty(group.getId(), module.getName(), library.getVersionProperty());
this.dependencyHandler.getConstraints().add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
createDependencyNotation(group.getId(), module.getName(), library.getVersion()));
}
for (String bomImport : group.getBoms()) {
this.putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty());
putArtifactVersionProperty(group.getId(), bomImport, library.getVersionProperty());
String bomDependency = createDependencyNotation(group.getId(), bomImport, library.getVersion());
this.dependencyHandler.add(JavaPlatformPlugin.API_CONFIGURATION_NAME,
this.dependencyHandler.platform(bomDependency));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ private UnstructuredDependencyVersion(String version) {

@Override
public boolean isNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0;
return compareTo(other) > 0;
}

@Override
public boolean isSameMajorAndNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0;
return compareTo(other) > 0;
}

@Override
public boolean isSameMinorAndNewerThan(DependencyVersion other) {
return this.compareTo(other) > 0;
return compareTo(other) > 0;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private WebOperation findMainReadOperation(ExposableWebEndpoint endpoint) {
}

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public FilterRegistrationMappingDescription(FilterRegistration filterRegistratio
* @return the mappings
*/
public Collection<String> getServletNameMappings() {
return this.getRegistration().getServletNameMappings();
return getRegistration().getServletNameMappings();
}

/**
* Returns the URL pattern mappings for the registered filter.
* @return the mappings
*/
public Collection<String> getUrlPatternMappings() {
return this.getRegistration().getUrlPatternMappings();
return getRegistration().getUrlPatternMappings();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void getEndpointsWhenHasCustomPathShouldReturnCustomPath() {
}

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void configure(Builder builder) {
if (this.username != null && this.password != null) {
builder.credentials(this.username, this.password);
}
builder.autoIndex(this.getAutoIndex().getName());
builder.autoIndex(getAutoIndex().getName());
if (this.useNativeTypes) {
builder.useNativeTypes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void logAutoConfigurationReport(boolean isCrashReport) {
this.report = ConditionEvaluationReport.get(this.applicationContext.getBeanFactory());
}
if (!this.report.getConditionAndOutcomesBySource().isEmpty()) {
if (this.getLogLevelForReport().equals(LogLevel.INFO)) {
if (getLogLevelForReport().equals(LogLevel.INFO)) {
if (this.logger.isInfoEnabled()) {
this.logger.info(new ConditionEvaluationReportMessage(this.report));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Map<String, Registration> getRegistration() {

@PostConstruct
public void validate() {
this.getRegistration().values().forEach(this::validateRegistration);
getRegistration().values().forEach(this::validateRegistration);
}

private void validateRegistration(Registration registration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,23 +424,23 @@ public static class Tomcat {
@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.max")
public int getMaxThreads() {
return this.getThreads().getMax();
return getThreads().getMax();
}

@Deprecated
public void setMaxThreads(int maxThreads) {
this.getThreads().setMax(maxThreads);
getThreads().setMax(maxThreads);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.tomcat.threads.min-spare")
public int getMinSpareThreads() {
return this.getThreads().getMinSpare();
return getThreads().getMinSpare();
}

@Deprecated
public void setMinSpareThreads(int minSpareThreads) {
this.getThreads().setMinSpare(minSpareThreads);
getThreads().setMinSpare(minSpareThreads);
}

@Deprecated
Expand Down Expand Up @@ -1106,65 +1106,65 @@ public void setMaxHttpFormPostSize(DataSize maxHttpFormPostSize) {
@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.acceptors")
public Integer getAcceptors() {
return this.getThreads().getAcceptors();
return getThreads().getAcceptors();
}

public void setAcceptors(Integer acceptors) {
this.getThreads().setAcceptors(acceptors);
getThreads().setAcceptors(acceptors);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.selectors")
public Integer getSelectors() {
return this.getThreads().getSelectors();
return getThreads().getSelectors();
}

public void setSelectors(Integer selectors) {
this.getThreads().setSelectors(selectors);
getThreads().setSelectors(selectors);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.min")
public Integer getMinThreads() {
return this.getThreads().getMin();
return getThreads().getMin();
}

@Deprecated
public void setMinThreads(Integer minThreads) {
this.getThreads().setMin(minThreads);
getThreads().setMin(minThreads);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max")
public Integer getMaxThreads() {
return this.getThreads().getMax();
return getThreads().getMax();
}

@Deprecated
public void setMaxThreads(Integer maxThreads) {
this.getThreads().setMax(maxThreads);
getThreads().setMax(maxThreads);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.max-queue-capacity")
public Integer getMaxQueueCapacity() {
return this.getThreads().getMaxQueueCapacity();
return getThreads().getMaxQueueCapacity();
}

@Deprecated
public void setMaxQueueCapacity(Integer maxQueueCapacity) {
this.getThreads().setMaxQueueCapacity(maxQueueCapacity);
getThreads().setMaxQueueCapacity(maxQueueCapacity);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.jetty.threads.idle-timeout")
public Duration getThreadIdleTimeout() {
return this.getThreads().getIdleTimeout();
return getThreads().getIdleTimeout();
}

@Deprecated
public void setThreadIdleTimeout(Duration threadIdleTimeout) {
this.getThreads().setIdleTimeout(threadIdleTimeout);
getThreads().setIdleTimeout(threadIdleTimeout);
}

public Duration getConnectionIdleTimeout() {
Expand Down Expand Up @@ -1520,23 +1520,23 @@ public void setBufferSize(DataSize bufferSize) {
@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.io")
public Integer getIoThreads() {
return this.getThreads().getIo();
return getThreads().getIo();
}

@Deprecated
public void setIoThreads(Integer ioThreads) {
this.getThreads().setIo(ioThreads);
getThreads().setIo(ioThreads);
}

@Deprecated
@DeprecatedConfigurationProperty(replacement = "server.undertow.threads.worker")
public Integer getWorkerThreads() {
return this.getThreads().getWorker();
return getThreads().getWorker();
}

@Deprecated
public void setWorkerThreads(Integer workerThreads) {
this.getThreads().setWorker(workerThreads);
getThreads().setWorker(workerThreads);
}

public Boolean getDirectBuffers() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private List<ErrorViewResolver> sortErrorViewResolvers(List<ErrorViewResolver> r
*/
@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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void expectedSendGridBeanWithProxyCreated() {
}

private void loadContext(String... environment) {
this.loadContext(null, environment);
loadContext(null, environment);
}

private void loadContext(Class<?> additionalConfiguration, String... environment) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public String getUsageHelp() {
}

public void stop() {
if (this.getHandler() != null) {
((RunOptionHandler) this.getHandler()).stop();
if (getHandler() != null) {
((RunOptionHandler) getHandler()).stop();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public Map<String, Map<String, List<String>>> enumerateGrapes() {

@Override
public URI[] resolve(Map args, Map... dependencyMaps) {
return this.resolve(args, null, dependencyMaps);
return resolve(args, null, dependencyMaps);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void dependencyResolutionWithCustomClassLoader() {
@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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ protected ConfigurableApplicationContext getContext(Supplier<ConfigurableApplica
}

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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public BasicJsonTester(Class<?> resourceLoadClass, Charset charset) {
* resources
*/
protected final void initialize(Class<?> resourceLoadClass) {
this.initialize(resourceLoadClass, null);
initialize(resourceLoadClass, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public static void initFields(Object testInstance, ObjectFactory<ObjectMapper> o
* @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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <T> T createSpy(String name, Object instance) {
}
settings.spiedInstance(instance);
settings.defaultAnswer(Mockito.CALLS_REAL_METHODS);
if (this.isProxyTargetAware()) {
if (isProxyTargetAware()) {
settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener());
}
return (T) mock(instance.getClass(), settings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public String toString() {
* version
*/
boolean isEqualOrGreaterThan(LifecycleVersion other) {
return this.compareTo(other) >= 0;
return compareTo(other) >= 0;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -47,7 +47,7 @@ void readValueDeserializesJson() throws Exception {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void setMainClassName(String mainClassName) {
* artifact will be the base name of the {@code bootWar} or {@code bootJar} task.
*/
public void buildInfo() {
this.buildInfo(null);
buildInfo(null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void exec() {
}
if (System.console() != null) {
// Record that the console is available here for AnsiOutput to detect later
this.getEnvironment().put("spring.output.ansi.console-available", true);
getEnvironment().put("spring.output.ansi.console-available", true);
}
super.exec();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void writeManifest(Manifest manifest) throws IOException {
* @throws IOException if the entries cannot be written
*/
public void writeEntries(JarFile jarFile) throws IOException {
this.writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER);
writeEntries(jarFile, EntryTransformer.NONE, UnpackHandler.NEVER);
}

final void writeEntries(JarFile jarFile, EntryTransformer entryTransformer, UnpackHandler unpackHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void repackage(File destination, Libraries libraries) throws IOException
* @since 1.3.0
*/
public void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException {
this.repackage(destination, libraries, launchScript, null);
repackage(destination, libraries, launchScript, null);
}

/**
Expand Down
Loading