diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-12-15 18:00:21 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-12-17 10:44:05 +0100 |
commit | 428a095a9254779b9a590b62444c597a4175657c (patch) | |
tree | e87be75435f46bfc362857eaeccea22c8ad1f944 | |
parent | 9c0f38be94b42e4b56572111115ff5ebe416882c (diff) | |
download | sonarqube-428a095a9254779b9a590b62444c597a4175657c.tar.gz sonarqube-428a095a9254779b9a590b62444c597a4175657c.zip |
SONAR-6990 fix use of String.format generating garbage strings
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/computation/duplication/DuplicationRepositoryImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/duplication/DuplicationRepositoryImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/duplication/DuplicationRepositoryImpl.java index 49162a9518d..3a37dab05b1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/duplication/DuplicationRepositoryImpl.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/duplication/DuplicationRepositoryImpl.java @@ -33,8 +33,8 @@ import org.sonar.server.computation.component.Component; import org.sonar.server.computation.component.TreeRootHolder; import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.FluentIterable.from; -import static java.lang.String.format; import static java.util.Objects.requireNonNull; /** @@ -339,7 +339,7 @@ public class DuplicationRepositoryImpl implements DuplicationRepository { } private static void checkComponentArgument(Component file, String argName) { - requireNonNull(file, format("%s can not be null", argName)); + checkNotNull(file, "%s can not be null", argName); checkArgument(file.getType() == Component.Type.FILE, "type of %s argument must be FILE", argName); } |