Skip to content

Conversation

gtoison
Copy link
Contributor

@gtoison gtoison commented May 28, 2024

Adjust the priority in case is was >= IGNORED_PRIORITY as it might be the case in "relaxed" mode.
I understand that this is expected because there's a similar adjustment at:

++totalErrors[Math.min(priority, totalErrors.length - 1)];

Not sure how to reproduce the problem and this seem fairly straightforward so I did not add a tautological test, let me know if you think this is required

@gtoison gtoison linked an issue May 28, 2024 that may be closed by this pull request
@hazendaz hazendaz merged commit 5d0fc04 into spotbugs:master Jun 5, 2024
@hazendaz
Copy link
Member

hazendaz commented Jun 5, 2024

Looks like a very old bug with a few of those links that could still have something to test the condition. Guess one was hitting mybatis spring boot project, and I don't recall this at all beyond my comments. The fix seems good, though.

@hazendaz hazendaz self-assigned this Jun 7, 2024
@hazendaz hazendaz added this to the Spotbugs 4.8.6 milestone Jun 7, 2024
@@ -9,6 +9,8 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
### Fixed
- Do not report BC_UNCONFIRMED_CAST for Java 21's type switches when the switch instruction is TABLESWITCH ([#2782](https://github.com/spotbugs/spotbugs/issues/2782))
- Do not throw exception when inspecting empty switch statements ([#2995](https://github.com/spotbugs/spotbugs/issues/2995))
- Adjust priority since relaxed mode reports even `IGNORED_PRIORITY` ([#2994]https://github.com/spotbugs/spotbugs/issues/2994)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like there is one ( missing for the correct formatting after the ]. Can you please add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch @JuditKnoll
I have made #3012 to fix other errors I've made

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.

Array index out of bounds exception on FindDeadLocalStores
4 participants