svn commit: r618903 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r618903 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java

hansbak-2
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"));