Ramesh N has uploaded a new change for review.

Change subject: webadmin: fixing NPE in ClusterModel.
......................................................................

webadmin: fixing NPE in ClusterModel.

  GlusterTunedProfile is being initialized before initializing
EnableGlusterService and its causing NPE. Moving the GlusterTuned
initialization of EnableGlusterService initialization

Change-Id: Iecca23f0c7cf4e201b8181adaaa0c38653f18cf6
Signed-off-by: Ramesh Nachimuthu <rnach...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/41116/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
index ad7afd6..0811063 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterModel.java
@@ -936,10 +936,7 @@
                 }
             }
         });
-        
getGlusterTunedProfile().setIsAvailable(getEnableGlusterService().getEntity());
-        if (getEnableGlusterService().getEntity()) {
-            initTunedProfiles();
-        }
+
         
getEnableOvirtService().setEntity(ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly));
         
getEnableOvirtService().setIsAvailable(ApplicationModeHelper.getUiMode() != 
ApplicationMode.VirtOnly
                 && 
ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly));
@@ -1020,6 +1017,9 @@
         
getEnableGlusterService().setIsAvailable(ApplicationModeHelper.getUiMode() != 
ApplicationMode.GlusterOnly
                 && 
ApplicationModeHelper.isModeSupported(ApplicationMode.GlusterOnly));
         
getGlusterTunedProfile().setIsAvailable(getEnableGlusterService().getEntity());
+        if (getEnableGlusterService().getEntity()) {
+            initTunedProfiles();
+        }
         setOptimizationNone(new EntityModel<Integer>());
         setOptimizationForServer(new EntityModel<Integer>());
         setOptimizationForDesktop(new EntityModel<Integer>());


-- 
To view, visit https://gerrit.ovirt.org/41116
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecca23f0c7cf4e201b8181adaaa0c38653f18cf6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Ramesh N <rnach...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to