Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4797947

RMIClassLoader DefaultProvider does not use actual value of codebase property

    XMLWordPrintable

Details

    • sparc
    • solaris_2.6

    Description



      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

         
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              awollratsunw Ann Wollrath (Inactive)
              alisunw Ali Ali (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: