JDK-6730423 : Diagnostic formatter should be an instance field of JCDiagnostic
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: unknown
  • Submitted: 2008-07-28
  • 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 b34Fixed
Related Reports
Relates :  
Description
Each diagnostic should store its own diagnostic formatter as a non-static field. Currently the formatter is a static field of JCDiagnostic. This forces the code in JCDiagnostic to go through an inelegant static factory method in order to initialize and retrieve the diagnostic formatter associated with the JCDiagnostic class each time it is used. 

It would be much better to let the diagnostic factory set the diagnostic formatter on each newly created diagnostic object. This requires, as a side-effects, that all diagnostic objects are indeed created through a diagnostic factory, and that all occurrences of static factory method JCDiagnostic.framents are removed from the compiler.

Comments
EVALUATION Will do
28-07-2008