-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: aaR10142 Date: 12/25/2002
The canonical RMIClassLoaderSpi returned by RMIClassLoader.getDefaultProvider()
does not check java.rmi.server.codebase property changes.
The getAnotationClass method returns only one value of codebase, and there is
no way to change it. If I change codebase property the method doesn't check this.
The javadoc says:
"the value of the java.rmi.server.codebase property is returned"
See example:
import java.rmi.server.*;
================ Test.java =====================
public class Test {
public static void main( String[] args ) throws Exception {
RMIClassLoaderSpi c = RMIClassLoader.getDefaultProviderInstance();
System.out.println("class annotation 1: " + c.getClassAnnotation(Object.class));
System.setProperty("java.rmi.server.codebase", "file:/");
RMIClassLoaderSpi c2 = RMIClassLoader.getDefaultProviderInstance();
System.out.println("class annotation 2: " + c2.getClassAnnotation(Object.class));
}
}
=============== output =======================
class annotation 1: null
class annotation 2: null
======================================================================
- duplicates
-
JDK-4508160 (spec) RMIClassLoader.loadClass() doesn't work if codebase changed dynamically
- Closed