Tomas Jelinek has uploaded a new change for review. Change subject: webadmin: Exception while showing an error message ......................................................................
webadmin: Exception while showing an error message The regression is caused by http://gerrit.ovirt.org/#/c/25837 which expected that the new ArrayList(someSize) creates a list of size someSize. This is not the case so consequently the Collections.fill left the list empty and consequently the actions.get(actionNum++) failed on an exception. Fixed by a simpler and more reliable way of filling a list using a loop and an add() method. Change-Id: Ic9714b3b92ff79b3eb12ead5dfb96d22fed41cca Signed-off-by: Tomas Jelinek <tjeli...@redhat.com> --- M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/08/28408/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java index 6353882..29ff396 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/FrontendEventsHandlerImpl.java @@ -1,7 +1,6 @@ package org.ovirt.engine.ui.common.uicommon; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import org.ovirt.engine.core.common.action.VdcActionType; @@ -51,8 +50,11 @@ @Override public void runMultipleActionFailed(VdcActionType action, List<VdcReturnValueBase> returnValues) { - List<VdcActionType> actions = new ArrayList<VdcActionType>(returnValues.size()); - Collections.fill(actions, action); + List<VdcActionType> actions = new ArrayList<VdcActionType>(); + for (int i = 0; i < returnValues.size(); i++) { + actions.add(action); + } + runMultipleActionsFailed(actions, returnValues); } -- To view, visit http://gerrit.ovirt.org/28408 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic9714b3b92ff79b3eb12ead5dfb96d22fed41cca Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches