[jboss-cvs] JBossAS SVN: r101891 - in projects/jboss-osgi/projects/deployers/trunk: vfs30/src/main/java/org/jboss/osgi/deployer and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 4 15:23:10 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-03-04 15:23:10 -0500 (Thu, 04 Mar 2010)
New Revision: 101891
Modified:
projects/jboss-osgi/projects/deployers/trunk/vfs21/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
Log:
Prevent NPE when Deployment is not attached
Modified: projects/jboss-osgi/projects/deployers/trunk/vfs21/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
===================================================================
--- projects/jboss-osgi/projects/deployers/trunk/vfs21/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2010-03-04 20:14:33 UTC (rev 101890)
+++ projects/jboss-osgi/projects/deployers/trunk/vfs21/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2010-03-04 20:23:10 UTC (rev 101891)
@@ -50,7 +50,6 @@
public BundleStartLevelDeployer()
{
super(Bundle.class);
- addInput(Deployment.class);
}
public void setSystemContext(BundleContext systemContext)
@@ -61,7 +60,7 @@
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
{
Deployment dep = unit.getAttachment(Deployment.class);
- Integer propStart = dep.getStartLevel();
+ Integer propStart = (dep != null ? dep.getStartLevel() : null);
StartLevel startLevel = getStartLevel();
if (propStart != null && startLevel != null)
Modified: projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
===================================================================
--- projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2010-03-04 20:14:33 UTC (rev 101890)
+++ projects/jboss-osgi/projects/deployers/trunk/vfs30/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2010-03-04 20:23:10 UTC (rev 101891)
@@ -50,7 +50,6 @@
public BundleStartLevelDeployer()
{
super(Bundle.class);
- addInput(Deployment.class);
}
public void setSystemContext(BundleContext systemContext)
@@ -61,7 +60,7 @@
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
{
Deployment dep = unit.getAttachment(Deployment.class);
- Integer propStart = dep.getStartLevel();
+ Integer propStart = dep != null ? dep.getStartLevel() : null;
StartLevel startLevel = getStartLevel();
if (propStart != null && startLevel != null)
More information about the jboss-cvs-commits
mailing list