Fix switch case warning related unconditional break, return or throw statement.#17611
Open
anukalp2804 wants to merge 2 commits intoapache:masterfrom
Open
Fix switch case warning related unconditional break, return or throw statement.#17611anukalp2804 wants to merge 2 commits intoapache:masterfrom
anukalp2804 wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
|
@CRZbulabula @Caideyipi plz review related classes |
JackieTien97
requested changes
May 7, 2026
Caideyipi
approved these changes
May 7, 2026
Contributor
|
There are some tests failed, please check them. |
Contributor
Author
|
I updated the code by removing the added "break" statements and using "// fall through" comments for the intentional fall-through cases. These cases appear to be designed to continue execution into the subsequent cases, so adding "break" may be change the original behavior. The "// fall through" comments help clarify that the behavior is intentional and also resolve warnings. Please review and let me know if any changes are needed from my side. Thank you |
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.
Summary
This PR resolves SonarCloud rule
java:S128, switch cases should end with an unconditionalbreak,returnorthrowstatement. For that we have done some changes like :Addressed : #17594
This PR has:
mvn spotless:apply.mvn clean package -DskipTests.mvn -pl iotdb-core -am test -DskipTests.Resolves : https://sonarcloud.io/project/issues?impactSeverities=BLOCKER&issueStatuses=OPEN%2CCONFIRMED&id=apache_iotdb
End this switch case with an unconditional break, return or throw statement.