1.1 --- a/src/share/classes/com/sun/tools/javac/parser/Scanner.java Tue Sep 07 17:31:54 2010 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/Scanner.java Tue Sep 07 17:32:27 2010 +0100 1.3 @@ -108,6 +108,10 @@ 1.4 */ 1.5 private boolean allowUnderscoresInLiterals; 1.6 1.7 + /** Allow exotic identifiers. 1.8 + */ 1.9 + private boolean allowExoticIdentifiers; 1.10 + 1.11 /** The source language setting. 1.12 */ 1.13 private Source source; 1.14 @@ -181,6 +185,7 @@ 1.15 allowBinaryLiterals = source.allowBinaryLiterals(); 1.16 allowHexFloats = source.allowHexFloats(); 1.17 allowUnderscoresInLiterals = source.allowBinaryLiterals(); 1.18 + allowExoticIdentifiers = source.allowExoticIdentifiers(); // for invokedynamic 1.19 } 1.20 1.21 private static final boolean hexFloatsWork = hexFloatsWork(); 1.22 @@ -1010,6 +1015,10 @@ 1.23 case '#': 1.24 scanChar(); 1.25 if (ch == '\"') { 1.26 + if (!allowExoticIdentifiers) { 1.27 + lexError("unsupported.exotic.id", source.name); 1.28 + allowExoticIdentifiers = true; 1.29 + } 1.30 scanChar(); 1.31 if (ch == '\"') 1.32 lexError(pos, "empty.bytecode.ident");