mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-04 14:52:24 -05:00
From coverity: fix resource leak
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2215 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
06741a59c9
commit
e65a0361f5
@ -38,8 +38,19 @@ public class OSXInfoPlist {
|
||||
}
|
||||
|
||||
protected static String getInfoPlistContent() throws IOException {
|
||||
FileInputStream fileInputStream = new FileInputStream(getInfoPlistPath());
|
||||
return new String(IOUtil.readFully(fileInputStream));
|
||||
FileInputStream fileInputStream = null;
|
||||
try {
|
||||
fileInputStream = new FileInputStream(getInfoPlistPath());
|
||||
return new String(IOUtil.readFully(fileInputStream));
|
||||
} finally {
|
||||
if (fileInputStream != null) {
|
||||
try {
|
||||
fileInputStream.close();
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user