Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results. Issue: SPR-15756
This commit is contained in:
@@ -597,7 +597,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
else if (embeddedValueResolver != null) {
|
||||
resourceName = embeddedValueResolver.resolveStringValue(resourceName);
|
||||
}
|
||||
if (resourceType != null && Object.class != resourceType) {
|
||||
if (Object.class != resourceType) {
|
||||
checkResourceType(resourceType);
|
||||
}
|
||||
else {
|
||||
@@ -642,7 +642,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
resourceName = Introspector.decapitalize(resourceName.substring(3));
|
||||
}
|
||||
}
|
||||
if (resourceType != null && Object.class != resourceType) {
|
||||
if (Object.class != resourceType) {
|
||||
checkResourceType(resourceType);
|
||||
}
|
||||
else {
|
||||
@@ -726,7 +726,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
}
|
||||
}
|
||||
Class<?> resourceType = resource.beanInterface();
|
||||
if (resourceType != null && Object.class != resourceType) {
|
||||
if (Object.class != resourceType) {
|
||||
checkResourceType(resourceType);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -364,7 +364,6 @@ class ConfigurationClassEnhancer {
|
||||
return resolveBeanReference(beanMethod, beanMethodArgs, beanFactory, beanName);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Object resolveBeanReference(Method beanMethod, Object[] beanMethodArgs,
|
||||
ConfigurableBeanFactory beanFactory, String beanName) {
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.core.type.StandardAnnotationMetadata;
|
||||
import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -205,6 +206,7 @@ abstract class ConfigurationClassUtils {
|
||||
* or {@link Ordered#LOWEST_PRECEDENCE} if none declared
|
||||
* @since 5.0
|
||||
*/
|
||||
@Nullable
|
||||
public static Integer getOrder(AnnotationMetadata metadata) {
|
||||
Map<String, Object> orderAttributes = metadata.getAnnotationAttributes(Order.class.getName());
|
||||
return (orderAttributes != null ? ((Integer) orderAttributes.get(AnnotationUtils.VALUE)) : null);
|
||||
|
||||
Reference in New Issue
Block a user