JDK 15 RFR of JDK-8239478: Make specification of SourceVersion.isName explicit for dotted names
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Feb 19 18:38:41 UTC 2020
The inline patch looks more recent than the webrev. The webrev has "This
methods" in a couple of places.
Otherwise OK.
-- Jon
On 2/19/20 9:56 AM, Joe Darcy wrote:
> Hello,
>
> Please review the spec clarification to address
>
> JDK-8239478: Make specification of SourceVersion.isName explicit
> for dotted names
> http://cr.openjdk.java.net/~darcy/8239478.0/
>
> Patch below.
>
> Thanks,
>
> -Joe
>
> ---
> old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
> 2020-02-19 09:40:00.728000000 -0800
> +++
> new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
> 2020-02-19 09:40:00.420000000 -0800
> @@ -287,6 +287,8 @@
> * @return {@code true} if this string is a
> * syntactically valid identifier or keyword, {@code false}
> * otherwise.
> + *
> + * @jls 3.8 Identifiers
> */
> public static boolean isIdentifier(CharSequence name) {
> String id = name.toString();
> @@ -311,9 +313,16 @@
>
> /**
> * Returns whether or not {@code name} is a syntactically valid
> - * qualified name in the latest source version. Unlike {@link
> + * qualified name in the latest source version.
> + *
> + * Syntactically, a qualified name is a sequence of identifiers
> + * separated by period characters ("{@code .}"). This method
> + * splits the input string into period-separated segments and
> + * applies checks to each segment in turn.
> + *
> + * Unlike {@link
> * #isIdentifier isIdentifier}, this method returns {@code false}
> - * for keywords, boolean literals, and the null literal.
> + * for keywords, boolean literals, and the null literal in any
> segment.
> *
> * This method returns {@code true} for <i>restricted
> * keywords</i> and <i>restricted identifiers</i>
> @@ -330,9 +339,16 @@
>
> /**
> * Returns whether or not {@code name} is a syntactically valid
> - * qualified name in the given source version. Unlike {@link
> + * qualified name in the given source version.
> + *
> + * Syntactically, a qualified name is a sequence of identifiers
> + * separated by period characters ("{@code .}"). This method
> + * splits the input string into period-separated segments and
> + * applies checks to each segment in turn.
> + *
> + * Unlike {@link
> * #isIdentifier isIdentifier}, this method returns {@code false}
> - * for keywords, boolean literals, and the null literal.
> + * for keywords, boolean literals, and the null literal in any
> segment.
> *
> * This method returns {@code true} for <i>restricted
> * keywords</i> and <i>restricted identifiers</i>
>
More information about the compiler-dev
mailing list