]> source.dussan.org Git - sonarqube.git/commitdiff
Code smell fix: remove unused code
authorZipeng WU <zipeng.wu@sonarsource.com>
Fri, 11 Dec 2020 13:55:15 +0000 (14:55 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 11 Dec 2020 20:07:52 +0000 (20:07 +0000)
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java
server/sonar-webserver-core/src/main/java/org/sonar/server/telemetry/TelemetryDataLoaderImpl.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/component/ws/SearchAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/EditCommentAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/ui/ws/MarketplaceAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/EmailValidator.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericCoverageSensor.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java

index d7853d008615486fd2f148ae0bddd866bfe7869e..c2462a80fb49754508a6b443d8698b49acccd560 100644 (file)
@@ -96,7 +96,6 @@ public final class IssueDto implements Serializable {
   private String projectKey;
   private String filePath;
   private String tags;
-  private boolean isFromHotspot;
   // populate only when retrieving closed issue for issue tracking
   private String closedChangeData;
 
index 202835901f84fc0142d3c3c9f7c8213297f40203..4682ebb9fe4961233f782dc8fc5a0e8673f92961 100644 (file)
@@ -38,7 +38,6 @@ import org.sonar.db.measure.SumNclocDbQuery;
 import org.sonar.server.es.SearchOptions;
 import org.sonar.server.measure.index.ProjectMeasuresIndex;
 import org.sonar.server.measure.index.ProjectMeasuresStatistics;
-import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.platform.DockerSupport;
 import org.sonar.server.property.InternalProperties;
 import org.sonar.server.telemetry.TelemetryData.Database;
index 1910c39994747efc1ef681ff8618a2daa2ab7a21..1421ded253f48bff890747149ff07808f3547b23 100644 (file)
@@ -211,7 +211,6 @@ public class SearchAction implements ComponentsWsAction {
     private Integer page;
     private Integer pageSize;
     private String query;
-    private String language;
 
     @CheckForNull
     public String getOrganization() {
index 74c3af754257cad2502627ccdb2414b16ece43c3..e8c85306f6e71340ca653518d2cd035f0a4960d5 100644 (file)
@@ -21,13 +21,11 @@ package org.sonar.server.issue.ws;
 
 import com.google.common.io.Resources;
 import java.util.Objects;
-import java.util.stream.Stream;
 import org.sonar.api.server.ws.Change;
 import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.api.utils.System2;
-import org.sonar.core.util.stream.MoreCollectors;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.issue.IssueChangeDto;
index 91191e57b8c26a44c4f587f28793e9f4dafd7795..7d837888695ee8fdeec5369c7824cb4d6a09e26a 100644 (file)
@@ -26,7 +26,6 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.measure.SumNclocDbQuery;
-import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Navigation;
 
index 4ba7a72779ca47d9ed6dce9bb3bc9bf48dd4ac36..e8d94849dd066c95b4168e5020ee0e2d75f66629 100644 (file)
  */
 package org.sonar.server.user.ws;
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 import javax.annotation.Nullable;
 import javax.mail.internet.AddressException;
 import javax.mail.internet.InternetAddress;
 
-import static java.util.regex.Pattern.compile;
 import static org.apache.commons.lang.StringUtils.isEmpty;
 
 class EmailValidator {
index 3d38d07cda41088b4d2b9f0af6e8a9de0fa4c4a8..e65351cf8e1a9742f55c1cf577fe3f68c361760a 100644 (file)
@@ -60,20 +60,6 @@ public class GenericCoverageSensor implements ProjectSensor {
 
   }
 
-  private void loadArrayDeprecated(Set<String> reportPaths, String propertyKey) {
-    if (config.getOriginalProperties().containsKey(propertyKey)) {
-      LOG.warn("Property '{}' is deprecated. Please use '{}' instead.", propertyKey, REPORT_PATHS_PROPERTY_KEY);
-      reportPaths.addAll(Arrays.asList(config.getStringArray(propertyKey)));
-    }
-  }
-
-  private void loadDeprecated(Set<String> reportPaths, String propertyKey) {
-    if (config.getOriginalProperties().containsKey(propertyKey)) {
-      LOG.warn("Property '{}' is deprecated. Please use '{}' instead.", propertyKey, REPORT_PATHS_PROPERTY_KEY);
-      config.get(propertyKey).ifPresent(reportPaths::add);
-    }
-  }
-
   @Override
   public void describe(SensorDescriptor descriptor) {
     descriptor.name("Generic Coverage Report")
index 27a398eb33ad2cd75a6fdd1342721bdecfe5482a..323f76096bec484143f81a66c6a120d75b75da42 100644 (file)
@@ -67,7 +67,6 @@ public class ReportPublisher implements Startable {
   private static final String DASHBOARD = "dashboard";
   private static final String BRANCH = "branch";
   private static final String ID = "id";
-  private static final String RESOLVED = "resolved";
 
   private final DefaultScannerWsClient wsClient;
   private final AnalysisContextReportPublisher contextPublisher;
index a49a2b62ef0f0eeefd8df24b17bf4e9011dc702a..e6dba2f400fb5803fa554b92ef17ab1427bbb626 100644 (file)
@@ -53,7 +53,6 @@ public class TestExecutionPublisher implements ReportPublisherStep {
 
   @Override
   public void publish(ScannerReportWriter writer) {
-    final ScannerReport.Measure.Builder builder = ScannerReport.Measure.newBuilder();
 
     for (final InputComponent c : componentStore.all()) {
       DefaultInputComponent component = (DefaultInputComponent) c;