mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8194746: (fs) Add equivalents of Paths.get to Path interface
Copy Paths.get() methods to Path.get() methods and have former call latter Reviewed-by: alanb, forax, chegar, psandoz
This commit is contained in:
parent
37f1b2b1e3
commit
9e3d8fd230
18 changed files with 174 additions and 119 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, 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
|
||||
|
@ -260,7 +260,7 @@ abstract class UnixFileStore
|
|||
private static Properties loadProperties() {
|
||||
Properties result = new Properties();
|
||||
String fstypes = System.getProperty("java.home") + "/lib/fstypes.properties";
|
||||
Path file = Paths.get(fstypes);
|
||||
Path file = Path.of(fstypes);
|
||||
try {
|
||||
try (ReadableByteChannel rbc = Files.newByteChannel(file)) {
|
||||
result.load(Channels.newReader(rbc, "UTF-8"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue