Remove unneeded @NonNull annotations
See gh-28797
This commit is contained in:
@@ -23,8 +23,6 @@ import java.beans.PropertyDescriptor;
|
||||
import java.beans.SimpleBeanInfo;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
|
||||
/**
|
||||
@@ -48,7 +46,7 @@ import org.springframework.core.Ordered;
|
||||
class SimpleBeanInfoFactory implements BeanInfoFactory, Ordered {
|
||||
|
||||
@Override
|
||||
public @NonNull BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
|
||||
public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
|
||||
Collection<? extends PropertyDescriptor> pds =
|
||||
PropertyDescriptorUtils.determineBasicProperties(beanClass);
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.SpringProperties;
|
||||
|
||||
@@ -67,7 +65,7 @@ public class StandardBeanInfoFactory implements BeanInfoFactory, Ordered {
|
||||
|
||||
|
||||
@Override
|
||||
public @NonNull BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
|
||||
public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
|
||||
BeanInfo beanInfo = (shouldIntrospectorIgnoreBeaninfoClasses ?
|
||||
Introspector.getBeanInfo(beanClass, Introspector.IGNORE_ALL_BEANINFO) :
|
||||
Introspector.getBeanInfo(beanClass));
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.beans.factory.support;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
|
||||
@@ -76,7 +74,7 @@ public class BeanDefinitionOverrideException extends BeanDefinitionStoreExceptio
|
||||
* Return the description of the resource that the bean definition came from.
|
||||
*/
|
||||
@Override
|
||||
public @NonNull String getResourceDescription() {
|
||||
public String getResourceDescription() {
|
||||
return String.valueOf(super.getResourceDescription());
|
||||
}
|
||||
|
||||
@@ -84,7 +82,7 @@ public class BeanDefinitionOverrideException extends BeanDefinitionStoreExceptio
|
||||
* Return the name of the bean.
|
||||
*/
|
||||
@Override
|
||||
public @NonNull String getBeanName() {
|
||||
public String getBeanName() {
|
||||
return String.valueOf(super.getBeanName());
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.jspecify.annotations.NonNull;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
|
||||
@@ -448,7 +447,7 @@ class ConfigurationClassBeanDefinitionReader {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull MethodMetadata getFactoryMethodMetadata() {
|
||||
public MethodMetadata getFactoryMethodMetadata() {
|
||||
return this.factoryMethodMetadata;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.scheduling.annotation;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
|
||||
import org.springframework.context.annotation.AdviceMode;
|
||||
import org.springframework.context.annotation.AdviceModeImportSelector;
|
||||
|
||||
@@ -44,7 +42,7 @@ public class AsyncConfigurationSelector extends AdviceModeImportSelector<EnableA
|
||||
* respectively.
|
||||
*/
|
||||
@Override
|
||||
public @NonNull String[] selectImports(AdviceMode adviceMode) {
|
||||
public String[] selectImports(AdviceMode adviceMode) {
|
||||
return switch (adviceMode) {
|
||||
case PROXY -> new String[] {ProxyAsyncConfiguration.class.getName()};
|
||||
case ASPECTJ -> new String[] {ASYNC_EXECUTION_ASPECT_CONFIGURATION_CLASS_NAME};
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.validation;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -62,7 +61,7 @@ public class MapBindingResult extends AbstractBindingResult implements Serializa
|
||||
}
|
||||
|
||||
@Override
|
||||
public final @NonNull Object getTarget() {
|
||||
public final Object getTarget() {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.core.BridgeMethodResolver;
|
||||
@@ -264,7 +263,7 @@ public class AnnotatedMethod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Method getMethod() {
|
||||
public Method getMethod() {
|
||||
return AnnotatedMethod.this.getBridgedMethod();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.beans.PropertyDescriptor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.beans.BeanWrapper;
|
||||
@@ -90,7 +89,7 @@ public class BeanPropertySqlParameterSource extends AbstractSqlParameterSource {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String[] getParameterNames() {
|
||||
public String[] getParameterNames() {
|
||||
return getReadablePropertyNames();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.jdbc.core.SqlParameterValue;
|
||||
@@ -174,7 +173,7 @@ public class MapSqlParameterSource extends AbstractSqlParameterSource {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String[] getParameterNames() {
|
||||
public String[] getParameterNames() {
|
||||
return StringUtils.toStringArray(this.values.keySet());
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.Spliterator;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import io.r2dbc.spi.Statement;
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -206,7 +205,7 @@ public class Bindings implements Iterable<Bindings.Binding> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Object getValue() {
|
||||
public Object getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -109,7 +108,7 @@ public class MockMultipartFile implements MultipartFile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getOriginalFilename() {
|
||||
public String getOriginalFilename() {
|
||||
return this.originalFilename;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.reactivestreams.Publisher;
|
||||
|
||||
@@ -379,7 +378,7 @@ public final class MultipartBodyBuilder {
|
||||
* Return the element type for the {@code Publisher} body.
|
||||
*/
|
||||
@Override
|
||||
public @NonNull ResolvableType getResolvableType() {
|
||||
public ResolvableType getResolvableType() {
|
||||
return this.resolvableType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ import jakarta.xml.bind.Unmarshaller;
|
||||
import jakarta.xml.bind.annotation.XmlRootElement;
|
||||
import jakarta.xml.bind.annotation.XmlSeeAlso;
|
||||
import jakarta.xml.bind.annotation.XmlType;
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.core.Exceptions;
|
||||
@@ -172,7 +171,7 @@ public class Jaxb2XmlDecoder extends AbstractDecoder<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Object decode(DataBuffer dataBuffer, ResolvableType targetType,
|
||||
public Object decode(DataBuffer dataBuffer, ResolvableType targetType,
|
||||
@Nullable MimeType mimeType, @Nullable Map<String, Object> hints) throws DecodingException {
|
||||
|
||||
try {
|
||||
|
||||
@@ -35,7 +35,6 @@ import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.http.Cookie;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
@@ -214,12 +213,12 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull InetSocketAddress getLocalAddress() {
|
||||
public InetSocketAddress getLocalAddress() {
|
||||
return new InetSocketAddress(this.request.getLocalAddr(), this.request.getLocalPort());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull InetSocketAddress getRemoteAddress() {
|
||||
public InetSocketAddress getRemoteAddress() {
|
||||
return new InetSocketAddress(this.request.getRemoteHost(), this.request.getRemotePort());
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.StringJoiner;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -196,7 +195,7 @@ final class HierarchicalUriComponents extends UriComponents {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getPath() {
|
||||
public String getPath() {
|
||||
return this.path.getPath();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.jspecify.annotations.NonNull;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
@@ -109,7 +108,7 @@ public class MockMultipartFile implements MultipartFile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull String getOriginalFilename() {
|
||||
public String getOriginalFilename() {
|
||||
return this.originalFilename;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user