Dudi Maroshi has posted comments on this change. Change subject: Engine: Scheduling-policy removal error message correction ......................................................................
Patch Set 3: (2 comments) https://gerrit.ovirt.org/#/c/38574/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java: Line 19: if (!checkRemoveEditValidations()) { Line 20: return false; Line 21: } Line 22: if (SchedulingManager.getInstance().getClustersByClusterPolicyId(getParameters().getClusterPolicyId()).size() > 0) { Line 23: StringBuffer attachedClustersStringBf = new StringBuffer(""); > you probably meant StringBuilder Done Line 24: List<VDSGroup> attachedClustersList = Line 25: SchedulingManager.getInstance().getClustersByClusterPolicyId(getParameters().getClusterPolicyId()); Line 26: boolean isFirstCluster = true; Line 27: for (VDSGroup vdsGroup : attachedClustersList) { Line 29: attachedClustersStringBf.append(','); Line 30: Line 31: attachedClustersStringBf.append('\'').append(vdsGroup.getName()).append('\''); Line 32: isFirstCluster = false; Line 33: } > you can replace all that with Entities.collectionToString Entities.collectionToString is almost useful. It appends newlines between elements, and wraps everything with [] parenthesis. Useful for dumping objects to logs. Line 34: Line 35: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE, Line 36: String.format("$clusters %1$s", attachedClustersStringBf.toString())); Line 37: } -- To view, visit https://gerrit.ovirt.org/38574 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6a95c3a973b8ba9053727009983480ce79119f83 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dudi Maroshi <d...@redhat.com> Gerrit-Reviewer: Dudi Maroshi <d...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Roy Golan <rgo...@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