@@ -60,6 +60,7 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
|
||||
this.attributeExtractor = attributeExtractor;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
if (isEqualsMethod(method)) {
|
||||
@@ -75,8 +76,8 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
|
||||
return annotationType();
|
||||
}
|
||||
if (!isAttributeMethod(method)) {
|
||||
String msg = String.format("Method [%s] is unsupported for synthesized annotation type [%s]", method,
|
||||
annotationType());
|
||||
String msg = String.format("Method [%s] is unsupported for synthesized annotation type [%s]",
|
||||
method, annotationType());
|
||||
throw new AnnotationConfigurationException(msg);
|
||||
}
|
||||
return getAttributeValue(method);
|
||||
@@ -92,9 +93,9 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
|
||||
if (value == null) {
|
||||
value = this.attributeExtractor.getAttributeValue(attributeMethod);
|
||||
if (value == null) {
|
||||
throw new IllegalStateException(String.format(
|
||||
"%s returned null for attribute name [%s] from attribute source [%s]",
|
||||
this.attributeExtractor.getClass().getName(), attributeName, this.attributeExtractor.getSource()));
|
||||
String msg = String.format("%s returned null for attribute name [%s] from attribute source [%s]",
|
||||
this.attributeExtractor.getClass().getName(), attributeName, this.attributeExtractor.getSource());
|
||||
throw new IllegalStateException(msg);
|
||||
}
|
||||
|
||||
// Synthesize nested annotations before returning them.
|
||||
@@ -200,7 +201,6 @@ class SynthesizedAnnotationInvocationHandler implements InvocationHandler {
|
||||
* in Spring's {@link ObjectUtils} because those hash code generation
|
||||
* algorithms do not comply with the requirements specified in
|
||||
* {@link Annotation#hashCode()}.
|
||||
*
|
||||
* @param array the array to compute the hash code for
|
||||
*/
|
||||
private int hashCodeForArray(Object array) {
|
||||
|
||||
Reference in New Issue
Block a user