diff options
| author | Shubham Ajmera <shubhamajmera@google.com> | 2016-07-26 09:11:48 +0100 |
|---|---|---|
| committer | Przemyslaw Szczepaniak <pszczepaniak@google.com> | 2016-07-26 09:11:48 +0100 |
| commit | 545cf975b4fd22f54945c559a26bd6d4f6acff54 (patch) | |
| tree | ef0579636abf807b00456db917a51c59595da2db /include/ScopedJavaUnicodeString.h | |
| parent | 5f3ac6af793a93d41d54b3b7eccc1a90e3121d89 (diff) | |
Return DataInputStream to pre-N calls on delegate
DataInputStream used to use read(byte[], int, int) method to perform
the operations - readShort, readChar, readInt, readUnsignedShort on pre-N
versions. However, the current version was using read() instead. As
the InputSteam can be user defined, read() and read(byte[], int, int)
could result to different outcomes.
A popular app relies on the specific calls being made to the wrapped
stream for readInt(). The N implementation calls through to methods that
are stubbed to throw exceptions in a stream implemented by app code.
Added test to prevent future unintensional regression.
Test: org.apache.harmony.tests.java.io.DataInputStreamTest
Test: libcore.java.io.OldAndroidDataInputStreamTest
Test: libcore.java.io.OldDataInputStreamTest
Bug: 30268192
Change-Id: Id6d58f3cfa3ab5eecb90e912a7052bb32551208b
(cherry picked from commit 850c9d95e354c22522314308a8cd6162db6a90b7)
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions
