aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>2024-11-25 11:51:01 +0100
committersonartech <sonartech@sonarsource.com>2024-11-26 20:02:51 +0000
commit7394e85879c9ccd4eca67e7fccb80ad5523da82b (patch)
tree412d2759ffd03dab89e9357564eea48e2e7b0fe4 /server
parent7137379d9a849403ce1079a90ed1e152cf56f597 (diff)
downloadsonarqube-7394e85879c9ccd4eca67e7fccb80ad5523da82b.tar.gz
sonarqube-7394e85879c9ccd4eca67e7fccb80ad5523da82b.zip
SONAR-23649 Fix SonarQube issues
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
index 13306e2fd4a..233283c58e6 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewModesNotificationsSenderTest.java
@@ -91,8 +91,10 @@ class NewModesNotificationsSenderTest {
verify(notificationManager, times(2)).scheduleForSending(captor.capture());
assertThat(captor.getAllValues())
- .filteredOn(notification -> notification instanceof QualityGateMetricsUpdateNotification)
- .map(notification -> (QualityGateMetricsUpdateNotification) notification)
+ .filteredOn(
+ QualityGateMetricsUpdateNotification.class::isInstance)
+ .map(
+ QualityGateMetricsUpdateNotification.class::cast)
.hasSize(1)
.extracting(QualityGateMetricsUpdateNotification::isMQRModeEnabled).isEqualTo(List.of(false));
}
@@ -109,8 +111,9 @@ class NewModesNotificationsSenderTest {
verify(notificationManager, times(1)).scheduleForSending(captor.capture());
assertThat(captor.getAllValues())
- .filteredOn(notification -> notification instanceof QualityGateMetricsUpdateNotification)
- .map(notification -> (QualityGateMetricsUpdateNotification) notification)
+ .filteredOn(
+ QualityGateMetricsUpdateNotification.class::isInstance)
+ .map(QualityGateMetricsUpdateNotification.class::cast)
.isEmpty();
}
}