Repository navigation
add missing default case to switch in McpController [Fix] - #2102
Closed
abhaygoudannavar wants to merge 1 commit into
Closed
abhaygoudannavar wants to merge 1 commit into
abhaygoudannavar wants to merge 1 commit into
Conversation
Signed-off-by: abhaygoudannavar <[email protected]>
abhaygoudannavar
requested review from
SebastienDegodez,
lbroudoux and
yada
as code owners
May 7, 2026 23:00
kishore08-07
reviewed
May 8, 2026
kishore08-07
left a comment
Contributor
There was a problem hiding this comment.
@abhaygoudannavar i had already addressed all the 18 SonarQube maintainability and security issues in McpController.java earlier in pr: #2069.
Contributor
Author
|
Hi @kishore08-07 i totally missed your PR while I was working my way through the umbrella issue (#2058). Awesome job knocking out all 18 of those McpController issues in one go! I'll go ahead and close this PR to keep the maintainers' queue clean and avoid stepping on your changes. |
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
Add a missing
defaultcase to the switch statement inMcpController.java, addressing the maintainability finding raised by SonarCloud and aggregated under #2058.Sites changed
McpController#handleMcpRequestNotes
This rule (
java:S131- switch statements should have adefaultcase) flagged therequest.method()switch block. I added adefault -> { }block with an inline comment explaining that unrecognized methods fall through safely. This intentionally leavesresultnull, which correctly triggers the existing-32601 Method not foundJSON RPC error response below it.