Author: hansbak
Date: Tue Feb  5 21:30:57 2008
New Revision: 618903

URL: http://svn.apache.org/viewvc?rev=618903&view=rev
Log:
correction to avoid null pointer exception when data is missing

Modified:
    
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

Modified: 
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=618903&r1=618902&r2=618903&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
 (original)
+++ 
ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
 Tue Feb  5 21:30:57 2008
@@ -127,7 +127,7 @@
         }
 
         // if the content is a PUBLISH_POINT and the data resource is not 
defined; get the related content
-        if (content.get("contentTypeId").equals("WEB_SITE_PUB_PT") && 
content.get("dataResourceId") == null) {
+        if ("WEB_SITE_PUB_PT".equals(content.get("contentTypeId")) && 
content.get("dataResourceId") == null) {
             List relContentIds = 
delegator.findByAnd("ContentAssocDataResourceViewTo",
                     UtilMisc.toMap("contentIdStart", 
content.get("contentId"),"statusId","CTNT_PUBLISHED",
                     "caContentAssocTypeId", "PUBLISH_LINK"), 
UtilMisc.toList("caFromDate"));


Reply via email to