diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-08 09:29:32 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-08 09:29:32 +0000 |
commit | f9625fd2531392d27caa68184be11a03d5d67860 (patch) | |
tree | 32b2892c48318cf7190ceaa8eb340ff9b65071b6 /sca-java-2.x/trunk/modules/domain-node/src/main/java/org | |
parent | 9089224b14e651e45f2cae5d9094d51d376d5974 (diff) |
Avoid NPE when no dependent contributions are used
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@983368 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java index 188cdff76d..153a5341cd 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java @@ -66,8 +66,10 @@ public class NodeFactory { EndpointRegistry endpointRegistry = new EndpointRegistryImpl(nodeFactory.extensionPointRegistry, null, null); NodeImpl node = new NodeImpl("default", nodeFactory.deployer, nodeFactory.compositeActivator, endpointRegistry, nodeFactory.extensionPointRegistry, nodeFactory); - for (int i=dependentContributionURLs.length-1; i>-1; i--) { - node.installContribution(null, dependentContributionURLs[i], null, null, false); + if (dependentContributionURLs != null) { + for (int i=dependentContributionURLs.length-1; i>-1; i--) { + node.installContribution(null, dependentContributionURLs[i], null, null, false); + } } String curi = node.installContribution(null, contributionURL, null, null, compositeURI == null); |