Repository navigation
Fix Release Nightly Snapshot job - #40685
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR resolves compiler/ErrorProne errors in the Release Nightly Snapshot workflow by removing the deprecated finalize() method from JmsIO.UnboundedJmsReader (which implements Closeable via UnboundedReader and is managed by the runner) and adding @SuppressWarnings("PatternMatchingInstanceof") to DeltaWriteTestUtils and AddFilesIT to maintain Java 8 compatibility.
🔍 General Feedback
- The changes are minimal, targeted, and cleanly address the JDK 17+ / ErrorProne build failures while preserving Java 8 source compatibility.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
| @SuppressWarnings({"Finalize", "removal"}) | ||
| protected void finalize() { | ||
| doClose(); | ||
| } |
There was a problem hiding this comment.
The finalize() method is deprecated and marked for removal in newer Java versions. Since UnboundedJmsReader already implements close() to release JMS resources, the finalizer is redundant. Resource cleanup should be handled explicitly through the reader lifecycle rather than relying on GC, which does not guarantee finalizer execution.
|
Assigning reviewers: R: @ahmedabu98 for label iceberg. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Abacn
left a comment
There was a problem hiding this comment.
Since there are multiple occurrence, we should add PatternMatchingInstanceOf into the global errorprome exclusion list, in BeamModulePlugin
FIxes #38899
Successful run:
https://github.com/apache/beam/actions/runs/39422473838