summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/node-api/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 13:10:12 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-05-18 13:10:12 +0000
commit9005ea23c3238a768908f39c7374f4c73704b647 (patch)
treeb15558cb57bdfe4eb9477a2ac6755729fd54cc4a /sca-java-2.x/trunk/modules/node-api/src/main/java
parent9b948d7c4f9798a0a90879d4856c90e69622f530 (diff)
Avoid NPE by not setting null in domain name
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@945640 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
index 3fc8098be2..2d2df84f42 100644
--- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
+++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
@@ -554,7 +554,9 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
private NodeConfiguration createConfiguration(Contribution... contributions) {
NodeConfigurationFactory factory = this;
NodeConfiguration configuration = factory.createNodeConfiguration();
- configuration.setDomainURI(properties.getProperty("defaultDomainName"));
+ if (properties.getProperty("defaultDomainName") != null) {
+ configuration.setDomainURI(properties.getProperty("defaultDomainName"));
+ }
// Make sure a unique node URI is created for the same node factory
configuration.setURI(generateNodeURI());
if (contributions != null) {