1.1 --- a/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java Tue Oct 12 13:19:47 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java Tue Oct 12 14:22:55 2010 -0700 1.3 @@ -250,9 +250,13 @@ 1.4 /** 1.5 * Sets "value" to an ExceptionProxy indicating a type mismatch. 1.6 */ 1.7 - private void typeMismatch(final Method method, final Attribute attr) { 1.8 - value = new ExceptionProxy() { 1.9 + private void typeMismatch(Method method, final Attribute attr) { 1.10 + class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy { 1.11 static final long serialVersionUID = 269; 1.12 + transient final Method method; 1.13 + AnnotationTypeMismatchExceptionProxy(Method method) { 1.14 + this.method = method; 1.15 + } 1.16 public String toString() { 1.17 return "<error>"; // eg: @Anno(value=<error>) 1.18 } 1.19 @@ -260,7 +264,8 @@ 1.20 return new AnnotationTypeMismatchException(method, 1.21 attr.type.toString()); 1.22 } 1.23 - }; 1.24 + } 1.25 + value = new AnnotationTypeMismatchExceptionProxy(method); 1.26 } 1.27 } 1.28