changeset 529:92ab8bb7ff22

7077466: fix for RMI DGC Reviewed-by: smarks
author coffeys
date Mon, 19 Sep 2011 10:52:31 +0100
parents ce3948d79810
children 9a4fc5068e5f
files src/share/classes/sun/rmi/server/UnicastServerRef.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/rmi/server/UnicastServerRef.java	Fri Jul 22 21:06:02 2011 +0400
+++ b/src/share/classes/sun/rmi/server/UnicastServerRef.java	Mon Sep 19 10:52:31 2011 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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",