Make use of the awesome Java 8 features

This commit is contained in:
games647
2016-09-16 17:40:42 +02:00
parent 31d6b67381
commit 17c2099bf1
15 changed files with 85 additions and 114 deletions
@@ -42,12 +42,9 @@ public abstract class FastLoginCore<P> {
builder.maximumSize(maxSize);
}
return builder.build(new CacheLoader<K, V>() {
@Override
public V load(K key) throws Exception {
throw new UnsupportedOperationException("Not supported yet.");
}
});
return builder.build(CacheLoader.from(() -> {
throw new UnsupportedOperationException();
}));
}
public static UUID parseId(String withoutDashes) {
@@ -62,7 +62,7 @@ public abstract class MojangApiConnector {
try {
InetAddress address = InetAddress.getByName(localAddress);
if (!address.isAnyLocalAddress()) {
logger.log(Level.WARNING, "Submitted IP-Address is not local", address);
logger.log(Level.WARNING, "Submitted IP-Address is not local {0}", address);
continue;
}