Yair Zaslavsky has uploaded a new change for review.

Change subject: core: Fix NPE at AddVdsGroupCommand when rng devices are not 
supported
......................................................................

core: Fix NPE at AddVdsGroupCommand when rng devices are not supported

Change-Id: If1265f463588bb09d2ff689bd7d3517d757c9e83
Signed-off-by: Yair Zaslavsky <yzasl...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/29318/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java
index f49d78f..fc76b3d 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java
@@ -159,8 +159,10 @@
             result = validateClusterPolicy();
         }
         // non-empty required sources list and rng-unsupported cluster version
-        if (result && !getVdsGroup().getRequiredRngSources().isEmpty()
-                && 
!FeatureSupported.virtIoRngSupported(getVdsGroup().getcompatibility_version())) 
{
+        if (result &&
+            
!FeatureSupported.virtIoRngSupported(getVdsGroup().getcompatibility_version()) 
&&
+            getVdsGroup().getRequiredRngSources() != null &&
+            !getVdsGroup().getRequiredRngSources().isEmpty()) {
             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_RNG_SOURCE_NOT_SUPPORTED);
             result = false;
         }


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

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

Reply via email to