diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-09 04:27:03 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-09 04:27:03 +0000 |
commit | 7a96a96edc88c319d97a90f94147a854d00492bb (patch) | |
tree | 358e9e6b8c63fde158d12d8ddc7c14d7bc2f1c18 /branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache | |
parent | a952bb5ae74cb0f4ce2e3a59365783d026e56590 (diff) |
Add null guards around uses of domainSearch reference to prevent unit test failure
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@812765 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache')
-rw-r--r-- | branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java b/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java index 6531d43e4a..ef23b1b4cd 100644 --- a/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java +++ b/branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java @@ -224,7 +224,9 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl // add it to the search index, contributionUpdated is called to guarantee // only one contribution with the same URI in the index - this.domainSearch.contributionUpdated(contribution, contribution); + if (domainSearch != null) { // can be null in unit tests + domainSearch.contributionUpdated(contribution, contribution); + } return key; @@ -271,7 +273,9 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl writeWorkspace(workspace); // delete it from the search index - this.domainSearch.contributionRemoved(contribution); + if (domainSearch != null) { // can be null in unit tests + domainSearch.contributionRemoved(contribution); + } return; |