Shahar Havivi has uploaded a new change for review.

Change subject: ui: posible NPE in domain selected item
......................................................................

ui: posible NPE in domain selected item

No need to call toString() since the selected item is String.

Change-Id: If3a18f8c711f886fe4dfbe4031b2de2aedc59477
Signed-off-by: Shahar Havivi <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInitModel.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/26682/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInitModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInitModel.java
index c36d7f0..9307623 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInitModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInitModel.java
@@ -47,7 +47,7 @@
     }
     public boolean getDomainEnabled() {
         if (isWindowsOS) {
-            return 
!StringHelper.isNullOrEmpty(getSysprepDomain().getSelectedItem().toString());
+            return 
!StringHelper.isNullOrEmpty(getSysprepDomain().getSelectedItem());
         }
         return false;
     }
@@ -651,7 +651,7 @@
         }
         getSysprepDomain().setIsValid(true);
         if (getDomainEnabled()) {
-            getSysprepDomain().setIsValid(new 
HostAddressValidation().validate(getSysprepDomain().getSelectedItem().toString()).getSuccess());
+            getSysprepDomain().setIsValid(new 
HostAddressValidation().validate(getSysprepDomain().getSelectedItem()).getSuccess());
         }
 
         getAuthorizedKeys().setIsValid(true);


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

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

Reply via email to