diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java')
-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; |