Allon Mureinik has uploaded a new change for review.

Change subject: findbugs: Clean up ST warnings
......................................................................

findbugs: Clean up ST warnings

Removed all-out ST category suppression and replaced it with narrow,
targeted suppressions, so that future instance methods updating static
variables will be caught by FindBugs.

Change-Id: I158d22e2c7e5f1ccedb6782b3288473f33e47a3f
Signed-off-by: Allon Mureinik <[email protected]>
---
M backend/manager/modules/bll/exclude-filters.xml
M exclude-filters-general.xml
M frontend/webadmin/modules/gwt-common/exclude-filters.xml
M frontend/webadmin/modules/uicommonweb/exclude-filters.xml
M frontend/webadmin/modules/userportal-gwtp/exclude-filters.xml
M frontend/webadmin/modules/webadmin/exclude-filters.xml
6 files changed, 74 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/26474/1

diff --git a/backend/manager/modules/bll/exclude-filters.xml 
b/backend/manager/modules/bll/exclude-filters.xml
index 3279ada..63cc100 100644
--- a/backend/manager/modules/bll/exclude-filters.xml
+++ b/backend/manager/modules/bll/exclude-filters.xml
@@ -105,7 +105,18 @@
      </Match>
 
      <Match>
+       <Class name="org.ovirt.engine.core.bll.Backend" />
+       <Method name="initialize" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+
+    <Match>
        <Class name="org.ovirt.engine.core.bll.AsyncTaskManager" />
        <Bug pattern="IS2_INCONSISTENT_SYNC" />
-     </Match>
+    </Match>
+
+    <Match>
+       <Class name="org.ovirt.engine.core.bll.VdsDeploy" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+    </Match>
 </FindBugsFilter>
diff --git a/exclude-filters-general.xml b/exclude-filters-general.xml
index c13c4d8..5bbc257 100644
--- a/exclude-filters-general.xml
+++ b/exclude-filters-general.xml
@@ -57,8 +57,8 @@
     Currently Ignoring.
     findbugs reason:
     ST: Write to static field from instance method 
(ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD)
-    -->
     <Match>
         <Bug code="ST" />
     </Match>
+    -->
 </FindBugsFilter>
diff --git a/frontend/webadmin/modules/gwt-common/exclude-filters.xml 
b/frontend/webadmin/modules/gwt-common/exclude-filters.xml
index 8ea48be..7e489bf 100644
--- a/frontend/webadmin/modules/gwt-common/exclude-filters.xml
+++ b/frontend/webadmin/modules/gwt-common/exclude-filters.xml
@@ -160,6 +160,26 @@
      </Match>
 
      <!--
+      Suppress current instance methods assigning values to static variables
+      -->
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.common.widget.refresh.BaseRefreshPanel" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.common.widget.table.column.PasswordTextInputCell" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.common.widget.table.column.StyledImageResourceCell" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.common.widget.table.column.TextCellWithTooltip" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+
+     <!--
       Ignore all the unconfirmed casts in this module.
       Unfortunately, these warnings are currently inherit to the design,
       and handling them on an individual basis just adds noise to the
diff --git a/frontend/webadmin/modules/uicommonweb/exclude-filters.xml 
b/frontend/webadmin/modules/uicommonweb/exclude-filters.xml
index df7e9dd..cecf1a1 100644
--- a/frontend/webadmin/modules/uicommonweb/exclude-filters.xml
+++ b/frontend/webadmin/modules/uicommonweb/exclude-filters.xml
@@ -1,4 +1,17 @@
 <FindBugsFilter>
+
+    <!--
+      Suppress current instance methods assigning values to static variables
+      -->
+    <Match>
+       <Class name="org.ovirt.engine.ui.uicommonweb.Configurator" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+    </Match>
+    <Match>
+       <Class 
name="org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkListModel"
 />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+    </Match>
+
        <!--
         findbugs complains about loading known null to a variable
         in this case we are using it for equals check and its intended
diff --git a/frontend/webadmin/modules/userportal-gwtp/exclude-filters.xml 
b/frontend/webadmin/modules/userportal-gwtp/exclude-filters.xml
index df93f0f..d5bb427 100644
--- a/frontend/webadmin/modules/userportal-gwtp/exclude-filters.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/exclude-filters.xml
@@ -70,6 +70,14 @@
    </Match>
 
    <!--
+     Suppress current instance methods assigning values to static variables
+    -->
+   <Match>
+     <Class 
name="org.ovirt.engine.ui.userportal.widget.extended.vm.AbstractConsoleButtonCell"
 />
+     <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+   </Match>
+
+   <!--
     Ignore non-static inner classes.
     This pattern is used by GWT-generated code, which we have no control of
     -->
diff --git a/frontend/webadmin/modules/webadmin/exclude-filters.xml 
b/frontend/webadmin/modules/webadmin/exclude-filters.xml
index 7805c09..3cb40f5 100644
--- a/frontend/webadmin/modules/webadmin/exclude-filters.xml
+++ b/frontend/webadmin/modules/webadmin/exclude-filters.xml
@@ -251,6 +251,26 @@
      <Bug code="UuF"/>
    </Match>
 
+     <!--
+      Suppress current instance methods assigning values to static variables
+      -->
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter"
 />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.webadmin.uicommon.model.TaskFirstRowModelProvider" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class 
name="org.ovirt.engine.ui.webadmin.widget.table.column.CustomSelectionCell" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+     <Match>
+       <Class name="org.ovirt.engine.ui.webadmin.widget.tags.TagItemCell" />
+       <Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
+     </Match>
+
     <!--
      Ignore all the unconfirmed casts in this module.
      Unfortunately, these warnings are currently inherit to the design,


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

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

Reply via email to