geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r883609 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
Date Tue, 24 Nov 2009 07:13:43 GMT
Author: gawor
Date: Tue Nov 24 07:13:42 2009
New Revision: 883609

URL: http://svn.apache.org/viewvc?rev=883609&view=rev
Log:
untabify and implement BundleReference interface

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java?rev=883609&r1=883608&r2=883609&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/BundleClassLoader.java
Tue Nov 24 07:13:42 2009
@@ -17,7 +17,6 @@
  * under the License.
  */
 
-
 package org.apache.geronimo.kernel.osgi;
 
 import java.io.IOException;
@@ -31,7 +30,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class BundleClassLoader extends ClassLoader {
+public class BundleClassLoader extends ClassLoader implements BundleReference {
 
     private final Bundle bundle;
 
@@ -59,20 +58,20 @@
     }
 
     @Override
-	public URL getResource(String name) {
+    public URL getResource(String name) {
         return bundle.getResource(name);
-	}
+    }
 
-	@SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked")
     @Override
-	public Enumeration<URL> getResources(String name) throws IOException {
-	    Enumeration<URL> e = (Enumeration<URL>)bundle.getResources(name);
-	    if (e == null) {
-	        return Collections.enumeration(Collections.EMPTY_LIST);
-	    } else {
-	        return e;
-	    }
-	}
+    public Enumeration<URL> getResources(String name) throws IOException {
+        Enumeration<URL> e = (Enumeration<URL>)bundle.getResources(name);
+        if (e == null) {
+            return Collections.enumeration(Collections.EMPTY_LIST);
+        } else {
+            return e;
+        }
+    }
 
     /**
      * Return the bundle instance backing this classloader.



Mime
View raw message