Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLUGINAPI-110 Remove deprecation on Hotspots statuses and resolutions… #203

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading