summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
authormcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-06-20 22:15:31 +0000
committermcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-06-20 22:15:31 +0000
commit396e33f60cb55e0c36588a9378209ee35ac4289d (patch)
treef6532c723eb04a48f349663199586fc8f3385a10 /branches
parent3fa2beb0c483b956c69602bbf2c6b386b9b3fe31 (diff)
TUSCANY-3109 Added null check for getOperation to handle case where the feed Java component implementation does not have a get() method but does define a getAll() method. This fixes TUSCANY-3109
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
index 3ee9a5e3dc..f41284624e 100644
--- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
+++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
@@ -142,16 +142,17 @@ class AtomBindingListenerServlet extends HttpServlet {
}
// Determine the collection item type
- itemXMLType = new DataTypeImpl<Class<?>>(String.class.getName(), String.class, String.class);
- Class<?> itemClass = getOperation.getOutputType().getPhysical();
- if (itemClass == org.apache.abdera.model.Entry.class) {
- supportsFeedEntries = true;
+ if (getOperation != null) {
+ itemXMLType = new DataTypeImpl<Class<?>>(String.class.getName(), String.class, String.class);
+ Class<?> itemClass = getOperation.getOutputType().getPhysical();
+ if (itemClass == org.apache.abdera.model.Entry.class) {
+ supportsFeedEntries = true;
+ }
+ DataType<XMLType> outputType = getOperation.getOutputType();
+ QName qname = outputType.getLogical().getElementName();
+ qname = new QName(qname.getNamespaceURI(), itemClass.getSimpleName());
+ itemClassType = new DataTypeImpl<XMLType>("java:complexType", itemClass, new XMLType(qname, null));
}
- DataType<XMLType> outputType = getOperation.getOutputType();
- QName qname = outputType.getLogical().getElementName();
- qname = new QName(qname.getNamespaceURI(), itemClass.getSimpleName());
- itemClassType = new DataTypeImpl<XMLType>("java:complexType", itemClass, new XMLType(qname, null));
-
}
@Override