diff options
author | Benjamin Campomenosi <109955405+benjamin-campomenosi-sonarsource@users.noreply.github.com> | 2023-11-02 14:52:28 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-11-08 20:02:52 +0000 |
commit | 0bc3c36c61a82eb18a66e2433164d06d548d127a (patch) | |
tree | 30efe10e56cf79ffbf8e56f6672ebe4669ab3ad4 /sonar-core/src | |
parent | a1be2cd1286ff3a24fc27d9c9a387069f5eafb91 (diff) | |
download | sonarqube-0bc3c36c61a82eb18a66e2433164d06d548d127a.tar.gz sonarqube-0bc3c36c61a82eb18a66e2433164d06d548d127a.zip |
SONAR-20871 Add simple status to the issue index
Diffstat (limited to 'sonar-core/src')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/issue/status/SimpleStatus.java | 4 | ||||
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/status/SimpleStatus.java b/sonar-core/src/main/java/org/sonar/core/issue/status/SimpleStatus.java index ba9df611bfb..0be0e499470 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/status/SimpleStatus.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/status/SimpleStatus.java @@ -40,13 +40,13 @@ public enum SimpleStatus { return SimpleStatus.CONFIRMED; case Issue.STATUS_CLOSED: return SimpleStatus.FIXED; - //Security hotspot should not return simple status as they are deprecated. + // Security hotspot should not return simple status as they are deprecated. case Issue.STATUS_REVIEWED: case Issue.STATUS_TO_REVIEW: return null; default: } - if (resolution != null) { + if (Issue.STATUS_RESOLVED.equals(status) && resolution != null) { switch (resolution) { case Issue.RESOLUTION_FALSE_POSITIVE: return SimpleStatus.FALSE_POSITIVE; diff --git a/sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java b/sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java new file mode 100644 index 00000000000..9b846f2ef9f --- /dev/null +++ b/sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2023 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.core.issue.status; + +import javax.annotation.ParametersAreNonnullByDefault; |