JDK-6404957 : Refactor com.sun.tools.javac.code.Source in terms of javax.lang.model.SourceVersion
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2006-03-28
  • Updated: 2022-05-17
  • Resolved: 2022-05-17
Related Reports
Relates :  
Relates :  
Description
Internally, javac uses com.sun.tools.javac.code.Source to track and distinguish properties of different source versions.  JSR 269 has added javax.lang.model.SourceVersion for a similar purpose.  The JSR 269 implementation now must compare objects representing these two different views of source code and the code uses the brittle idiom of comparing the (shifted) ordinal positions of the two enums in JavacProcessingEnvironment.

This could be improved.