diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-11-06 13:34:22 -0600 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-12-09 20:46:15 +0100 |
commit | 63c9fb57a0f00f06c782cec8d2ffdf8d9e8b2f1b (patch) | |
tree | 05ab4e935651a5a1a52cdd4f0b43510794c58cd0 /server/sonar-ce-task-projectanalysis | |
parent | 0a6525b3f63132a719e96a16233aef04fcf535cd (diff) | |
download | sonarqube-63c9fb57a0f00f06c782cec8d2ffdf8d9e8b2f1b.tar.gz sonarqube-63c9fb57a0f00f06c782cec8d2ffdf8d9e8b2f1b.zip |
SONAR-12626 remove references to SLB
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
65 files changed, 26 insertions, 92 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/Branch.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/Branch.java index 66b2e175f31..052e479d89e 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/Branch.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/Branch.java @@ -54,11 +54,11 @@ public interface Branch extends ComponentKeyGenerator { String getPullRequestKey(); /** - * The target/base branch name of a SLB or PR. + * The target/base branch name of a PR. * Correspond to <pre>sonar.pullrequest.base</pre> or <pre>sonar.branch.target</pre> * It's not guaranteed to exist. * - * @throws IllegalStateException if this branch configuration is not a pull request or SLB. + * @throws IllegalStateException if this branch configuration is not a pull request. */ String getTargetBranchName(); } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/Component.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/Component.java index a3c171f39b2..352e07efa32 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/Component.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/Component.java @@ -59,8 +59,8 @@ public interface Component { } /** - * On a long-living branch, CHANGED and ADDED are relative to the previous analysis. - * On a short-living branch and pull request, these are relative to the base branch. + * On a branch, CHANGED and ADDED are relative to the previous analysis. + * On a pull request, these are relative to the base branch. */ enum Status { UNAVAILABLE, SAME, CHANGED, ADDED diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryImpl.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryImpl.java index 6a798621077..8677927e59c 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryImpl.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryImpl.java @@ -24,8 +24,6 @@ import com.google.common.base.Suppliers; import org.sonar.api.config.Configuration; import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder; import org.sonar.ce.task.projectanalysis.analysis.ProjectConfigurationFactory; -import org.sonar.ce.task.projectanalysis.analysis.ProjectConfigurationFactory; -import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder; /** * Repository of component settings implementation based on a memory cache. diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/DefaultBranchImpl.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/DefaultBranchImpl.java index a42889a088b..938740db97b 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/DefaultBranchImpl.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/DefaultBranchImpl.java @@ -71,7 +71,7 @@ public class DefaultBranchImpl implements Branch { @Override public String getTargetBranchName() { - throw new IllegalStateException("Only on a short lived branch or pull request"); + throw new IllegalStateException("Only on a pull request"); } @Override diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/TreeRootHolder.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/TreeRootHolder.java index 14763baa2d0..49bb568f131 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/TreeRootHolder.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/component/TreeRootHolder.java @@ -34,7 +34,7 @@ public interface TreeRootHolder { * The root of the tree, for example the project or the portfolio. * With branches, it will refer to the root component of the branch. * - * On a short living branch or pull request, it contains ONLY: + * On a pull request, it contains ONLY: * 1. The PROJECT component (tree root) * 2. The FILE components whose status is not SAME * 3. Intermediary MODULE and DIRECTORY components that lead to FILE leafs that are not SAME @@ -47,7 +47,7 @@ public interface TreeRootHolder { * The root of the components that were in the scanner report. * This tree may include components that are not persisted, * just kept in memory for computation purposes, such as overall coverage - * in short living branches or pull requests. + * in pull requests. * * @throws IllegalStateException if the holder is empty (ie. there is no root yet) */ diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java index 08200f35b0e..fc2a51f9c62 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasures.java @@ -111,7 +111,7 @@ public class DuplicationMeasures { } protected void initializeForFile(Component file) { - // don't use measure since it won't be available for some files in the report tree in SLB + // don't use measure since it won't be available for some files in the report tree in PRs this.lineCount = file.getFileAttributes().getLines(); Iterable<Duplication> duplications = requireNonNull(this.duplicationRepository, "DuplicationRepository missing") .getDuplications(file); diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationRepository.java index 77a1f877373..4c028f3e114 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationRepository.java @@ -20,7 +20,6 @@ package org.sonar.ce.task.projectanalysis.duplication; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; /** * Repository of code duplications in files of the project. diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/InProjectDuplicate.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/InProjectDuplicate.java index 57b16238774..18211dc777c 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/InProjectDuplicate.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/duplication/InProjectDuplicate.java @@ -23,7 +23,6 @@ import java.util.Objects; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepository.java index 352c44fdc7d..37c886e81c5 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepository.java @@ -20,9 +20,6 @@ package org.sonar.ce.task.projectanalysis.event; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; - -import static org.sonar.ce.task.projectanalysis.component.Component.Type; public interface EventRepository { /** diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepositoryImpl.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepositoryImpl.java index a3a403c7cdf..a4c595f9038 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepositoryImpl.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/event/EventRepositoryImpl.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.event; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Objects.requireNonNull; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MovedFilesRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MovedFilesRepository.java index b45958e3a0c..1894de4cc3a 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MovedFilesRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MovedFilesRepository.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.filemove; import com.google.common.base.Optional; import javax.annotation.Nullable; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; import static java.util.Objects.requireNonNull; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MutableMovedFilesRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MutableMovedFilesRepository.java index bdb7391b5a9..b70faed8385 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MutableMovedFilesRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filemove/MutableMovedFilesRepository.java @@ -20,9 +20,6 @@ package org.sonar.ce.task.projectanalysis.filemove; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; - -import static org.sonar.ce.task.projectanalysis.component.Component.Type; public interface MutableMovedFilesRepository extends MovedFilesRepository { /** diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/Counter.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/Counter.java index aad6d74dded..a81b35b2dcb 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/Counter.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/Counter.java @@ -21,8 +21,6 @@ package org.sonar.ce.task.projectanalysis.formula; import org.sonar.ce.task.projectanalysis.component.Component; -import static org.sonar.ce.task.projectanalysis.component.Component.Type; - /** * A counter is used to aggregate some data */ diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsCounter.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsCounter.java index c73e40aebb0..9b18ebfa80a 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsCounter.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsCounter.java @@ -20,7 +20,6 @@ package org.sonar.ce.task.projectanalysis.formula.coverage; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.ce.task.projectanalysis.formula.Counter; import org.sonar.ce.task.projectanalysis.formula.CounterInitializationContext; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsVariationCounter.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsVariationCounter.java index 2b6dedd4369..083b006fe37 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsVariationCounter.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/formula/coverage/ElementsAndCoveredElementsVariationCounter.java @@ -23,10 +23,6 @@ import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.ce.task.projectanalysis.formula.Counter; import org.sonar.ce.task.projectanalysis.formula.CounterInitializationContext; import org.sonar.ce.task.projectanalysis.formula.counter.LongValue; -import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.formula.Counter; -import org.sonar.ce.task.projectanalysis.formula.CounterInitializationContext; -import org.sonar.ce.task.projectanalysis.formula.counter.LongValue; /** * A counter used to create measure variations which are based on a count of elements and coveredElements. diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesRepository.java index 802b5efbf0a..e46ddc3a7fd 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesRepository.java @@ -23,7 +23,6 @@ import java.util.List; import org.sonar.api.ce.measure.MeasureComputer; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; /** * This repository contains issues for only one component at a time. It's populated by {@link IntegrateIssuesVisitor} and diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssignee.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssignee.java index 2cf38810965..ffccb31d94f 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssignee.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssignee.java @@ -22,12 +22,11 @@ package org.sonar.ce.task.projectanalysis.issue; import javax.annotation.CheckForNull; 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.component.ConfigurationRepository; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.user.UserDto; -import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder; -import org.sonar.ce.task.projectanalysis.component.ConfigurationRepository; import static com.google.common.base.Strings.isNullOrEmpty; import static org.sonar.api.CoreProperties.DEFAULT_ISSUE_ASSIGNEE; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultTrackingInput.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultTrackingInput.java index ec5d0019b5d..9d15dd4b2c0 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultTrackingInput.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/DefaultTrackingInput.java @@ -20,7 +20,6 @@ package org.sonar.ce.task.projectanalysis.issue; import java.util.Collection; - import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.tracking.BlockHashSequence; import org.sonar.core.issue.tracking.Input; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueVisitors.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueVisitors.java index 111971fea9a..f547dc3833c 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueVisitors.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssueVisitors.java @@ -21,7 +21,6 @@ package org.sonar.ce.task.projectanalysis.issue; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; public class IssueVisitors { diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssuesRepositoryVisitor.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssuesRepositoryVisitor.java index 5f544b72235..0c3d0cce165 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssuesRepositoryVisitor.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/IssuesRepositoryVisitor.java @@ -21,7 +21,6 @@ package org.sonar.ce.task.projectanalysis.issue; import java.util.ArrayList; import java.util.List; - import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/MutableComponentIssuesRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/MutableComponentIssuesRepository.java index 1fdcce6c956..1507535d168 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/MutableComponentIssuesRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/MutableComponentIssuesRepository.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.issue; import java.util.List; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; public interface MutableComponentIssuesRepository extends ComponentIssuesRepository { diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/PullRequestTrackerExecution.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/PullRequestTrackerExecution.java index e7ea5eeab70..1ca6d1b7cf2 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/PullRequestTrackerExecution.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/PullRequestTrackerExecution.java @@ -53,7 +53,7 @@ public class PullRequestTrackerExecution { Input<DefaultIssue> rawInput = rawInputFactory.create(component); Input<DefaultIssue> previousAnalysisInput = baseInputFactory.create(component); - // Step 1: track issues with merge branch (= long living) + // Step 1: track issues with merge branch Input<DefaultIssue> unmatchedRawsAfterMergeBranchTracking; if (mergeInputFactory.hasMergeBranchAnalysis()) { Input<DefaultIssue> mergeInput = mergeInputFactory.createForMergeBranch(component); @@ -84,7 +84,7 @@ public class PullRequestTrackerExecution { unmatchedRawsAfterChangedLineFiltering = unmatchedRawsAfterTargetBranchTracking; } - // Step 4: track issues of previous analysis of the current branch/PR + // Step 4: track issues of previous analysis of the current PR return tracker.trackNonClosed(unmatchedRawsAfterChangedLineFiltering, previousAnalysisInput); } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RemoveProcessedComponentsVisitor.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RemoveProcessedComponentsVisitor.java index 63ae6cd23e6..9932989aed8 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RemoveProcessedComponentsVisitor.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RemoveProcessedComponentsVisitor.java @@ -19,12 +19,10 @@ */ package org.sonar.ce.task.projectanalysis.issue; -import org.sonar.ce.task.projectanalysis.component.Component; +import com.google.common.base.Optional; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.ce.task.projectanalysis.filemove.MovedFilesRepository; -import com.google.common.base.Optional; - public class RemoveProcessedComponentsVisitor extends IssueVisitor { private final ComponentsWithUnprocessedIssues componentsWithUnprocessedIssues; private final MovedFilesRepository movedFilesRepository; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RuleTagsCopier.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RuleTagsCopier.java index b8a8a47e1be..dc8008c7908 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RuleTagsCopier.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/RuleTagsCopier.java @@ -21,7 +21,6 @@ package org.sonar.ce.task.projectanalysis.issue; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; import static com.google.common.collect.Sets.union; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssuesLoader.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssuesLoader.java index 11ce82356e4..890a343f935 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssuesLoader.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssuesLoader.java @@ -32,7 +32,7 @@ import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.component.ComponentDto; import org.sonar.db.issue.IssueDto; -import org.sonar.db.issue.ShortBranchIssueDto; +import org.sonar.db.issue.PrIssueDto; import static org.sonar.api.utils.DateUtils.longToDate; import static org.sonar.core.util.stream.MoreCollectors.toList; @@ -66,7 +66,7 @@ public class SiblingsIssuesLoader { } } - private static SiblingIssue toSiblingIssue(ShortBranchIssueDto dto) { + private static SiblingIssue toSiblingIssue(PrIssueDto dto) { return new SiblingIssue(dto.getKey(), dto.getLine(), dto.getMessage(), dto.getChecksum(), dto.getRuleKey(), dto.getStatus(), dto.getBranchKey(), dto.getKeyType(), longToDate(dto.getIssueUpdateDate())); } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngine.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngine.java index 10826dcef1c..89938c01693 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngine.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngine.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.issue.commonrule; import java.util.Collection; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; /** * Generate the issues related to "common rules", which are diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngineImpl.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngineImpl.java index 2f69ed772a9..b9168e6336c 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngineImpl.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/issue/commonrule/CommonRuleEngineImpl.java @@ -24,7 +24,6 @@ import java.util.Collection; import javax.annotation.CheckForNull; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.core.issue.DefaultIssue; -import org.sonar.ce.task.projectanalysis.component.Component; public class CommonRuleEngineImpl implements CommonRuleEngine { diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolder.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolder.java index 42e572bdc5b..b054a097318 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolder.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolder.java @@ -20,7 +20,6 @@ package org.sonar.ce.task.projectanalysis.measure; import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; -import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; public interface MeasureComputersHolder { diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolderImpl.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolderImpl.java index f58db2cb374..2119534d5b6 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolderImpl.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MeasureComputersHolderImpl.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.measure; import com.google.common.base.Predicates; import javax.annotation.CheckForNull; import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; -import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.FluentIterable.from; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MutableMeasureComputersHolder.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MutableMeasureComputersHolder.java index ccddc87b6df..0d7483bc11e 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MutableMeasureComputersHolder.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/MutableMeasureComputersHolder.java @@ -20,7 +20,6 @@ package org.sonar.ce.task.projectanalysis.measure; import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; -import org.sonar.ce.task.projectanalysis.api.measurecomputer.MeasureComputerWrapper; /** * A {@link MeasureComputersHolder} which value can be set only once. diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/qualitygatedetails/EvaluatedCondition.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/qualitygatedetails/EvaluatedCondition.java index f802af4fd54..db9febd9020 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/qualitygatedetails/EvaluatedCondition.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/qualitygatedetails/EvaluatedCondition.java @@ -23,8 +23,6 @@ import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; import org.sonar.ce.task.projectanalysis.measure.Measure; import org.sonar.ce.task.projectanalysis.qualitygate.Condition; -import org.sonar.ce.task.projectanalysis.measure.Measure; -import org.sonar.ce.task.projectanalysis.qualitygate.Condition; import static java.util.Objects.requireNonNull; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/qualitymodel/SecurityReviewRatingVisitor.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/qualitymodel/SecurityReviewRatingVisitor.java index 866b8ac4a01..3603883a80d 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/qualitymodel/SecurityReviewRatingVisitor.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/qualitymodel/SecurityReviewRatingVisitor.java @@ -37,7 +37,6 @@ import static org.sonar.api.measures.CoreMetrics.SECURITY_HOTSPOTS_KEY; import static org.sonar.api.measures.CoreMetrics.SECURITY_REVIEW_RATING_KEY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT; import static org.sonar.ce.task.projectanalysis.component.Component.Type.SUBVIEW; -import static org.sonar.ce.task.projectanalysis.measure.Measure.newMeasureBuilder; public class SecurityReviewRatingVisitor extends TypeAwareVisitorAdapter { diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoader.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoader.java index 07dc89a4c56..8f1be4b8775 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoader.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/scm/ScmInfoDbLoader.java @@ -64,7 +64,7 @@ public class ScmInfoDbLoader { return Optional.of(file.getUuid()); } - // at this point, it's the first analysis of a LLB with copyFromPrevious flag true or any analysis of a PR/SLB + // at this point, it's the first analysis of a branch with copyFromPrevious flag true or any analysis of a PR Branch branch = analysisMetadataHolder.getBranch(); if (!branch.isMain()) { String uuid = mergeBranchComponentUuid.getTargetBranchComponentUuid(file.getDbKey()); diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersion.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersion.java index f139d37e3d6..98a8fb0083c 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersion.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/DbLineHashVersion.java @@ -25,7 +25,6 @@ import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.source.LineHashVersion; -import org.sonar.ce.task.projectanalysis.component.Component; public class DbLineHashVersion { private final Map<Component, LineHashVersion> lineHashVersionPerComponent = new HashMap<>(); diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/NewLinesRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/NewLinesRepository.java index 313fbe3a41a..41cd5eea101 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/NewLinesRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/NewLinesRepository.java @@ -61,7 +61,7 @@ public class NewLinesRepository { } /** - * If the changed lines are not in the report or if we are not analyzing a short lived branch (or P/R) we fall back to this method. + * If the changed lines are not in the report or if we are not analyzing a P/R we fall back to this method. * If there is a period and SCM information, we compare the change dates of each line with the start of the period to figure out * if a line is new or not. */ diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCache.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCache.java index 02d021b2dd6..8fc48620ad1 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCache.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCache.java @@ -30,7 +30,6 @@ import java.util.Set; import java.util.function.Function; import org.sonar.api.utils.TempFolder; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; public class SourceLinesHashCache { private static final String FILE_NAME_PREFIX = "hashes-"; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepository.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepository.java index 290c7cebebf..717b6912564 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepository.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepository.java @@ -21,8 +21,6 @@ package org.sonar.ce.task.projectanalysis.source; import java.util.List; import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.component.Component; -import org.sonar.ce.task.projectanalysis.source.SourceLinesHashRepositoryImpl.LineHashesComputer; /** * Generates line hashes from source code included in the report. diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/linereader/SymbolsLineReader.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/linereader/SymbolsLineReader.java index 5f71ea42462..495f995e3a6 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/linereader/SymbolsLineReader.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/source/linereader/SymbolsLineReader.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.source.linereader; import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; import com.google.common.collect.SetMultimap; -import java.util.ArrayList; import java.util.Comparator; import java.util.IdentityHashMap; import java.util.Iterator; diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStep.java index cf84c305e97..6ebaba9c874 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStep.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStep.java @@ -55,13 +55,13 @@ public class LoadQualityGateStep implements ComputationStep { } if (analysisMetadataHolder.isPullRequest()) { - qualityGate = filterQGForSLB(qualityGate); + qualityGate = filterQGForPR(qualityGate); } qualityGateHolder.setQualityGate(qualityGate.orElseThrow(() -> new IllegalStateException("Quality gate not present"))); } - private static Optional<QualityGate> filterQGForSLB(Optional<QualityGate> qualityGate) { + private static Optional<QualityGate> filterQGForPR(Optional<QualityGate> qualityGate) { return qualityGate.map(qg -> new QualityGate(qg.getId(), qg.getName(), qg.getConditions().stream().filter(Condition::useVariation).collect(Collectors.toList()))); } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStep.java index 7c2a7430009..261282f0f73 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStep.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadQualityProfilesStep.java @@ -35,8 +35,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.core.util.CloseableIterator; import org.sonar.scanner.protocol.output.ScannerReport; -import static com.google.common.base.Strings.emptyToNull; - public class LoadQualityProfilesStep implements ComputationStep { private final BatchReportReader batchReportReader; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ComponentImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ComponentImplTest.java index d0f4c51e5b0..e1cfa4394f4 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ComponentImplTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ComponentImplTest.java @@ -21,7 +21,6 @@ package org.sonar.ce.task.projectanalysis.component; import java.util.Arrays; import java.util.Collections; -import org.apache.commons.lang.RandomStringUtils; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasuresTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasuresTest.java index 6c11486f4e6..cf5b57ac712 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasuresTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/DuplicationMeasuresTest.java @@ -43,7 +43,6 @@ import static org.sonar.ce.task.projectanalysis.component.Component.Type.DIRECTO import static org.sonar.ce.task.projectanalysis.component.Component.Type.FILE; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT; import static org.sonar.ce.task.projectanalysis.component.ReportComponent.builder; -import static org.sonar.ce.task.projectanalysis.measure.Measure.newMeasureBuilder; public class DuplicationMeasuresTest { private static final int ROOT_REF = 1; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/ViewsDuplicationMeasuresTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/ViewsDuplicationMeasuresTest.java index 8ee2a332b23..8ab57d517d2 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/ViewsDuplicationMeasuresTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/ViewsDuplicationMeasuresTest.java @@ -26,7 +26,6 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepositoryRule; import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_KEY; import static org.sonar.api.measures.CoreMetrics.DUPLICATED_BLOCKS; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/AverageFormulaExecutionTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/AverageFormulaExecutionTest.java index 1e3936ededa..c5b14a98b1b 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/AverageFormulaExecutionTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/AverageFormulaExecutionTest.java @@ -33,7 +33,6 @@ import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; import org.sonar.ce.task.projectanalysis.period.PeriodHolderRule; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.COMPLEXITY_IN_FUNCTIONS_KEY; import static org.sonar.api.measures.CoreMetrics.FUNCTIONS_KEY; import static org.sonar.api.measures.CoreMetrics.FUNCTION_COMPLEXITY_KEY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/DistributionFormulaExecutionTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/DistributionFormulaExecutionTest.java index ee45417ead2..c944f37b9af 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/DistributionFormulaExecutionTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/DistributionFormulaExecutionTest.java @@ -32,7 +32,6 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepositoryRule; import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION_KEY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.DIRECTORY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/SumFormulaExecutionTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/SumFormulaExecutionTest.java index dade125e419..cdaec5e99d6 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/SumFormulaExecutionTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/SumFormulaExecutionTest.java @@ -32,7 +32,6 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepositoryRule; import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.LINES_KEY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.DIRECTORY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/ViewsFormulaExecutorComponentVisitorTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/ViewsFormulaExecutorComponentVisitorTest.java index 5fa55686568..544ed5972e7 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/ViewsFormulaExecutorComponentVisitorTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/formula/ViewsFormulaExecutorComponentVisitorTest.java @@ -34,7 +34,6 @@ import org.sonar.ce.task.projectanalysis.metric.Metric; import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.LINES_KEY; import static org.sonar.api.measures.CoreMetrics.NCLOC_KEY; import static org.sonar.api.measures.CoreMetrics.NEW_COVERAGE_KEY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/FillComponentIssuesVisitorRule.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/FillComponentIssuesVisitorRule.java index 529ca5f54ef..e9314f3eb2d 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/FillComponentIssuesVisitorRule.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/FillComponentIssuesVisitorRule.java @@ -31,7 +31,6 @@ import org.sonar.ce.task.projectanalysis.component.TypeAwareVisitorAdapter; import org.sonar.core.issue.DefaultIssue; import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import static java.util.Arrays.asList; import static org.sonar.ce.task.projectanalysis.component.ComponentVisitor.Order.POST_ORDER; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IssueCounterTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IssueCounterTest.java index 6711ce436dc..993a8916f89 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IssueCounterTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IssueCounterTest.java @@ -24,7 +24,6 @@ import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import java.util.stream.Stream; import javax.annotation.Nullable; import org.assertj.core.data.MapEntry; import org.junit.Rule; @@ -35,7 +34,6 @@ import org.sonar.ce.task.projectanalysis.analysis.Branch; import org.sonar.ce.task.projectanalysis.batch.BatchReportReaderRule; import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.ce.task.projectanalysis.component.TreeRootHolderRule; -import org.sonar.ce.task.projectanalysis.measure.Measure; import org.sonar.ce.task.projectanalysis.measure.MeasureRepoEntry; import org.sonar.ce.task.projectanalysis.measure.MeasureRepositoryRule; import org.sonar.ce.task.projectanalysis.metric.MetricRepositoryRule; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/NewEffortAggregatorTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/NewEffortAggregatorTest.java index a3d020e2387..aa80737f60b 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/NewEffortAggregatorTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/NewEffortAggregatorTest.java @@ -38,7 +38,6 @@ import org.sonar.db.component.BranchType; import org.sonar.db.newcodeperiod.NewCodePeriodType; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.api.issue.Issue.RESOLUTION_FIXED; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MeasureLevelTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MeasureLevelTest.java index 2be49cd29ab..8d6fc42d266 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MeasureLevelTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/measure/MeasureLevelTest.java @@ -22,7 +22,6 @@ package org.sonar.ce.task.projectanalysis.measure; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; public class MeasureLevelTest { @Test diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitygate/ConditionEvaluatorTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitygate/ConditionEvaluatorTest.java index 476ed506cb0..ce108f85cc8 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitygate/ConditionEvaluatorTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitygate/ConditionEvaluatorTest.java @@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableSet; import com.tngtech.java.junit.dataprovider.DataProvider; import com.tngtech.java.junit.dataprovider.DataProviderRunner; import com.tngtech.java.junit.dataprovider.UseDataProvider; -import java.util.EnumSet; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -37,9 +36,9 @@ import static com.google.common.base.Predicates.not; import static com.google.common.collect.FluentIterable.from; import static java.util.Arrays.asList; import static org.junit.Assert.fail; -import static org.sonar.ce.task.projectanalysis.measure.Measure.newMeasureBuilder; import static org.sonar.ce.task.projectanalysis.measure.Measure.Level.ERROR; import static org.sonar.ce.task.projectanalysis.measure.Measure.Level.OK; +import static org.sonar.ce.task.projectanalysis.measure.Measure.newMeasureBuilder; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.BOOL; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.DATA; @@ -47,7 +46,6 @@ import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.DISTRIB import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.FLOAT; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.INT; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.LEVEL; -import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.MILLISEC; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.PERCENT; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.RATING; import static org.sonar.ce.task.projectanalysis.metric.Metric.MetricType.STRING; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesDiffImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesDiffImplTest.java index 2a658c46292..784ce2f2352 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesDiffImplTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesDiffImplTest.java @@ -70,7 +70,7 @@ public class SourceLinesDiffImplTest { } @Test - public void should_find_diff_with_target_branch_for_slbs() { + public void should_find_diff_with_target_branch_for_prs() { Component component = fileComponent(FILE_REF); Component componentInTarget = fileComponent(2); @@ -84,7 +84,7 @@ public class SourceLinesDiffImplTest { } @Test - public void should_find_diff_with_merge_branch_for_slbs_if_not_found_in_target() { + public void should_find_diff_with_merge_branch_for_prs_if_not_found_in_target() { Component component = fileComponent(FILE_REF); Component componentInTarget = fileComponent(2); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepTest.java index f3be841d2a6..d1a0d9fbeef 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/BuildComponentTreeStepTest.java @@ -40,7 +40,6 @@ import org.sonar.ce.task.projectanalysis.component.ReportModulesPath; import org.sonar.ce.task.step.TestComputationStepContext; import org.sonar.db.DbClient; import org.sonar.db.DbTester; -import org.sonar.db.component.BranchType; import org.sonar.db.component.ComponentDto; import org.sonar.db.component.SnapshotDto; import org.sonar.db.organization.OrganizationDto; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/CustomMeasuresCopyStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/CustomMeasuresCopyStepTest.java index 43d78064a22..28c9c05f5d7 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/CustomMeasuresCopyStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/CustomMeasuresCopyStepTest.java @@ -39,7 +39,6 @@ import org.sonar.db.measure.custom.CustomMeasureDto; import org.sonar.db.measure.custom.CustomMeasureTesting; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.ce.task.projectanalysis.component.Component.Type.DIRECTORY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.FILE; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadDuplicationsFromReportStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadDuplicationsFromReportStepTest.java index c004b473226..b25355e2fa5 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadDuplicationsFromReportStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadDuplicationsFromReportStepTest.java @@ -61,7 +61,7 @@ public class LoadDuplicationsFromReportStepTest { builder(PROJECT, ROOT_REF) .addChildren( builder(FILE, FILE_1_REF).build(), - // status has no effect except if it's a SLB or PR + // status has no effect except if it's a PR builder(FILE, FILE_2_REF).setStatus(Component.Status.SAME).build()) .build()); @Rule diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java index 51b359c800e..42a454aecc9 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java @@ -355,7 +355,7 @@ public class LoadPeriodsStepTest extends BaseStepTest { @Test @UseDataProvider("anyValidLeakPeriodSettingValue") - public void leak_period_setting_is_ignored_for_SLB_or_PR(NewCodePeriodType type, @Nullable String value) { + public void leak_period_setting_is_ignored_for_PR(NewCodePeriodType type, @Nullable String value) { when(analysisMetadataHolder.isLongLivingBranch()).thenReturn(false); dbTester.newCodePeriods().insert(type, value); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/NewCoverageMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/NewCoverageMeasuresStepTest.java index f14c11af75c..f8744388620 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/NewCoverageMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/NewCoverageMeasuresStepTest.java @@ -42,7 +42,6 @@ import org.sonar.scanner.protocol.output.ScannerReport; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.api.measures.CoreMetrics.NEW_CONDITIONS_TO_COVER_KEY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityGateEventsStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityGateEventsStepTest.java index 03d3faf239e..a12efcef511 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityGateEventsStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityGateEventsStepTest.java @@ -272,9 +272,9 @@ public class QualityGateEventsStepTest { @Test public void no_alert_on_pull_request_branches() { - Branch shortBranch = mock(Branch.class); - when(shortBranch.getType()).thenReturn(BranchType.PULL_REQUEST); - analysisMetadataHolder.setBranch(shortBranch); + Branch pr = mock(Branch.class); + when(pr.getType()).thenReturn(BranchType.PULL_REQUEST); + analysisMetadataHolder.setBranch(pr); TreeRootHolder treeRootHolder = mock(TreeRootHolder.class); MetricRepository metricRepository = mock(MetricRepository.class); MeasureRepository measureRepository = mock(MeasureRepository.class); diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityProfileEventsStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityProfileEventsStepTest.java index caa057d18ad..6219a2d31eb 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityProfileEventsStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/QualityProfileEventsStepTest.java @@ -45,7 +45,6 @@ import org.sonar.ce.task.projectanalysis.measure.MeasureRepository; import org.sonar.ce.task.projectanalysis.metric.Metric; import org.sonar.ce.task.projectanalysis.metric.MetricRepository; import org.sonar.ce.task.projectanalysis.qualityprofile.MutableQProfileStatusRepository; -import org.sonar.ce.task.projectanalysis.qualityprofile.QProfileStatusRepository; import org.sonar.ce.task.projectanalysis.qualityprofile.QProfileStatusRepositoryImpl; import org.sonar.ce.task.step.TestComputationStepContext; import org.sonar.core.util.UtcDateUtils; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ReportCommentMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ReportCommentMeasuresStepTest.java index 96097ed096e..fbcd8650fa2 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ReportCommentMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ReportCommentMeasuresStepTest.java @@ -29,7 +29,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_DENSITY; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_DENSITY_KEY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsCommentMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsCommentMeasuresStepTest.java index 6e22becc1c7..222b367b2c3 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsCommentMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsCommentMeasuresStepTest.java @@ -29,7 +29,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_DENSITY; import static org.sonar.api.measures.CoreMetrics.COMMENT_LINES_DENSITY_KEY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsComplexityMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsComplexityMeasuresStepTest.java index d6127526fdd..cfdec65ae36 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsComplexityMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsComplexityMeasuresStepTest.java @@ -29,7 +29,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.CLASSES; import static org.sonar.api.measures.CoreMetrics.CLASSES_KEY; import static org.sonar.api.measures.CoreMetrics.CLASS_COMPLEXITY; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsLanguageDistributionMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsLanguageDistributionMeasuresStepTest.java index aa397d7fbca..3d665c57941 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsLanguageDistributionMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsLanguageDistributionMeasuresStepTest.java @@ -28,7 +28,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.NCLOC_LANGUAGE_DISTRIBUTION; import static org.sonar.api.measures.CoreMetrics.NCLOC_LANGUAGE_DISTRIBUTION_KEY; import static org.sonar.ce.task.projectanalysis.component.Component.Type.PROJECT_VIEW; diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsUnitTestMeasuresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsUnitTestMeasuresStepTest.java index df3c9141710..9771d4c3cd2 100644 --- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsUnitTestMeasuresStepTest.java +++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ViewsUnitTestMeasuresStepTest.java @@ -28,7 +28,6 @@ import org.sonar.ce.task.step.ComputationStep; import org.sonar.ce.task.step.TestComputationStepContext; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.guava.api.Assertions.assertThat; import static org.sonar.api.measures.CoreMetrics.SKIPPED_TESTS; import static org.sonar.api.measures.CoreMetrics.SKIPPED_TESTS_KEY; import static org.sonar.api.measures.CoreMetrics.TESTS; |