Skip to content
Permalink
Browse files
8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on…
… String object

Reviewed-by: bpb
  • Loading branch information
iignatev committed Oct 21, 2020
1 parent 9e9f5e6 commit 6bd05b12a05b9d088724de70ddb048e2f4ed3943
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/java.base/windows/classes/sun/nio/fs/WindowsPath.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -206,7 +206,7 @@ String getPathForWin32Calls() throws WindowsException {
// directory on removal media devices can change during the lifetime
// of the VM)
if (type != WindowsPathType.DRIVE_RELATIVE) {
synchronized (path) {
synchronized (this) {
pathForWin32Calls = new WeakReference<String>(resolved);
}
}

1 comment on commit 6bd05b1

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 6bd05b1 Oct 21, 2020

Please sign in to comment.