src/solaris/classes/sun/awt/X11/XWM.java
Print this page
rev 9830 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by: darcy, prr
*** 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>();
*** 1320,1332 ****
}
}
}
}
! 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;
--- 1321,1333 ----
}
}
}
}
! 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;