src/share/classes/com/sun/tools/javac/parser/Scanner.java
Print this page
@@ -1006,12 +1006,13 @@
} else {
lexError(pos, "unclosed.str.lit");
}
return;
case '#':
+ // lookahead one character
+ if (buf[bp + 1] == '\"') {
scanChar();
- if (ch == '\"') {
scanChar();
if (ch == '\"')
lexError(pos, "empty.bytecode.ident");
while (ch != '\"' && ch != CR && ch != LF && bp < buflen) {
scanBytecodeNameChar();
@@ -1022,11 +1023,12 @@
scanChar();
} else {
lexError(pos, "unclosed.bytecode.ident");
}
} else {
- lexError("illegal.char", String.valueOf((int)'#'));
+ //lexError("illegal.char", String.valueOf((int)'#'));
+ scanOperator();
}
return;
default:
if (isSpecial(ch)) {
scanOperator();