JDK-6599696 : Make use initialize-on-demand holder class for javax.lang.model.SourceVersion keywords
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2007-08-31
  • Updated: 2012-01-31
  • Resolved: 2012-01-31
Related Reports
Relates :  
Description
The enum javax.lang.model.SourceVersion has a static variable pointing to a set of String keywords.  It would be preferable if the set was initilized using the initialize-on-demand holder class pattern.

Comments
EVALUATION Closing this bug as will-not-fix in the absence of good metrics for time/space trade-offs along different dimensions (static size of class files, number of classes, expected dynamic size of loaded SourceVersion class, etc.). Will re-open the issue if the trade-offs for the pattern are favorable to hold the 43 or so string constants used by the isKeyword method.
31-01-2012

EVALUATION A fine idea.
31-08-2007