JDK-6401101 : SourceVersion must fully specify the platform version
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-03-20
  • Updated: 2010-04-02
  • Resolved: 2006-05-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 6
6 b83Fixed
Related Reports
Relates :  
Description
The enum javax.lang.model.SourceVersion does not precisely specify the
product releases corresponding to each enum constant.

This is needed by the interfaces javax.tools.Tool and
javax.tools.JavaCompilerTool.

Comments
SUGGESTED FIX src/share/classes/javax/lang/model>sccs sccsdiff -r1.2 -r1.3 SourceVersion.java ------- SourceVersion.java ------- 19,21c19,20 < * for information on editions of <i>The < * Java</i><sup><small>TM</small></sup><i> Language Specification</i>, < * including updates and clarifications. --- > * for information on editions of <i>The Java&trade; Language > * Specification</i>, including updates and clarifications. 27,28d25 < * @ToDo Add more descriptive javadoc." < * @Note A number of source version methods could potentially go here, keywords, indentifiers... 37a35 > * 1.6: no changes 41,43c39,42 < * The language described in <i>The < * Java</i><sup><small>TM</small></sup><i> Language Specification</i>, < * first edition. --- > * The original version. > * > * The language described in the first edition of <i>The > * Java&trade; Language Specification</i>. 48c47,49 < * {@code RELEASE_0} <a --- > * The version recognized by the Java Platform 1.1. > * > * The language is {@code RELEASE_0} <a 55,57c56,61 < * The language described in <i>The < * Java</i><sup><small>TM</small></sup><i> Language Specification, Second < * Edition</i>. Includes the {@code strictfp} modifier. --- > * The version recognized by the Java 2 Platform, Standard Edition, > * v 1.2. > * > * The language described in <i>The Java&trade; Language > * Specification, Second Edition</i>, which includes the {@code > * strictfp} modifier. 61a66,68 > * The version recognized by the Java 2 Platform, Standard Edition, > * v 1.3. > * 66a74,76 > * The version recognized by the Java 2 Platform, Standard Edition, > * v 1.4. > * 72,76c82,88 < * The language described in <i>The < * Java</i><sup><small>TM</small></sup><i> Language Specification, Third < * Edition</i>. First release to support generics, annotations, < * autoboxing, var-args, enhanced {@code for} loop, and < * hexadecimal floating-point literals. --- > * The version recognized by the Java 2 Platform, Standard > * Edition 5.0. > * > * The language described in <i>The Java&trade; Language > * Specification, Third Edition</i>. First release to support > * generics, annotations, autoboxing, var-args, enhanced {@code > * for} loop, and hexadecimal floating-point literals. 80a93,94 > * The version recognized by Java Platform, Standard Edition 6. > * 96,99c110,113 < * Returns whether this character sequence is a syntactically < * valid identifier (simple name) or keyword in the latest source < * version. The method returns {@code true} if this character < * sequence consists of an initial character for which {@link --- > * Returns whether or not {@code name} is a syntactically valid > * identifier (simple name) or keyword in the latest source > * version. The method returns {@code true} if the name consists > * of an initial character for which {@link 105c119 < * The method returns {@code false} for all other character sequences. --- > * The method returns {@code false} for all other strings. 107c121,122 < * @return {@code true} if this character sequences is a --- > * @param name the string to check > * @return {@code true} if this string is a 112d126 < // TODO: Don't convert to string first 134,137c148,151 < * Returns whether or not this character sequence is a < * syntactically valid qualified name in the latest source < * version. Unlike {@link #isIdentifier isIdentifier}, this < * method returns {@code false} for keywords and literals. --- > * Returns whether or not {@code name} is a syntactically valid > * qualified name in the latest source version. Unlike {@link > * #isIdentifier isIdentifier}, this method returns {@code false} > * for keywords and literals. 139c153,154 < * @return {@code true} if this character sequences is a --- > * @param name the string to check > * @return {@code true} if this string is a 144d158 < // TODO: don't convert to string first 147c161 < for(String s : id.split("\\.")) { --- > for(String s : id.split("\\.", -1)) { 176,177c190,199 < static boolean isKeyword(String s) { < return keywords.contains(s); --- > /** > * Returns whether or not {@code s} is a keyword or literal in the > * latest source version. > * > * @param s the string to check > * @return {@code true} if {@code s} is a keyword or literal, {@code false} otherwise. > */ > public static boolean isKeyword(CharSequence s) { > String keywordOrLiteral = s.toString(); > return keywords.contains(keywordOrLiteral);
02-05-2006

EVALUATION Specification should be clarified or amended as suggested.
20-03-2006