8274317: Unnecessary reentrant synchronized block in java.awt.Cursor
Reviewed-by: serb, pbansal, prr
This commit is contained in:
parent
7426fd4c9c
commit
7436a77e3d
@ -295,10 +295,7 @@ public class Cursor implements java.io.Serializable {
|
||||
Cursor cursor = systemCustomCursors.get(name);
|
||||
|
||||
if (cursor == null) {
|
||||
synchronized(systemCustomCursors) {
|
||||
if (systemCustomCursorProperties == null)
|
||||
loadSystemCustomCursorProperties();
|
||||
}
|
||||
loadSystemCustomCursorProperties();
|
||||
|
||||
String prefix = CURSOR_DOT_PREFIX + name;
|
||||
String key = prefix + DOT_FILE_SUFFIX;
|
||||
@ -433,7 +430,10 @@ public class Cursor implements java.io.Serializable {
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
private static void loadSystemCustomCursorProperties() throws AWTException {
|
||||
synchronized(systemCustomCursors) {
|
||||
synchronized (systemCustomCursors) {
|
||||
if (systemCustomCursorProperties != null) {
|
||||
return;
|
||||
}
|
||||
systemCustomCursorProperties = new Properties();
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user