RFR: JDK-8286604: Update InputStream and OutputStream to use @implSpec
Alan Bateman
alanb at openjdk.java.net
Thu May 12 12:27:06 UTC 2022
On Wed, 11 May 2022 20:40:30 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> While doing a CSR review of another issue, I noticed some cases in InputStream and OutputStream what would benefit from being upgraded to implSpec and related javadoc tags.
>
> The "A subclass must provide an implementation of this method." statements on several abstract methods don't add much value, but I chose to leave them in for this request.
>
> Please also review the corresponding CSR: https://bugs.openjdk.java.net/browse/JDK-8286605
src/java.base/share/classes/java/io/InputStream.java line 177:
> 175: *
> 176: * @apiNote
> 177: * A subclass must provide an implementation of this method.
Is this sentence useful to keep? The method is abstract so a concrete implementation has to implement it. On the other other hand, an abstract subclass does not need to implement it.
src/java.base/share/classes/java/io/InputStream.java line 688:
> 686: * @implSpec
> 687: * The {@code mark} method of {@code InputStream} does
> 688: * nothing.
Minor nit but the line break can be removed so that "nothing" is on the same line.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8663
More information about the core-libs-dev
mailing list