Clean up low-severity CodeQL code-quality alerts#302
Merged
vharseko merged 2 commits intoJul 24, 2026
Conversation
Resolve 17 CodeQL note-level alerts across 15 files: - inefficient-empty-string-test: use String.isEmpty() instead of ""-equality (8) - inefficient-string-constructor: drop redundant new String(...) wrappers (2) - inefficient-key-set-iterator: iterate entrySet() instead of keySet()+get() (2) - useless-tostring-call: remove toString() on values already String (2) - local-variable-is-never-read: remove dead local assignments (3) Behaviour is unchanged; all touched modules compile.
- java/local-shadows-field (5): rename local variables that shadowed fields in CsvAuditEventHandler, JsonFileWriter, and WarningHeader - java/call-to-object-tostring (1): log VersionedPath.getVersions() instead of the object's default toString() in CrestApiProducer - py/unused-import (1): drop the unused `import sys, os` in the persistit doc conf.py Behaviour is unchanged; all touched Java modules compile.
maximthomas
approved these changes
Jul 24, 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.
Resolves a batch of CodeQL
note-level (code-quality) alerts. No behaviour changes; all touched Java modules compile.Commit 1 — 17 alerts across 15 files
String.isEmpty()instead of"".equals(...)new String(...)wrappersentrySet()instead ofkeySet()+get()toString()on values alreadyStringCommit 2 — 7 alerts across 5 files
CsvAuditEventHandler,JsonFileWriter, andWarningHeaderVersionedPath.getVersions()instead of the object's defaulttoString()inCrestApiProducerimport sys, osin the persistit docconf.pyNot addressed here (deliberate)
BufferPoolkeeps a 1 MBreservebuffer released onOutOfMemoryError; the "unused" write is intentional — dismissed as won't-fixConverter.javaleft for a separate, dedicated refactor