Allon Mureinik has uploaded a new change for review. Change subject: core: Fix FB issue in VdsCpuUsageComparator ......................................................................
core: Fix FB issue in VdsCpuUsageComparator This patch fixes the following FindBugs warning on this class: """ Se: Comparator doesn't implement Serializable (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE) This class implements the Comparator interface. You should consider whether or not it should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming. """ Change-Id: Iedbed23022e170c5b9486b4af26ac9ed1eec96eb Signed-off-by: Allon Mureinik <amure...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/41265/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java index 71e439c..fc07757 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java @@ -3,13 +3,14 @@ import org.ovirt.engine.core.bll.scheduling.SlaValidator; import org.ovirt.engine.core.common.businessentities.VDS; +import java.io.Serializable; import java.util.Comparator; /** * Comparator that compares the CPU usage of two hosts, with regard to the number of CPUs each host has and it's * strength. */ -public class VdsCpuUsageComparator implements Comparator<VDS> { +public class VdsCpuUsageComparator implements Comparator<VDS>, Serializable { boolean countThreadsAsCores; public VdsCpuUsageComparator(boolean countThreadsAsCores) { -- To view, visit https://gerrit.ovirt.org/41265 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedbed23022e170c5b9486b4af26ac9ed1eec96eb Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches