From f887fa14b7a536bf34ee9ed80dd2c8eb97ccddac Mon Sep 17 00:00:00 2001 From: nash Date: Tue, 24 Aug 2010 20:10:53 +0000 Subject: Merge revision 951561 from trunk into the 1.6.1 branch git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@988701 13f79535-47bb-0310-9956-ffa450edef68 --- .../domain/search/impl/ComponentDocumentProcessor.java | 18 +++++++++++------- .../search/impl/ComponentTypeDocumentProcessor.java | 8 +++++--- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'sca-java-1.x/branches/sca-java-1.6.1/modules/domain-search') 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)); + } } } -- cgit v1.2.3