]> source.dussan.org Git - sonarqube.git/commitdiff
[NO JIRA] Remove debug logs
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Fri, 11 Nov 2022 09:37:10 +0000 (10:37 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 11 Nov 2022 20:02:50 +0000 (20:02 +0000)
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/FileStatusesImpl.java

index 21471cbf0d1c0a6bede360581e0a4be778746f03..045b7ffa14e48e02463fc74f24dd17a25be90bea 100644 (file)
@@ -22,8 +22,6 @@ package org.sonar.ce.task.projectanalysis.component;
 import java.util.HashSet;
 import java.util.Optional;
 import java.util.Set;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
 import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder;
 import org.sonar.ce.task.projectanalysis.source.SourceHashRepository;
 import org.sonar.db.source.FileHashesDto;
@@ -32,14 +30,11 @@ import static com.google.common.base.Preconditions.checkState;
 import static org.sonar.ce.task.projectanalysis.component.ComponentVisitor.Order.PRE_ORDER;
 
 public class FileStatusesImpl implements FileStatuses {
-  private static final Logger LOG = Loggers.get(FileStatusesImpl.class);
-
   private final PreviousSourceHashRepository previousSourceHashRepository;
   private final SourceHashRepository sourceHashRepository;
   private final AnalysisMetadataHolder analysisMetadataHolder;
   private final TreeRootHolder treeRootHolder;
   private Set<String> fileUuidsMarkedAsUnchanged;
-  private int notMarkedAsUnchanged = 0;
 
   public FileStatusesImpl(AnalysisMetadataHolder analysisMetadataHolder, TreeRootHolder treeRootHolder, PreviousSourceHashRepository previousSourceHashRepository,
     SourceHashRepository sourceHashRepository) {
@@ -54,8 +49,6 @@ public class FileStatusesImpl implements FileStatuses {
     if (!analysisMetadataHolder.isPullRequest() && !analysisMetadataHolder.isFirstAnalysis()) {
       new DepthTraversalTypeAwareCrawler(new Visitor()).visit(treeRootHolder.getRoot());
     }
-    LOG.warn("FILES MARKED AS UNCHANGED: " + fileUuidsMarkedAsUnchanged.size());
-    LOG.warn("FILES NOT MARKED AS UNCHANGED: " + notMarkedAsUnchanged);
   }
 
   private class Visitor extends TypeAwareVisitorAdapter {
@@ -75,11 +68,8 @@ public class FileStatusesImpl implements FileStatuses {
       if (canTrustUnchangedFlags) {
         if (file.getFileAttributes().isMarkedAsUnchanged()) {
           fileUuidsMarkedAsUnchanged.add(file.getUuid());
-        } else {
-          notMarkedAsUnchanged++;
         }
       } else {
-        LOG.error("FILE HAS DIFFERENT HASH: " + file.getName());
         fileUuidsMarkedAsUnchanged.clear();
       }
     }