From 4d74534bed30145921d7c1eed221773a3c9562fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?L=C3=A9o=20Geoffroy?= Date: Wed, 31 Jan 2024 11:46:00 +0100 Subject: [PATCH] SONAR-21455 Fix code smell --- .../org/sonar/server/measure/ImpactMeasureBuilderTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/measure/ImpactMeasureBuilderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/measure/ImpactMeasureBuilderTest.java index edd4f188d4d..f94fb65ecd1 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/measure/ImpactMeasureBuilderTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/measure/ImpactMeasureBuilderTest.java @@ -121,7 +121,8 @@ public class ImpactMeasureBuilderTest { @Test public void add_whenOtherMapHasMissingField_shouldThrowException() { ImpactMeasureBuilder impactMeasureBuilder = ImpactMeasureBuilder.newInstance(); - assertThatThrownBy(() -> impactMeasureBuilder.add(ImpactMeasureBuilder.newInstance())) + ImpactMeasureBuilder otherBuilder = ImpactMeasureBuilder.newInstance(); + assertThatThrownBy(() -> impactMeasureBuilder.add(otherBuilder)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Map must contain a total key"); } -- 2.39.5