RFR: JDK-8304945: StringBuilder and StringBuffer should implement Appendable explicitly
Tingjun Yuan
duke at openjdk.org
Sun Apr 2 23:42:18 UTC 2023
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> The StringBuilder and StringBuffer classes are Appendable by virtue of from subclasses their non-public superclass AbstractStringBuilder.
>
> It is slightly clearer to declare StringBuilder and StringBuffer to directly implement Appendable, as they already directly implement the CharSequence interface also implemented by their superclass.
>
> There are no other interfaces implemented by AbstractStringBuilder other than Appendable and CharSequence.
>
> Please also review the CSR https://bugs.openjdk.org/browse/JDK-8305408
src/java.base/share/classes/java/lang/StringBuffer.java line 112:
> 110: * @since 1.0
> 111: */
> 112: public final class StringBuffer
Consider removing the leading space.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13278#discussion_r1155394123
More information about the core-libs-dev
mailing list