Skip to content

Commit

Permalink
PLUGINAPI-110 Remove deprecation on Hotspots statuses and resolutions…
Browse files Browse the repository at this point in the history
… values
  • Loading branch information
dejan-milisavljevic-sonarsource committed Dec 23, 2024
1 parent 143008a commit 4724ec1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 11.1
* Remove deprecation on `status` values `TO_REVIEW`, `REVIEWED` and related usages
* Remove deprecation on `resolution` values `FIXED`, `SAFE`, `ACKNOWLEDGED` and related usages
* Indicate that `status` and `resolution` are not deprecated for hotspots

## 11.0
* Remove usage of `javax-servlet-api`:
* Remove ~~`org.sonar.api.web.ServletFilter`~~
Expand Down
25 changes: 3 additions & 22 deletions plugin-api/src/main/java/org/sonar/api/issue/Issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ public interface Issue extends Serializable {
*/
@Deprecated(since = "10.4")
String STATUS_CLOSED = "CLOSED";
/**
* @deprecated since 10.4 in favor of {@link IssueStatus}
*/
@Deprecated(since = "10.4")

String RESOLUTION_FIXED = "FIXED";

/**
Expand Down Expand Up @@ -103,18 +100,14 @@ public interface Issue extends Serializable {

/**
* Security Hotspot has been reviewed and resolved as safe.
* @deprecated since 10.4 as Security Hotspot are deprecated.
* @since 8.1
*/
@Deprecated(since = "10.4")
String RESOLUTION_SAFE = "SAFE";

/**
* Security Hotspot has been reviewed and acknowledged that it poses a risk.
* @deprecated since 10.4 as Security Hotspot are deprecated.
* @since 9.4
*/
@Deprecated(since = "10.4")
String RESOLUTION_ACKNOWLEDGED = "ACKNOWLEDGED";

/**
Expand All @@ -124,16 +117,8 @@ public interface Issue extends Serializable {
List<String> RESOLUTIONS = List.of(RESOLUTION_FALSE_POSITIVE, RESOLUTION_WONT_FIX, RESOLUTION_FIXED,
RESOLUTION_REMOVED);

/**
* @deprecated since 10.4 as Security Hotspot are deprecated
*/
@Deprecated(since = "10.4")
List<String> SECURITY_HOTSPOT_RESOLUTIONS = List.of(RESOLUTION_FIXED, RESOLUTION_SAFE, RESOLUTION_ACKNOWLEDGED);

/**
* @deprecated since 10.4 as Security Hotspot are deprecated
*/
@Deprecated(since = "10.4")
String STATUS_TO_REVIEW = "TO_REVIEW";

/**
Expand All @@ -142,10 +127,6 @@ public interface Issue extends Serializable {
@Deprecated(since = "8.1")
String STATUS_IN_REVIEW = "IN_REVIEW";

/**
* @deprecated since 10.4 as Security Hotspot are deprecated
*/
@Deprecated(since = "10.4")
String STATUS_REVIEWED = "REVIEWED";

/**
Expand Down Expand Up @@ -205,14 +186,14 @@ public interface Issue extends Serializable {

/**
* See constant values in {@link Issue}.
* @deprecated since 10.4 in favor of {@link IssueStatus}
* @deprecated since 10.4 in favor of {@link IssueStatus}. Not deprecated for hotspots
*/
@Deprecated(since = "10.4")
String status();

/**
* The type of resolution, or null if the issue is not resolved. See constant values in {@link Issue}.
* @deprecated since 10.4 in favor of {@link IssueStatus}
* @deprecated since 10.4 in favor of {@link IssueStatus}. Not deprecated for hotspots
*/
@CheckForNull
@Deprecated(since = "10.4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static IssueStatus of(@Nullable String status, @Nullable String resolutio
return IssueStatus.CONFIRMED;
case Issue.STATUS_CLOSED:
return IssueStatus.FIXED;
// Security hotspot should not return issue status as they are deprecated.
// Security hotspot should not return issue status.
case Issue.STATUS_REVIEWED:
case Issue.STATUS_TO_REVIEW:
return null;
Expand Down

0 comments on commit 4724ec1

Please sign in to comment.