7077466: fix for RMI DGC
authorcoffeys
Mon Sep 19 10:52:31 2011 +0100 (20 months ago)
changeset 52992ab8bb7ff22
parent 528ce3948d79810
child 5309a4fc5068e5f
7077466: fix for RMI DGC
Reviewed-by: smarks
src/share/classes/sun/rmi/server/UnicastServerRef.java
--- 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 @@ public class UnicastServerRef extends Un
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",