mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 05:55:51 +00:00
Update inconsistency
If it is inconsistent, update the new owner with the old owner
This commit is contained in:
parent
fc12751b2c
commit
ef27f2edb4
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue