Fix some resources that are never closed, close in a finally block (#3544)

This commit is contained in:
James Mitchell authored and LexManos committed 2016-12-21 11:13:27 -08:00
1 parent e32cc2a607
commit e9143859c0
13 files changed
+148 -113

No files matched your search

@@ -62,6 +62,7 @@ import net.minecraftforge.fml.client.config.IConfigElement;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.relauncher.FMLInjectionData;
import org.apache.commons.compress.utils.IOUtils;
/**
* This class offers advanced configurations capabilities, allowing to provide
@@ -1055,20 +1056,8 @@ public class Configuration
}
finally
{
if (buffer != null)
{
try
{
buffer.close();
} catch (IOException e){}
}
if (input != null)
{
try
{
input.close();
} catch (IOException e){}
}
IOUtils.closeQuietly(buffer);
IOUtils.closeQuietly(input);
}
resetChangedState();