src/solaris/classes/sun/awt/X11/XWM.java
Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:
*** 1070,1079 ****
--- 1070,1080 ----
private HashMap<Class<?>, Collection<?>> protocolsMap = new HashMap<Class<?>, Collection<?>>();
/**
* Returns all protocols supporting given protocol interface
*/
<T> Collection<T> getProtocols(Class<T> protocolInterface) {
+ @SuppressWarnings("unchecked")
Collection<T> res = (Collection<T>) protocolsMap.get(protocolInterface);
if (res != null) {
return res;
} else {
return new LinkedList<T>();
*** 1129,1138 ****
--- 1130,1140 ----
for (XStateProtocol proto : getProtocols(XStateProtocol.class)) {
if (proto.supportsState(state)) {
return true;
}
}
+ /* FALLTROUGH */
default:
return false;
}
}
*** 1318,1330 ****
}
}
}
}
! HashMap storedInsets = new HashMap();
Insets guessInsets(XDecoratedPeer window) {
! Insets res = (Insets)storedInsets.get(window.getClass());
if (res == null) {
switch (WMID) {
case ENLIGHTEN_WM:
res = new Insets(19, 4, 4, 4);
break;
--- 1320,1332 ----
}
}
}
}
! HashMap<Class<?>, Insets> storedInsets = new HashMap<>();
Insets guessInsets(XDecoratedPeer window) {
! Insets res = storedInsets.get(window.getClass());
if (res == null) {
switch (WMID) {
case ENLIGHTEN_WM:
res = new Insets(19, 4, 4, 4);
break;