aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-pushapi
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2022-02-21 13:46:34 +0100
committersonartech <sonartech@sonarsource.com>2022-02-21 16:42:09 +0000
commit9694d4113bf401b84e86e0223dbea8f5339388d8 (patch)
tree9fa2d5d2b7ac1da973ae1e7ecd55962dfb17b50d /server/sonar-webserver-pushapi
parent63e1e3d20fd0232365f04651fc064760daa22feb (diff)
downloadsonarqube-9694d4113bf401b84e86e0223dbea8f5339388d8.tar.gz
sonarqube-9694d4113bf401b84e86e0223dbea8f5339388d8.zip
SONAR-15919 fix nullable activeRule
Diffstat (limited to 'server/sonar-webserver-pushapi')
-rw-r--r--server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImpl.java b/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImpl.java
index 6ada60df296..809483f1355 100644
--- a/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImpl.java
+++ b/server/sonar-webserver-pushapi/src/main/java/org/sonar/server/pushapi/qualityprofile/QualityProfileChangeEventServiceImpl.java
@@ -136,12 +136,13 @@ public class QualityProfileChangeEventServiceImpl implements QualityProfileChang
Set<RuleChange> deactivatedRules = new HashSet<>();
for (ActiveRuleChange arc : activeRuleChanges) {
- if (arc.getActiveRule() == null) {
+ ActiveRuleDto activeRule = arc.getActiveRule();
+ if (activeRule == null) {
continue;
}
RuleChange ruleChange = new RuleChange();
- ruleChange.setKey(arc.getActiveRule().getRuleKey().rule());
+ ruleChange.setKey(activeRule.getRuleKey().rule());
ruleChange.setSeverity(arc.getSeverity());
ruleChange.setLanguage(language);