This fixes some problems in CombinedClassLoader that may arise when using the application without pre-generated RMI stubs.

2006-03-07  Audrius Meskauskas  <[EMAIL PROTECTED]>

   * gnu/java/rmi/server/CombinedClassLoader.java (findClass,
   findLibrary, findResouce, findResources): check all loaders in
   array.
Index: CombinedClassLoader.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/rmi/server/CombinedClassLoader.java,v
retrieving revision 1.1
diff -u -r1.1 CombinedClassLoader.java
--- CombinedClassLoader.java	20 Feb 2006 08:49:37 -0000	1.1
+++ CombinedClassLoader.java	6 Mar 2006 23:49:50 -0000
@@ -96,7 +96,7 @@
       {
         try
           {
-            return findClass(name);
+            return loaders[i].loadClass(name);
           }
         catch (ClassNotFoundException e)
           {
@@ -107,27 +107,13 @@
   }
 
   /**
-   * Find the library with the given name
-   */
-  protected String findLibrary(String name)
-  {
-    for (int i = 0; i < loaders.length; i++)
-      {
-        String lib = findLibrary(name);
-        if (lib != null)
-          return lib;
-      }
-    return super.findLibrary(name);
-  }
-
-  /**
    * Find resource with the given name.
    */
   protected URL findResource(String name)
   {
     for (int i = 0; i < loaders.length; i++)
       {
-        URL resource = findResource(name);
+        URL resource = loaders[i].getResource(name);
         if (resource != null)
           return resource;
       }
@@ -141,7 +127,7 @@
   {
     for (int i = 0; i < loaders.length; i++)
       {
-        Enumeration resource = findResources(name);
+        Enumeration resource = loaders[i].getResources(name);
         if (resource != null)
           return resource;
       }

Reply via email to