tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcombell...@apache.org
Subject svn commit: r658242 - /incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
Date Tue, 20 May 2008 13:36:47 GMT
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;



Mime
View raw message