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.