mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8302979: (fs) Files usage of SUPPORTED_CHARSETS could be simplified
Reviewed-by: alanb, jwaters
This commit is contained in:
parent
0d5f7439a4
commit
25bfed3b12
2 changed files with 8 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -4103,7 +4103,7 @@ public final class Files {
|
|||
// 3) the file size is such that all bytes can be indexed by int values
|
||||
// (this limitation is imposed by ByteBuffer)
|
||||
if (path.getFileSystem() == FileSystems.getDefault() &&
|
||||
FileChannelLinesSpliterator.SUPPORTED_CHARSET_NAMES.contains(cs.name())) {
|
||||
FileChannelLinesSpliterator.SUPPORTED_CHARSETS.contains(cs)) {
|
||||
FileChannel fc = FileChannel.open(path, StandardOpenOption.READ);
|
||||
|
||||
Stream<String> fcls = createFileChannelLinesStream(fc, cs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue