[Minor] Allow not setting of State on Order and Action

This commit is contained in:
Robert von Burg 2015-08-28 14:49:52 +02:00
parent 4de7dfba85
commit b76f90d7bd
1 changed files with 4 additions and 5 deletions

View File

@ -118,7 +118,8 @@ public class XmlModelSaxReader extends DefaultHandler {
Action action = new Action(actionId, actionName, actionType);
action.setResourceId(actionResourceId);
action.setResourceType(actionResourceType);
action.setState(State.valueOf(actionState));
if (StringHelper.isNotEmpty(actionState))
action.setState(State.valueOf(actionState));
this.parameterizedElement = action;
@ -150,10 +151,8 @@ public class XmlModelSaxReader extends DefaultHandler {
Date orderDate = ISO8601FormatFactory.getInstance().getDateFormat().parse(orderDateS);
order.setDate(orderDate);
}
if (orderStateS != null) {
State orderState = State.valueOf(orderStateS);
order.setState(orderState);
}
if (StringHelper.isNotEmpty(orderStateS))
order.setState(State.valueOf(orderStateS));
this.parameterizedElement = order;
break;