> Exception in thread "main" java.lang.Exception: Unable to resolve
> symbol: \uffff in this context
Ooops. Someone is failing to check for EOF before casting the value
returned by Reader#read into a Java char, producing that horrible and
dreadful dragon, the Spurious U+FFFF.
--
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures
> That someone appears to be the java.io.PushbackReader, which does
> exactly that in its unread(), yielding a nasty asymmetry between
> read() and unread().
Right right right. I remember now having to work around exactly that
bug in TagSoup (a SAX parser written in Java to consume nasty, ugly
HTML and keep on truckin'; http://tagsoup.info) with a private
unread() method in my scanner, thus:
// Compensate for bug in PushbackReader that allows
// pushing back EOF.
private void unread(PushbackReader r, int c) throws IOException {
if (c != -1) r.unread(c);
}
That's all it takes, so I license you to use this snippet. :-)