aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2023-01-11 11:31:20 +0100
committersonartech <sonartech@sonarsource.com>2023-01-12 20:02:51 +0000
commit1d191848d5d16e2615e84deb68552a6dec039e37 (patch)
treecbdbecfa02714666dc278845312d354aaf913bd5 /server
parentc6a817468bcd71129f9da2b453a5a91af62df570 (diff)
downloadsonarqube-1d191848d5d16e2615e84deb68552a6dec039e37.tar.gz
sonarqube-1d191848d5d16e2615e84deb68552a6dec039e37.zip
[NO-JIRA] Remove reported code smells about unused imports
Diffstat (limited to 'server')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStep.java1
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java1
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStep.java1
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/queue/NextPendingTaskPicker.java1
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java1
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java9
-rw-r--r--server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java1
-rw-r--r--server/sonar-webserver-es/src/main/java/org/sonar/server/component/index/ComponentIndexResults.java1
-rw-r--r--server/sonar-webserver-es/src/main/java/org/sonar/server/permission/index/PermissionIndexer.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/batch/IssuesAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/AuthorsAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectanalysis/ws/SearchResponseBuilder.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/QualityGateConditionsUpdater.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImpl.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/RuleActivationContext.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/HomepageTypesImpl.java1
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/UpdateIdentityProviderAction.java1
22 files changed, 5 insertions, 25 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStep.java
index fa4fa79b888..978f76983f3 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/PullRequestFileMoveDetectionStep.java
@@ -43,7 +43,6 @@ import org.sonar.db.component.BranchDto;
import org.sonar.db.component.FileMoveRowDto;
import static java.util.function.Function.identity;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static org.sonar.ce.task.projectanalysis.component.ComponentVisitor.Order.POST_ORDER;
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java
index a27b2857d63..9b793370cbd 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoader.java
@@ -47,7 +47,6 @@ import static com.google.common.base.Preconditions.checkState;
import static java.util.Collections.emptyList;
import static java.util.Collections.unmodifiableList;
import static java.util.stream.Collectors.groupingBy;
-import static java.util.stream.Collectors.toList;
import static org.sonar.api.issue.Issue.STATUS_CLOSED;
import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex;
import static org.sonar.server.issue.IssueFieldsSetter.FROM_BRANCH;
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStep.java
index 35b98f14122..15a82c84e53 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/SendIssueNotificationsStep.java
@@ -55,7 +55,6 @@ import org.sonar.server.issue.notification.NewIssuesStatistics;
import org.sonar.server.notification.NotificationService;
import static java.util.Collections.singleton;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static java.util.stream.StreamSupport.stream;
import static org.sonar.core.util.stream.MoreCollectors.toSet;
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/queue/NextPendingTaskPicker.java b/server/sonar-ce/src/main/java/org/sonar/ce/queue/NextPendingTaskPicker.java
index 4bd038ece4f..50e0068ad8b 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/queue/NextPendingTaskPicker.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/queue/NextPendingTaskPicker.java
@@ -38,7 +38,6 @@ import org.sonar.db.ce.CeQueueDto;
import org.sonar.db.ce.CeTaskDtoLight;
import org.sonar.db.ce.PrOrBranchTask;
-import static java.util.stream.Collectors.toList;
import static org.sonar.db.ce.CeTaskCharacteristicDto.BRANCH_KEY;
import static org.sonar.db.ce.CeTaskCharacteristicDto.PULL_REQUEST;
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java
index 22beed6aea9..442edf73596 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/user/UserDao.java
@@ -26,7 +26,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
-import java.util.stream.Collectors;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import org.sonar.api.user.UserQuery;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
index 50a163f4062..f5356ac46fa 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
@@ -35,6 +35,11 @@ import static org.sonar.api.utils.DateUtils.DATETIME_FORMAT;
public class TelemetryDataJsonWriter {
+ @VisibleForTesting
+ static final String SCIM_PROPERTY = "scim";
+
+ private static final String LANGUAGE_PROPERTY = "language";
+
private final List<TelemetryExtension> extensions;
private final System2 system2;
@@ -44,10 +49,6 @@ public class TelemetryDataJsonWriter {
this.system2 = system2;
}
- @VisibleForTesting
- static final String SCIM_PROPERTY = "scim";
- private static final String LANGUAGE_PROPERTY = "language";
-
public void writeTelemetryData(JsonWriter json, TelemetryData statistics) {
json.beginObject();
json.prop("id", statistics.getServerId());
diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
index 060e8f8341f..0fc12ce8ce9 100644
--- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
+++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/ServerUserSession.java
@@ -48,7 +48,6 @@ import org.sonar.db.user.UserDto;
import static java.util.Collections.singleton;
import static java.util.Optional.of;
import static java.util.Optional.ofNullable;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.apache.commons.lang.StringUtils.defaultIfEmpty;
import static org.sonar.api.web.UserRole.PUBLIC_PERMISSIONS;
diff --git a/server/sonar-webserver-es/src/main/java/org/sonar/server/component/index/ComponentIndexResults.java b/server/sonar-webserver-es/src/main/java/org/sonar/server/component/index/ComponentIndexResults.java
index 5e4cbeff5b4..e99096c5c5c 100644
--- a/server/sonar-webserver-es/src/main/java/org/sonar/server/component/index/ComponentIndexResults.java
+++ b/server/sonar-webserver-es/src/main/java/org/sonar/server/component/index/ComponentIndexResults.java
@@ -20,7 +20,6 @@
package org.sonar.server.component.index;
import java.util.List;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.Collections.emptyList;
diff --git a/server/sonar-webserver-es/src/main/java/org/sonar/server/permission/index/PermissionIndexer.java b/server/sonar-webserver-es/src/main/java/org/sonar/server/permission/index/PermissionIndexer.java
index b99603eec91..d2a7fcb2e86 100644
--- a/server/sonar-webserver-es/src/main/java/org/sonar/server/permission/index/PermissionIndexer.java
+++ b/server/sonar-webserver-es/src/main/java/org/sonar/server/permission/index/PermissionIndexer.java
@@ -27,7 +27,6 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.DbClient;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposAction.java
index b5e11fe4655..a12b8e1d57a 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/SearchAzureReposAction.java
@@ -51,7 +51,6 @@ import org.sonarqube.ws.AlmIntegrations.SearchAzureReposWsResponse;
import static java.util.Comparator.comparing;
import static java.util.Objects.requireNonNull;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static java.util.stream.Collectors.toSet;
import static org.apache.commons.lang.StringUtils.containsIgnoreCase;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposAction.java
index e3d3eb98bcb..5abaa0b3ce2 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/SearchBitbucketCloudReposAction.java
@@ -45,7 +45,6 @@ import org.sonarqube.ws.Common.Paging;
import static java.util.Objects.requireNonNull;
import static java.util.Optional.ofNullable;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static java.util.stream.Collectors.toSet;
import static org.sonar.api.server.ws.WebService.Param.PAGE;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposAction.java
index 5d45a796056..af4d19e4a2d 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/SearchBitbucketServerReposAction.java
@@ -48,7 +48,6 @@ import org.sonarqube.ws.AlmIntegrations.BBSRepo;
import org.sonarqube.ws.AlmIntegrations.SearchBitbucketserverReposWsResponse;
import static java.util.Objects.requireNonNull;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static java.util.stream.Collectors.toSet;
import static org.sonar.db.permission.GlobalPermission.PROVISION_PROJECTS;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposAction.java
index fde8246eb6c..37ddade6427 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/gitlab/SearchGitlabReposAction.java
@@ -45,7 +45,6 @@ import org.sonarqube.ws.AlmIntegrations.GitlabRepository;
import org.sonarqube.ws.Common.Paging;
import static java.util.Objects.requireNonNull;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.sonar.db.permission.GlobalPermission.PROVISION_PROJECTS;
import static org.sonar.server.ws.WsUtils.writeProtobuf;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/batch/IssuesAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/batch/IssuesAction.java
index ddd5a0965ee..8ce5be9b88f 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/batch/IssuesAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/batch/IssuesAction.java
@@ -45,7 +45,6 @@ import org.sonarqube.ws.MediaTypes;
import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.String.format;
import static java.util.Optional.ofNullable;
-import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
import static org.sonar.api.web.UserRole.USER;
import static org.sonar.server.ws.KeyExamples.KEY_BRANCH_EXAMPLE_001;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/AuthorsAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/AuthorsAction.java
index 9b2a3795988..038de20e503 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/AuthorsAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/AuthorsAction.java
@@ -24,7 +24,6 @@ import com.google.common.io.Resources;
import java.util.EnumSet;
import java.util.List;
import java.util.Optional;
-import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectanalysis/ws/SearchResponseBuilder.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectanalysis/ws/SearchResponseBuilder.java
index 66c5c97bc1a..18da3c06e46 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectanalysis/ws/SearchResponseBuilder.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectanalysis/ws/SearchResponseBuilder.java
@@ -41,7 +41,6 @@ import org.sonarqube.ws.ProjectAnalyses.SearchResponse;
import static java.lang.String.format;
import static java.util.Optional.ofNullable;
-import static java.util.stream.Collectors.toList;
import static org.sonar.api.utils.DateUtils.formatDateTime;
import static org.sonar.core.util.stream.MoreCollectors.index;
import static org.sonar.server.projectanalysis.ws.EventCategory.fromLabel;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java
index 719d225f969..1c237b6de3d 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java
@@ -20,7 +20,6 @@
package org.sonar.server.projectlink.ws;
import java.util.List;
-import java.util.stream.Collectors;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/QualityGateConditionsUpdater.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/QualityGateConditionsUpdater.java
index 0b6ee2b475e..a7d9affadcc 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/QualityGateConditionsUpdater.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/QualityGateConditionsUpdater.java
@@ -26,7 +26,6 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
-import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.sonar.api.measures.Metric.ValueType;
import org.sonar.core.util.Uuids;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImpl.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImpl.java
index d6db7bf4ec5..ba3568f04f3 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImpl.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/BuiltInQProfileInsertImpl.java
@@ -28,7 +28,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
-import java.util.stream.Collectors;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.rule.RuleKey;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/RuleActivationContext.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/RuleActivationContext.java
index 6ca883a3217..6776d52841b 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/RuleActivationContext.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/builtin/RuleActivationContext.java
@@ -25,7 +25,6 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
-import java.util.stream.Collectors;
import javax.annotation.CheckForNull;
import org.sonar.api.rule.RuleKey;
import org.sonar.db.qualityprofile.ActiveRuleDto;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/HomepageTypesImpl.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/HomepageTypesImpl.java
index cd0558ef0dd..6320559d2d6 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/HomepageTypesImpl.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/HomepageTypesImpl.java
@@ -20,7 +20,6 @@
package org.sonar.server.user.ws;
import java.util.List;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.google.common.base.Preconditions.checkState;
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/UpdateIdentityProviderAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/UpdateIdentityProviderAction.java
index b9034d38722..09e36ae8796 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/UpdateIdentityProviderAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/UpdateIdentityProviderAction.java
@@ -20,7 +20,6 @@
package org.sonar.server.user.ws;
import java.util.List;
-import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.sonar.api.server.authentication.IdentityProvider;
import org.sonar.api.server.ws.Change;