Maor Lipchuk has posted comments on this change. Change subject: core: make clear use of filterImage ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/25349/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java: Line 543: public static List<DiskImage> filterOutShareableDisks(Collection<? extends Disk> listOfDisks) { Line 544: return filterImageDisks(listOfDisks, true, false, false); Line 545: } Line 546: Line 547: public static List<DiskImage> filterOutShareableAndNotSnapsableAndNotActiveDisks(Collection<? extends Disk> listOfDisks) { > this patch adds several proxy methods here which half of them are unneeded you are repeating the same issue. again, will be introduced in another patch Line 548: return filterImageDisks(listOfDisks, true, true, true); Line 549: } Line 550: Line 551: public static List<DiskImage> filterOutShareableAndNotSnapsableDisks(Collection<? extends Disk> listOfDisks) { Line 553: } Line 554: Line 555: public static List<DiskImage> filterOutNotActiveDisks(Collection<? extends Disk> listOfDisks) { Line 556: return filterImageDisks(listOfDisks, false, false, true); Line 557: } > Are all of these really used? If not, there's no reason to create all of th all of those methods are used, if not we should fail in findbugs. suggestions for re-naming methods are welcome. I think the most common method is filterOutShareableAndNotActiveDisks Line 558: Line 559: public static List<LunDisk> filterDiskBasedOnLuns(Collection<Disk> listOfDisks) { Line 560: List<LunDisk> lunDisks = new ArrayList<LunDisk>(); Line 561: for (Disk disk : listOfDisks) { -- To view, visit http://gerrit.ovirt.org/25349 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54a22319d7005449ec4c3ecd285d81870b1c307e Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches