Close inputstream
This commit is contained in:
parent
d7817aef39
commit
e9c66f63fd
1 changed files with 12 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue