Remove StringUtils#join in favor of String#join (Java 8)
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
package tools.checktestmocks;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.Sets;
|
||||
import fr.xephi.authme.ClassCollector;
|
||||
import fr.xephi.authme.TestHelper;
|
||||
import fr.xephi.authme.util.StringUtils;
|
||||
import org.mockito.Mock;
|
||||
import tools.utils.AutoToolTask;
|
||||
import tools.utils.InjectorUtils;
|
||||
@@ -16,6 +14,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Task checking if all tests' {@code @Mock} fields have a corresponding
|
||||
@@ -41,7 +40,7 @@ public class CheckTestMocks implements AutoToolTask {
|
||||
for (Class<?> clazz : collector.collectClasses(c -> isTestClassWithMocks(c))) {
|
||||
checkClass(clazz);
|
||||
}
|
||||
System.out.println(StringUtils.join("\n", errors));
|
||||
System.out.println(String.join("\n", errors));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,8 +111,9 @@ public class CheckTestMocks implements AutoToolTask {
|
||||
}
|
||||
|
||||
private static String formatClassList(Collection<Class<?>> coll) {
|
||||
Collection<String> classNames = Collections2.transform(coll, Class::getSimpleName);
|
||||
return StringUtils.join(", ", classNames);
|
||||
return coll.stream()
|
||||
.map(Class::getSimpleName)
|
||||
.collect(Collectors.joining(", "));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package tools.messages.translation;
|
||||
|
||||
import fr.xephi.authme.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Container class for one translatable message.
|
||||
*/
|
||||
@@ -14,7 +12,7 @@ public class MessageExport {
|
||||
|
||||
public MessageExport(String key, String[] tags, String defaultMessage, String translatedMessage) {
|
||||
this.key = key;
|
||||
this.tags = StringUtils.join(",", tags);
|
||||
this.tags = String.join(",", tags);
|
||||
this.defaultMessage = defaultMessage;
|
||||
this.translatedMessage = translatedMessage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user