From 6bd05b12a05b9d088724de70ddb048e2f4ed3943 Mon Sep 17 00:00:00 2001 From: Igor Ignatyev Date: Wed, 21 Oct 2020 02:34:47 +0000 Subject: [PATCH] 8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on String object Reviewed-by: bpb --- src/java.base/windows/classes/sun/nio/fs/WindowsPath.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java b/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java index 4500c733a34..de2a0a8a28f 100644 --- a/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java +++ b/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 @@ class WindowsPath implements Path { // 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(resolved); } }