src/share/classes/java/rmi/MarshalledObject.java

Print this page

        

@@ -154,10 +154,11 @@
         // locBytes is null if no annotations
         ByteArrayInputStream lin =
             (locBytes == null ? null : new ByteArrayInputStream(locBytes));
         MarshalledObjectInputStream in =
             new MarshalledObjectInputStream(bin, lin);
+        @SuppressWarnings("unchecked")
         T obj = (T) in.readObject();
         in.close();
         return obj;
     }
 

@@ -188,11 +189,11 @@
     public boolean equals(Object obj) {
         if (obj == this)
             return true;
 
         if (obj != null && obj instanceof MarshalledObject) {
-            MarshalledObject other = (MarshalledObject) obj;
+            MarshalledObject<?> other = (MarshalledObject<?>) obj;
 
             // if either is a ref to null, both must be
             if (objBytes == null || other.objBytes == null)
                 return objBytes == other.objBytes;