Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: fix the issue with fields being initialized twice during Copy C…
…onstructor 1. For some reason during Copy Constructor of the "DiskImage" class, the "CreationDate" & "LastModified" fields are overridden from having the correct date of the original "DiskImage", to the current date. 2. Additionally there are 2 "ImageStatus" modifications: keeping the last one ("ImageStatus.LOCKED" status), since it's actually the one that matters. There is an open question whether all disks created with this Copy Constructor should always end up in "ImageStatus.LOCKED" status, but since the existing code might rely on this strange behavior and the investigation would take a lot of time, the decision was to keep the current behavior. This code was refactored lately in: https://gerrit.ovirt.org/c/ovirt-engine/+/117500/17/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/DiskImage.java#77 But it looks like this implementation started long before - at 2012: https://gerrit.ovirt.org/c/ovirt-engine/+/3835/4/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskImage.java#350 Signed-off-by: Pavel Bar <pbar@redhat.com>
- Loading branch information