Skip to content

SLCORE-2212 fix: resolve 1 SonarQube issue (1 minor)#1892

Open
sonarqube-agent[bot] wants to merge 1 commit intomasterfrom
remediate-master-20260311-000048
Open

SLCORE-2212 fix: resolve 1 SonarQube issue (1 minor)#1892
sonarqube-agent[bot] wants to merge 1 commit intomasterfrom
remediate-master-20260311-000048

Conversation

@sonarqube-agent
Copy link
Contributor

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. • MINORView issue

Location: sonarlint-core-parent:backend/server-api/src/main/java/org/sonarsource/sonarlint/core/serverapi/rules/RulesApi.java:82

Why 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 deprecated getType() API, acknowledging that the usage is intentional and accepted for now, even though the method has been deprecated.

--- a/backend/server-api/src/main/java/org/sonarsource/sonarlint/core/serverapi/rules/RulesApi.java
+++ b/backend/server-api/src/main/java/org/sonarsource/sonarlint/core/serverapi/rules/RulesApi.java
@@ -72,0 +73,1 @@ public class RulesApi {
+  @SuppressWarnings("deprecation")

SonarQube Remediation Agent uses AI. Check for mistakes.

Fixed issues:
- AZv9xa-LClKDVB-iUu0s for java:S1874 rule

Generated by SonarQube Agent (task: 7b5a6c63-10b1-405d-81e3-cc3fe59426f1)
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title fix: resolve 1 SonarQube issue (1 minor) SLCORE-2212 fix: resolve 1 SonarQube issue (1 minor) Mar 11, 2026
@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Mar 11, 2026

SLCORE-2212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants