-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 7, 16
-
Component/s: core-libs
-
b23
-
generic
-
linux
Running JShell 16-ea on Linux and passing an empty Path to Files.isHidden() throws an ArrayIndexOutOfBoundsException:
jshell> Files.isHidden(Path.of(""))
| Exception java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
| at UnixFileSystemProvider.isHidden(UnixFileSystemProvider.java:355)
| at Files.isHidden (Files.java:1637)
| at (#30:1)
Using an empty Path on Windows returns a value without throwing an exception:
jshell> Files.isHidden(Path.of(""))
$1 ==> false
jshell> Files.isHidden(Path.of(""))
| Exception java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
| at UnixFileSystemProvider.isHidden(UnixFileSystemProvider.java:355)
| at Files.isHidden (Files.java:1637)
| at (#30:1)
Using an empty Path on Windows returns a value without throwing an exception:
jshell> Files.isHidden(Path.of(""))
$1 ==> false