JDK-6990133 : AnnotationProxyMaker.ValueVisitor$1 contains non-transient non-serializable field
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-07
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
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 7
7 b116Fixed
Related Reports
Relates :  
Description
AnnotationProxyMaker.ValueVisitor.typeMismatch defines an anonymous inner class that tries to serialize the non-transient non-serializable parameter "method".

The anonymous inner class should be defined as local or nested class that defines a transient field for the value.

There are two instances of AnnotationProxyMaker.ValueVisitor: one in APT, one in JSR 269. The same fix should work for both, so I would suggest fixing the APT code as well, to get rid of the findbugs warning.

Comments
EVALUATION Rewrite class to use a transient field. Fixes the findbugs issue, but doesn't addres the fundamental underlying problem that a Method object is not serializable.
12-10-2010