History log of /libcore/luni/src/test/java/libcore/java/io/ObjectOutputStreamTest.java
Revision Date Author Comments
01e5d205c2549f9e2500018b41af9618442b3477 19-Apr-2016 Paul Duffin <paulduffin@google.com> Make ObjectOutputStream behave as in M when stream is closed

Comments out the call to clear() from close() to prevent the
handle table being reset. That will prevent corruption in the
serialized data which was the cause of this problem.

Logs a warning when writing to a closed stream that the app is
relying on undefined behavior which will change in the next
release. The warning is only logged if the underlying stream
does not itself throw an IOException when attempting to write to
a closed stream. The warning is logged on the first time data is
written to the underlying stream after close() was called.
Writing additional data to the underlying stream will not log
another warning unless close() was called again.

As data is buffered in the ObjectOutputStream writing data to
it may not cause a warning to be logged but the warning will be
logged when the data is flushed.

(cherry picked from commit ec949338f804167b669d47ce86ede15cf2258c56)

Bug: 28159133
Change-Id: I659f7ce9c4bf89379a0703c34fcbf53b42e83bb2
ec949338f804167b669d47ce86ede15cf2258c56 19-Apr-2016 Paul Duffin <paulduffin@google.com> Make ObjectOutputStream behave as in M when stream is closed

Comments out the call to clear() from close() to prevent the
handle table being reset. That will prevent corruption in the
serialized data which was the cause of this problem.

Logs a warning when writing to a closed stream that the app is
relying on undefined behavior which will change in the next
release. The warning is only logged if the underlying stream
does not itself throw an IOException when attempting to write to
a closed stream. The warning is logged on the first time data is
written to the underlying stream after close() was called.
Writing additional data to the underlying stream will not log
another warning unless close() was called again.

As data is buffered in the ObjectOutputStream writing data to
it may not cause a warning to be logged but the warning will be
logged when the data is flushed.

Bug: 28159133
Change-Id: I659f7ce9c4bf89379a0703c34fcbf53b42e83bb2
9559e748729ef1deb6400f31d0407543cbff3566 21-Oct-2010 Elliott Hughes <enh@google.com> Improve our modified UTF-8 implementation.

I was out looking for customers for the new OSMemory peek/poke for byte[]s,
and ran into this mess. I also noticed we didn't have any real tests for
DataOutputStream. This patch rewrites DataOuputStream and ObjectOutputStream
to be simpler and cleaner, pulls modified UTF-8 encoding support out into
ModifiedUtf8 where it belongs, and adds a new special ICU-avoiding case for
String.getBytes("UTF-16BE"). And adds tests.

Bug: 3032515
Change-Id: I618c8b1bda13138feed7710e29aee0f96f2e9b95