Skip to content

Commit 6bd05b1

Browse files
committed
8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on String object
Reviewed-by: bpb
1 parent 9e9f5e6 commit 6bd05b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.base/windows/classes/sun/nio/fs/WindowsPath.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -206,7 +206,7 @@ String getPathForWin32Calls() throws WindowsException {
206206
// directory on removal media devices can change during the lifetime
207207
// of the VM)
208208
if (type != WindowsPathType.DRIVE_RELATIVE) {
209-
synchronized (path) {
209+
synchronized (this) {
210210
pathForWin32Calls = new WeakReference<String>(resolved);
211211
}
212212
}

0 commit comments

Comments
 (0)