-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
None
-
b27
The 'Properties' field 'java.awt.Cursor#systemCustomCursorProperties' contains only non-null values. It means we can use 'get'+null check instead of 'containsKey'+'get' calls in the method 'java.awt.Cursor#getSystemCustomCursor'.
if (!systemCustomCursorProperties.containsKey(key)) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
}
return null;
}
final String fileName =
systemCustomCursorProperties.getProperty(key);
It's clearer and a bit faster.
if (!systemCustomCursorProperties.containsKey(key)) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
}
return null;
}
final String fileName =
systemCustomCursorProperties.getProperty(key);
It's clearer and a bit faster.
- links to
-
Commit(master) openjdk/jdk/3b7571d3
-
Review(master) openjdk/jdk/21824