diff --git a/spring-core/src/main/java/org/springframework/core/PriorityOrdered.java b/spring-core/src/main/java/org/springframework/core/PriorityOrdered.java index 2090cd35f9..aac7916370 100644 --- a/spring-core/src/main/java/org/springframework/core/PriorityOrdered.java +++ b/spring-core/src/main/java/org/springframework/core/PriorityOrdered.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 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,6 @@ package org.springframework.core; * @author Sam Brannen * @since 2.5 * @see org.springframework.beans.factory.config.PropertyOverrideConfigurer - * @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer */ public interface PriorityOrdered extends Ordered { } diff --git a/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java b/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java index 5e37afabf0..d056613e94 100644 --- a/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java +++ b/spring-core/src/main/java/org/springframework/core/ReactiveTypeDescriptor.java @@ -130,7 +130,7 @@ public final class ReactiveTypeDescriptor { /** - * Descriptor for a reactive type that can produce 0..N values. + * Descriptor for a reactive type that can produce {@code 0..N} values. * @param type the reactive type * @param emptySupplier a supplier of an empty-value instance of the reactive type */ diff --git a/spring-core/src/main/java/org/springframework/core/ResolvableType.java b/spring-core/src/main/java/org/springframework/core/ResolvableType.java index 6db94aa366..510b191c9a 100644 --- a/spring-core/src/main/java/org/springframework/core/ResolvableType.java +++ b/spring-core/src/main/java/org/springframework/core/ResolvableType.java @@ -758,7 +758,7 @@ public class ResolvableType implements Serializable { * Convenience method that will {@link #getGenerics() get} and * {@link #resolve() resolve} generic parameters. * @return an array of resolved generic parameters (the resulting array - * will never be {@code null}, but it may contain {@code null} elements}) + * will never be {@code null}, but it may contain {@code null} elements) * @see #getGenerics() * @see #resolve() */ diff --git a/spring-core/src/main/java/org/springframework/core/SpringProperties.java b/spring-core/src/main/java/org/springframework/core/SpringProperties.java index 9c53470a82..3cb1cd51eb 100644 --- a/spring-core/src/main/java/org/springframework/core/SpringProperties.java +++ b/spring-core/src/main/java/org/springframework/core/SpringProperties.java @@ -39,7 +39,6 @@ import org.springframework.lang.Nullable; * @author Juergen Hoeller * @since 3.2.7 * @see org.springframework.beans.StandardBeanInfoFactory#IGNORE_BEANINFO_PROPERTY_NAME - * @see org.springframework.context.index.CandidateComponentsIndexLoader#IGNORE_INDEX * @see org.springframework.core.env.AbstractEnvironment#IGNORE_GETENV_PROPERTY_NAME * @see org.springframework.expression.spel.SpelParserConfiguration#SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME * @see org.springframework.jdbc.core.StatementCreatorUtils#IGNORE_GETPARAMETERTYPE_PROPERTY_NAME diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java index 61fea06852..a98c005f37 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 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. @@ -98,7 +98,6 @@ abstract class AnnotationsScanner { } @Nullable - @SuppressWarnings("deprecation") private static R processClass(C context, Class source, SearchStrategy searchStrategy, Predicate> searchEnclosingClass, AnnotationsProcessor processor) { @@ -237,7 +236,6 @@ abstract class AnnotationsScanner { } @Nullable - @SuppressWarnings("deprecation") private static R processMethod(C context, Method source, SearchStrategy searchStrategy, AnnotationsProcessor processor) { @@ -509,7 +507,6 @@ abstract class AnnotationsScanner { return (type.getName().startsWith("java.") || type == Ordered.class); } - @SuppressWarnings("deprecation") private static boolean isWithoutHierarchy(AnnotatedElement source, SearchStrategy searchStrategy, Predicate> searchEnclosingClass) { diff --git a/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java b/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java index 0fd5870b2a..9bcb6430f0 100644 --- a/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java +++ b/spring-core/src/main/java/org/springframework/core/codec/AbstractDataBufferDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 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. @@ -45,7 +45,6 @@ import org.springframework.util.MimeType; * @since 5.0 * @param the element type */ -@SuppressWarnings("deprecation") public abstract class AbstractDataBufferDecoder extends AbstractDecoder { private int maxInMemorySize = 256 * 1024; diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java index 038a82d742..7cece80cf8 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/StringToArrayConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2023 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. @@ -29,7 +29,7 @@ import org.springframework.util.StringUtils; /** * Converts a comma-delimited String to an Array. - * Only matches if String.class can be converted to the target array element type. + * Only matches if {@code String.class} can be converted to the target array element type. * * @author Keith Donald * @author Juergen Hoeller diff --git a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java index c317f5e2dc..6a5cd246a2 100644 --- a/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java @@ -25,9 +25,8 @@ import org.springframework.util.StringUtils; /** * Abstract base class for {@link PropertySource} implementations backed by command line * arguments. The parameterized type {@code T} represents the underlying source of command - * line options. This may be as simple as a String array in the case of - * {@link SimpleCommandLinePropertySource}, or specific to a particular API such as JOpt's - * {@code OptionSet} in the case of {@link JOptCommandLinePropertySource}. + * line options. For instance, {@link SimpleCommandLinePropertySource} uses a String + * array. * *

Purpose and General Usage

* @@ -203,7 +202,6 @@ import org.springframework.util.StringUtils; * @param the source type * @see PropertySource * @see SimpleCommandLinePropertySource - * @see JOptCommandLinePropertySource */ public abstract class CommandLinePropertySource extends EnumerablePropertySource { diff --git a/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java index 48015092c1..3efb89a327 100644 --- a/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java @@ -74,15 +74,13 @@ import org.springframework.util.StringUtils; * *

Beyond the basics

* - *

When more fully-featured command line parsing is necessary, consider using - * the provided {@link JOptCommandLinePropertySource}, or implement your own - * {@code CommandLinePropertySource} against the command line parsing library of your - * choice. + *

When more fully-featured command line parsing is necessary, consider + * implementing your own {@code CommandLinePropertySource} against the command line + * parsing library of your choice. * * @author Chris Beams * @since 3.1 * @see CommandLinePropertySource - * @see JOptCommandLinePropertySource */ public class SimpleCommandLinePropertySource extends CommandLinePropertySource { diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java index 16cd5d5115..0d7b1d6393 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java @@ -829,7 +829,7 @@ public abstract class DataBufferUtils { */ private static class SingleByteMatcher implements NestedMatcher { - static SingleByteMatcher NEWLINE_MATCHER = new SingleByteMatcher(new byte[] {10}); + static final SingleByteMatcher NEWLINE_MATCHER = new SingleByteMatcher(new byte[] {10}); private final byte[] delimiter; diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java b/spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java index 62fa289e7c..d089fc4ec9 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/LimitedDataBufferList.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2023 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. @@ -95,7 +95,7 @@ public class LimitedDataBufferList extends ArrayList { } private void raiseLimitException() { - // Do not release here, it's likely down via doOnDiscard.. + // Do not release here, it's likely done via doOnDiscard throw new DataBufferLimitException( "Exceeded limit on max bytes to buffer : " + this.maxByteCount); } diff --git a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java index 07bf246b05..3096daf961 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java @@ -65,7 +65,6 @@ public class DefaultDeserializer implements Deserializer { * @see ObjectInputStream#readObject() */ @Override - @SuppressWarnings("resource") public Object deserialize(InputStream inputStream) throws IOException { ObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader); try { diff --git a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java index 9c8958d214..e1860006a5 100644 --- a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java +++ b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java @@ -34,7 +34,7 @@ import org.springframework.util.Assert; * *

NOTE: This ExecutorService adapter does not support the * lifecycle methods in the {@code java.util.concurrent.ExecutorService} API - * ("shutdown()" etc), similar to a server-wide {@code ManagedExecutorService} + * ("shutdown()" etc.), similar to a server-wide {@code ManagedExecutorService} * in a Jakarta EE environment. The lifecycle is always up to the backend pool, * with this adapter acting as an access-only proxy for that target pool. * diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java b/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java index 540ee3546a..1a2bfe899d 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/MergedAnnotationReadingVisitor.java @@ -94,7 +94,7 @@ class MergedAnnotationReadingVisitor extends AnnotationVis @Override public void visitEnd() { Map compactedAttributes = - (this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes); + (this.attributes.isEmpty() ? Collections.emptyMap() : this.attributes); MergedAnnotation annotation = MergedAnnotation.of( this.classLoader, this.source, this.annotationType, compactedAttributes); this.consumer.accept(annotation); diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java index 96874edb2e..145450bf57 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 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. @@ -73,7 +73,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte // Optimization to avoid creating ClassReader for superclass. Boolean superClassMatch = matchSuperClass(superClassName); if (superClassMatch != null) { - if (superClassMatch.booleanValue()) { + if (superClassMatch) { return true; } } @@ -99,7 +99,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte // Optimization to avoid creating ClassReader for superclass Boolean interfaceMatch = matchInterface(ifc); if (interfaceMatch != null) { - if (interfaceMatch.booleanValue()) { + if (interfaceMatch) { return true; } }