RFR: JDK-8042742 possible error in Tokens.Token.checkKind() for javac

Adam Sotona adam.sotona at oracle.com
Wed Jan 22 09:54:10 UTC 2020


Hi,
I would like to fix small typo in Tokens (see the patch below).

JBS: https://bugs.openjdk.java.net/browse/JDK-8042742 <https://bugs.openjdk.java.net/browse/JDK-8042742>

> diff -r 9c53fdf6ba63 src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java
> --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Wed Jan 15 08:44:53 2020 +0100
> +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java	Wed Jan 15 15:26:25 2020 +0100
> @@ -357,7 +357,7 @@
>  
>          protected void checkKind() {
>              if (kind.tag != Tag.DEFAULT) {
> -                throw new AssertionError("Bad token kind - expected " + Tag.STRING);
> +                throw new AssertionError("Bad token kind - expected " + Tag.DEFAULT);
>              }
>          }
>  

Please let me know if this is OK.

Thank you,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20200122/5ed395e2/attachment.htm>


More information about the compiler-dev mailing list