Author: jacopoc
Date: Tue Apr 10 02:59:17 2007
New Revision: 527075
URL: http://svn.apache.org/viewvc?view=rev&rev=527075
Log:
Fix for NPE.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?view=diff&rev=527075&r1=527074&r2=527075
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Tue Apr 10 02:59:17 2007
@@ -510,14 +510,14 @@
}
String currentStatusId =
productionRun.getGenericValue().getString("currentStatusId");
- if (statusId != null && currentStatusId.equals(statusId)) {
+ if (currentStatusId.equals(statusId)) {
result.put("newStatusId", currentStatusId);
result.put(ModelService.SUCCESS_MESSAGE,
UtilProperties.getMessage(resource,
"ManufacturingProductionRunStatusChanged",UtilMisc.toMap("newStatusId",
currentStatusId), locale));
return result;
}
// PRUN_CREATED --> PRUN_SCHEDULED
- if (currentStatusId.equals("PRUN_CREATED") &&
statusId.equals("PRUN_SCHEDULED")) {
+ if (currentStatusId.equals("PRUN_CREATED") && (statusId != null &&
statusId.equals("PRUN_SCHEDULED"))) {
// change the production run status to PRUN_SCHEDULED
Map serviceContext = new HashMap();
serviceContext.clear();