Moti Asayag has posted comments on this change. Change subject: core: move interfaces and disks collections to VMBase ......................................................................
Patch Set 1: (4 inline comments) .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java Line 32: private java.util.ArrayList<DiskImage> images; please remove prefix java.util from the collections from the new added code .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java Line 80: mVmStatic.setImages(new java.util.ArrayList<DiskImage>()); please omit the java.util. prefix. The ArrayList is already imported (from both lines) Line 1099: if (mVmStatic == null) This is very problematic. I think that if from some reason the VmStatic is null (it doesn't suppose to be - since initialized in the c'tor) but if some client sends it as null, we should create an instance if it from here and use its reference of mVmStatic.getInterfaces(). The reason is providing the capability for a user to assume that VM.getInterfaces() is a collection which he may work on, and assuming this collection was modified. The next time the client invokes the VM.getInterfaces() he gets a new ArrayList<VmNetworkInterface>() without his changes. Line 1109: public java.util.ArrayList<DiskImage> getImages() { same here. -- To view, visit http://gerrit.ovirt.org/2413 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I18be17cdcad37d4940b99cbad6dc3abaf04d8595 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches