geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r905535 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
Date Tue, 02 Feb 2010 07:06:21 GMT
Author: gawor
Date: Tue Feb  2 07:06:21 2010
New Revision: 905535

URL: http://svn.apache.org/viewvc?rev=905535&view=rev
Log:
forgot to commit

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

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java?rev=905535&r1=905534&r2=905535&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/MockBundle.java
Tue Feb  2 07:06:21 2010
@@ -51,7 +51,11 @@
 
     public MockBundle(ClassLoader classLoader, String location, long id) {
         this.classLoader = classLoader;
-        this.location = location;
+        if (location != null && location.endsWith("/")) {
+            this.location = location.substring(0, location.length() - 1);
+        } else {
+            this.location = location;
+        }
         this.id = id;
     }
 
@@ -129,13 +133,17 @@
     }
 
     public URL getEntry(String s) {
+        if (s.startsWith("/")) {
+            s = s.substring(1);   
+        }
         try {
-            return new URL(location + s);
+            return new URL(location + "/" + s);
         } catch (MalformedURLException e) {
             throw new RuntimeException(e);
         }
     }
 
+    
     public long getLastModified() {
         return 0;
     }



Mime
View raw message