From c00109074a8aaacc9f6417205bca41be4df63dde Mon Sep 17 00:00:00 2001 From: ljacqu Date: Fri, 2 Aug 2019 15:29:06 +0200 Subject: [PATCH] Minor: create dummy string of specific length with better method --- .../tools/docs/hashmethods/EncryptionMethodInfoGatherer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/tools/docs/hashmethods/EncryptionMethodInfoGatherer.java b/src/test/java/tools/docs/hashmethods/EncryptionMethodInfoGatherer.java index 0362e26c..29b03c94 100644 --- a/src/test/java/tools/docs/hashmethods/EncryptionMethodInfoGatherer.java +++ b/src/test/java/tools/docs/hashmethods/EncryptionMethodInfoGatherer.java @@ -2,6 +2,7 @@ package tools.docs.hashmethods; import ch.jalu.injector.Injector; import ch.jalu.injector.InjectorBuilder; +import com.google.common.base.Strings; import com.google.common.collect.ImmutableSet; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.TestHelper; @@ -15,7 +16,6 @@ import fr.xephi.authme.security.crypts.description.Recommendation; import fr.xephi.authme.settings.Settings; import java.lang.annotation.Annotation; -import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; @@ -171,7 +171,7 @@ public class EncryptionMethodInfoGatherer { @Override public String computeHash(String password) { // Argon2 produces hashes of 96 characters -> return dummy value with this length - return String.join("", Collections.nCopies(96, ".")); + return Strings.repeat(".", 96); } } }