From 0bc3c36c61a82eb18a66e2433164d06d548d127a Mon Sep 17 00:00:00 2001 From: Benjamin Campomenosi <109955405+benjamin-campomenosi-sonarsource@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:52:28 +0100 Subject: SONAR-20871 Add simple status to the issue index --- .../org/sonar/core/issue/status/SimpleStatus.java | 4 ++-- .../org/sonar/core/issue/status/package-info.java | 23 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 sonar-core/src/main/java/org/sonar/core/issue/status/package-info.java (limited to 'sonar-core/src') 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; -- cgit v1.2.3