Use guava 21, add 1.12 support

This commit is contained in:
Gabriele C
2017-05-29 23:40:44 +02:00
parent 9385fc8f4c
commit 00699ed7fb
6 changed files with 11 additions and 11 deletions
@@ -1,7 +1,7 @@
package fr.xephi.authme.datasource;
import ch.jalu.configme.properties.Property;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -143,7 +143,7 @@ public abstract class AbstractResourceClosingTest {
// Use XFBCRYPT if nothing else specified as there is a lot of specific behavior to this hash algorithm in MySQL
final HashAlgorithm[] defaultAlgorithm = new HashAlgorithm[]{HashAlgorithm.XFBCRYPT};
for (Method method : methods) {
HashAlgorithm[] algorithms = Objects.firstNonNull(CUSTOM_ALGORITHMS.get(method.getName()), defaultAlgorithm);
HashAlgorithm[] algorithms = MoreObjects.firstNonNull(CUSTOM_ALGORITHMS.get(method.getName()), defaultAlgorithm);
for (HashAlgorithm algorithm : algorithms) {
data.add(new Object[]{method, method.getName(), algorithm});
}
@@ -12,7 +12,7 @@ import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;
import static com.google.common.base.Objects.firstNonNull;
import static com.google.common.base.MoreObjects.firstNonNull;
/**
* Generates the translations page in docs.