1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-03-04 19:29:46 -05:00

configFilePath is null in some test cases

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1517 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-10-26 21:03:47 +00:00
parent 4547ee7870
commit cf98558e81

View File

@ -259,7 +259,7 @@ public final class Settings {
// disable ConsoleAppender in gui mode
if (!Settings.getBooleanProperty("davmail.server")) {
ConsoleAppender consoleAppender = (ConsoleAppender)rootLogger.getAppender("ConsoleAppender");
ConsoleAppender consoleAppender = (ConsoleAppender) rootLogger.getAppender("ConsoleAppender");
if (consoleAppender != null) {
consoleAppender.setThreshold(Level.OFF);
}
@ -280,6 +280,8 @@ public final class Settings {
* Save settings in current file path (command line or default).
*/
public static synchronized void save() {
// configFilePath is null in some test cases
if (configFilePath != null) {
FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(configFilePath);
@ -295,6 +297,7 @@ public final class Settings {
}
}
}
}
updateLoggingConfig();
}