Polishing
This commit removes unnecessary not-null checks for annotation attribute alias names.
This commit is contained in:
parent
164bed5c3f
commit
a066143a5b
|
|
@ -91,7 +91,6 @@ abstract class AbstractAliasAwareAnnotationAttributeExtractor<S> implements Anno
|
||||||
if (aliasNames != null) {
|
if (aliasNames != null) {
|
||||||
final Object defaultValue = AnnotationUtils.getDefaultValue(getAnnotationType(), attributeName);
|
final Object defaultValue = AnnotationUtils.getDefaultValue(getAnnotationType(), attributeName);
|
||||||
for (String aliasName : aliasNames) {
|
for (String aliasName : aliasNames) {
|
||||||
if (aliasName != null) {
|
|
||||||
Object aliasValue = getRawAttributeValue(aliasName);
|
Object aliasValue = getRawAttributeValue(aliasName);
|
||||||
|
|
||||||
if (!ObjectUtils.nullSafeEquals(attributeValue, aliasValue) &&
|
if (!ObjectUtils.nullSafeEquals(attributeValue, aliasValue) &&
|
||||||
|
|
@ -112,7 +111,6 @@ abstract class AbstractAliasAwareAnnotationAttributeExtractor<S> implements Anno
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return attributeValue;
|
return attributeValue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,6 @@ class MapAnnotationAttributeExtractor extends AbstractAliasAwareAnnotationAttrib
|
||||||
List<String> aliasNames = attributeAliasMap.get(attributeName);
|
List<String> aliasNames = attributeAliasMap.get(attributeName);
|
||||||
if (aliasNames != null) {
|
if (aliasNames != null) {
|
||||||
for (String aliasName : aliasNames) {
|
for (String aliasName : aliasNames) {
|
||||||
if (aliasName != null) {
|
|
||||||
Object aliasValue = attributes.get(aliasName);
|
Object aliasValue = attributes.get(aliasName);
|
||||||
if (aliasValue != null) {
|
if (aliasValue != null) {
|
||||||
attributeValue = aliasValue;
|
attributeValue = aliasValue;
|
||||||
|
|
@ -109,7 +108,6 @@ class MapAnnotationAttributeExtractor extends AbstractAliasAwareAnnotationAttrib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// if aliases not present, check default
|
// if aliases not present, check default
|
||||||
if (attributeValue == null) {
|
if (attributeValue == null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue