You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2011/01/22 21:07:25 UTC
svn commit: r1062250 -
/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
Author: mrisaliti
Date: Sat Jan 22 20:07:24 2011
New Revision: 1062250
URL: http://svn.apache.org/viewvc?rev=1062250&view=rev
Log:
Avoid a null pointer exception
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1062250&r1=1062249&r2=1062250&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Sat Jan 22 20:07:24 2011
@@ -673,7 +673,9 @@ public class ContentManagementServices {
if (hasData) {
fileContext.put("rootDir", context.get("rootDir"));
fileContext.put("dataResourceTypeId", dataResourceTypeId);
- fileContext.put("objectInfo", dataResource.get("objectInfo"));
+ if (UtilValidate.isNotEmpty(dataResource) && UtilValidate.isNotEmpty(dataResource.get("objectInfo"))) {
+ fileContext.put("objectInfo", dataResource.get("objectInfo"));
+ }
thisResult = dispatcher.runSync("createFile", fileContext);
errorMsg = ServiceUtil.getErrorMessage(thisResult);
if (UtilValidate.isNotEmpty(errorMsg)) {