Commit e814dba19ef0b0b689f5c5d286da337bcb85c714

Authored by Mumfrey
1 parent 4d46c503

warnings cleanup, remove unused imports and replace deprecated Guava methods

java/client/com/mumfrey/liteloader/util/ModUtilities.java
... ... @@ -13,7 +13,6 @@ import net.minecraft.client.renderer.entity.Render;
13 13 import net.minecraft.client.renderer.entity.RenderManager;
14 14 import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
15 15 import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
16   -import net.minecraft.client.settings.KeyBinding;
17 16 import net.minecraft.entity.Entity;
18 17 import net.minecraft.init.Blocks;
19 18 import net.minecraft.init.Items;
... ... @@ -27,7 +26,6 @@ import net.minecraft.util.RegistrySimple;
27 26 import net.minecraft.util.ResourceLocation;
28 27  
29 28 import com.mumfrey.liteloader.client.util.PrivateFields;
30   -import com.mumfrey.liteloader.core.LiteLoader;
31 29 import com.mumfrey.liteloader.core.runtime.Obf;
32 30 import com.mumfrey.liteloader.util.log.LiteLoaderLogger;
33 31  
... ...
java/common/com/mumfrey/liteloader/core/LiteLoader.java
... ... @@ -16,8 +16,6 @@ import net.minecraft.network.play.server.S01PacketJoinGame;
16 16 import net.minecraft.profiler.Profiler;
17 17 import net.minecraft.world.World;
18 18  
19   -import org.apache.logging.log4j.Logger;
20   -
21 19 import com.mumfrey.liteloader.LiteMod;
22 20 import com.mumfrey.liteloader.api.CoreProvider;
23 21 import com.mumfrey.liteloader.api.CustomisationProvider;
... ... @@ -68,11 +66,6 @@ public final class LiteLoader
68 66 private static LiteLoader instance;
69 67  
70 68 /**
71   - * Logger for LiteLoader events
72   - */
73   - private static final Logger logger = LiteLoaderLogger.getLogger();
74   -
75   - /**
76 69 * Tweak system class loader
77 70 */
78 71 private static LaunchClassLoader classLoader;
... ...
java/common/com/mumfrey/liteloader/core/LiteLoaderUpdateSite.java
1 1 package com.mumfrey.liteloader.core;
2 2  
3 3 import java.io.File;
4   -import java.io.FileOutputStream;
5 4 import java.io.IOException;
6 5 import java.io.InputStream;
7 6  
8 7 import net.minecraft.util.Util;
9 8 import net.minecraft.util.Util.EnumOS;
10 9  
11   -import com.google.common.io.ByteStreams;
  10 +import com.google.common.io.ByteSink;
12 11 import com.google.common.io.Files;
13   -import com.google.common.io.OutputSupplier;
14 12 import com.mumfrey.liteloader.launch.ClassPathUtilities;
15 13 import com.mumfrey.liteloader.launch.LoaderProperties;
16 14 import com.mumfrey.liteloader.update.UpdateSite;
... ... @@ -151,8 +149,8 @@ public class LiteLoaderUpdateSite extends UpdateSite
151 149 try
152 150 {
153 151 final InputStream inputStream = LiteLoaderUpdateSite.class.getResourceAsStream(resourceName);
154   - final OutputSupplier<FileOutputStream> outputSupplier = Files.newOutputStreamSupplier(outputFile);
155   - ByteStreams.copy(inputStream, outputSupplier);
  152 + final ByteSink outputSupplier = Files.asByteSink(outputFile);
  153 + outputSupplier.writeFrom(inputStream);
156 154 }
157 155 catch (NullPointerException ex)
158 156 {
... ...