Polishing

This commit is contained in:
Juergen Hoeller
2016-07-19 20:09:00 +02:00
parent fd4b5ac892
commit a4743c07d4
14 changed files with 42 additions and 56 deletions

View File

@@ -350,7 +350,8 @@ public class AnnotationAttributes extends LinkedHashMap<String, Object> {
}
private void assertAttributePresence(String attributeName, Object attributeValue) {
Assert.notNull(attributeValue, () -> String.format("Attribute '%s' not found in attributes for annotation [%s]",
Assert.notNull(attributeValue, () -> String.format(
"Attribute '%s' not found in attributes for annotation [%s]",
attributeName, this.displayName));
}

View File

@@ -1237,8 +1237,8 @@ public abstract class AnnotationUtils {
(annotatedElement != null ? annotatedElement.toString() : "unknown element");
throw new AnnotationConfigurationException(String.format(
"In AnnotationAttributes for annotation [%s] declared on %s, " +
"attribute '%s' and its alias '%s' are declared with values of [%s] and [%s], " +
"but only one is permitted.", annotationType.getName(), elementAsString,
"attribute '%s' and its alias '%s' are declared with values of [%s] and [%s], " +
"but only one is permitted.", annotationType.getName(), elementAsString,
attributeName, aliasedAttributeName, ObjectUtils.nullSafeToString(value),
ObjectUtils.nullSafeToString(aliasedValue)));
}