-
Bug
-
Resolution: Fixed
-
P4
-
8u40, 9
-
b34
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084399 | emb-9 | Daniel Fuchs | P4 | Resolved | Fixed | team |
JDK-8063896 | 8u45 | Daniel Fuchs | P4 | Resolved | Fixed | b01 |
JDK-8059463 | 8u40 | Daniel Fuchs | P4 | Resolved | Fixed | b10 |
JDK-8070162 | emb-8u47 | Daniel Fuchs | P4 | Resolved | Fixed | team |
This is a regression introduced by JDK-8048020 - which might happen in the uncommon case where: pattern is a simple name (not a full path), and the .lck file already exists on disk (and hasn't been created by another FileHandler in the same VM).
In that case, we will check whether we have write permission in the directory in which the lck file is present. The catch is that if the file name is a simple name (not composed), then Path.getParentPath() will return null, and Files.isWritable() will throw NPE.
Exception in thread "main" java.lang.NullPointerException
at java.nio.file.Files.provider(Files.java:96)
at java.nio.file.Files.isAccessible(Files.java:2454)
at java.nio.file.Files.isWritable(Files.java:2520)
at java.util.logging.FileHandler.openFiles(FileHandler.java:466)
In that case, we will check whether we have write permission in the directory in which the lck file is present. The catch is that if the file name is a simple name (not composed), then Path.getParentPath() will return null, and Files.isWritable() will throw NPE.
Exception in thread "main" java.lang.NullPointerException
at java.nio.file.Files.provider(Files.java:96)
at java.nio.file.Files.isAccessible(Files.java:2454)
at java.nio.file.Files.isWritable(Files.java:2520)
at java.util.logging.FileHandler.openFiles(FileHandler.java:466)
- backported by
-
JDK-8059463 FileHandler may throw NPE if pattern is a simple name and the lock file already exists
-
- Resolved
-
-
JDK-8063896 FileHandler may throw NPE if pattern is a simple name and the lock file already exists
-
- Resolved
-
-
JDK-8070162 FileHandler may throw NPE if pattern is a simple name and the lock file already exists
-
- Resolved
-
-
JDK-8084399 FileHandler may throw NPE if pattern is a simple name and the lock file already exists
-
- Resolved
-
- relates to
-
JDK-8048020 Regression on java.util.logging.FileHandler
-
- Closed
-