Shahar Havivi has uploaded a new change for review.

Change subject: findbugs: adding comments to exclude filter xml files
......................................................................

findbugs: adding comments to exclude filter xml files

Change-Id: Ica8fcbcbf012b57c2c3289970129c08c4a235d0f
Signed-off-by: Shahar Havivi <[email protected]>
---
M backend/manager/modules/bll/exclude-filters.xml
M backend/manager/modules/utils/exclude-filters.xml
M backend/manager/tools/exclude-filters.xml
M frontend/webadmin/modules/webadmin/exclude-filters.xml
4 files changed, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/14770/1

diff --git a/backend/manager/modules/bll/exclude-filters.xml 
b/backend/manager/modules/bll/exclude-filters.xml
index 6a9a037..f227524 100644
--- a/backend/manager/modules/bll/exclude-filters.xml
+++ b/backend/manager/modules/bll/exclude-filters.xml
@@ -1,4 +1,9 @@
 <FindBugsFilter>
+       <!--
+        findbugs complain that we are not using the getBlockingQueue() return 
value,
+        by calling getBlockingQueue() we also set the synchronized queue.
+        In this case we have no use for the return queue, only to set it.
+       -->
      <Match>
        <Class name="org.ovirt.engine.core.bll.RunVmCommandBase" />
        <Method name="decreasePendingVms"/>
@@ -6,12 +11,22 @@
      </Match>
 
      <Match>
+       <!--
+        findbugs complain that we are not using the getBlockingQueue() return 
value,
+        by calling getBlockingQueue() we also set the synchronized queue.
+        In this case we have no use for the return queue, only to set it.
+       -->
        <Class name="org.ovirt.engine.core.bll.RunVmCommandBase" />
        <Method name="delay"/>
        <Bug code="RV"/>
      </Match>
 
      <Match>
+       <!--
+        findbugs complain that we may be using uninitialized instance of 
'tags'.
+        In this case we are using the local test method: createTag() that
+        never returns null.
+       -->
        <Class name="org.ovirt.engine.core.bll.TagsDirectorTest" />
        <Method name="testUpdateParent"/>
        <Bug code="NP"/>
@@ -24,6 +39,11 @@
      </Match>
 
      <Match>
+       <!--
+        findbugs complains that we are double checking for 
(isoDomainListSyncronizer == null).
+        We need to double check because we are using the singleton design 
pattern,
+        we first check for null and the second check is inside synchronized 
block.
+       -->
        <Class name="org.ovirt.engine.core.bll.IsoDomainListSyncronizer" />
        <Method name="getInstance"/>
        <Bug code="DC"/>
diff --git a/backend/manager/modules/utils/exclude-filters.xml 
b/backend/manager/modules/utils/exclude-filters.xml
index 74d27a6..6c66af0 100644
--- a/backend/manager/modules/utils/exclude-filters.xml
+++ b/backend/manager/modules/utils/exclude-filters.xml
@@ -1,11 +1,22 @@
 <FindBugsFilter>
      <Match>
+       <!--
+        findbugs complains that we are double checking for (vmPropertiesUtils 
== null).
+        We need to double check because we are using the singleton design 
pattern,
+        we first check for null and the second check is inside synchronized 
block.
+       -->
        <Class 
name="org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils" />
        <Method name="getInstance"/>
        <Bug code="DC"/>
      </Match>
 
      <Match>
+       <!--
+        findbugs complains that we are having empty block of catch exception:
+        catch (Exception e) {}
+        This is a test code that close ssh socket and have nothing to do if the
+        connection is already closed.
+       -->
        <Class name="org.ovirt.engine.core.utils.ssh.TransferTest" />
        <Method name="tearDown"/>
        <Bug code="DE"/>
diff --git a/backend/manager/tools/exclude-filters.xml 
b/backend/manager/tools/exclude-filters.xml
index f0cd3ce..3234593 100644
--- a/backend/manager/tools/exclude-filters.xml
+++ b/backend/manager/tools/exclude-filters.xml
@@ -1,4 +1,11 @@
 <FindBugsFilter>
+     <!--
+      findbugs complains that we are having empty block of catch exception:
+      catch (Exception e) {}
+      in this case we are fetching the value from getDisplayValue() method,
+      if we have stay with the default value which assigned before the try
+      block.
+     -->
      <Match>
        <Class name="org.ovirt.engine.core.config.entity.ConfigKey" />
        <Method name="toString"/>
diff --git a/frontend/webadmin/modules/webadmin/exclude-filters.xml 
b/frontend/webadmin/modules/webadmin/exclude-filters.xml
index 0222367..f822d9d 100644
--- a/frontend/webadmin/modules/webadmin/exclude-filters.xml
+++ b/frontend/webadmin/modules/webadmin/exclude-filters.xml
@@ -1,5 +1,10 @@
 <FindBugsFilter>
     <Match>
+        <!--
+         findbugs complain that when returning Boolean type we should return 
only True
+         or False and not null.
+         In this case we do have the third option i.e. null
+        -->
         <Class 
name="org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunctionResultHelper" />
         <Method name="getResultAsBoolean"/>
         <Bug code="NP"/>


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica8fcbcbf012b57c2c3289970129c08c4a235d0f
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