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:16:23 UTC
svn commit: r1402753 - in /river/jtsk/trunk/src/net/jini/loader:
ClassAnnotation.java ClassLoading.java DownloadPermission.java
Author: sijskes
Date: Sat Oct 27 08:16:23 2012
New Revision: 1402753
URL: http://svn.apache.org/viewvc?rev=1402753&view=rev
Log:
RIVER-336 related.
Modified:
river/jtsk/trunk/src/net/jini/loader/ClassAnnotation.java
river/jtsk/trunk/src/net/jini/loader/ClassLoading.java
river/jtsk/trunk/src/net/jini/loader/DownloadPermission.java
Modified: river/jtsk/trunk/src/net/jini/loader/ClassAnnotation.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/src/net/jini/loader/ClassAnnotation.java?rev=1402753&r1=1402752&r2=1402753&view=diff
==============================================================================
--- river/jtsk/trunk/src/net/jini/loader/ClassAnnotation.java (original)
+++ river/jtsk/trunk/src/net/jini/loader/ClassAnnotation.java Sat Oct 27 08:16:23 2012
@@ -18,7 +18,6 @@
package net.jini.loader;
-import java.rmi.server.RMIClassLoader;
import net.jini.loader.pref.PreferredClassProvider;
/**
@@ -26,19 +25,19 @@ import net.jini.loader.pref.PreferredCla
* loader that is an instance of this interface.
*
* <p>This interface allows a {@link ClassLoader} subclass to
- * customize the behavior of {@link RMIClassLoader#getClassAnnotation
- * RMIClassLoader.getClassAnnotation} (and thus RMI marshalling
+ * customize the behavior of {@link RiverClassLoader#getClassAnnotation
+ * RiverClassLoader.getClassAnnotation} (and thus RMI marshalling
* semantics) for classes defined by its instances.
*
* <p>Note that this interface is only effective if the current {@link
- * RMIClassLoader} provider supports it; not all
- * <code>RMIClassLoader</code> providers support this interface. In
+ * RiverClassLoader} provider supports it; not all
+ * <code>RiverClassLoader</code> providers support this interface. In
* particular, the default provider (see {@link
- * RMIClassLoader#getDefaultProviderInstance
- * RMIClassLoader.getDefaultProviderInstance}) does <i>not</i> support
+ * RiverClassLoader#getDefaultProviderInstance
+ * RiverClassLoader.getDefaultProviderInstance}) does <i>not</i> support
* this interface, and so when the default provider is used, this
* interface will be ignored by
- * <code>RMIClassLoader.getClassAnnotation</code>. {@link
+ * <code>RiverClassLoader.getClassAnnotation</code>. {@link
* PreferredClassProvider} and its subclasses do support this
* interface.
*
Modified: river/jtsk/trunk/src/net/jini/loader/ClassLoading.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/src/net/jini/loader/ClassLoading.java?rev=1402753&r1=1402752&r2=1402753&view=diff
==============================================================================
--- river/jtsk/trunk/src/net/jini/loader/ClassLoading.java (original)
+++ river/jtsk/trunk/src/net/jini/loader/ClassLoading.java Sat Oct 27 08:16:23 2012
@@ -20,7 +20,6 @@ package net.jini.loader;
import java.lang.ref.SoftReference;
import java.net.MalformedURLException;
-import java.rmi.server.RMIClassLoader;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Map;
@@ -29,7 +28,7 @@ import net.jini.security.Security;
/**
* Provides static methods for loading classes using {@link
- * RMIClassLoader} with optional verification that the codebase URLs
+ * RiverClassLoader} with optional verification that the codebase URLs
* used to load classes provide content integrity (see {@link
* Security#verifyCodebaseIntegrity
* Security.verifyCodebaseIntegrity}).
@@ -50,8 +49,8 @@ public final class ClassLoading {
/**
* Loads a class using {@link
- * RMIClassLoader#loadClass(String,String,ClassLoader)
- * RMIClassLoader.loadClass}, optionally verifying that the
+ * RiverClassLoader#loadClass(String,String,ClassLoader)
+ * RiverClassLoader.loadClass}, optionally verifying that the
* codebase URLs provide content integrity.
*
* <p>If <code>verifyCodebaseIntegrity</code> is <code>true</code>
@@ -72,19 +71,19 @@ public final class ClassLoading {
* other exception, then this method throws that exception.
*
* <p>This method then invokes {@link
- * RMIClassLoader#loadClass(String,String,ClassLoader)
- * RMIClassLoader.loadClass} with <code>codebase</code> as the
+ * RiverClassLoader#loadClass(String,String,ClassLoader)
+ * RiverClassLoader.loadClass} with <code>codebase</code> as the
* first argument (or <code>null</code> if in the previous step
* <code>Security.verifyCodebaseIntegrity</code> was invoked and
* it threw a <code>SecurityException</code>), <code>name</code>
* as the second argument, and <code>defaultLoader</code> as the
- * third argument. If <code>RMIClassLoader.loadClass</code>
+ * third argument. If <code>RiverClassLoader.loadClass</code>
* throws a <code>ClassNotFoundException</code>, then this method
* throws a <code>ClassNotFoundException</code>; if
- * <code>RMIClassLoader.loadClass</code> throws any other
+ * <code>RiverClassLoader.loadClass</code> throws any other
* exception, then this method throws that exception; otherwise,
* this method returns the <code>Class</code> returned by
- * <code>RMIClassLoader.loadClass</code>.
+ * <code>RiverClassLoader.loadClass</code>.
*
* @param codebase the list of URLs (separated by spaces) to load
* the class from, or <code>null</code>
@@ -93,7 +92,7 @@ public final class ClassLoading {
*
* @param defaultLoader the class loader value (possibly
* <code>null</code>) to pass as the <code>defaultLoader</code>
- * argument to <code>RMIClassLoader.loadClass</code>
+ * argument to <code>RiverClassLoader.loadClass</code>
*
* @param verifyCodebaseIntegrity if <code>true</code>, verify
* that the codebase URLs provide content integrity
@@ -108,11 +107,11 @@ public final class ClassLoading {
*
* @throws MalformedURLException if
* <code>Security.verifyCodebaseIntegrity</code> or
- * <code>RMIClassLoader.loadClass</code> throws a
+ * <code>RiverClassLoader.loadClass</code> throws a
* <code>MalformedURLException</code>
*
* @throws ClassNotFoundException if
- * <code>RMIClassLoader.loadClass</code> throws a
+ * <code>RiverClassLoader.loadClass</code> throws a
* <code>ClassNotFoundException</code>
*
* @throws NullPointerException if <code>name</code> is
@@ -135,7 +134,7 @@ public final class ClassLoading {
}
}
try {
- return RMIClassLoader.loadClass(codebase, name, defaultLoader);
+ return RiverClassLoader.loadClass(codebase, name, defaultLoader);
} catch (ClassNotFoundException e) {
if (verifyException != null) {
// assume that the verify exception is more important
@@ -149,8 +148,8 @@ public final class ClassLoading {
/**
* Loads a dynamic proxy class using {@link
- * RMIClassLoader#loadProxyClass(String,String[],ClassLoader)
- * RMIClassLoader.loadProxyClass}, optionally verifying that the
+ * RiverClassLoader#loadProxyClass(String,String[],ClassLoader)
+ * RiverClassLoader.loadProxyClass}, optionally verifying that the
* codebase URLs provide content integrity.
*
* <p>If <code>verifyCodebaseIntegrity</code> is <code>true</code>
@@ -171,20 +170,20 @@ public final class ClassLoading {
* exception, then this method throws that exception.
*
* <p>This method invokes {@link
- * RMIClassLoader#loadProxyClass(String,String[],ClassLoader)
- * RMIClassLoader.loadProxyClass} with <code>codebase</code> as
+ * RiverClassLoader#loadProxyClass(String,String[],ClassLoader)
+ * RiverClassLoader.loadProxyClass} with <code>codebase</code> as
* the first argument (or <code>null</code> if in the previous
* step <code>Security.verifyCodebaseIntegrity</code> was invoked
* and it threw a <code>SecurityException</code>),
* <code>interfaceNames</code> as the second argument, and
* <code>defaultLoader</code> as the third argument. If
- * <code>RMIClassLoader.loadProxyClass</code> throws a
+ * <code>RiverClassLoader.loadProxyClass</code> throws a
* <code>ClassNotFoundException</code>, then this method throws a
* <code>ClassNotFoundException</code>; if
- * <code>RMIClassLoader.loadProxyClass</code> throws any other
+ * <code>RiverClassLoader.loadProxyClass</code> throws any other
* exception, then this method throws that exception; otherwise,
* this method returns the <code>Class</code> returned by
- * <code>RMIClassLoader.loadProxyClass</code>.
+ * <code>RiverClassLoader.loadProxyClass</code>.
*
* @param codebase the list of URLs (separated by spaces) to load
* classes from, or <code>null</code>
@@ -194,7 +193,7 @@ public final class ClassLoading {
*
* @param defaultLoader the class loader value (possibly
* <code>null</code>) to pass as the <code>defaultLoader</code>
- * argument to <code>RMIClassLoader.loadProxyClass</code>
+ * argument to <code>RiverClassLoader.loadProxyClass</code>
*
* @param verifyCodebaseIntegrity if <code>true</code>, verify
* that the codebase URLs provide content integrity
@@ -209,11 +208,11 @@ public final class ClassLoading {
*
* @throws MalformedURLException if
* <code>Security.verifyCodebaseIntegrity</code> or
- * <code>RMIClassLoader.loadProxyClass</code> throws a
+ * <code>RiverClassLoader.loadProxyClass</code> throws a
* <code>MalformedURLException</code>
*
* @throws ClassNotFoundException if
- * <code>RMIClassLoader.loadProxyClass</code> throws a
+ * <code>RiverClassLoader.loadProxyClass</code> throws a
* <code>ClassNotFoundException</code>
*
* @throws NullPointerException if <code>interfaceNames</code> is
@@ -237,7 +236,7 @@ public final class ClassLoading {
}
}
try {
- return RMIClassLoader.loadProxyClass(codebase, interfaceNames,
+ return RiverClassLoader.loadProxyClass(codebase, interfaceNames,
defaultLoader);
} catch (ClassNotFoundException e) {
if (verifyException != null) {
Modified: river/jtsk/trunk/src/net/jini/loader/DownloadPermission.java
URL: http://svn.apache.org/viewvc/river/jtsk/trunk/src/net/jini/loader/DownloadPermission.java?rev=1402753&r1=1402752&r2=1402753&view=diff
==============================================================================
--- river/jtsk/trunk/src/net/jini/loader/DownloadPermission.java (original)
+++ river/jtsk/trunk/src/net/jini/loader/DownloadPermission.java Sat Oct 27 08:16:23 2012
@@ -18,7 +18,6 @@
package net.jini.loader;
-import java.rmi.server.RMIClassLoader;
import java.security.BasicPermission;
import java.security.CodeSource;
import net.jini.loader.pref.PreferredClassProvider;
@@ -27,30 +26,30 @@ import net.jini.loader.pref.RequireDlPer
/**
* Permission that must be granted to the {@link CodeSource} of a
* downloaded class in order for the class to be defined using {@link
- * RMIClassLoader}.
+ * RiverClassLoader}.
*
* <p>A <code>DownloadPermission</code> contains a name (also referred
* to as a "target name") but no action list; you either have the
* named permission or you don't. The only defined target name is
* "permit", which allows a downloaded class with a
* <code>CodeSource</code> that is granted the permission to be
- * defined by a class loader created by <code>RMIClassLoader</code>.
+ * defined by a class loader created by <code>RiverClassLoader</code>.
*
* <p>Selective granting of this permission can be used to restrict
* the <code>CodeSource</code> values (codebase URLs and signers) from
* which downloaded classes can be defined using
- * <code>RMIClassLoader</code>.
+ * <code>RiverClassLoader</code>.
*
* <p>Note that this permission is only enforced if the current {@link
- * RMIClassLoader} provider supports it; not all
- * <code>RMIClassLoader</code> providers support this permission. In
+ * RiverClassLoader} provider supports it; not all
+ * <code>RiverClassLoader</code> providers support this permission. In
* particular, the default provider (see {@link
- * RMIClassLoader#getDefaultProviderInstance
- * RMIClassLoader.getDefaultProviderInstance}) does <i>not</i> support
+ * RiverClassLoader#getDefaultProviderInstance
+ * RiverClassLoader.getDefaultProviderInstance}) does <i>not</i> support
* this permission, and so when the default provider is used,
* downloaded classes do not need to be granted
* <code>DownloadPermission</code> in order to be defined using
- * <code>RMIClassLoader</code>. {@link PreferredClassProvider} itself
+ * <code>RiverClassLoader</code>. {@link PreferredClassProvider} itself
* does not enforce this permission, but subclasses may configure it
* to do so (see {@link RequireDlPermProvider}).
*