From 428a095a9254779b9a590b62444c597a4175657c Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Tue, 15 Dec 2015 18:00:21 +0100 Subject: [PATCH] SONAR-6990 fix use of String.format generating garbage strings --- .../computation/duplication/DuplicationRepositoryImpl.java | 4 ++-- 1 file 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); } -- 2.39.5