tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcombell...@apache.org
Subject svn commit: r786955 - /tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java
Date Sun, 21 Jun 2009 09:02:24 GMT
Author: mcombellack
Date: Sun Jun 21 09:02:24 2009
New Revision: 786955

URL: http://svn.apache.org/viewvc?rev=786955&view=rev
Log:
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

Modified:
    tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java

Modified: tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java?rev=786955&r1=786954&r2=786955&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java
Sun Jun 21 09:02:24 2009
@@ -108,16 +108,17 @@
         }
 
         // 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 @@
     }
 
     /**
-     * Create an Atom entry from a data collection entry.
+     * Create an RSS entry from a data collection entry.
      * @param entry 
      * @return
      */



Mime
View raw message