mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8234147: Avoid looking up standard charsets in core libraries
Reviewed-by: alanb
This commit is contained in:
parent
4e64af81a2
commit
cd589d8469
36 changed files with 200 additions and 237 deletions
|
@ -25,6 +25,8 @@
|
|||
|
||||
package sun.nio.fs;
|
||||
|
||||
import sun.nio.cs.UTF_8;
|
||||
|
||||
import jdk.internal.util.StaticProperty;
|
||||
|
||||
import java.nio.file.*;
|
||||
|
@ -277,7 +279,7 @@ abstract class UnixFileStore
|
|||
Path file = Path.of(fstypes);
|
||||
try {
|
||||
try (ReadableByteChannel rbc = Files.newByteChannel(file)) {
|
||||
result.load(Channels.newReader(rbc, "UTF-8"));
|
||||
result.load(Channels.newReader(rbc, UTF_8.INSTANCE));
|
||||
}
|
||||
} catch (IOException x) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue