harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r416063 - /incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java
Date Wed, 21 Jun 2006 18:41:35 GMT
Author: hindessm
Date: Wed Jun 21 11:41:35 2006
New Revision: 416063

URL: http://svn.apache.org/viewvc?rev=416063&view=rev
Log:
The getResource method should use systemClassLoader if parent is null.

Modified:
    incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java

Modified: incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java?rev=416063&r1=416062&r2=416063&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java
(original)
+++ incubator/harmony/enhanced/classlibadapter/trunk/modules/kernel/src/main/java/java/lang/ClassLoader.java
Wed Jun 21 11:41:35 2006
@@ -206,9 +206,14 @@
 	 * @see Class#getResource
 	 */
 	public URL getResource(String resName) {
-        URL resource = parent.getResource(resName);
-        if (resource != null) return resource;
-        return findResource(resName);
+            URL resource = null;
+            if (parent == null) {
+                resource = systemClassLoader.getResource(resName);
+            } else {
+                resource = parent.getResource(resName);
+            }
+            if (resource != null) return resource;
+            return findResource(resName);
 	}
 
 	/**



Mime
View raw message