mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
Fix some resources that are never closed, close in a finally block (#3544)
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user