On 17/02/2008, Roman Kennke <[EMAIL PROTECTED]> wrote: > Hi Robert, > > > > public final class StringBuilder > > > + extends AbstractStringBuffer > > StringBuffer and StringBuilder have Object as their superclass. I think > > we are not allowed to break that. If so you should change your > > implementation to follow a delegation pattern and make as many methods > > 'final' as possible. :) > > That doesn't matter as long as the superclass isn't public. JavaDoc > should document it as extends Object in this case. IIRC, OpenJDK also > implements this via an abstract superclass. > > /Roman > > -- > http://kennke.org/blog/ > >
Exactly. The new AbstractStringBuffer class is package-private so it won't be accessible outside java.lang. I didn't realise this either until I spotted the abstraction in OpenJDK when testing PR34840. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net