Skip to content

Commit

Permalink
fix for MID-5479
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Jul 3, 2019
1 parent 7a6d930 commit 406d71c
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -65,12 +65,18 @@ public <D extends ItemDelta<V, ID>, ID extends ItemDefinition> void addToDelta(D
}
case MODIFIED:
if (parent.isSingleValue()) {
delta.addValueToReplace((V) newValue.clone());
if (newValue.isEmpty()) {
delta.addValueToReplace(null);
} else {
delta.addValueToReplace((V) newValue.clone());
}
break;
}

delta.addValueToAdd((V) newValue.clone());
delta.addValueToDelete((V) oldValue.clone());
if (!oldValue.isEmpty()) {
delta.addValueToDelete((V) oldValue.clone());
}
break;
case DELETED:
delta.addValueToDelete((V) oldValue.clone());
Expand Down

0 comments on commit 406d71c

Please sign in to comment.