[jboss-cvs] JBossAS SVN: r94318 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src: main/java/org/jboss/osgi/framework/bundle and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Oct 4 17:38:58 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-04 17:38:57 -0400 (Sun, 04 Oct 2009)
New Revision: 94318

Removed:
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/etc/osgitck/cnf/
Modified:
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
Log:
Avoid interpreting bundle loaction as URL if inputSource is given

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java	2009-10-04 21:19:12 UTC (rev 94317)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java	2009-10-04 21:38:57 UTC (rev 94318)
@@ -400,8 +400,9 @@
       if (location == null)
          throw new BundleException("Null location");
 
+      URL locationURL;
+      
       // Get the location URL
-      URL locationURL = getLocationURL(location);
       if (input != null)
       {
          try
@@ -410,7 +411,7 @@
             String path = plugin.getStorageDir(getSystemBundle()).getCanonicalPath();
 
             // [TODO] do properly
-            File file = new File(path + "/installBundle-" + System.currentTimeMillis() + ".jar");
+            File file = new File(path + "/bundle-" + System.currentTimeMillis() + ".jar");
             FileOutputStream fos = new FileOutputStream(file);
             VFSUtils.copyStream(input, fos);
             fos.close();
@@ -422,6 +423,10 @@
             throw new BundleException("Cannot store bundle from input stream", ex);
          }
       }
+      else
+      {
+         locationURL = getLocationURL(location);
+      }
 
       // Get the root file
       VirtualFile root;




More information about the jboss-cvs-commits mailing list