Polish
This commit is contained in:
parent
3d248607dc
commit
199d5e5f37
|
@ -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 {
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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()
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <C, R> R processClass(C context, Class<?> source, SearchStrategy searchStrategy,
|
||||
Predicate<Class<?>> searchEnclosingClass, AnnotationsProcessor<C, R> processor) {
|
||||
|
||||
|
@ -237,7 +236,6 @@ abstract class AnnotationsScanner {
|
|||
}
|
||||
|
||||
@Nullable
|
||||
@SuppressWarnings("deprecation")
|
||||
private static <C, R> R processMethod(C context, Method source,
|
||||
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> 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<Class<?>> searchEnclosingClass) {
|
||||
|
||||
|
|
|
@ -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 <T> the element type
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class AbstractDataBufferDecoder<T> extends AbstractDecoder<T> {
|
||||
|
||||
private int maxInMemorySize = 256 * 1024;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* <h3>Purpose and General Usage</h3>
|
||||
*
|
||||
|
@ -203,7 +202,6 @@ import org.springframework.util.StringUtils;
|
|||
* @param <T> the source type
|
||||
* @see PropertySource
|
||||
* @see SimpleCommandLinePropertySource
|
||||
* @see JOptCommandLinePropertySource
|
||||
*/
|
||||
public abstract class CommandLinePropertySource<T> extends EnumerablePropertySource<T> {
|
||||
|
||||
|
|
|
@ -74,15 +74,13 @@ import org.springframework.util.StringUtils;
|
|||
*
|
||||
* <h3>Beyond the basics</h3>
|
||||
*
|
||||
* <p>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.
|
||||
* <p>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<CommandLineArgs> {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<DataBuffer> {
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@ public class DefaultDeserializer implements Deserializer<Object> {
|
|||
* @see ObjectInputStream#readObject()
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("resource")
|
||||
public Object deserialize(InputStream inputStream) throws IOException {
|
||||
ObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader);
|
||||
try {
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
|||
*
|
||||
* <p><b>NOTE:</b> This ExecutorService adapter does <em>not</em> 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.
|
||||
*
|
||||
|
|
|
@ -94,7 +94,7 @@ class MergedAnnotationReadingVisitor<A extends Annotation> extends AnnotationVis
|
|||
@Override
|
||||
public void visitEnd() {
|
||||
Map<String, Object> compactedAttributes =
|
||||
(this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes);
|
||||
(this.attributes.isEmpty() ? Collections.emptyMap() : this.attributes);
|
||||
MergedAnnotation<A> annotation = MergedAnnotation.of(
|
||||
this.classLoader, this.source, this.annotationType, compactedAttributes);
|
||||
this.consumer.accept(annotation);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue