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
1 file changed