RFR: 8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on String object
Igor Ignatyev
iignatyev at openjdk.java.net
Tue Oct 20 22:54:16 UTC 2020
Hi all,
could you please review this small and trivial patch?
from JBS:
`sun.nio.fs.WindowsPath::getPathForWin32Calls` synchronizes on `path` field, which is a `String` object:
if (type != WindowsPathType.DRIVE_RELATIVE) {
synchronized (path) {
pathForWin32Calls = new WeakReference<String>(resolved);
}
}
this might lead to a deadlock, synchronizing on `this` is appropriate here.
testing:
* [ ] tier1
* [x] `test/jdk/java/nio` on windows-x64
-------------
Commit messages:
- update copyright
- 8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on String object
Changes: https://git.openjdk.java.net/jdk/pull/774/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=774&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8255074
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/774.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/774/head:pull/774
PR: https://git.openjdk.java.net/jdk/pull/774
More information about the nio-dev
mailing list