-
Bug
-
Resolution: Fixed
-
P2
-
None
-
b117
-
generic
-
linux
SunFontManager.java invokes ConcurrentHashMap.contains(Object), which is denigrated.
If you change that method to be @Deprecated, the build fails with
jdk/src/java.desktop/share/classes/sun/font/SunFontManager.java:1847: warning: [deprecation] contains(Object) in ConcurrentHashMap has been deprecated
!registeredFonts.contains(file)) {
contains is equivalent to containsValue and that would be a good change to make, except that it looks like the intent was to check for a key, i.e. the author intended a call to containsKey(Object) and fell into the contains trap.
If you change that method to be @Deprecated, the build fails with
jdk/src/java.desktop/share/classes/sun/font/SunFontManager.java:1847: warning: [deprecation] contains(Object) in ConcurrentHashMap has been deprecated
!registeredFonts.contains(file)) {
contains is equivalent to containsValue and that would be a good change to make, except that it looks like the intent was to check for a key, i.e. the author intended a call to containsKey(Object) and fell into the contains trap.