stringBuffer.append(char) now throws IOException?!? HUH?!?
807607Jan 30 2007 — edited Jan 31 2007I recently had the 1.5 JDK shoved down my throat, and today was the first time I actually had to compile anything in it.
And I suddenly found 7 compiler errors complaining that I'm appending to a StringBuffer without dealing with IOExceptions.
Two questions:
1. Yes, I eventually figured out that StringBuffer inherits this requirement from the new "Appendable" interface, but given that a StringBuffer doesn't do I/O, WHY was it set up this way???
2. Again, given that the method is effectively lying about what it can throw, how am I to deal with it? A "try/catch" with an empty catch?
--
JHHL