Details
-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
17
-
generic
-
generic
-
Verified
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10
Windows 1117.0.2
A DESCRIPTION OF THE PROBLEM :
Given following method signatures:
FileSystems.getDefault().getPath("","");
Paths.get("","");
Path.of("","");
First two work. While Path.of doesn't. I get a NoSuchMethod exception. I know another person who has the same issue. He works on Windows 11. Same JDK version.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use following three methods:
FileSystems.getDefault().getPath("","");
Paths.get("","");
Path.of("","");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Last method also works
ACTUAL -
Last method doesn't work
---------- BEGIN SOURCE ----------
import java.nio.file.*;
public class Test {
public static void main(String[] args) {
FileSystems.getDefault().getPath("C:/Users","");
Paths.get("C:/Users","");
Path.of("C:/Users","");
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use FileSystems.getDefault().getPath("",""); or Paths.get("","");
FREQUENCY : always
Windows 10
Windows 1117.0.2
A DESCRIPTION OF THE PROBLEM :
Given following method signatures:
FileSystems.getDefault().getPath("","");
Paths.get("","");
Path.of("","");
First two work. While Path.of doesn't. I get a NoSuchMethod exception. I know another person who has the same issue. He works on Windows 11. Same JDK version.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use following three methods:
FileSystems.getDefault().getPath("","");
Paths.get("","");
Path.of("","");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Last method also works
ACTUAL -
Last method doesn't work
---------- BEGIN SOURCE ----------
import java.nio.file.*;
public class Test {
public static void main(String[] args) {
FileSystems.getDefault().getPath("C:/Users","");
Paths.get("C:/Users","");
Path.of("C:/Users","");
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use FileSystems.getDefault().getPath("",""); or Paths.get("","");
FREQUENCY : always