This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 340fa8ce9 ORC-1944: Upgrade `spotbugs` to 4.9.3
340fa8ce9 is described below
commit 340fa8ce90c1022219db4f58230bb7a55b0c6ffd
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Jun 30 15:55:43 2025 -0700
ORC-1944: Upgrade `spotbugs` to 4.9.3
### What changes were proposed in this pull request?
This PR aims to upgrade `SpotBugs` to 4.9.3.
### Why are the changes needed?
To bring the latest improvements like Java 21 support,
- https://github.com/spotbugs/spotbugs/releases/tag/4.9.3
- https://github.com/spotbugs/spotbugs/releases/tag/4.9.2
- https://github.com/spotbugs/spotbugs/releases/tag/4.9.1
- https://github.com/spotbugs/spotbugs/releases/tag/4.9.0
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.5
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.4
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.3
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.2
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.1
- https://github.com/spotbugs/spotbugs/releases/tag/4.8.0
- https://github.com/spotbugs/spotbugs/pull/2578
### How was this patch tested?
Manual check the CI logs
**BEFORE**
- https://github.com/apache/orc/actions/runs/15979589321/job/45070631476
(Java 21)
```
[java] Exception analyzing org.apache.orc.impl.AircompressorCodec$1 using
detector edu.umd.cs.findbugs.detect.FindOpenStream
[java] org.apache.bcel.classfile.ClassFormatException: Invalid
constant pool reference using index: 0. Constant pool size is: 28
[java] At
org.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:305)
[java] At
org.apache.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:257)
[java] At
edu.umd.cs.findbugs.detect.FindOpenStream.visitClassContext(FindOpenStream.java:304)
[java] At
edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
[java] At
edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$1(FindBugs2.java:1108)
[java] At
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[java] At
edu.umd.cs.findbugs.CurrentThreadExecutorService.execute(CurrentThreadExecutorService.java:86)
[java] At
java.base/java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:247)
[java] At
edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
[java] At
edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
[java] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
[java] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #2306 from dongjoon-hyun/ORC-1944.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 4126a7fd3801d1127f7f971867bc8767ebbf7e90)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
java/pom.xml | 2 +-
java/spotbugs-exclude.xml | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/java/pom.xml b/java/pom.xml
index 8309f8320..db91712b4 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -399,7 +399,7 @@
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
- <version>4.7.3</version>
+ <version>4.9.3</version>
</dependency>
</dependencies>
<executions>
diff --git a/java/spotbugs-exclude.xml b/java/spotbugs-exclude.xml
index d5f7fe7d9..26bec6fe9 100644
--- a/java/spotbugs-exclude.xml
+++ b/java/spotbugs-exclude.xml
@@ -74,4 +74,10 @@
<Class name="org.apache.orc.tools.ScanData" />
</And>
</Match>
+ <Match>
+ <Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
+ </Match>
+ <Match>
+ <Bug pattern="CT_CONSTRUCTOR_THROW" />
+ </Match>
</FindBugsFilter>