]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19850 Fix code smells
authorLéo Geoffroy <leo.geoffroy@sonarsource.com>
Wed, 12 Jul 2023 13:41:26 +0000 (15:41 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 19 Jul 2023 20:03:06 +0000 (20:03 +0000)
server/sonar-webserver-webapi/src/it/java/org/sonar/server/projectdump/ws/StatusActionIT.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/newcodeperiod/NewCodeDefinitionResolver.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/project/ws/BulkDeleteAction.java

index ee7479374f8ecac992553b43f360501548aded1a..f2294c203993341307f8d30e05ed7292d00927e8 100644 (file)
@@ -39,7 +39,6 @@ import org.sonar.db.DbSession;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ResourceTypesRule;
-import org.sonar.db.component.SnapshotTesting;
 import org.sonar.db.project.ProjectDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.exceptions.BadRequestException;
@@ -123,9 +122,11 @@ public class StatusActionIT {
 
   @Test
   public void fails_with_BRE_if_both_params_are_provided() {
+    String projectUuid = project.getUuid();
+    String projectKey = project.getKey();
     assertThatThrownBy(() -> {
       underTest.newRequest()
-        .setParam(ID_PARAM, project.getUuid()).setParam(KEY_PARAM, project.getKey())
+        .setParam(ID_PARAM, projectUuid).setParam(KEY_PARAM, projectKey)
         .execute();
     })
       .isInstanceOf(BadRequestException.class)
index 64085be3fd29b913f4e30f4cccc1f7ab6ba2c29d..a91268891c2ee36bb2fdcbe9cea983d1dbb63fc5 100644 (file)
@@ -31,7 +31,6 @@ import org.sonar.db.DbSession;
 import org.sonar.db.newcodeperiod.NewCodePeriodDto;
 import org.sonar.db.newcodeperiod.NewCodePeriodParser;
 import org.sonar.db.newcodeperiod.NewCodePeriodType;
-import org.sonar.server.component.ComponentCreationData;
 
 import static org.sonar.db.newcodeperiod.NewCodePeriodType.NUMBER_OF_DAYS;
 import static org.sonar.db.newcodeperiod.NewCodePeriodType.PREVIOUS_VERSION;
index 379c1774e81be8a680586ca29e8649f5189a0f37..9f1d77e665801029414d5b6b5a3bb88b39c7acc6 100644 (file)
@@ -20,7 +20,6 @@
 package org.sonar.server.project.ws;
 
 import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableSet;
 import java.util.Date;
 import java.util.HashSet;
 import java.util.List;