diff --git a/org.springframework.core/src/main/java/org/springframework/core/AttributeAccessorSupport.java b/org.springframework.core/src/main/java/org/springframework/core/AttributeAccessorSupport.java
index ece4a05862b..a6bc52560f3 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/AttributeAccessorSupport.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/AttributeAccessorSupport.java
@@ -84,6 +84,7 @@ public abstract class AttributeAccessorSupport implements AttributeAccessor, Ser
}
+ @Override
public boolean equals(Object other) {
if (this == other) {
return true;
@@ -95,6 +96,7 @@ public abstract class AttributeAccessorSupport implements AttributeAccessor, Ser
return this.attributes.equals(that.attributes);
}
+ @Override
public int hashCode() {
return this.attributes.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java b/org.springframework.core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
index 30b5f0cc29c..1b1aebdf265 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
@@ -49,6 +49,7 @@ public class ConfigurableObjectInputStream extends ObjectInputStream {
}
+ @Override
protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException {
try {
if (this.classLoader != null) {
@@ -65,6 +66,7 @@ public class ConfigurableObjectInputStream extends ObjectInputStream {
}
}
+ @Override
protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException {
if (this.classLoader != null) {
// Use the specified ClassLoader to resolve local proxy classes.
diff --git a/org.springframework.core/src/main/java/org/springframework/core/ControlFlowFactory.java b/org.springframework.core/src/main/java/org/springframework/core/ControlFlowFactory.java
index ef10946ed6c..9a17275600a 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/ControlFlowFactory.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/ControlFlowFactory.java
@@ -103,6 +103,7 @@ public abstract class ControlFlowFactory {
return stackTrace.indexOf(token) != -1;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer("Jdk14ControlFlow: ");
for (int i = 0; i < this.stack.length; i++) {
diff --git a/org.springframework.core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java b/org.springframework.core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
index 4a9033bc432..0305f4c75e4 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
@@ -177,6 +177,7 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD
this.descriptorToMatch = descriptor;
}
+ @Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if (name.equals(this.methodNameToMatch) && desc.equals(this.descriptorToMatch)) {
return new LocalVariableTableVisitor(this, isStatic(access));
@@ -253,6 +254,7 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD
this.parameterNames = new String[memberVisitor.numParamsExpected];
}
+ @Override
public void visitLocalVariable(
String name, String description, String signature, Label start, Label end, int index) {
this.hasLvtInfo = true;
@@ -264,6 +266,7 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD
}
}
+ @Override
public void visitEnd() {
if (this.hasLvtInfo || (this.isStatic && this.parameterNames.length == 0)) {
// visitLocalVariable will never be called for static no args methods
diff --git a/org.springframework.core/src/main/java/org/springframework/core/NamedInheritableThreadLocal.java b/org.springframework.core/src/main/java/org/springframework/core/NamedInheritableThreadLocal.java
index fa6c0d8bcfc..e66e94e528b 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/NamedInheritableThreadLocal.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/NamedInheritableThreadLocal.java
@@ -40,6 +40,7 @@ public class NamedInheritableThreadLocal extends InheritableThreadLocal {
this.name = name;
}
+ @Override
public String toString() {
return this.name;
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/NamedThreadLocal.java b/org.springframework.core/src/main/java/org/springframework/core/NamedThreadLocal.java
index 1b84aab8a4c..08d1d2be35b 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/NamedThreadLocal.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/NamedThreadLocal.java
@@ -40,6 +40,7 @@ public class NamedThreadLocal extends ThreadLocal {
this.name = name;
}
+ @Override
public String toString() {
return this.name;
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/NestedCheckedException.java b/org.springframework.core/src/main/java/org/springframework/core/NestedCheckedException.java
index 39361c6aad8..99094d7b7a3 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/NestedCheckedException.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/NestedCheckedException.java
@@ -63,6 +63,7 @@ public abstract class NestedCheckedException extends Exception {
* Return the detail message, including the message from the nested exception
* if there is one.
*/
+ @Override
public String getMessage() {
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/NestedIOException.java b/org.springframework.core/src/main/java/org/springframework/core/NestedIOException.java
index 25536da2987..bcdd152f4aa 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/NestedIOException.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/NestedIOException.java
@@ -59,6 +59,7 @@ public class NestedIOException extends IOException {
* Return the detail message, including the message from the nested exception
* if there is one.
*/
+ @Override
public String getMessage() {
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/NestedRuntimeException.java b/org.springframework.core/src/main/java/org/springframework/core/NestedRuntimeException.java
index fb62c33fbdd..dde2b1dcca6 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/NestedRuntimeException.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/NestedRuntimeException.java
@@ -63,6 +63,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
* Return the detail message, including the message from the nested exception
* if there is one.
*/
+ @Override
public String getMessage() {
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java b/org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java
index b1ef1191d33..20796e7d4be 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java
@@ -54,6 +54,7 @@ public class OverridingClassLoader extends DecoratingClassLoader {
}
+ @Override
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
Class result = null;
if (isEligibleForOverriding(name)) {
diff --git a/org.springframework.core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java b/org.springframework.core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
index 817c3ce3091..13a50b910dc 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
@@ -33,6 +33,7 @@ import org.springframework.core.Ordered;
*/
public class AnnotationAwareOrderComparator extends OrderComparator {
+ @Override
protected int getOrder(Object obj) {
if (obj instanceof Ordered) {
return ((Ordered) obj).getOrder();
diff --git a/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java b/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java
index 40eba4d3223..79ac4f0c9f3 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractCachingLabeledEnumResolver.java
@@ -48,6 +48,7 @@ public abstract class AbstractCachingLabeledEnumResolver implements LabeledEnumR
private final CachingMapDecorator labeledEnumCache = new CachingMapDecorator(true) {
+ @Override
protected Object create(Object key) {
Class enumType = (Class) key;
Set typeEnums = findLabeledEnums(enumType);
@@ -64,6 +65,7 @@ public abstract class AbstractCachingLabeledEnumResolver implements LabeledEnumR
}
return Collections.unmodifiableMap(typeEnumMap);
}
+ @Override
protected boolean useWeakValue(Object key, Object value) {
Class enumType = (Class) key;
if (!ClassUtils.isCacheSafe(enumType, AbstractCachingLabeledEnumResolver.this.getClass().getClassLoader())) {
diff --git a/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java b/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java
index 8081f8c3fe4..d55a483a7b5 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/enums/AbstractLabeledEnum.java
@@ -49,6 +49,7 @@ public abstract class AbstractLabeledEnum implements LabeledEnum {
return this.getCode().compareTo(that.getCode());
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -60,10 +61,12 @@ public abstract class AbstractLabeledEnum implements LabeledEnum {
return (this.getType().equals(other.getType()) && this.getCode().equals(other.getCode()));
}
+ @Override
public int hashCode() {
return (getType().hashCode() * 29 + getCode().hashCode());
}
+ @Override
public String toString() {
return getLabel();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java b/org.springframework.core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
index a1ee63ef1a9..eb6aa86bec8 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
@@ -50,6 +50,7 @@ public class StaticLabeledEnumResolver extends AbstractCachingLabeledEnumResolve
}
+ @Override
protected Set findLabeledEnums(Class type) {
Set typeEnums = new TreeSet();
Field[] fields = type.getFields();
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/AbstractResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/AbstractResource.java
index 21fa7604d4b..eac9c813bed 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/AbstractResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/AbstractResource.java
@@ -153,6 +153,7 @@ public abstract class AbstractResource implements Resource {
* This implementation returns the description of this resource.
* @see #getDescription()
*/
+ @Override
public String toString() {
return getDescription();
}
@@ -161,6 +162,7 @@ public abstract class AbstractResource implements Resource {
* This implementation compares description strings.
* @see #getDescription()
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof Resource && ((Resource) obj).getDescription().equals(getDescription())));
@@ -170,6 +172,7 @@ public abstract class AbstractResource implements Resource {
* This implementation returns the description's hash code.
* @see #getDescription()
*/
+ @Override
public int hashCode() {
return getDescription().hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/ByteArrayResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/ByteArrayResource.java
index 48c5b81eabb..7f20b144461 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/ByteArrayResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/ByteArrayResource.java
@@ -75,6 +75,7 @@ public class ByteArrayResource extends AbstractResource {
/**
* This implementation always returns true.
*/
+ @Override
public boolean exists() {
return true;
}
@@ -100,6 +101,7 @@ public class ByteArrayResource extends AbstractResource {
* This implementation compares the underlying byte array.
* @see java.util.Arrays#equals(byte[], byte[])
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof ByteArrayResource && Arrays.equals(((ByteArrayResource) obj).byteArray, this.byteArray)));
@@ -109,6 +111,7 @@ public class ByteArrayResource extends AbstractResource {
* This implementation returns the hash code based on the
* underlying byte array.
*/
+ @Override
public int hashCode() {
return (byte[].class.hashCode() * 29 * this.byteArray.length);
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/ClassPathResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/ClassPathResource.java
index b803ad77ed2..53c42483080 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/ClassPathResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/ClassPathResource.java
@@ -151,6 +151,7 @@ public class ClassPathResource extends AbstractResource {
* @see java.lang.ClassLoader#getResource(String)
* @see java.lang.Class#getResource(String)
*/
+ @Override
public URL getURL() throws IOException {
URL url = null;
if (this.clazz != null) {
@@ -171,6 +172,7 @@ public class ClassPathResource extends AbstractResource {
* resource, provided that it refers to a file in the file system.
* @see org.springframework.util.ResourceUtils#getFile(java.net.URL, String)
*/
+ @Override
public File getFile() throws IOException {
return ResourceUtils.getFile(getURL(), getDescription());
}
@@ -179,6 +181,7 @@ public class ClassPathResource extends AbstractResource {
* This implementation determines the underlying File
* (or jar file, in case of a resource in a jar/zip).
*/
+ @Override
protected File getFileForLastModifiedCheck() throws IOException {
URL url = getURL();
if (ResourceUtils.isJarURL(url)) {
@@ -195,6 +198,7 @@ public class ClassPathResource extends AbstractResource {
* relative to the path of the underlying resource of this descriptor.
* @see org.springframework.util.StringUtils#applyRelativePath(String, String)
*/
+ @Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new ClassPathResource(pathToUse, this.classLoader, this.clazz);
@@ -205,6 +209,7 @@ public class ClassPathResource extends AbstractResource {
* resource refers to.
* @see org.springframework.util.StringUtils#getFilename(String)
*/
+ @Override
public String getFilename() {
return StringUtils.getFilename(this.path);
}
@@ -220,6 +225,7 @@ public class ClassPathResource extends AbstractResource {
/**
* This implementation compares the underlying class path locations.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -237,6 +243,7 @@ public class ClassPathResource extends AbstractResource {
* This implementation returns the hash code of the underlying
* class path location.
*/
+ @Override
public int hashCode() {
return this.path.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java b/org.springframework.core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
index 6baf59498f1..d422c50ed19 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
@@ -134,6 +134,7 @@ public class DefaultResourceLoader implements ResourceLoader {
return getPath();
}
+ @Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(getPath(), relativePath);
return new ClassPathContextResource(pathToUse, getClassLoader());
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/DescriptiveResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/DescriptiveResource.java
index cab0c6a5d78..df3aaad2cf6 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/DescriptiveResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/DescriptiveResource.java
@@ -44,10 +44,12 @@ public class DescriptiveResource extends AbstractResource {
}
+ @Override
public boolean exists() {
return false;
}
+ @Override
public boolean isReadable() {
return false;
}
@@ -65,6 +67,7 @@ public class DescriptiveResource extends AbstractResource {
/**
* This implementation compares the underlying description String.
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof DescriptiveResource && ((DescriptiveResource) obj).description.equals(this.description)));
@@ -73,6 +76,7 @@ public class DescriptiveResource extends AbstractResource {
/**
* This implementation returns the hash code of the underlying description String.
*/
+ @Override
public int hashCode() {
return this.description.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResource.java
index ef063870348..4ebfbc2d445 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResource.java
@@ -86,6 +86,7 @@ public class FileSystemResource extends AbstractResource {
* This implementation returns whether the underlying file exists.
* @see java.io.File#exists()
*/
+ @Override
public boolean exists() {
return this.file.exists();
}
@@ -96,6 +97,7 @@ public class FileSystemResource extends AbstractResource {
* @see java.io.File#canRead()
* @see java.io.File#isDirectory()
*/
+ @Override
public boolean isReadable() {
return (this.file.canRead() && !this.file.isDirectory());
}
@@ -112,6 +114,7 @@ public class FileSystemResource extends AbstractResource {
* This implementation returns a URL for the underlying file.
* @see java.io.File#toURI()
*/
+ @Override
public URL getURL() throws IOException {
return this.file.toURI().toURL();
}
@@ -120,6 +123,7 @@ public class FileSystemResource extends AbstractResource {
* This implementation returns a URI for the underlying file.
* @see java.io.File#toURI()
*/
+ @Override
public URI getURI() throws IOException {
return this.file.toURI();
}
@@ -127,6 +131,7 @@ public class FileSystemResource extends AbstractResource {
/**
* This implementation returns the underlying File reference.
*/
+ @Override
public File getFile() {
return this.file;
}
@@ -136,6 +141,7 @@ public class FileSystemResource extends AbstractResource {
* relative to the path of the underlying file of this resource descriptor.
* @see org.springframework.util.StringUtils#applyRelativePath(String, String)
*/
+ @Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new FileSystemResource(pathToUse);
@@ -145,6 +151,7 @@ public class FileSystemResource extends AbstractResource {
* This implementation returns the name of the file.
* @see java.io.File#getName()
*/
+ @Override
public String getFilename() {
return this.file.getName();
}
@@ -162,6 +169,7 @@ public class FileSystemResource extends AbstractResource {
/**
* This implementation compares the underlying File references.
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof FileSystemResource && this.path.equals(((FileSystemResource) obj).path)));
@@ -170,6 +178,7 @@ public class FileSystemResource extends AbstractResource {
/**
* This implementation returns the hash code of the underlying File reference.
*/
+ @Override
public int hashCode() {
return this.path.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java b/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java
index 30891d18966..d811d91f80f 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/FileSystemResourceLoader.java
@@ -46,6 +46,7 @@ public class FileSystemResourceLoader extends DefaultResourceLoader {
* @see FileSystemResource
* @see org.springframework.web.context.support.ServletContextResourceLoader#getResourceByPath
*/
+ @Override
protected Resource getResourceByPath(String path) {
if (path != null && path.startsWith("/")) {
path = path.substring(1);
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/InputStreamResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/InputStreamResource.java
index e42edef6acf..e9c1c7d4ae4 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/InputStreamResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/InputStreamResource.java
@@ -71,6 +71,7 @@ public class InputStreamResource extends AbstractResource {
/**
* This implementation always returns true.
*/
+ @Override
public boolean exists() {
return true;
}
@@ -78,6 +79,7 @@ public class InputStreamResource extends AbstractResource {
/**
* This implementation always returns true.
*/
+ @Override
public boolean isOpen() {
return true;
}
@@ -106,6 +108,7 @@ public class InputStreamResource extends AbstractResource {
/**
* This implementation compares the underlying InputStream.
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof InputStreamResource && ((InputStreamResource) obj).inputStream.equals(this.inputStream)));
@@ -114,6 +117,7 @@ public class InputStreamResource extends AbstractResource {
/**
* This implementation returns the hash code of the underlying InputStream.
*/
+ @Override
public int hashCode() {
return this.inputStream.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/ResourceEditor.java b/org.springframework.core/src/main/java/org/springframework/core/io/ResourceEditor.java
index 9d53130c02a..efb6025af87 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/ResourceEditor.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/ResourceEditor.java
@@ -68,6 +68,7 @@ public class ResourceEditor extends PropertyEditorSupport {
}
+ @Override
public void setAsText(String text) {
if (StringUtils.hasText(text)) {
String locationToUse = resolvePath(text).trim();
@@ -90,6 +91,7 @@ public class ResourceEditor extends PropertyEditorSupport {
}
+ @Override
public String getAsText() {
Resource value = (Resource) getValue();
try {
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/UrlResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/UrlResource.java
index 0627cb09ddf..0406b33d97d 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/UrlResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/UrlResource.java
@@ -126,6 +126,7 @@ public class UrlResource extends AbstractResource {
/**
* This implementation returns the underlying URL reference.
*/
+ @Override
public URL getURL() throws IOException {
return this.url;
}
@@ -134,6 +135,7 @@ public class UrlResource extends AbstractResource {
* This implementation returns the underlying URI directly,
* if possible.
*/
+ @Override
public URI getURI() throws IOException {
if (this.uri != null) {
return this.uri;
@@ -148,6 +150,7 @@ public class UrlResource extends AbstractResource {
* provided that it refers to a file in the file system.
* @see org.springframework.util.ResourceUtils#getFile(java.net.URL, String)
*/
+ @Override
public File getFile() throws IOException {
if (this.uri != null) {
return ResourceUtils.getFile(this.uri, getDescription());
@@ -161,6 +164,7 @@ public class UrlResource extends AbstractResource {
* This implementation determines the underlying File
* (or jar file, in case of a resource in a jar/zip).
*/
+ @Override
protected File getFileForLastModifiedCheck() throws IOException {
if (ResourceUtils.isJarURL(this.url)) {
URL actualUrl = ResourceUtils.extractJarFileURL(this.url);
@@ -176,6 +180,7 @@ public class UrlResource extends AbstractResource {
* relative to the path of the underlying URL of this resource descriptor.
* @see java.net.URL#URL(java.net.URL, String)
*/
+ @Override
public Resource createRelative(String relativePath) throws MalformedURLException {
if (relativePath.startsWith("/")) {
relativePath = relativePath.substring(1);
@@ -188,6 +193,7 @@ public class UrlResource extends AbstractResource {
* @see java.net.URL#getFile()
* @see java.io.File#getName()
*/
+ @Override
public String getFilename() {
return new File(this.url.getFile()).getName();
}
@@ -203,6 +209,7 @@ public class UrlResource extends AbstractResource {
/**
* This implementation compares the underlying URL references.
*/
+ @Override
public boolean equals(Object obj) {
return (obj == this ||
(obj instanceof UrlResource && this.cleanedUrl.equals(((UrlResource) obj).cleanedUrl)));
@@ -211,6 +218,7 @@ public class UrlResource extends AbstractResource {
/**
* This implementation returns the hash code of the underlying URL reference.
*/
+ @Override
public int hashCode() {
return this.cleanedUrl.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/support/EncodedResource.java b/org.springframework.core/src/main/java/org/springframework/core/io/support/EncodedResource.java
index 4e680d1193f..c0075caa418 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/support/EncodedResource.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/support/EncodedResource.java
@@ -94,6 +94,7 @@ public class EncodedResource {
}
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -106,10 +107,12 @@ public class EncodedResource {
return false;
}
+ @Override
public int hashCode() {
return this.resource.hashCode();
}
+ @Override
public String toString() {
return this.resource.toString();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java b/org.springframework.core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
index ac4b2c5596c..f23d093ec62 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
@@ -74,6 +74,7 @@ public class ResourceArrayPropertyEditor extends PropertyEditorSupport {
/**
* Treat the given text as location pattern and convert it to a Resource array.
*/
+ @Override
public void setAsText(String text) {
String pattern = resolvePath(text).trim();
try {
@@ -89,6 +90,7 @@ public class ResourceArrayPropertyEditor extends PropertyEditorSupport {
* Treat the given value as collection or array and convert it to a Resource array.
* Considers String elements as location patterns, and takes Resource elements as-is.
*/
+ @Override
public void setValue(Object value) throws IllegalArgumentException {
if (value instanceof Collection || (value instanceof Object[] && !(value instanceof Resource[]))) {
Collection input = (value instanceof Collection ? (Collection) value : Arrays.asList((Object[]) value));
diff --git a/org.springframework.core/src/main/java/org/springframework/core/style/ToStringCreator.java b/org.springframework.core/src/main/java/org/springframework/core/style/ToStringCreator.java
index 8d78888258e..57a07305138 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/style/ToStringCreator.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/style/ToStringCreator.java
@@ -180,6 +180,7 @@ public class ToStringCreator {
/**
* Return the String representation that this ToStringCreator built.
*/
+ @Override
public String toString() {
this.styler.styleEnd(this.buffer, this.object);
return this.buffer.toString();
diff --git a/org.springframework.core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java b/org.springframework.core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
index 2ac8c1289d0..685c4709d20 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
@@ -166,10 +166,12 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement
*/
private static class ConcurrencyThrottleAdapter extends ConcurrencyThrottleSupport {
+ @Override
protected void beforeAccess() {
super.beforeAccess();
}
+ @Override
protected void afterAccess() {
super.afterAccess();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java
index 9236bf38fa9..75e91dd7500 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java
@@ -54,14 +54,17 @@ class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisitor imple
}
+ @Override
public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
final String className = Type.getType(desc).getClassName();
final Map attributes = new LinkedHashMap();
return new EmptyVisitor() {
+ @Override
public void visit(String name, Object value) {
// Explicitly defined annotation attribute value.
attributes.put(name, value);
}
+ @Override
public void visitEnd() {
try {
Class annotationClass = classLoader.loadClass(className);
diff --git a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/CachingMetadataReaderFactory.java b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/CachingMetadataReaderFactory.java
index ea1843966ac..0d71b436257 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/CachingMetadataReaderFactory.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/CachingMetadataReaderFactory.java
@@ -61,6 +61,7 @@ public class CachingMetadataReaderFactory extends SimpleMetadataReaderFactory {
}
+ @Override
public MetadataReader getMetadataReader(Resource resource) throws IOException {
synchronized (this.classReaderCache) {
MetadataReader metadataReader = this.classReaderCache.get(resource);
diff --git a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java
index 892bc6a0d8b..3dcfbb9a673 100644
--- a/org.springframework.core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java
+++ b/org.springframework.core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java
@@ -50,6 +50,7 @@ class ClassMetadataReadingVisitor extends EmptyVisitor implements ClassMetadata
private String[] interfaces;
+ @Override
public void visit(int version, int access, String name, String signature, String supername, String[] interfaces) {
this.className = ClassUtils.convertResourcePathToClassName(name);
this.isInterface = ((access & Opcodes.ACC_INTERFACE) != 0);
@@ -63,10 +64,12 @@ class ClassMetadataReadingVisitor extends EmptyVisitor implements ClassMetadata
}
}
+ @Override
public void visitOuterClass(String owner, String name, String desc) {
this.enclosingClassName = ClassUtils.convertResourcePathToClassName(owner);
}
+ @Override
public void visitInnerClass(String name, String outerName, String innerName, int access) {
if (outerName != null && this.className.equals(ClassUtils.convertResourcePathToClassName(name))) {
this.enclosingClassName = ClassUtils.convertResourcePathToClassName(outerName);
diff --git a/org.springframework.core/src/main/java/org/springframework/util/AutoPopulatingList.java b/org.springframework.core/src/main/java/org/springframework/util/AutoPopulatingList.java
index e7276f8c900..0d57e9511b9 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/AutoPopulatingList.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/AutoPopulatingList.java
@@ -119,6 +119,7 @@ public class AutoPopulatingList implements List, Serializable {
return this.backingList.containsAll(c);
}
+ @Override
public boolean equals(Object o) {
return this.backingList.equals(o);
}
@@ -148,6 +149,7 @@ public class AutoPopulatingList implements List, Serializable {
return element;
}
+ @Override
public int hashCode() {
return this.backingList.hashCode();
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/CachingMapDecorator.java b/org.springframework.core/src/main/java/org/springframework/util/CachingMapDecorator.java
index c6f87c57a8d..c9d6b05dedb 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/CachingMapDecorator.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/CachingMapDecorator.java
@@ -269,6 +269,7 @@ public class CachingMapDecorator implements Map, Serializable {
}
+ @Override
public String toString() {
return "CachingMapDecorator [" + getClass().getName() + "]:" + this.targetMap;
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/CommonsLogWriter.java b/org.springframework.core/src/main/java/org/springframework/util/CommonsLogWriter.java
index 9db1c876601..dc1308d4901 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/CommonsLogWriter.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/CommonsLogWriter.java
@@ -53,6 +53,7 @@ public class CommonsLogWriter extends Writer {
}
}
+ @Override
public void write(char[] buffer, int offset, int length) {
for (int i = 0; i < length; i++) {
char ch = buffer[offset + i];
@@ -66,9 +67,11 @@ public class CommonsLogWriter extends Writer {
}
}
+ @Override
public void flush() {
}
+ @Override
public void close() {
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/StopWatch.java b/org.springframework.core/src/main/java/org/springframework/util/StopWatch.java
index 7fc0c9ab74c..d8afa1afb4d 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/StopWatch.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/StopWatch.java
@@ -232,6 +232,7 @@ public class StopWatch {
* Return an informative string describing all tasks performed
* For custom reporting, call getTaskInfo() and use the task info directly.
*/
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer(shortSummary());
if (this.keepTaskList) {
diff --git a/org.springframework.core/src/main/java/org/springframework/util/comparator/BooleanComparator.java b/org.springframework.core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
index 4095b2f3c8c..26dd4aaf3f4 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
@@ -64,6 +64,7 @@ public final class BooleanComparator implements Comparator, Serializable {
return (v1 ^ v2) ? ((v1 ^ this.trueLow) ? 1 : -1) : 0;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -74,10 +75,12 @@ public final class BooleanComparator implements Comparator, Serializable {
return (this.trueLow == ((BooleanComparator) obj).trueLow);
}
+ @Override
public int hashCode() {
return (this.trueLow ? -1 : 1) * getClass().hashCode();
}
+ @Override
public String toString() {
return "BooleanComparator: " + (this.trueLow ? "true low" : "true high");
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/comparator/CompoundComparator.java b/org.springframework.core/src/main/java/org/springframework/util/comparator/CompoundComparator.java
index 3de42f56ab0..2e238b2f82d 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/comparator/CompoundComparator.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/comparator/CompoundComparator.java
@@ -184,6 +184,7 @@ public class CompoundComparator implements Comparator, Serializable {
return 0;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -195,10 +196,12 @@ public class CompoundComparator implements Comparator, Serializable {
return this.comparators.equals(other.comparators);
}
+ @Override
public int hashCode() {
return this.comparators.hashCode();
}
+ @Override
public String toString() {
return "CompoundComparator: " + this.comparators;
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java b/org.springframework.core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java
index 22f73f771b3..1af7fb45160 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/comparator/InvertibleComparator.java
@@ -96,6 +96,7 @@ public class InvertibleComparator implements Comparator, Serializable {
return 0;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -107,10 +108,12 @@ public class InvertibleComparator implements Comparator, Serializable {
return (this.comparator.equals(other.comparator) && this.ascending == other.ascending);
}
+ @Override
public int hashCode() {
return this.comparator.hashCode();
}
+ @Override
public String toString() {
return "InvertibleComparator: [" + this.comparator + "]; ascending=" + this.ascending;
}
diff --git a/org.springframework.core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java b/org.springframework.core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
index edec70ff4a9..915553ea241 100644
--- a/org.springframework.core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
+++ b/org.springframework.core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
@@ -96,6 +96,7 @@ public class NullSafeComparator implements Comparator {
return this.nonNullComparator.compare(o1, o2);
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -107,10 +108,12 @@ public class NullSafeComparator implements Comparator {
return (this.nonNullComparator.equals(other.nonNullComparator) && this.nullsLow == other.nullsLow);
}
+ @Override
public int hashCode() {
return (this.nullsLow ? -1 : 1) * this.nonNullComparator.hashCode();
}
+ @Override
public String toString() {
return "NullSafeComparator: non-null comparator [" + this.nonNullComparator + "]; " +
(this.nullsLow ? "nulls low" : "nulls high");