Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P5
-
Resolution: Fixed
-
Affects Version/s: 16, 17
-
Fix Version/s: 18
-
Component/s: client-libs
-
Labels:None
-
Subcomponent:
-
Resolved In Build:b17
Description
There is lock on a field java.awt.Cursor.systemCustomCursors which is taken twice:
1. In a method java.awt.Cursor#getSystemCustomCursor:
```
synchronized(systemCustomCursors) {
if (systemCustomCursorProperties == null)
loadSystemCustomCursorProperties();
}
```
2. And then again in method 'loadSystemCustomCursorProperties' itself
```
private static void loadSystemCustomCursorProperties() throws AWTException {
synchronized(systemCustomCursors) {
systemCustomCursorProperties = new Properties();
```
Such reentrancy is redundant and confusing.
1. In a method java.awt.Cursor#getSystemCustomCursor:
```
synchronized(systemCustomCursors) {
if (systemCustomCursorProperties == null)
loadSystemCustomCursorProperties();
}
```
2. And then again in method 'loadSystemCustomCursorProperties' itself
```
private static void loadSystemCustomCursorProperties() throws AWTException {
synchronized(systemCustomCursors) {
systemCustomCursorProperties = new Properties();
```
Such reentrancy is redundant and confusing.