Skip to content

Commit 8921712

Browse files
PLUGINAPI-110 Remove deprecation on Hotspots statuses and resolutions values
1 parent 143008a commit 8921712

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 11.1
4+
* Remove deprecation on `status` values `TO_REVIEW`, `REVIEWED` and related usages
5+
* Remove deprecation on `resolution` values `FIXED`, `SAFE`, `ACKNOWLEDGED` and related usages
6+
* Indicate that `status` and `resolution` are not deprecated for hotspots
7+
38
## 11.0
49
* Remove usage of `javax-servlet-api`:
510
* Remove ~~`org.sonar.api.web.ServletFilter`~~

plugin-api/src/main/java/org/sonar/api/issue/Issue.java

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ public interface Issue extends Serializable {
7171
*/
7272
@Deprecated(since = "10.4")
7373
String STATUS_CLOSED = "CLOSED";
74-
/**
75-
* @deprecated since 10.4 in favor of {@link IssueStatus}
76-
*/
77-
@Deprecated(since = "10.4")
74+
7875
String RESOLUTION_FIXED = "FIXED";
7976

8077
/**
@@ -103,18 +100,14 @@ public interface Issue extends Serializable {
103100

104101
/**
105102
* Security Hotspot has been reviewed and resolved as safe.
106-
* @deprecated since 10.4 as Security Hotspot are deprecated.
107103
* @since 8.1
108104
*/
109-
@Deprecated(since = "10.4")
110105
String RESOLUTION_SAFE = "SAFE";
111106

112107
/**
113108
* Security Hotspot has been reviewed and acknowledged that it poses a risk.
114-
* @deprecated since 10.4 as Security Hotspot are deprecated.
115109
* @since 9.4
116110
*/
117-
@Deprecated(since = "10.4")
118111
String RESOLUTION_ACKNOWLEDGED = "ACKNOWLEDGED";
119112

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

127-
/**
128-
* @deprecated since 10.4 as Security Hotspot are deprecated
129-
*/
130-
@Deprecated(since = "10.4")
131120
List<String> SECURITY_HOTSPOT_RESOLUTIONS = List.of(RESOLUTION_FIXED, RESOLUTION_SAFE, RESOLUTION_ACKNOWLEDGED);
132121

133-
/**
134-
* @deprecated since 10.4 as Security Hotspot are deprecated
135-
*/
136-
@Deprecated(since = "10.4")
137122
String STATUS_TO_REVIEW = "TO_REVIEW";
138123

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

145-
/**
146-
* @deprecated since 10.4 as Security Hotspot are deprecated
147-
*/
148-
@Deprecated(since = "10.4")
149130
String STATUS_REVIEWED = "REVIEWED";
150131

151132
/**
@@ -205,14 +186,14 @@ public interface Issue extends Serializable {
205186

206187
/**
207188
* See constant values in {@link Issue}.
208-
* @deprecated since 10.4 in favor of {@link IssueStatus}
189+
* @deprecated since 10.4 in favor of {@link IssueStatus}. Not deprecated for hotspots
209190
*/
210191
@Deprecated(since = "10.4")
211192
String status();
212193

213194
/**
214195
* The type of resolution, or null if the issue is not resolved. See constant values in {@link Issue}.
215-
* @deprecated since 10.4 in favor of {@link IssueStatus}
196+
* @deprecated since 10.4 in favor of {@link IssueStatus}. Not deprecated for hotspots
216197
*/
217198
@CheckForNull
218199
@Deprecated(since = "10.4")

plugin-api/src/main/java/org/sonar/api/issue/IssueStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static IssueStatus of(@Nullable String status, @Nullable String resolutio
6060
return IssueStatus.CONFIRMED;
6161
case Issue.STATUS_CLOSED:
6262
return IssueStatus.FIXED;
63-
// Security hotspot should not return issue status as they are deprecated.
63+
// Security hotspot should not return issue status.
6464
case Issue.STATUS_REVIEWED:
6565
case Issue.STATUS_TO_REVIEW:
6666
return null;

0 commit comments

Comments
 (0)