Skip to content

Commit

Permalink
Java 10 preparation
Browse files Browse the repository at this point in the history
Add "var" as reserved keyword as defined in JEP 286: Local-Variable Type
Inference
  • Loading branch information
mvilliger committed Mar 13, 2018
1 parent 27fabc3 commit 239874d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -494,7 +494,7 @@ public static Set<String> getJavaKeyWords() {
if (javaKeyWords == null) {
String[] keyWords = new String[]{"abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "default", "do", "double", "else", "enum", "extends", "final", "finally", "float", "for",
"goto", "if", "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", "synchronized", "this",
"throw", "throws", "transient", "try", "void", "volatile", "while", "false", "null", "true"};
"throw", "throws", "transient", "try", "void", "volatile", "while", "false", "null", "true", "var" /* java 10 */};
Set<String> tmp = new HashSet<>(keyWords.length);
for (String s : keyWords) {
tmp.add(s);
Expand Down

0 comments on commit 239874d

Please sign in to comment.