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);
|
Cursor cursor = systemCustomCursors.get(name);
|
||||||
|
|
||||||
if (cursor == null) {
|
if (cursor == null) {
|
||||||
synchronized(systemCustomCursors) {
|
loadSystemCustomCursorProperties();
|
||||||
if (systemCustomCursorProperties == null)
|
|
||||||
loadSystemCustomCursorProperties();
|
|
||||||
}
|
|
||||||
|
|
||||||
String prefix = CURSOR_DOT_PREFIX + name;
|
String prefix = CURSOR_DOT_PREFIX + name;
|
||||||
String key = prefix + DOT_FILE_SUFFIX;
|
String key = prefix + DOT_FILE_SUFFIX;
|
||||||
@ -433,7 +430,10 @@ public class Cursor implements java.io.Serializable {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
private static void loadSystemCustomCursorProperties() throws AWTException {
|
private static void loadSystemCustomCursorProperties() throws AWTException {
|
||||||
synchronized(systemCustomCursors) {
|
synchronized (systemCustomCursors) {
|
||||||
|
if (systemCustomCursorProperties != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
systemCustomCursorProperties = new Properties();
|
systemCustomCursorProperties = new Properties();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user