Repository navigation
Fix the two open Sonar reliability issues - #3141
Merged
Merged
Conversation
The team panel compared the viewer with a member through User#equals, which led Sonar to report a possible null member in Island#getRank. Compare UUIDs instead. The item key pattern matched trailing whitespace after a lazy quantifier and could backtrack; the caller already trims. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HBXcjai4FihmV4n54fjjMe
|
Open
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.



SonarQube Cloud rates BentoBox's reliability C because of two open issues. This fixes both.
Island#getRank(blocker,javabugs:S2259). The team panel compared the viewer with a member throughUser#equals, whose null check led Sonar to assume the member could be null when its rank is read next. The member is never null there, so this was a false alarm, but comparing UUIDs in a smallisViewerhelper removes the path Sonar followed.ItemStackTypeAdapter(medium,java:S8786). The pattern that finds an item'sid:ortype:key matched trailing whitespace after a lazy quantifier, which can backtrack. The pattern now takes the rest of the line and the caller trims it, as it already did. A new test covers a key with trailing whitespace.The item adapter and team panel tests pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HBXcjai4FihmV4n54fjjMe