From 6d724b5c1bb753b22de8c572496d4a95fe2f8850 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Thu, 30 Mar 2023 15:38:46 +0200 Subject: [PATCH] [NO-JIRA] Remove code smells related to missing @deprecated javadoc --- .../java/org/sonar/server/rule/index/RuleIndex.java | 3 +++ .../org/sonar/server/security/SecurityStandards.java | 11 +++++++++-- .../org/sonar/server/hotspot/ws/SearchAction.java | 3 +++ .../org/sonar/server/rule/ws/RulesWsParameters.java | 3 +++ .../java/org/sonar/server/rule/ws/SearchAction.java | 3 +++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java b/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java index 6c222a0027d..2fff25c259e 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java @@ -128,6 +128,9 @@ public class RuleIndex { public static final String FACET_TYPES = "types"; public static final String FACET_OLD_DEFAULT = "true"; public static final String FACET_CWE = "cwe"; + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) public static final String FACET_SANS_TOP_25 = "sansTop25"; public static final String FACET_OWASP_TOP_10 = "owaspTop10"; diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java b/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java index c6c02b128bd..1ab2cdda6c7 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/security/SecurityStandards.java @@ -52,6 +52,10 @@ import static org.sonar.server.security.SecurityStandards.VulnerabilityProbabili public final class SecurityStandards { public static final String UNKNOWN_STANDARD = "unknown"; + + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) public static final String SANS_TOP_25_INSECURE_INTERACTION = "insecure-interaction"; @Deprecated(since = "10.0", forRemoval = true) @@ -67,6 +71,9 @@ public final class SecurityStandards { private static final String CWE_PREFIX = "cwe:"; // See https://www.sans.org/top25-software-errors + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) private static final Set INSECURE_CWE = new HashSet<>(asList("89", "78", "79", "434", "352", "601")); @Deprecated(since = "10.0", forRemoval = true) @@ -75,7 +82,7 @@ public final class SecurityStandards { private static final Set POROUS_CWE = new HashSet<>(asList("306", "862", "798", "311", "807", "250", "863", "732", "327", "307", "759")); /** - * @deprecated SansTop25 report is outdated and will be removed from version 11.0 + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 */ @Deprecated public static final Map> CWES_BY_SANS_TOP_25 = ImmutableMap.of( @@ -306,7 +313,7 @@ public final class SecurityStandards { } /** - * @deprecated SansTop25 report is outdated and will be removed from version 11.0 + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 */ @Deprecated public Set getSansTop25() { diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/hotspot/ws/SearchAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/hotspot/ws/SearchAction.java index ac8662feed2..590d9bd5ce0 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/hotspot/ws/SearchAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/hotspot/ws/SearchAction.java @@ -118,6 +118,9 @@ public class SearchAction implements HotspotsWsAction { private static final String PARAM_OWASP_ASVS_40 = "owaspAsvs-4.0"; private static final String PARAM_OWASP_TOP_10_2017 = "owaspTop10"; private static final String PARAM_OWASP_TOP_10_2021 = "owaspTop10-2021"; + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) private static final String PARAM_SANS_TOP_25 = "sansTop25"; private static final String PARAM_SONARSOURCE_SECURITY = "sonarsourceSecurity"; diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RulesWsParameters.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RulesWsParameters.java index fa4612de150..8505722956a 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RulesWsParameters.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RulesWsParameters.java @@ -35,6 +35,9 @@ public class RulesWsParameters { public static final String PARAM_CWE = "cwe"; public static final String PARAM_OWASP_TOP_10 = "owaspTop10"; public static final String PARAM_OWASP_TOP_10_2021 = "owaspTop10-2021"; + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) public static final String PARAM_SANS_TOP_25 = "sansTop25"; public static final String PARAM_SONARSOURCE_SECURITY = "sonarsourceSecurity"; diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/SearchAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/SearchAction.java index 1cb7889bd96..cbf97562dd6 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/SearchAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/SearchAction.java @@ -617,6 +617,9 @@ public class SearchAction implements RulesWsAction { return this; } + /** + * @deprecated SansTop25 report is outdated, it has been completely deprecated in version 10.0 and will be removed from version 11.0 + */ @Deprecated(since = "10.0", forRemoval = true) public List getSansTop25() { return sansTop25; -- 2.39.5