A DESCRIPTION OF THE PROBLEM :
The documentation for the following java.io.Reader methods does not explain how the methods behave if an array of length 0, respectively length 0 is provided:
- read(char[])
- read(char[], int, int)
It is not clear whether
- 0 should be returned
- -1 should be returned if at end of stream
- An IOException should be thrown if reader is closed
Compare this to the documentation of java.io.InputStream where this is clearly specified.
It appears most of the JDK classes check if the reader is closed and afterwards return 0 in these cases.
Related to JDK-8222329