RFR: 8305902: (cs) Resolve default Charset only once in StreamEncoder and StreamDecoder

Sergey Tsypanov stsypanov at openjdk.org
Wed Apr 12 11:45:29 UTC 2023


If `charsetName` passed into `forOutputStreamWriter()` method is null then `Charset.forName()` is redundant as we can use already resolved default Charset.

-------------

Commit messages:
 - Don't resolve default Charset twice in StreamDecoder and StreamEncoder

Changes: https://git.openjdk.org/jdk/pull/13443/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13443&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8305902
  Stats: 10 lines in 2 files changed: 0 ins; 6 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/13443.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13443/head:pull/13443

PR: https://git.openjdk.org/jdk/pull/13443


More information about the nio-dev mailing list