On 01/07/2017 09:26 AM, Peter Levart wrote:
I'm thinking of moving the validateAnnotationMethods() method from AnnotationInvocationHandler where methods are being checked for each annotation instance constructed to AnnotationType, where they would be checked only once per annotation type and make exception reporting consistent for any invalid situation.

Correction: validateAnnotationMethods() is only invoked from the annotation's equals() implementation when some JDK annotation is compared with a foreign implementation of annotation (one that is not using dynamic Proxy and AnnotationInvocationHandler). Which is a waste I think and mostly to late or never. I think the methods should be checked in AnnotationType constructor as soon as the 1st annotation of a particular type is attempted to be materialized, don't you think?

Regards, Peter

Reply via email to