diff options
author | mcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-21 09:02:24 +0000 |
---|---|---|
committer | mcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-21 09:02:24 +0000 |
commit | 788dee65e439f8e14ace842746b89420d918de40 (patch) | |
tree | 4dcd86149050edfdea80d192b5462f120ab01f05 /branches/sca-java-1.x/modules | |
parent | f6935c5980c68e02be6886edd2a463484a1327d5 (diff) |
TUSCANY-3111 - Fixed NPE when using the RSS binding on a Java component implementation that does not implement the org.apache.tuscany.sca.binding.rss.collection.Collections interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786955 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java b/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java index 7eb5aeb3df..66dca99ccf 100644 --- a/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java +++ b/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java @@ -108,16 +108,17 @@ class RSSBindingListenerServlet 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 == SyndEntry.class) { - supportsFeedEntries = true; + if (getOperation != null) { + itemXMLType = new DataTypeImpl<Class<?>>(String.class.getName(), String.class, String.class); + Class<?> itemClass = getOperation.getOutputType().getPhysical(); + if (itemClass == SyndEntry.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 @@ -196,7 +197,7 @@ class RSSBindingListenerServlet extends HttpServlet { } /** - * Create an Atom entry from a data collection entry. + * Create an RSS entry from a data collection entry. * @param entry * @return */ |