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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
* @author Sam Brannen
|
||||||
* @since 2.5
|
* @since 2.5
|
||||||
* @see org.springframework.beans.factory.config.PropertyOverrideConfigurer
|
* @see org.springframework.beans.factory.config.PropertyOverrideConfigurer
|
||||||
* @see org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
|
|
||||||
*/
|
*/
|
||||||
public interface PriorityOrdered extends Ordered {
|
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 type the reactive type
|
||||||
* @param emptySupplier a supplier of an empty-value instance of 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
|
* Convenience method that will {@link #getGenerics() get} and
|
||||||
* {@link #resolve() resolve} generic parameters.
|
* {@link #resolve() resolve} generic parameters.
|
||||||
* @return an array of resolved generic parameters (the resulting array
|
* @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 #getGenerics()
|
||||||
* @see #resolve()
|
* @see #resolve()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,7 +39,6 @@ import org.springframework.lang.Nullable;
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 3.2.7
|
* @since 3.2.7
|
||||||
* @see org.springframework.beans.StandardBeanInfoFactory#IGNORE_BEANINFO_PROPERTY_NAME
|
* @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.core.env.AbstractEnvironment#IGNORE_GETENV_PROPERTY_NAME
|
||||||
* @see org.springframework.expression.spel.SpelParserConfiguration#SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME
|
* @see org.springframework.expression.spel.SpelParserConfiguration#SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME
|
||||||
* @see org.springframework.jdbc.core.StatementCreatorUtils#IGNORE_GETPARAMETERTYPE_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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -98,7 +98,6 @@ abstract class AnnotationsScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private static <C, R> R processClass(C context, Class<?> source, SearchStrategy searchStrategy,
|
private static <C, R> R processClass(C context, Class<?> source, SearchStrategy searchStrategy,
|
||||||
Predicate<Class<?>> searchEnclosingClass, AnnotationsProcessor<C, R> processor) {
|
Predicate<Class<?>> searchEnclosingClass, AnnotationsProcessor<C, R> processor) {
|
||||||
|
|
||||||
|
@ -237,7 +236,6 @@ abstract class AnnotationsScanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private static <C, R> R processMethod(C context, Method source,
|
private static <C, R> R processMethod(C context, Method source,
|
||||||
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
|
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
|
||||||
|
|
||||||
|
@ -509,7 +507,6 @@ abstract class AnnotationsScanner {
|
||||||
return (type.getName().startsWith("java.") || type == Ordered.class);
|
return (type.getName().startsWith("java.") || type == Ordered.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private static boolean isWithoutHierarchy(AnnotatedElement source, SearchStrategy searchStrategy,
|
private static boolean isWithoutHierarchy(AnnotatedElement source, SearchStrategy searchStrategy,
|
||||||
Predicate<Class<?>> searchEnclosingClass) {
|
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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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
|
* @since 5.0
|
||||||
* @param <T> the element type
|
* @param <T> the element type
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public abstract class AbstractDataBufferDecoder<T> extends AbstractDecoder<T> {
|
public abstract class AbstractDataBufferDecoder<T> extends AbstractDecoder<T> {
|
||||||
|
|
||||||
private int maxInMemorySize = 256 * 1024;
|
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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.
|
* 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 Keith Donald
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
|
@ -25,9 +25,8 @@ import org.springframework.util.StringUtils;
|
||||||
/**
|
/**
|
||||||
* Abstract base class for {@link PropertySource} implementations backed by command line
|
* Abstract base class for {@link PropertySource} implementations backed by command line
|
||||||
* arguments. The parameterized type {@code T} represents the underlying source of command
|
* 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
|
* line options. For instance, {@link SimpleCommandLinePropertySource} uses a String
|
||||||
* {@link SimpleCommandLinePropertySource}, or specific to a particular API such as JOpt's
|
* array.
|
||||||
* {@code OptionSet} in the case of {@link JOptCommandLinePropertySource}.
|
|
||||||
*
|
*
|
||||||
* <h3>Purpose and General Usage</h3>
|
* <h3>Purpose and General Usage</h3>
|
||||||
*
|
*
|
||||||
|
@ -203,7 +202,6 @@ import org.springframework.util.StringUtils;
|
||||||
* @param <T> the source type
|
* @param <T> the source type
|
||||||
* @see PropertySource
|
* @see PropertySource
|
||||||
* @see SimpleCommandLinePropertySource
|
* @see SimpleCommandLinePropertySource
|
||||||
* @see JOptCommandLinePropertySource
|
|
||||||
*/
|
*/
|
||||||
public abstract class CommandLinePropertySource<T> extends EnumerablePropertySource<T> {
|
public abstract class CommandLinePropertySource<T> extends EnumerablePropertySource<T> {
|
||||||
|
|
||||||
|
|
|
@ -74,15 +74,13 @@ import org.springframework.util.StringUtils;
|
||||||
*
|
*
|
||||||
* <h3>Beyond the basics</h3>
|
* <h3>Beyond the basics</h3>
|
||||||
*
|
*
|
||||||
* <p>When more fully-featured command line parsing is necessary, consider using
|
* <p>When more fully-featured command line parsing is necessary, consider
|
||||||
* the provided {@link JOptCommandLinePropertySource}, or implement your own
|
* implementing your own {@code CommandLinePropertySource} against the command line
|
||||||
* {@code CommandLinePropertySource} against the command line parsing library of your
|
* parsing library of your choice.
|
||||||
* choice.
|
|
||||||
*
|
*
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
* @see CommandLinePropertySource
|
* @see CommandLinePropertySource
|
||||||
* @see JOptCommandLinePropertySource
|
|
||||||
*/
|
*/
|
||||||
public class SimpleCommandLinePropertySource extends CommandLinePropertySource<CommandLineArgs> {
|
public class SimpleCommandLinePropertySource extends CommandLinePropertySource<CommandLineArgs> {
|
||||||
|
|
||||||
|
|
|
@ -829,7 +829,7 @@ public abstract class DataBufferUtils {
|
||||||
*/
|
*/
|
||||||
private static class SingleByteMatcher implements NestedMatcher {
|
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;
|
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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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() {
|
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(
|
throw new DataBufferLimitException(
|
||||||
"Exceeded limit on max bytes to buffer : " + this.maxByteCount);
|
"Exceeded limit on max bytes to buffer : " + this.maxByteCount);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,6 @@ public class DefaultDeserializer implements Deserializer<Object> {
|
||||||
* @see ObjectInputStream#readObject()
|
* @see ObjectInputStream#readObject()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("resource")
|
|
||||||
public Object deserialize(InputStream inputStream) throws IOException {
|
public Object deserialize(InputStream inputStream) throws IOException {
|
||||||
ObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader);
|
ObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader);
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||||
*
|
*
|
||||||
* <p><b>NOTE:</b> This ExecutorService adapter does <em>not</em> support the
|
* <p><b>NOTE:</b> This ExecutorService adapter does <em>not</em> support the
|
||||||
* lifecycle methods in the {@code java.util.concurrent.ExecutorService} API
|
* 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,
|
* 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.
|
* 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
|
@Override
|
||||||
public void visitEnd() {
|
public void visitEnd() {
|
||||||
Map<String, Object> compactedAttributes =
|
Map<String, Object> compactedAttributes =
|
||||||
(this.attributes.size() == 0 ? Collections.emptyMap() : this.attributes);
|
(this.attributes.isEmpty() ? Collections.emptyMap() : this.attributes);
|
||||||
MergedAnnotation<A> annotation = MergedAnnotation.of(
|
MergedAnnotation<A> annotation = MergedAnnotation.of(
|
||||||
this.classLoader, this.source, this.annotationType, compactedAttributes);
|
this.classLoader, this.source, this.annotationType, compactedAttributes);
|
||||||
this.consumer.accept(annotation);
|
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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.
|
// Optimization to avoid creating ClassReader for superclass.
|
||||||
Boolean superClassMatch = matchSuperClass(superClassName);
|
Boolean superClassMatch = matchSuperClass(superClassName);
|
||||||
if (superClassMatch != null) {
|
if (superClassMatch != null) {
|
||||||
if (superClassMatch.booleanValue()) {
|
if (superClassMatch) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public abstract class AbstractTypeHierarchyTraversingFilter implements TypeFilte
|
||||||
// Optimization to avoid creating ClassReader for superclass
|
// Optimization to avoid creating ClassReader for superclass
|
||||||
Boolean interfaceMatch = matchInterface(ifc);
|
Boolean interfaceMatch = matchInterface(ifc);
|
||||||
if (interfaceMatch != null) {
|
if (interfaceMatch != null) {
|
||||||
if (interfaceMatch.booleanValue()) {
|
if (interfaceMatch) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue