ofri masad has uploaded a new change for review.

Change subject: webadmin: Fix NumberFormatException in VM popup view
......................................................................

webadmin: Fix NumberFormatException in VM popup view

Fixed a NumberFormatException when the CpuSharesAmount is 'Disable' (string is 
"").

Change-Id: I4a7b5de45e14af96e3cc8fe2a597138205a7da92
Signed-off-by: Ofri Masad <oma...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/17773/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
index 353e077..e7b4595 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
@@ -1983,7 +1983,8 @@
                 .getEntity());
         getcurrentVm().setVncKeyboardLayout((String) 
model.getVncKeyboardLayout().getSelectedItem());
 
-        if (model.getCpuSharesAmount().getIsAvailable()) {
+        if (model.getCpuSharesAmount().getIsAvailable()
+                && 
!model.getCpuSharesAmount().getEntity().toString().equals("")) {  // $NON-NLS-1$
             
getcurrentVm().setCpuShares(Integer.parseInt(model.getCpuSharesAmount().getEntity().toString()));
         }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a7b5de45e14af96e3cc8fe2a597138205a7da92
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <oma...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to