From ef27f2edb44eb560c139e561eebb5bdcb92bac67 Mon Sep 17 00:00:00 2001 From: rajee10 Date: Mon, 2 Apr 2018 23:30:57 -0400 Subject: [PATCH] Update inconsistency If it is inconsistent, update the new owner with the old owner --- .../samples/petclinic/newDataStore/NewOwnerStore.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/springframework/samples/petclinic/newDataStore/NewOwnerStore.java b/src/main/java/org/springframework/samples/petclinic/newDataStore/NewOwnerStore.java index d9499636f..1921e1448 100644 --- a/src/main/java/org/springframework/samples/petclinic/newDataStore/NewOwnerStore.java +++ b/src/main/java/org/springframework/samples/petclinic/newDataStore/NewOwnerStore.java @@ -78,6 +78,7 @@ public class NewOwnerStore { if(iterator.hasNext()) { Owner oldOwner = iterator.next(); if(id != oldOwner.getId() || !ownerStore.get(id).equals(oldOwner)) { + ownerStore.put(id, convertToStaticOwner(oldOwner); inconsistencies++; violation(id, StaticOwner.convertToStaticOwner(oldOwner), ownerStore.get(id)); }