From c63283fce767013e11ca6bf1c26170a11c0d48da Mon Sep 17 00:00:00 2001 From: OrlovAlexander Date: Mon, 14 Oct 2024 09:03:02 +0200 Subject: SONAR-23250 Support impacts in QP export-import --- .../main/java/org/sonar/server/qualityprofile/RuleActivation.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/sonar-webserver-api/src') diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java index a155d284fb9..61c94b5a7b5 100644 --- a/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java +++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java @@ -68,9 +68,11 @@ public class RuleActivation { return new RuleActivation(ruleUuid, false, severity, prioritizedRule, parameters, Map.of()); } - public static RuleActivation create(String ruleUuid, @Nullable String severity, Map impactSeverities, - @Nullable Boolean prioritizedRule, - @Nullable Map parameters) { + public static RuleActivation create(String ruleUuid, @Nullable String severity, @Nullable Map impactSeverities, @Nullable Boolean prioritizedRule, @Nullable Map parameters) { + if (impactSeverities == null) { + impactSeverities = Map.of(); + } return new RuleActivation(ruleUuid, false, severity, prioritizedRule, parameters, impactSeverities); } -- cgit v1.2.3