aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TrackerRawInputFactory.java2
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java10
-rw-r--r--server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java1
3 files changed, 5 insertions, 8 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TrackerRawInputFactory.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TrackerRawInputFactory.java
index 6a86e5648be..1279d412e6f 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TrackerRawInputFactory.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/TrackerRawInputFactory.java
@@ -392,7 +392,7 @@ public class TrackerRawInputFactory {
} else if (rule.getSeverity() != null) {
return rule.getSeverity();
} else if (!rule.getDefaultImpacts().isEmpty()) {
- org.sonar.api.issue.impact.Severity impactSeverity = ImpactMapper.getBestImpactForBackmapping(rule.getDefaultImpacts()).getValue();
+ Severity impactSeverity = ImpactMapper.getBestImpactForBackmapping(rule.getDefaultImpacts()).getValue();
return ImpactMapper.convertToDeprecatedSeverity(impactSeverity);
} else {
throw new IllegalArgumentException("Cannot determine the severity for issue of rule %s".formatted(reportExternalIssue.getRuleId()));
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java
index 7c615d3bef9..2ec7a312c65 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java
@@ -364,12 +364,10 @@ public class RuleMapper {
ruleResponse.setDescriptionSections(Rules.Rule.DescriptionSections.newBuilder().addAllDescriptionSections(sections).build());
}
- if (shouldReturnField(fieldsToReturn, FIELD_MARKDOWN_DESCRIPTION)) {
- if (MARKDOWN.equals(ruleDto.getDescriptionFormat())) {
- Optional.ofNullable(ruleDto.getDefaultRuleDescriptionSection())
- .map(RuleDescriptionSectionDto::getContent)
- .ifPresent(ruleResponse::setMdDesc);
- }
+ if (shouldReturnField(fieldsToReturn, FIELD_MARKDOWN_DESCRIPTION) && MARKDOWN.equals(ruleDto.getDescriptionFormat())) {
+ Optional.ofNullable(ruleDto.getDefaultRuleDescriptionSection())
+ .map(RuleDescriptionSectionDto::getContent)
+ .ifPresent(ruleResponse::setMdDesc);
}
}
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
index cb6b4828d40..1f4b43c009f 100644
--- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
+++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
@@ -59,7 +59,6 @@ import org.sonar.core.metric.SoftwareQualitiesMetrics;
import org.sonar.core.platform.PlatformEditionProvider;
import org.sonar.core.platform.SpringComponentContainer;
import org.sonar.server.ai.code.assurance.AiCodeAssuranceEntitlement;
-import org.sonar.server.ai.code.assurance.AiCodeAssuranceVerifier;
import org.sonar.server.ai.code.assurance.NoOpAiCodeAssuranceVerifier;
import org.sonar.server.almintegration.ws.AlmIntegrationsWSModule;
import org.sonar.server.almintegration.ws.CredentialsEncoderHelper;