JDK-5041778 : (ann) AnnotationFormatError if "default" Class type not found
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2004-05-04
  • Updated: 2016-06-16
  • Resolved: 2016-06-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b123Fixed
Related Reports
Relates :  
Relates :  
Description
If an annotation type's default is not found, it is treated as an error.

This is related to the following code in java.lang.reflect.Method:

705          if (result instanceof sun.reflect.annotation.ExceptionProxy)
706              throw new AnnotationFormatError("Invalid default: " + this);

Comments
Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-June/041747.html
11-06-2016

Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-June/041747.html
11-06-2016

EVALUATION We should be more careful about coping with these situations. It is not always the case that an AnnotationProxy for the default value indicates a true annotation format error. ###@###.### 2004-05-28
28-05-2004