r7401 - dumbhippo/trunk/server/src/com/dumbhippo/server/impl



Author: walters
Date: 2008-03-28 10:43:20 -0500 (Fri, 28 Mar 2008)
New Revision: 7401

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FeedSystemBean.java
Log:
Handle missing Content-Type (null content.getType())


Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FeedSystemBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FeedSystemBean.java	2008-03-28 15:24:16 UTC (rev 7400)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/impl/FeedSystemBean.java	2008-03-28 15:43:20 UTC (rev 7401)
@@ -169,8 +169,11 @@
 			if (content.getType().equals("text/plain"))
 				isDefinitelyText = true;
 		} else if (feed.getFeedType().equals("atom_1.0")) {
-			if (content.getType().equals("text") || content.getType().equals("text/plain"))
-				isDefinitelyText = true;
+			String contentType = content.getType();
+			if (contentType != null) {
+				if (contentType.equals("text") || contentType.equals("text/plain"))
+					isDefinitelyText = true;
+			}
 		}
 		
 		if (isDefinitelyText)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]