SLCORE-2212 fix: resolve 1 SonarQube issue (1 minor)#1892
Open
sonarqube-agent[bot] wants to merge 1 commit intomasterfrom
Open
SLCORE-2212 fix: resolve 1 SonarQube issue (1 minor)#1892sonarqube-agent[bot] wants to merge 1 commit intomasterfrom
sonarqube-agent[bot] wants to merge 1 commit intomasterfrom
Conversation
Fixed issues: - AZv9xa-LClKDVB-iUu0s for java:S1874 rule Generated by SonarQube Agent (task: 7b5a6c63-10b1-405d-81e3-cc3fe59426f1)
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.
This PR includes automated code changes to address 1 SonarQube issues: MINOR (1).
View Project in SonarCloud
Fixed Issues
java:S1874 - Remove this use of "getType"; it is deprecated. • MINOR • View issue
Location:
sonarlint-core-parent:backend/server-api/src/main/java/org/sonarsource/sonarlint/core/serverapi/rules/RulesApi.java:82Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds a @SuppressWarnings("deprecation") annotation to the method that calls the deprecated
getType()method on line 82 of RulesApi.java. This suppresses the static analysis warning about using the deprecatedgetType()API, acknowledging that the usage is intentional and accepted for now, even though the method has been deprecated.SonarQube Remediation Agent uses AI. Check for mistakes.