[jboss-cvs] JBossAS SVN: r59537 - projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 11 12:47:22 EST 2007


Author: alesj
Date: 2007-01-11 12:47:19 -0500 (Thu, 11 Jan 2007)
New Revision: 59537

Modified:
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java
Log:
bundle check fix

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java	2007-01-11 17:23:27 UTC (rev 59536)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/BundleDeployer.java	2007-01-11 17:47:19 UTC (rev 59537)
@@ -47,9 +47,9 @@
    {
       try
       {
-         if (isBundle(unit))
+         VirtualFile root = unit.getFile("");
+         if (isBundle(unit, root))
          {
-            VirtualFile root = unit.getFile("");
             BundleAdapter bundleAdapter = platform.installBundle(root.getPathName(), null);
             unit.getTransientManagedObjects().addAttachment(BundleAdapter.class, bundleAdapter);
          }
@@ -60,12 +60,14 @@
       }
    }
 
-   protected boolean isBundle(DeploymentUnit unit)
+   protected boolean isBundle(DeploymentUnit unit, VirtualFile root)
    {
       // todo - determine better what is a Bundle
-      VirtualFile root = unit.getFile("");
-      VirtualFile manifest = unit.getMetaDataFile("MANIFEST.MF");
-      return (root != null && root.getName().endsWith(".jar")) && manifest != null;
+      if (root != null && root.getName().endsWith(".jar"))
+      {
+         return (unit.getMetaDataFile("MANIFEST.MF") != null);
+      }
+      return false;
    }
 
    public void undeploy(DeploymentUnit unit)




More information about the jboss-cvs-commits mailing list