google / guava

Google core libraries for Java
Apache License 2.0
50.24k stars 10.91k forks source link

Roll forward cl/688155711, which was rolled back in cl/688191691. #7479

Closed copybara-service[bot] closed 3 weeks ago

copybara-service[bot] commented 1 month ago

Roll forward cl/688155711, which was rolled back in cl/688191691.

The broken Writer implementation that saw trouble after the previous attempt has been fixed.

Remove a couple more obsolete workarounds for FilterOutputStream trouble.

See https://github.com/google/guava/issues/1330.

I have the others taken care of in cl/687314611.

RELNOTES=io: Changed ByteSink and CharSink to no longer call flush() in some cases before close(). This is a no-op for well-behaved streams, which internally flush their data as part of closing. However, we have discovered some stream implementations that have overridden close() to do nothing, including not to flush some buffered data. If this change causes problems, the simplest fix is usually to change the close() override to at least call flush().