You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by mc...@apache.org on 2008/05/20 15:36:47 UTC

svn commit: r658242 - /incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java

Author: mcombellack
Date: Tue May 20 06:36:47 2008
New Revision: 658242

URL: http://svn.apache.org/viewvc?rev=658242&view=rev
Log:
Added null check to avoid NPE when ContentType on the Request is null (FindBugs reported issue)

Modified:
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java?rev=658242&r1=658241&r2=658242&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java (original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java Tue May 20 06:36:47 2008
@@ -513,7 +513,7 @@
 
             // Create a new Atom entry
             String contentType = request.getContentType();
-            if (contentType.startsWith("application/atom+xml")) {
+            if (contentType != null && contentType.startsWith("application/atom+xml")) {
 
                 // Read the entry from the request
                 Entry feedEntry;
@@ -623,7 +623,7 @@
 
             // Update an Atom entry
             String contentType = request.getContentType();
-            if (contentType.startsWith("application/atom+xml")) {
+            if (contentType != null && contentType.startsWith("application/atom+xml")) {
 
                 // Read the entry from the request
                 Entry feedEntry;