7077466: fix for RMI DGC

Reviewed-by: valeriep
This commit is contained in:
Stuart Marks 2011-08-30 14:30:03 -07:00
parent 096686792a
commit fcee5390db

View File

@ -390,6 +390,12 @@ public class UnicastServerRef extends UnicastRef
ObjectInput in;
try {
in = call.getInputStream();
try {
Class<?> clazz = Class.forName("sun.rmi.transport.DGCImpl_Skel");
if (clazz.isAssignableFrom(skel.getClass())) {
((MarshalInputStream)in).useCodebaseOnly();
}
} catch (ClassNotFoundException ignore) { }
hash = in.readLong();
} catch (Exception readEx) {
throw new UnmarshalException("error unmarshalling call header",