This is an automated email from the ASF dual-hosted git repository.
xianjin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 6367b36e [SpotBugs] Remove unread protected field in Checker (#520)
6367b36e is described below
commit 6367b36e0b94fbd7d70d5489168a53960a8ae31c
Author: Kaijie Chen <[email protected]>
AuthorDate: Tue Jan 31 15:16:41 2023 +0800
[SpotBugs] Remove unread protected field in Checker (#520)
### What changes were proposed in this pull request?
1. Remove unread protected field in Checker.
2. Remove SpotBugs exclusion [URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD][1].
[1]:
https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#urf-unread-public-protected-field-urf-unread-public-or-protected-field
### Why are the changes needed?
Reduce SpotBugs exceptions.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI.
---
server/src/main/java/org/apache/uniffle/server/Checker.java | 3 ---
spotbugs-exclude.xml | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/server/src/main/java/org/apache/uniffle/server/Checker.java
b/server/src/main/java/org/apache/uniffle/server/Checker.java
index 2be1b30f..e6171960 100644
--- a/server/src/main/java/org/apache/uniffle/server/Checker.java
+++ b/server/src/main/java/org/apache/uniffle/server/Checker.java
@@ -19,10 +19,7 @@ package org.apache.uniffle.server;
public abstract class Checker {
- protected ShuffleServerConf conf;
-
Checker(ShuffleServerConf conf) {
- this.conf = conf;
}
abstract boolean checkIsHealthy();
diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml
index bead73be..f7b5d80a 100644
--- a/spotbugs-exclude.xml
+++ b/spotbugs-exclude.xml
@@ -20,6 +20,6 @@
<Package name="~org\.apache\.uniffle\.proto.*"/>
</Match>
<Match>
- <Bug
pattern="MS_EXPOSE_REP,EI_EXPOSE_REP,EI_EXPOSE_REP2,EI_EXPOSE_STATIC_REP2,THROWS_METHOD_THROWS_RUNTIMEEXCEPTION,THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION,REC_CATCH_EXCEPTION,THROWS_METHOD_THROWS_CLAUSE_THROWABLE,MS_PKGPROTECT,MS_CANNOT_BE_FINAL,UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD,SE_BAD_FIELD,URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD,SC_START_IN_CTOR,SWL_SLEEP_WITH_LOCK_HELD,IS2_INCONSISTENT_SYNC"
/>
+ <Bug
pattern="MS_EXPOSE_REP,EI_EXPOSE_REP,EI_EXPOSE_REP2,EI_EXPOSE_STATIC_REP2,THROWS_METHOD_THROWS_RUNTIMEEXCEPTION,THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION,REC_CATCH_EXCEPTION,THROWS_METHOD_THROWS_CLAUSE_THROWABLE,MS_PKGPROTECT,MS_CANNOT_BE_FINAL,UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD,SE_BAD_FIELD,SC_START_IN_CTOR,SWL_SLEEP_WITH_LOCK_HELD,IS2_INCONSISTENT_SYNC"
/>
</Match>
</FindBugsFilter>