@@ -648,10 +648,6 @@
*/
protected void doInstall(Deployer deployer, DeploymentContext context, boolean doComponents) throws Throwable
{
- // Take a copy of the components so we don't start looping on newly added components
- // in the component deployers
- List<DeploymentContext> components = new ArrayList<DeploymentContext>(context.getComponents());
-
DeploymentUnit unit = context.getDeploymentUnit();
if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent()))
deployer.deploy(unit);
@@ -660,9 +656,13 @@
if (doComponents)
{
- try
+ List<DeploymentContext> currentComponents = context.getComponents();
+ if (currentComponents != null && currentComponents.isEmpty() == false)
Take a copy of the components so we don't start looping on newly added components
Darn. You're right. I'll fix it as it should be.
I left it at the begining, but then I saw that we still need to check for null components before putting them into list copy.