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:
Brian Burkhalter 2018-03-22 12:30:47 -07:00
parent 37f1b2b1e3
commit 9e3d8fd230
18 changed files with 174 additions and 119 deletions

View file

@ -27,7 +27,7 @@ package sun.security.tools.keytool;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.security.CodeSigner;
import java.security.CryptoPrimitive;
import java.security.KeyStore;
@ -2189,7 +2189,7 @@ public final class Main {
inplaceBackupName = srcksfname + ".old" + (n == 1 ? "" : n);
File bkFile = new File(inplaceBackupName);
if (!bkFile.exists()) {
Files.copy(Paths.get(srcksfname), bkFile.toPath());
Files.copy(Path.of(srcksfname), bkFile.toPath());
break;
}
}