Oved Ourfali has uploaded a new change for review.

Change subject: webadmin: fix findbugs warning on ProviderModel
......................................................................

webadmin: fix findbugs warning on ProviderModel

This patch fixes a findbugs warning in ProviderModel, as we case a
variable that's known to be null.
The fix just passes null, and in order to be able to address the
ambiguity, the method name was renamed according to the use-case.

Change-Id: I94c5ff1cde5c76a89ea0c56022e306a264905066
Signed-off-by: Oved Ourfali <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/05/22805/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
index 362c6e4..8607dbd 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
@@ -329,14 +329,14 @@
                                 
sourceListModel.setConfirmWindow(confirmationModel);
                             } else {
                                 stopProgress();
-                                setTestResultValue((VdcQueryReturnValue) 
result);
+                                setTestResultValueFromQueryReturnValue(null);
                             }
                         }
                     };
                     
AsyncDataProvider.getProviderCertificateChain(getCertChainQuery, provider);
                 } else {
                     stopProgress();
-                    setTestResultValue(res);
+                    setTestResultValueFromCommandReturnValue(res);
                 }
             }
         }, null, false);
@@ -382,12 +382,12 @@
                         @Override
                         public void executed(FrontendActionAsyncResult result) 
{
                             VdcReturnValueBase res = result.getReturnValue();
-                            setTestResultValue(res);
+                            setTestResultValueFromCommandReturnValue(res);
                             stopProgress();
                         }
                     }, null, false);
                 } else {
-                    setTestResultValue(res);
+                    setTestResultValueFromCommandReturnValue(res);
                     stopProgress();
                 }
             }
@@ -417,7 +417,7 @@
         }
     }
 
-    private void setTestResultValue(VdcReturnValueBase result) {
+    private void setTestResultValueFromCommandReturnValue(VdcReturnValueBase 
result) {
         String errorMessage = EMPTY_ERROR_MESSAGE;
         if (result == null) {
             errorMessage = 
ConstantsManager.getInstance().getConstants().testFailedUnknownErrorMsg();
@@ -431,7 +431,7 @@
         getTestResult().setEntity(errorMessage);
     }
 
-    private void setTestResultValue(VdcQueryReturnValue result) {
+    private void setTestResultValueFromQueryReturnValue(VdcQueryReturnValue 
result) {
         String errorMessage = EMPTY_ERROR_MESSAGE;
         if (result == null) {
             errorMessage = 
ConstantsManager.getInstance().getConstants().testFailedUnknownErrorMsg();


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

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

Reply via email to