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

Print this page

        

*** 154,163 **** --- 154,164 ---- // 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,198 **** public boolean equals(Object obj) { if (obj == this) return true; if (obj != null && obj instanceof MarshalledObject) { ! MarshalledObject other = (MarshalledObject) obj; // if either is a ref to null, both must be if (objBytes == null || other.objBytes == null) return objBytes == other.objBytes; --- 189,199 ---- public boolean equals(Object obj) { if (obj == this) return true; if (obj != null && obj instanceof MarshalledObject) { ! MarshalledObject<?> other = (MarshalledObject<?>) obj; // if either is a ref to null, both must be if (objBytes == null || other.objBytes == null) return objBytes == other.objBytes;