Einav Cohen has posted comments on this change.
Change subject: userportal: prevent an error dialog in login page
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/Frontend.java
Line 768
Line 769
Line 770
Line 771
Line 772
....
[1] FrontendActionAsyncResult f = new
FrontendActionAsyncResult(actionType, parameters, result, state);
[2] boolean success = false;
[3] if (!result.getCanDoAction()) {
[4] List<VdcReturnValueBase> failed = new
ArrayList<VdcReturnValueBase>();
[5] failed.add(result);
[6] translateErrors(failed);
[7] callback.executed(f);
....
the "failed" ArrayList contains "result" [5];
"result" is contained within "f" [1].
the "failed" ArrayList items (i.e. "result") are being manipulated in [6].
[the 'translateErrors' method takes every VdcReturnValueBase item within the
ArrayList passed to it as a parameter, and manipulates the CanDoAction messages
array within that item (i.e. it turns the CanDoAction messages keys into
CanDoAction messages values, which we eventually want to display)]
"result" is manipulated -> "f" is manipulated (since "f" contains "result").
"f" is defined outside the context of the "if" statement [1]
(and regardless - "f" is being used in [7]).
so the 3 lines that you have suggested to remove are indeed actually used as
Derez mentioned, therefore they shouldn't be removed.
--
To view, visit http://gerrit.ovirt.org/14392
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib240214df319a0122ebcac82bf2b96d608997432
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches