Community
Participate
Working Groups
In J2SDK1.5beta1, StringBuffer nows extends AbstractStringBuilder, and this class implements Appendable. Appendable declares append(char) to throw IOException, but the versions of this method in AbstractStringBuilder and StringBuffer do not throw any exceptions. This is permitted in the language spec. - you may narrow but not widen the range of exceptions thrown. The JDT compiler flags all uses of StringBuffer.append(char) demanding that it be enclosed in a try-catch block or that the enclosing method is declared to throw IOException. This appears to be an incorrect interpretation of the language spec.
*** This bug has been marked as a duplicate of 51353 ***