7077466: fix for RMI DGC
authorsmarks
Tue, 30 Aug 2011 14:30:03 -0700
changeset 10912 4f21298dca19
parent 10911 6816ffc67934
child 10913 e1acf4473704
7077466: fix for RMI DGC Reviewed-by: valeriep
jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java
--- a/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java	Fri Jul 22 21:14:56 2011 +0400
+++ b/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java	Tue Aug 30 14:30:03 2011 -0700
@@ -390,6 +390,12 @@
             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",