JDK-8033004 : Make base TypeAnnotationPosition data immutable, create better methods for obtaining base TypeAnnotationPositions
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-01-28
  • Updated: 2014-07-30
  • Resolved: 2014-02-04
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 b03Fixed
Related Reports
Blocks :  
Relates :  
Description
Presently, TypeAnnotationPosition is a class containing mutable public fields, and a zero-argument constructor.  This is dangerous, and it is not clear what combinations of field values represent sensible instances.

A better way would be to make the class immutable with private constructors, static methods for creating "Base" TypeAnnotationPositions
Comments
Patch ready, under review and testing.
30-01-2014