Add missing @Deprecated annotations and @deprecated Javadoc tags - #2166
Open
sonarqube-agent[bot] wants to merge 1 commit into
Open
Add missing @Deprecated annotations and @deprecated Javadoc tags#2166sonarqube-agent[bot] wants to merge 1 commit into
sonarqube-agent[bot] wants to merge 1 commit into
Conversation
Fixed issues: - AZjRnmUzCue1PWb8I6hR for java:S1123 rule - AZjRnmSwCue1PWb8I6gn for java:S1123 rule - AZjRnmVECue1PWb8I6hV for java:S1123 rule - AZjRnmS-Cue1PWb8I6gq for java:S1123 rule - AZ6HdAqqZMgPBM841Lww for java:S1123 rule Generated by SonarQube Agent (task: d586253c-e4d4-4788-aef2-87edcec388ab)
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 fixes 5 SonarQube violations of rule java:S1123 by adding missing @deprecated annotations and @deprecated Javadoc tags to deprecated classes and fields across the rpc-protocol module. Properly marking deprecation with both the annotation and Javadoc tag ensures consistency and helps developers understand which alternatives to use.
View Project in SonarCloud
Fixed Issues
java:S1123 - Add the missing @deprecated Javadoc tag. • MAJOR • View issue
Location:
sonarlint-core-parent:rpc-protocol/src/main/java/org/sonarsource/sonarlint/core/rpc/protocol/backend/initialize/LanguageSpecificRequirements.java:31Why is this an issue?
Deprecation should be marked with both the
@Deprecatedannotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.What changed
This hunk adds the missing @deprecated Javadoc tag to the constructor of LanguageSpecificRequirements that is annotated with @deprecated. The static analysis rule requires that deprecation be marked with both the @deprecated annotation and the @deprecated Javadoc tag. The constructor at line 31 already had the @deprecated annotation but was missing the @deprecated Javadoc tag. This hunk adds the Javadoc comment with the @deprecated tag (including information about when it was deprecated and what to use instead), making the deprecation marking complete and compliant with the rule.
java:S1123 - Add the missing @deprecated Javadoc tag. • MAJOR • View issue
Location:
sonarlint-core-parent:rpc-protocol/src/main/java/org/sonarsource/sonarlint/core/rpc/protocol/backend/connection/auth/HelpGenerateUserTokenParams.java:32Why is this an issue?
Deprecation should be marked with both the
@Deprecatedannotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.What changed
This hunk adds the missing @deprecated Javadoc tag to the HelpGenerateUserTokenParams constructor that is already annotated with @deprecated. The static analysis rule requires that deprecation be marked with both the @deprecated annotation and the @deprecated Javadoc tag. The constructor at line 32 had the @deprecated annotation but was missing the @deprecated Javadoc tag, so this hunk adds the Javadoc comment with the @deprecated tag explaining which alternative constructor to use instead.
java:S1123 - Add the missing @deprecated annotation. • MAJOR • View issue
Location:
sonarlint-core-parent:rpc-protocol/src/main/java/org/sonarsource/sonarlint/core/rpc/protocol/client/analysis/FileEditDto.java:30Why is this an issue?
Deprecation should be marked with both the
@Deprecatedannotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.What changed
This hunk adds the missing @deprecated annotation to the FileEditDto class. The static analysis rule requires that deprecation be marked with both the @deprecated annotation and the @deprecated Javadoc tag. The class already had a @deprecated Javadoc tag but was missing the @deprecated annotation, so adding
@Deprecated(since = "10.2")makes the deprecation compliant by ensuring both the annotation and the Javadoc tag are present.java:S1123 - Add the missing @deprecated Javadoc tag. • MAJOR • View issue
Location:
sonarlint-core-parent:rpc-protocol/src/main/java/org/sonarsource/sonarlint/core/rpc/protocol/backend/config/binding/BindingSuggestionDto.java:28Why is this an issue?
Deprecation should be marked with both the
@Deprecatedannotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.What changed
This hunk adds the missing @deprecated Javadoc tag to the field 'isFromSharedConfiguration' in BindingSuggestionDto.java. The field was annotated with @deprecated but lacked the corresponding @deprecated Javadoc tag. The static analysis rule requires that deprecation be marked with both the @deprecated annotation and the @deprecated Javadoc tag. By adding the Javadoc comment with '@deprecated use {@link #origin} instead', the code now satisfies both requirements, resolving the code smell.
java:S1123 - Add the missing @deprecated Javadoc tag. • MAJOR • View issue
Location:
sonarlint-core-parent:rpc-protocol/src/main/java/org/sonarsource/sonarlint/core/rpc/protocol/client/binding/AssistBindingParams.java:29Why is this an issue?
Deprecation should be marked with both the
@Deprecatedannotation and @deprecated Javadoc tag. The annotation enables tools such as IDEs to warn about referencing deprecated elements, and the tag can be used to explain when it was deprecated, why, and how references should be refactored.What changed
This hunk adds the missing @deprecated Javadoc tag to the field 'isFromSharedConfiguration' in AssistBindingParams.java. The field already had the @deprecated annotation but was missing the corresponding @deprecated Javadoc tag. By adding the Javadoc comment with '@deprecated Use {@link #getOrigin()} instead.', the code now properly has both the @deprecated annotation and the @deprecated Javadoc tag, satisfying the rule that deprecation should be marked with both.
SonarQube Remediation Agent uses AI. Check for mistakes.