Polishing and removal of "this." for method invocations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -69,7 +69,7 @@ public class HttpMediaTypeNotAcceptableException extends HttpMediaTypeException
|
||||
return HttpHeaders.EMPTY;
|
||||
}
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setAccept(this.getSupportedMediaTypes());
|
||||
headers.setAccept(getSupportedMediaTypes());
|
||||
return headers;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -237,7 +237,7 @@ public class InMemoryWebSessionStore implements WebSessionStore {
|
||||
InMemoryWebSessionStore.this.sessions.remove(currentId);
|
||||
String newId = String.valueOf(idGenerator.generateId());
|
||||
this.id.set(newId);
|
||||
InMemoryWebSessionStore.this.sessions.put(this.getId(), this);
|
||||
InMemoryWebSessionStore.this.sessions.put(this.id.get(), this);
|
||||
return Mono.empty();
|
||||
})
|
||||
.subscribeOn(Schedulers.boundedElastic())
|
||||
@@ -266,11 +266,11 @@ public class InMemoryWebSessionStore implements WebSessionStore {
|
||||
|
||||
if (isStarted()) {
|
||||
// Save
|
||||
InMemoryWebSessionStore.this.sessions.put(this.getId(), this);
|
||||
InMemoryWebSessionStore.this.sessions.put(this.id.get(), this);
|
||||
|
||||
// Unless it was invalidated
|
||||
if (this.state.get().equals(State.EXPIRED)) {
|
||||
InMemoryWebSessionStore.this.sessions.remove(this.getId());
|
||||
InMemoryWebSessionStore.this.sessions.remove(this.id.get());
|
||||
return Mono.error(new IllegalStateException("Session was invalidated"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -2040,7 +2040,7 @@ final class WhatWgUrlParser {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || obj.getClass() != this.getClass()) {
|
||||
if (obj == null || getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UrlRecord that = (UrlRecord) obj;
|
||||
@@ -2322,7 +2322,7 @@ final class WhatWgUrlParser {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj == this || obj != null && obj.getClass() == this.getClass();
|
||||
return obj == this || obj != null && getClass() == obj.getClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -435,7 +435,7 @@ public class PathPattern implements Comparable<PathPattern> {
|
||||
if (this.endsWithSeparatorWildcard) {
|
||||
String prefix = this.patternString.length() > 2 ?
|
||||
this.patternString.substring(0, this.patternString.length() - 2) :
|
||||
String.valueOf(this.getSeparator());
|
||||
String.valueOf(getSeparator());
|
||||
return this.parser.parse(concat(prefix, otherPattern.patternString));
|
||||
}
|
||||
|
||||
@@ -465,8 +465,8 @@ public class PathPattern implements Comparable<PathPattern> {
|
||||
"Cannot combine patterns: " + this.patternString + " and " + otherPattern);
|
||||
}
|
||||
|
||||
String firstPath = this.patternString.substring(0, this.patternString.lastIndexOf(this.getSeparator()));
|
||||
String secondPath = otherPattern.patternString.substring(0, otherPattern.patternString.lastIndexOf(this.getSeparator()));
|
||||
String firstPath = this.patternString.substring(0, this.patternString.lastIndexOf(getSeparator()));
|
||||
String secondPath = otherPattern.patternString.substring(0, otherPattern.patternString.lastIndexOf(getSeparator()));
|
||||
if (!this.parser.parse(firstPath).matches(PathContainer.parsePath(secondPath))) {
|
||||
throw new IllegalArgumentException(
|
||||
"Cannot combine patterns: " + this.patternString + " and " + otherPattern);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -615,7 +615,7 @@ class Jackson2ObjectMapperBuilderTests {
|
||||
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return this.getClass().getSimpleName();
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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.
|
||||
@@ -358,7 +358,7 @@ public class Jackson2ObjectMapperFactoryBeanTests {
|
||||
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return this.getClass().getSimpleName();
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 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 @@ class CompositeUriComponentsContributorTests {
|
||||
resolvers.add(new RequestParamMethodArgumentResolver(true));
|
||||
|
||||
CompositeUriComponentsContributor contributor = new CompositeUriComponentsContributor(resolvers);
|
||||
Method method = ClassUtils.getMethod(this.getClass(), "handleRequest", String.class, String.class, String.class);
|
||||
Method method = ClassUtils.getMethod(getClass(), "handleRequest", String.class, String.class, String.class);
|
||||
assertThat(contributor.supportsParameter(new MethodParameter(method, 0))).isTrue();
|
||||
assertThat(contributor.supportsParameter(new MethodParameter(method, 1))).isTrue();
|
||||
assertThat(contributor.supportsParameter(new MethodParameter(method, 2))).isFalse();
|
||||
|
||||
Reference in New Issue
Block a user