RFR: 8302979: Simplify FileChannelLinesSpliterator.SUPPORTED_CHARSETS and its usage

Sergey Tsypanov stsypanov at openjdk.org
Tue Feb 21 11:26:08 UTC 2023


Code of `Files.lines()` could be slightly simplified:

- use charsets instead of their names
- use `Set.of()` instead of `HashSet` in `FileChannelLinesSpliterator`

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

Commit messages:
 - Simplify FileChannelLinesSpliterator.SUPPORTED_CHARSETS

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

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


More information about the nio-dev mailing list