Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084501 | emb-9 | Brian Burkhalter | P4 | Resolved | Fixed | team |
A DESCRIPTION OF THE PROBLEM :
It looks like java.io.PushbackInputStream was designed in JDK 1.0 to only pushback a single byte, was expanded in JDK 1.1 to allow any number of bytes, but the documentation wasn't fully updated.
(1) The first sentence of the class doc says:
>A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
However, a PushbackInputStream now has a user-specified buffer capacity. It is not limited it one byte. Fixed version:
>A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" bytes, by storing pushed-back bytes in an internal buffer.
(2) Both constructors contain the following sentence:
>Initially, there is no pushed-back byte (the field pushBack is initialized to -1).
However, there is no such field. Fixed version:
>Initially, the pushback buffer is empty.
(3) The one-arg constructor neglects to mention the size of the pushback buffer it creates. It should say:
>Creates a PushbackInputStream with a 1-byte pushback buffer ...
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/io/PushbackInputStream.html
It looks like java.io.PushbackInputStream was designed in JDK 1.0 to only pushback a single byte, was expanded in JDK 1.1 to allow any number of bytes, but the documentation wasn't fully updated.
(1) The first sentence of the class doc says:
>A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" one byte.
However, a PushbackInputStream now has a user-specified buffer capacity. It is not limited it one byte. Fixed version:
>A PushbackInputStream adds functionality to another input stream, namely the ability to "push back" or "unread" bytes, by storing pushed-back bytes in an internal buffer.
(2) Both constructors contain the following sentence:
>Initially, there is no pushed-back byte (the field pushBack is initialized to -1).
However, there is no such field. Fixed version:
>Initially, the pushback buffer is empty.
(3) The one-arg constructor neglects to mention the size of the pushback buffer it creates. It should say:
>Creates a PushbackInputStream with a 1-byte pushback buffer ...
URL OF FAULTY DOCUMENTATION :
https://docs.oracle.com/javase/8/docs/api/java/io/PushbackInputStream.html
- backported by
-
JDK-8084501 (doc) errors in java.io.PushbackInputStream API documentation
-
- Resolved
-
- relates to
-
JDK-8067885 Review java.io.PushbackInputStream spec
-
- Closed
-