A patch from Sebastian Leitner "ContentManagementServices throws NullPointerException" https://issues.apache.org/jira/browse/OFBIZ-4751
Fixes a NPE git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303764 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1591,8 +1591,11 @@ public class ContentManagementServices {
|
||||
Debug.logError(msg, module);
|
||||
return ServiceUtil.returnError(msg);
|
||||
}
|
||||
Long useTime = (Long)productContent.get("useTime");
|
||||
Integer newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
|
||||
Long useTime = (Long) productContent.get("useTime");
|
||||
Integer newUseTime = null;
|
||||
if (UtilValidate.isNotEmpty(useTime)) {
|
||||
newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
|
||||
}
|
||||
context.put("useTime", newUseTime);
|
||||
context.put("useTimeUomId", productContent.get("useTimeUomId"));
|
||||
context.put("useRoleTypeId", productContent.get("useRoleTypeId"));
|
||||
|
||||
Reference in New Issue
Block a user