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;


Reply via email to