RFR: 8258444: Clean up specifications of java.io.Reader.read(char[], int, int) in subclass overrides
Alan Bateman
alanb at openjdk.java.net
Tue Feb 23 16:25:45 UTC 2021
On Tue, 23 Feb 2021 16:19:41 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> src/java.base/share/classes/java/io/InputStreamReader.java line 167:
>>
>>> 165: * {@inheritDoc}
>>> 166: */
>>> 167: public int read(char[] cbuf, int off, int len) throws IOException {
>>
>> IOOBE is unchecked, are you sure it gets inherited into the sub-class here?
>
> It does not due to https://bugs.openjdk.java.net/browse/JDK-8157677.
The long standard behavior is that javadoc doesn't copy the throws of unchecked exceptions, instead we've had to declare the throws and use inheritDoc. I assume you'll need to do that here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2680
More information about the core-libs-dev
mailing list