aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api/src
diff options
context:
space:
mode:
authorOrlovAlexander <alexander.orlov@sonarsource.com>2024-10-14 09:03:02 +0200
committersonartech <sonartech@sonarsource.com>2024-10-16 20:03:02 +0000
commitc63283fce767013e11ca6bf1c26170a11c0d48da (patch)
treecd01b86e456639d5149ab9854b4ef65a363a6cf0 /server/sonar-webserver-api/src
parenta49dcbfad564db95c05d538d7aff110a33db12a1 (diff)
downloadsonarqube-c63283fce767013e11ca6bf1c26170a11c0d48da.tar.gz
sonarqube-c63283fce767013e11ca6bf1c26170a11c0d48da.zip
SONAR-23250 Support impacts in QP export-import
Diffstat (limited to 'server/sonar-webserver-api/src')
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/qualityprofile/RuleActivation.java8
1 files changed, 5 insertions, 3 deletions
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<SoftwareQuality, org.sonar.api.issue.impact.Severity> impactSeverities,
- @Nullable Boolean prioritizedRule,
- @Nullable Map<String, String> parameters) {
+ public static RuleActivation create(String ruleUuid, @Nullable String severity, @Nullable Map<SoftwareQuality,
+ org.sonar.api.issue.impact.Severity> impactSeverities, @Nullable Boolean prioritizedRule, @Nullable Map<String, String> parameters) {
+ if (impactSeverities == null) {
+ impactSeverities = Map.of();
+ }
return new RuleActivation(ruleUuid, false, severity, prioritizedRule, parameters, impactSeverities);
}