Fix concurrent modification check for missing modification date

This commit is contained in:
René Pfeuffer
2018-08-30 10:34:43 +02:00
parent f5600f60fb
commit b992ab414f
4 changed files with 36 additions and 6 deletions

View File

@@ -71,8 +71,8 @@ class SingleResourceManagerAdapter<MODEL_OBJECT extends ModelObject,
}
private boolean modelObjectWasModifiedConcurrently(MODEL_OBJECT existing, MODEL_OBJECT updated) {
return (existing.getLastModified() != null && updated.getLastModified() != null)
&& (existing.getLastModified() > updated.getLastModified());
return existing.getLastModified() != null
&& (updated.getLastModified() == null || existing.getLastModified() > updated.getLastModified());
}
public Response delete(Supplier<Optional<MODEL_OBJECT>> reader) {