diff -r a1d31ab7b525 -r ea92d1e275b6 src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java --- a/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java Tue Oct 12 13:19:47 2010 -0700 +++ b/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java Tue Oct 12 14:22:55 2010 -0700 @@ -250,9 +250,13 @@ /** * Sets "value" to an ExceptionProxy indicating a type mismatch. */ - private void typeMismatch(final Method method, final Attribute attr) { - value = new ExceptionProxy() { + private void typeMismatch(Method method, final Attribute attr) { + class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy { private static final long serialVersionUID = 8473323277815075163L; + transient final Method method; + AnnotationTypeMismatchExceptionProxy(Method method) { + this.method = method; + } public String toString() { return ""; // eg: @Anno(value=) } @@ -260,7 +264,8 @@ return new AnnotationTypeMismatchException(method, attr.type.toString()); } - }; + } + value = new AnnotationTypeMismatchExceptionProxy(method); } }