Skip to content

Commit

Permalink
Add missing versions on Deprecated elements
Browse files Browse the repository at this point in the history
  • Loading branch information
damien-urruty-sonarsource committed Jun 22, 2023
1 parent ede09f7 commit 30c002b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
8 changes: 6 additions & 2 deletions plugin-api/src/main/java/org/sonar/api/measures/Metric.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ public Metric<G> setDescription(@Nullable String description) {

/**
* @return whether the metric is a managed by the users ("manual metric")
* @deprecated since 9.1. There is no replacement
*/
@Deprecated
@Deprecated(since = "9.1")
public Boolean getUserManaged() {
return userManaged;
}
Expand All @@ -337,7 +338,9 @@ public Boolean getUserManaged() {
*
* @param userManaged whether the metric is user managed
* @return this
* @deprecated since 9.1. There is no replacement
*/
@Deprecated(since = "9.1")
public Metric<G> setUserManaged(Boolean userManaged) {
this.userManaged = userManaged;
return this;
Expand Down Expand Up @@ -697,8 +700,9 @@ public Builder setHidden(boolean b) {
* @param b true if the metric can be edited online.
* @return the builder
* @since 2.10
* @deprecated since 9.1. There is no replacement
*/
@Deprecated
@Deprecated(since = "9.1")
public Builder setUserManaged(boolean b) {
this.userManaged = b;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public RulePriority getSeverity() {
/**
* For internal use
* @since 6.6
* @deprecated
* @deprecated since 6.6, internal usage only
*/
@Deprecated
public RulePriority getOverriddenSeverity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,15 +463,15 @@ abstract class NewRule {
* The optional description, in a restricted Markdown format, has no max length. It's exclusive with HTML description
* (see {@link #setHtmlDescription(String)})
*
* @deprecated use {@link #addDescriptionSection(RuleDescriptionSection)} instead
* @deprecated since 9.6. Use {@link #addDescriptionSection(RuleDescriptionSection)} instead
*/
@Deprecated(since = "9.6", forRemoval = true)
public abstract NewRule setMarkdownDescription(@Nullable String s);

/**
* Load description from a file available in classpath. Example : {@code setMarkdownDescription(getClass().getResource("/myrepo/Rule1234.md")}
*
* @deprecated use {@link #addDescriptionSection(RuleDescriptionSection)} instead
* @deprecated since 9.6. Use {@link #addDescriptionSection(RuleDescriptionSection)} instead
*/
@Deprecated(since = "9.6", forRemoval = true)
public abstract NewRule setMarkdownDescription(@Nullable URL classpathUrl);
Expand Down Expand Up @@ -630,7 +630,7 @@ abstract class Rule {
public abstract String htmlDescription();

/**
* @deprecated use html format instead
* @deprecated since 9.6. Use html format instead
*/
@Deprecated(since = "9.6", forRemoval = true)
@CheckForNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,13 @@ public String htmlDescription() {
return htmlDescription;
}

/**
* @deprecated since 9.6 markdown support fur rule descriptions will be dropped
*/
@Override
@CheckForNull
@Deprecated(since = "9.6", forRemoval = true)

public String markdownDescription() {
return markdownDescription;
}
Expand Down Expand Up @@ -246,4 +250,3 @@ public String toString() {
return format("[repository=%s, key=%s]", repoKey, key);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* {@code @deprecated} since 9.16. Use {@link org.sonar.api.web.HttpFilter} instead.
*
* @since 3.1
* @deprecated since 9.16. Use {@link org.sonar.api.web.HttpFilter} instead.
*/
@ServerSide
@ExtensionPoint
Expand Down

0 comments on commit 30c002b

Please sign in to comment.