Actually support 1.8 servers

This commit is contained in:
Gabriele C
2018-12-02 00:28:14 +01:00
parent 650a97647a
commit 427251a4f3
5 changed files with 28 additions and 11 deletions
@@ -2,7 +2,7 @@ package fr.xephi.authme.service.yaml;
import ch.jalu.configme.exception.ConfigMeException;
import static com.google.common.base.MoreObjects.firstNonNull;
import java.util.Optional;
/**
* Exception when a YAML file could not be parsed.
@@ -18,7 +18,7 @@ public class YamlParseException extends RuntimeException {
* @param configMeException the caught exception from ConfigMe
*/
public YamlParseException(String file, ConfigMeException configMeException) {
super(firstNonNull(configMeException.getCause(), configMeException));
super(Optional.ofNullable(configMeException.getCause()).orElse(configMeException));
this.file = file;
}