-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
b63
-
sparc
-
solaris_2.6
Name: asR10047 Date: 06/19/2002
Specification of DataInputStream class seems to be copied from
FilterInputStream so the spec for DataInputStream constructor says:
Creates a FilterInputStream ...
and contains unfinished sentence : "An internal"
Further. The spec for DataInputStream.read() methods says:
In particular, an IOException is thrown if
the input stream has been closed.
that is not always true. IOException will be thrown only if
the input stream throws IOException on attempt to read when
it is previously closed. But if the DataInputStream object
has ByteArrayInputStream as it's input stream no IOException
will be thrown regardless was ByteArrayInputStream closed or not.
So I propose to change that sentence on something like
In particular, an IOException is thrown if
the input stream has been closed and
the input stream does not support reading after close.
======================================================================
Specification of DataInputStream class seems to be copied from
FilterInputStream so the spec for DataInputStream constructor says:
Creates a FilterInputStream ...
and contains unfinished sentence : "An internal"
Further. The spec for DataInputStream.read() methods says:
In particular, an IOException is thrown if
the input stream has been closed.
that is not always true. IOException will be thrown only if
the input stream throws IOException on attempt to read when
it is previously closed. But if the DataInputStream object
has ByteArrayInputStream as it's input stream no IOException
will be thrown regardless was ByteArrayInputStream closed or not.
So I propose to change that sentence on something like
In particular, an IOException is thrown if
the input stream has been closed and
the input stream does not support reading after close.
======================================================================