This is an automated email from the ASF dual-hosted git repository. leerho pushed a commit to branch update_spotbugs_filter in repository https://gitbox.apache.org/repos/asf/datasketches-memory.git
commit c6ef678b77cb096e994033b56ab021bd3d0adaa3 Author: Lee Rhodes <[email protected]> AuthorDate: Mon Jul 29 13:18:59 2024 -0700 Update SpotBugs Filter, Made AllocateDirectWritableMap final. Added "default" to MurmurHash3v2 switch. --- .../apache/datasketches/memory/MurmurHash3v2.java | 2 +- .../memory/internal/AllocateDirectWritableMap.java | 2 +- tools/FindBugsExcludeFilter.xml | 71 ++-------------------- 3 files changed, 6 insertions(+), 69 deletions(-) diff --git a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/MurmurHash3v2.java b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/MurmurHash3v2.java index 7d6136d..6e328cc 100644 --- a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/MurmurHash3v2.java +++ b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/MurmurHash3v2.java @@ -299,7 +299,7 @@ public final class MurmurHash3v2 { k1 ^= (unsafe.getByte(uObj, cumOff) & 0xFFL); break; } - //default: break; //can't happen + default: break; //can't happen } h1 ^= mixK1(k1); diff --git a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMap.java b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMap.java index 41fb014..f461c6f 100644 --- a/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMap.java +++ b/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/AllocateDirectWritableMap.java @@ -50,7 +50,7 @@ import sun.nio.ch.FileChannelImpl; * @author Praveenkumar Venkatesan */ @SuppressWarnings("restriction") -class AllocateDirectWritableMap { +final class AllocateDirectWritableMap { static final Logger LOG = Logger.getLogger(AllocateDirectWritableMap.class.getCanonicalName()); private static final int MAP_RO = 0; diff --git a/tools/FindBugsExcludeFilter.xml b/tools/FindBugsExcludeFilter.xml index ae68389..166ef4b 100644 --- a/tools/FindBugsExcludeFilter.xml +++ b/tools/FindBugsExcludeFilter.xml @@ -21,76 +21,13 @@ under the License. <FindBugsFilter> <!-- memory --> - <!-- Too many false positives to be useful. I could not make it happy :( --> + <!-- Ignore all test code --> <Match> - <Bug pattern="SF_SWITCH_NO_DEFAULT" /> - </Match> - - <Match> <!-- Exclude for test classes; too many False Positives. --> - <Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL" /> <Class name="~.*\.*Test" /> </Match> - - <Match> <!-- Exclude for test classes; too many False Positives. --> - <Bug pattern="DLS_DEAD_LOCAL_STORE" /> - <Class name="~.*\.*Test" /> + + <Match> <!-- harmless, not going to fix right now --> + <Bug pattern="INT_VACUOUS_BIT_OPERATION" /> </Match> </FindBugsFilter> - - - -<!-- Examples: --> - -<!-- Exclude java.* classes --> - <!-- - <Match> - <Package name="java\.*" /> - </Match> ---> - - <!-- Exclude test classes --> -<!-- - <Match> - <Class name="~.*\.*Test" /> - </Match> ---> - -<!-- - <Match> - <Class name="com.foobar.ClassNotToBeAnalyzed" /> - </Match> ---> -<!-- - <Match> - <Class name="com.foobar.ClassWithSomeBugsMatched" /> - <Bug code="DE,UrF,SIC" /> - </Match> ---> - <!-- Match all XYZ violations. --> -<!-- - <Match> - <Bug code="XYZ" /> - </Match> ---> - <!-- Match all doublecheck violations in these methods of "AnotherClass". --> -<!-- - <Match> - <Class name="com.foobar.AnotherClass" /> - <Or> - <Method name="nonOverloadedMethod" /> - <Method name="frob" params="int,java.lang.String" returns="void" /> - <Method name="blat" params="" returns="boolean" /> - </Or> - <Bug code="DC" /> - </Match> ---> - <!-- A method with a dead local store false positive (medium priority). --> -<!-- - <Match> - <Class name="com.foobar.MyClass" /> - <Method name="someMethod" /> - <Bug pattern="DLS_DEAD_LOCAL_STORE" /> - <Priority value="2" /> - </Match> ---> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
