Remove unneeded @NonNull annotations

See gh-28797
This commit is contained in:
Sébastien Deleuze
2024-12-18 18:22:54 +01:00
parent bc5d771a06
commit 0e85d950b3
16 changed files with 18 additions and 38 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -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());
}