Jakub Niedermertl has uploaded a new change for review.

Change subject: userportal: Expecting List instead of ArrayList from server
......................................................................

userportal: Expecting List instead of ArrayList from server

Patch related to http://gerrit.ovirt.org/#/c/27578/ - The ArrayList
expected vs. LinkedList passed from server problem.

It fixes an issue with saving 'New VM' dialog in Userportal.

Change-Id: I1d20bca027514d462f364647130e19908a60a004
Signed-off-by: Jakub Niedermertl <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/68/36568/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
index 05c2578..515088e 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
@@ -405,14 +405,14 @@
                     public void onSuccess(Object target, Object returnValue) {
 
                         UnitVmModel model = (UnitVmModel) target;
-                        ArrayList<VDS> hosts = null;
-                        if (returnValue instanceof ArrayList) {
-                            hosts = (ArrayList<VDS>) returnValue;
+                        List<VDS> hosts = null;
+                        if (returnValue instanceof List) {
+                            hosts = (List<VDS>) returnValue;
                         } else if (returnValue instanceof VdcQueryReturnValue
-                                && ((VdcQueryReturnValue) 
returnValue).getReturnValue() instanceof ArrayList) {
+                                && ((VdcQueryReturnValue) 
returnValue).getReturnValue() instanceof List) {
                             hosts = ((VdcQueryReturnValue) 
returnValue).getReturnValue();
                         } else {
-                            throw new IllegalArgumentException("The return 
value should be ArrayList<VDS> or VdcQueryReturnValue with return value 
ArrayList<VDS>"); //$NON-NLS-1$
+                            throw new IllegalArgumentException("The return 
value should be List<VDS> or VdcQueryReturnValue with return value List<VDS>"); 
//$NON-NLS-1$
                         }
 
                         VDS oldDefaultHost = 
model.getDefaultHost().getSelectedItem();


-- 
To view, visit http://gerrit.ovirt.org/36568
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d20bca027514d462f364647130e19908a60a004
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jakub Niedermertl <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to