summaryrefslogtreecommitdiff
path: root/include/ScopedJavaUnicodeString.h
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2018-02-13 14:45:12 +0000
committerTobias Thierer <tobiast@google.com>2018-02-13 15:48:47 +0000
commit06baf720fd4446ab06dd170c9415d6f09d023d93 (patch)
treeeb5b157434bcb0b1f6135b2f61a45a74530478f2 /include/ScopedJavaUnicodeString.h
parent0692a133e3895e44eb828ca1298e057bed7ed731 (diff)
Revert Android changes in PrintStream.java on top of OpenJDK8u121-b13.
Android was carrying a local patch to delay initialization of the charOut and textOut fields until the first call to write(); while this has potential performance benefits for PrintStream objects that are constructed without ever being written to, this or any other benefits were not documented, not quantified, and carried disadvantages: - it made the code more fragile against future changes because all code that accesses these fields now needs to ensure their initialization (more generally, integrating changes correctly when local patches exist is harder), and - the initial patch erroneously ignored the Charset argument to the constructor (bug 37313782). Carrying a patch with unclear (likely minor performance) benefits but actual fragility / maintenance cost seems like a poor trade-off. Therefore, this CL reverts the local patch. After this CL, PrintStream.java is exactly identical to the one in OpenJDK8u121-b13. Test: CtsLibcoreTestCases Bug: 37313782 Bug: 35910877 Change-Id: I2964befe0352be52694eef257b9c986c1aaa7fb9
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions