Java 1.5 compatibility fix (replace FileWriter with FileOutputStream)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@112 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-01-09 16:31:21 +00:00
parent e82280ef02
commit 4ce550d3ff
1 changed files with 5 additions and 5 deletions

View File

@ -66,16 +66,16 @@ public class Settings {
}
public static synchronized void save() {
FileWriter fileWriter = null;
FileOutputStream fileOutputStream = null;
try {
fileWriter = new FileWriter(configFilePath);
SETTINGS.store(fileWriter, "DavMail settings");
fileOutputStream = new FileOutputStream(configFilePath);
SETTINGS.store(fileOutputStream, "DavMail settings");
} catch (IOException e) {
DavGatewayTray.error("Unable to store settings: ", e);
} finally {
if (fileWriter != null) {
if (fileOutputStream != null) {
try {
fileWriter.close();
fileOutputStream.close();
} catch (IOException e) {
DavGatewayTray.debug("Error closing configuration file: ", e);
}