Martin Mucha has posted comments on this change.

Change subject: engine: Add ModifiedNetworkAttachmentValidator
......................................................................


Patch Set 15:

(1 comment)

https://gerrit.ovirt.org/#/c/34967/15/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/ModifiedNetworkAttachmentValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/ModifiedNetworkAttachmentValidator.java:

Line 67: 
Line 68:         return oldAttachment;
Line 69:     }
Line 70: 
Line 71:     private Network getOldNetwork() {
> Ok, so I start to examine this class more thoroughly with radicality enable
and verifying, that only actually existing networkattachment is referenced is 
already done via: referencedNetworkAttachmentActuallyExists. This method is 
more optimal (since it does not need to place another db query) so I'm deleting 
one from ModifiednNtworkAttachmentValidator.
Line 72:         if (oldNetwork == null) {
Line 73:             oldNetwork = 
getDbFacade().getNetworkDao().get(getOldNetworkAttachment().getNetworkId());
Line 74:         }
Line 75: 


-- 
To view, visit https://gerrit.ovirt.org/34967
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie64dff04dbf43b8507b0559d82dc56a24e170e7d
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to