Skip to content

nit: more spotbugs fixes#183

Merged
jasonk000 merged 1 commit into
masterfrom
jkoch/spotbugs-2
May 4, 2026
Merged

nit: more spotbugs fixes#183
jasonk000 merged 1 commit into
masterfrom
jkoch/spotbugs-2

Conversation

@jasonk000
Copy link
Copy Markdown
Contributor

Fix four spotbugs issues:

  1. Node.attributeName was never written to, always stayed null -> remove the attributeName field, which means decorateWithAttributeName is never used (all class private), and the codepath can be cleaned up.

  2. LeakHunterQuery reuses the Map.Entry object which might be reused -> reconstruct a new Map Entry.

    • the Map.entry() constructor requires Java9+
  3. resolveIsDaemon returns Boolean, which might be auto-unboxed to boolean by caller and trigger a NPE -> Annotating @CheckForNulls ensures call site is validated to check that it is null before using.

  4. Value stored to tt1 which was never read -> Shuffle things around so scope is more natural/clear.

@jasonk000 jasonk000 requested review from kgibm and krumts as code owners May 4, 2026 05:48
@jasonk000
Copy link
Copy Markdown
Contributor Author

brings us from 394 -> 390

Copy link
Copy Markdown
Contributor

@krumts krumts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasonk000 jasonk000 merged commit f183345 into master May 4, 2026
3 checks passed
@jasonk000 jasonk000 deleted the jkoch/spotbugs-2 branch May 4, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants