summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentDocumentProcessor.java18
-rw-r--r--sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentTypeDocumentProcessor.java8
2 files changed, 16 insertions, 10 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentDocumentProcessor.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentDocumentProcessor.java
index 28099f055c..5e6cd54e67 100644
--- a/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentDocumentProcessor.java
+++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentDocumentProcessor.java
@@ -85,11 +85,13 @@ public class ComponentDocumentProcessor implements DocumentProcessor {
}
- for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
+ if (interfaceContract.getCallbackInterface() != null) {
+ for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
- serviceDoc.add(new Field(SearchFields.SERVICE_INTERFACE_CALLBACK_FIELD,
- operation.getName(), Field.Store.YES, Field.Index.ANALYZED));
+ serviceDoc.add(new Field(SearchFields.SERVICE_INTERFACE_CALLBACK_FIELD,
+ operation.getName(), Field.Store.YES, Field.Index.ANALYZED));
+ }
}
}
@@ -115,12 +117,14 @@ public class ComponentDocumentProcessor implements DocumentProcessor {
}
- for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
+ if (interfaceContract.getCallbackInterface() != null) {
+ for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
- referenceDoc.add(new Field(SearchFields.REFERENCE_INTERFACE_CALLBACK_FIELD, operation
- .getName(), Field.Store.YES, Field.Index.ANALYZED));
+ referenceDoc.add(new Field(SearchFields.REFERENCE_INTERFACE_CALLBACK_FIELD, operation
+ .getName(), Field.Store.YES, Field.Index.ANALYZED));
- }
+ }
+ }
}
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentTypeDocumentProcessor.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentTypeDocumentProcessor.java
index 6c6f7e2194..20cc421d72 100644
--- a/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentTypeDocumentProcessor.java
+++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search/src/main/java/org/apache/tuscany/sca/domain/search/impl/ComponentTypeDocumentProcessor.java
@@ -128,11 +128,13 @@ public class ComponentTypeDocumentProcessor implements DocumentProcessor {
}
- for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
+ if (interfaceContract.getCallbackInterface() != null) {
+ for (Operation operation : interfaceContract.getCallbackInterface().getOperations()) {
- referenceDoc.add(new Field(SearchFields.REFERENCE_INTERFACE_CALLBACK_FIELD, operation
- .getName(), Field.Store.YES, Field.Index.ANALYZED));
+ referenceDoc.add(new Field(SearchFields.REFERENCE_INTERFACE_CALLBACK_FIELD, operation
+ .getName(), Field.Store.YES, Field.Index.ANALYZED));
+ }
}
}