tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r983368 - /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java
Date Sun, 08 Aug 2010 09:29:32 GMT
Author: antelder
Date: Sun Aug  8 09:29:32 2010
New Revision: 983368

URL: http://svn.apache.org/viewvc?rev=983368&view=rev
Log:
Avoid NPE when no dependent contributions are used

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java?rev=983368&r1=983367&r2=983368&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java
Sun Aug  8 09:29:32 2010
@@ -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);



Mime
View raw message