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

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

View File

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

View File

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