diff options
author | Alain Kermis <alain.kermis@sonarsource.com> | 2023-09-27 16:41:05 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-10-04 20:03:19 +0000 |
commit | a3e3f905dc3231d48beb5b9abb5ae27120ef7b61 (patch) | |
tree | d255c47ad2b67612559e3db076edd57628f60468 /sonar-plugin-api-impl | |
parent | 87082d7efc8662a0ced560ffe9cc5fe464069327 (diff) | |
download | sonarqube-a3e3f905dc3231d48beb5b9abb5ae27120ef7b61.tar.gz sonarqube-a3e3f905dc3231d48beb5b9abb5ae27120ef7b61.zip |
SONAR-20552 Introduce new generic issue import format in scanner
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r-- | sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java index 389a81361f1..a71e1eab76d 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java @@ -109,13 +109,13 @@ public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewA @Override public Map<SoftwareQuality, org.sonar.api.issue.impact.Severity> defaultImpacts() { - return impacts; + return impacts.isEmpty() ? Map.of(SoftwareQuality.MAINTAINABILITY, org.sonar.api.issue.impact.Severity.MEDIUM) : impacts; } @CheckForNull @Override public CleanCodeAttribute cleanCodeAttribute() { - return cleanCodeAttribute; + return cleanCodeAttribute == null ? CleanCodeAttribute.defaultCleanCodeAttribute() : cleanCodeAttribute; } @Override |