RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly

Alan Bateman alanb at openjdk.org
Mon Apr 3 11:13:00 UTC 2023


On Mon, 3 Apr 2023 10:58:35 GMT, Tingjun Yuan <duke at openjdk.org> wrote:

>  So we don't have to change these classes.

They are just examples where the superclass is not-public.

> But in this issue, all public supertypes of `String{Builder,Buffer}` (`Serializable`, `Comparable`, `CharSequence` and `Object`) do not implement `Appendable`, so this change is necessary.

It's not strictly necessary but it does help the javadoc. It may also help code that walks the class hierarchy and looking at the accessibility of API elements in non-public supers.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13278#issuecomment-1494128409


More information about the core-libs-dev mailing list