Close inputstream

This commit is contained in:
LexManos 2012-06-21 06:11:17 -07:00
parent d7817aef39
commit e9c66f63fd

View file

@ -169,6 +169,7 @@ public class Configuration
public void load()
{
BufferedReader buffer = null;
try
{
if (file.getParentFile() != null)
@ -184,7 +185,7 @@ public class Configuration
if (file.canRead())
{
FileInputStream fileinputstream = new FileInputStream(file);
BufferedReader buffer = new BufferedReader(new InputStreamReader(fileinputstream, "8859_1"));
buffer = new BufferedReader(new InputStreamReader(fileinputstream, "8859_1"));
String line;
Map<String, Property> currentMap = null;
@ -265,6 +266,16 @@ public class Configuration
{
e.printStackTrace();
}
finally
{
if (buffer != null)
{
try
{
buffer.close();
} catch (IOException e){}
}
}
}
public void save()