Permalink
Browse files

RF remove unnecessary reassigment in ValidationServiceImpl

  • Loading branch information...
1 parent a2942c9 commit 7a5c3cf2a719b53b5458ca08de52bbbbe425509e @mkubala mkubala committed May 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 qcadoo-model/src/main/java/com/qcadoo/model/internal/ValidationServiceImpl.java
@@ -121,9 +121,8 @@ private Object parseBelongsToField(final InternalFieldDefinition fieldDefinition
validatedEntity.addError(fieldDefinition, "qcadooView.validate.field.error.wrongType", value.getClass()
.getSimpleName(), fieldDefinition.getType().getType().getSimpleName());
}
- if (referencedEntityId == null) {
- referencedEntity = null;
- } else {
+
+ if (referencedEntityId != null) {
BelongsToType belongsToFieldType = (BelongsToType) fieldDefinition.getType();
referencedEntity = belongsToFieldType.getDataDefinition().get(referencedEntityId);
}

0 comments on commit 7a5c3cf

Please sign in to comment.