You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by si...@apache.org on 2012/10/27 10:17:45 UTC

svn commit: r1402755 - /river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java

Author: sijskes
Date: Sat Oct 27 08:17:45 2012
New Revision: 1402755

URL: http://svn.apache.org/viewvc?rev=1402755&view=rev
Log:
RIVER-336

Modified:
    river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java

Modified: river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java?rev=1402755&r1=1402754&r2=1402755&view=diff
==============================================================================
--- river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java (original)
+++ river/jtsk/trunk/src/net/jini/security/proxytrust/ProxyTrustVerifier.java Sat Oct 27 08:17:45 2012
@@ -31,8 +31,6 @@ import java.lang.reflect.Proxy;
 import java.net.MalformedURLException;
 import java.rmi.RemoteException;
 import java.rmi.UnmarshalException;
-import java.rmi.server.RMIClassLoader;
-import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
@@ -46,6 +44,7 @@ import net.jini.core.constraint.MethodCo
 import net.jini.core.constraint.RemoteMethodControl;
 import net.jini.io.MarshalInputStream;
 import net.jini.io.ObjectStreamContext;
+import net.jini.loader.RiverClassLoader;
 import net.jini.security.SecurityContext;
 import net.jini.security.TrustVerifier;
 
@@ -228,8 +227,8 @@ public class ProxyTrustVerifier implemen
      * method; the class loader of the proxy's class is
      * the proper Java(TM) RMI class
      * loader (as defined below) for its parent class loader and the class's
-     * codebase (as produced by {@link RMIClassLoader#getClassAnnotation
-     * RMIClassLoader.getClassAnnotation}); and both <code>ProxyTrust</code>
+     * codebase (as produced by {@link RiverClassLoader#getClassAnnotation
+     * RiverClassLoader.getClassAnnotation}); and both <code>ProxyTrust</code>
      * and <code>RemoteMethodControl</code> are loadable by the parent class
      * loader. The derivative that is produced is an instance of a dynamically
      * generated <code>Proxy</code> class defined by the parent class loader
@@ -270,7 +269,7 @@ public class ProxyTrustVerifier implemen
      * parent class loader and the class's codebase if the class loader is
      * not <code>null</code>, the codebase for the class is a non-empty
      * string, and calling
-     * {@link RMIClassLoader#getClassLoader RMIClassLoader.getClassLoader}
+     * {@link RiverClassLoader#getClassLoader RiverClassLoader.getClassLoader}
      * with that codebase, with the thread's context class loader set to the
      * parent class loader, returns the class loader of the class.
      *
@@ -513,7 +512,7 @@ public class ProxyTrustVerifier implemen
 	    return null;
 	}
 	final Class base = obj.getClass();
-	final String bcb = RMIClassLoader.getClassAnnotation(base);
+	final String bcb = RiverClassLoader.getClassAnnotation(base);
 	if (bcb == null || bcb.length() == 0) {
 	    return null;
 	}
@@ -530,7 +529,7 @@ public class ProxyTrustVerifier implemen
 		    boolean proper = false;
 		    try {
 			t.setContextClassLoader(pcl);
-			proper = (RMIClassLoader.getClassLoader(bcb) == bcl);
+			proper = (RiverClassLoader.getClassLoader(bcb) == bcl);
 		    } catch (MalformedURLException e) {
 		    } finally {
 			t.setContextClassLoader(ccl);
@@ -631,7 +630,7 @@ public class ProxyTrustVerifier implemen
 	}
 
 	private void writeAnnotation(final Class c) throws IOException {
-	    String cb = RMIClassLoader.getClassAnnotation(c);
+	    String cb = RiverClassLoader.getClassAnnotation(c);
 	    writeObject(cb);
 	    if (bcb.equals(cb)) {
 		AccessController.doPrivileged(new PrivilegedAction() {