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

@ -30,7 +30,7 @@ import java.lang.reflect.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.*;
import java.security.*;
import java.security.cert.Certificate;
@ -278,7 +278,7 @@ public class PolicyFile extends java.security.Policy {
public URL run() {
String sep = File.separator;
try {
return Paths.get(System.getProperty("java.home"),
return Path.of(System.getProperty("java.home"),
"lib", "security",
"default.policy").toUri().toURL();
} catch (MalformedURLException mue) {