Repository navigation
[Java] Make non-extensible classes final instead of suppressing CT_CONSTRUCTOR_THROW - #40444
Open
mxtymoshyk wants to merge 2 commits into
Open
mxtymoshyk wants to merge 2 commits into
mxtymoshyk wants to merge 2 commits into
Conversation
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40444 +/- ##
============================================
+ Coverage 56.16% 58.73% +2.56%
- Complexity 2288 13913 +11625
============================================
Files 1124 2585 +1461
Lines 178336 271694 +93358
Branches 1489 11243 +9754
============================================
+ Hits 100170 159573 +59403
- Misses 75645 106113 +30468
- Partials 2521 6008 +3487
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kennknowles
self-requested a review
October 7, 2026 19:14
mxtymoshyk
force-pushed
the
spotbugs-final-classes
branch
from
October 8, 2026 15:07
0e85cfd to
931d107
Compare
mxtymoshyk
marked this pull request as ready for review
October 8, 2026 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #40008. @kennknowles flagged a set of classes there that can be final, so this PR makes them final.
It makes 31 classes final and removes their CT_CONSTRUCTOR_THROW suppressions. None of them has a subclass or a Mockito mock. BoundedTrieData keeps its separate IS2_INCONSISTENT_SYNC suppression.
StatefulDoFnRunner stays non-final because ExecutableStageDoFnOperator creates an anonymous subclass of it.
Main and test code compile, and spotbugsMain passes on the touched modules, including Flink 1.20 and 2.2. I did not run the unit tests locally.
This builds on #40008, so the diff includes its commits until that merges.