changeset 4464:78f33b47d8aa

7077466: fix for RMI DGC Reviewed-by: valeriep
author smarks
date Tue, 30 Aug 2011 14:30:03 -0700
parents 806657cb5075
children be6d52e6106d
files src/share/classes/sun/rmi/server/UnicastServerRef.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/rmi/server/UnicastServerRef.java	Mon Aug 22 18:45:44 2011 -0700
+++ b/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",