Fix code quality issues: raw types, printStackTrace, System.out, and empty catch blocks#18342
Merged
xiangfu0 merged 2 commits intoapache:masterfrom Apr 27, 2026
Merged
Conversation
…empty catch blocks - Replace raw type `new HashMap()` / `new ArrayList()` with diamond operator across 3 files - Replace `e.printStackTrace()` with `LOGGER.error()` in PinotDataBuffer - Replace `System.out.println` with `LOGGER.debug()` in OffHeapStarTree - Add logging or comments to silent empty catch blocks in PinotTaskManager, DriverUtils, TimestampUtils, ByteArray, ExtraInstanceConfig, and S3Config
Contributor
Author
|
@xiangfu0 please review |
The inner catch block variable 'e' shadowed the outer catch block's variable of the same name, causing a compilation failure.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18342 +/- ##
============================================
- Coverage 63.96% 63.39% -0.57%
- Complexity 1617 1679 +62
============================================
Files 3179 3253 +74
Lines 193741 198767 +5026
Branches 29926 30791 +865
============================================
+ Hits 123918 126007 +2089
- Misses 60031 62683 +2652
- Partials 9792 10077 +285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
xiangfu0
approved these changes
Apr 27, 2026
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.
Summary
new HashMap()/new ArrayList()with diamond operator inRealtimeSegmentStatsHistory,SparkSegmentGenerationJobRunner, andHadoopSegmentGenerationJobRunnere.printStackTrace()withLOGGER.error()inPinotDataBuffer.closeOpenBuffers()System.out.printlnwithLOGGER.debug()inOffHeapStarTree.printTreeHelper()(added slf4j Logger)LOGGER.warn()to silent catch block inPinotTaskManagerduring task lock acquisitionLOGGER.debug()to silent catch block inByteArrayfor MethodHandle fallbackDriverUtils,TimestampUtils,ExtraInstanceConfig, andS3ConfigTest plan
spotless:applyandcheckstyle:checkpass on all affected modules