Issue #13809: Kill mutation in Checker#13981
Merged
romani merged 1 commit intocheckstyle:masterfrom Nov 2, 2023
Merged
Conversation
Member
|
We can use probably https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/lang/AssertionError.html It is pretty generic. All other subclasses of Error is very specific. @rnveach , are you ok to throw AssertionError ? |
Contributor
|
@romani AssertionError seems unrelated to this issue of killing the mutation with file path.
As for the question, I am not sure I see this area as asserting anything, so I don't see using AssertionError making more sense than just a general error. |
romani
approved these changes
Nov 2, 2023
Member
romani
left a comment
There was a problem hiding this comment.
ok to merge,
we will suppress in sonar as wontfix.
33 tasks
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.
Part of #13809
https://sonarcloud.io/project/issues?resolved=false&severities=MAJOR&sinceLeakPeriod=true&pullRequest=13981&id=org.checkstyle%3Acheckstyle&open=AYuOAJXquUWup32NLidh
Change from method call -> variable must be enough to fool sonar into thinking this is new code; sonar violation should be suppressed after merge to master.