8054371: Need to suppress newly added unchecked cast and conversion in Swing code
Reviewed-by: jgodinez
--- a/jdk/src/share/classes/javax/swing/JLayer.java Tue Aug 05 12:14:11 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/JLayer.java Tue Aug 05 14:18:46 2014 -0700
@@ -646,6 +646,7 @@
return 1;
}
+ @SuppressWarnings("unchecked")
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField f = s.readFields();
@@ -656,7 +657,6 @@
if (eventMask != 0) {
eventController.updateAWTEventListener(0, eventMask);
}
- @SuppressWarnings("unchecked")
LayerUI<V> newLayerUI = (LayerUI<V>) f.get("layerUI", null);
if (newLayerUI != null) {
setUI(newLayerUI);
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java Tue Aug 05 12:14:11 2014 -0700
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java Tue Aug 05 14:18:46 2014 -0700
@@ -1426,12 +1426,14 @@
// --- serialization ---------------------------------------------
+ @SuppressWarnings("unchecked")
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException
{
ObjectInputStream.GetField f = s.readFields();
- documentProperties = (Dictionary) f.get("documentProperties", null);
+ documentProperties =
+ (Dictionary<Object, Object>) f.get("documentProperties", null);
listenerList = new EventListenerList();
data = (Content) f.get("data", null);
context = (AttributeContext) f.get("context", null);