Clean up uses of deprecated library functions (#4130)

Avoid catching and rethrowing runtime exceptions
Append error messages to exceptions instead of the log
This commit is contained in:
Ben Staddon authored and mezz committed 2017-07-12 21:50:28 -07:00
1 parent ead0e81025
commit 0fde64ac38
44 files changed
+118 -232

No files matched your search

@@ -25,6 +25,7 @@ import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.UUID;
@@ -33,7 +34,6 @@ import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.io.Files;
@@ -56,7 +56,7 @@ public final class UsernameCache {
private static Map<UUID, String> map = Maps.newHashMap();
private static final Charset charset = Charsets.UTF_8;
private static final Charset charset = StandardCharsets.UTF_8;
private static final File saveFile = new File( /* The minecraft dir */(File) FMLInjectionData.data()[6], "usernamecache.json");
private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();