RFR JDK-8204930 Reader:nullReader() spec does not match the behavior

Brian Burkhalter brian.burkhalter at oracle.com
Wed Jun 13 20:56:36 UTC 2018

Hi Patrick,

Not part of your change, but I noticed that at line 66 of Reader.java there is an extra parenthesis after ready().

In the test, the bug ID at line 39 could simply be appended to line 38.

Otherwise looks good although I suppose given the specification update you’ll need an approved CSR before checking it in.



On Jun 13, 2018, at 1:22 PM, Patrick Reinhart <patrick at reini.net> wrote:

> While looking into the current Reader Spec and the failing methods I found that the ready() method actually does behave wrong and I fixed this.
> For the case of mark() I would like to revise the specification to align with the Reader’s default behavior that states for the mark method:
> IOException - If the stream does not support mark(), or if some other I/O error occurs
> The new spec for those methods would then read like:
> 70     * <p> The {@code markSupported()} method returns {@code false}.  The
> 71     * {@code mark()} and {@code reset()} methods throw an {@code IOException}.
> Here the link to the webrev:
> http://cr.openjdk.java.net/~reinhapa/reviews/8204930/webrev

More information about the core-libs-dev mailing list