mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
Fix empty setting behavior: return null instead of empty string
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@964 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
3bb0dde31e
commit
2b758b1dc1
@ -280,7 +280,12 @@ public final class Settings {
|
||||
* @return property value
|
||||
*/
|
||||
public static synchronized String getProperty(String property) {
|
||||
return SETTINGS.getProperty(property);
|
||||
String value = SETTINGS.getProperty(property);
|
||||
// return null on empty value
|
||||
if (value != null && value.length() == 0) {
|
||||
value = null;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,7 +87,7 @@ public final class ExchangeSessionFactory {
|
||||
|
||||
// prepend default windows domain prefix
|
||||
String defaultDomain = Settings.getProperty("davmail.defaultDomain");
|
||||
if (userName.indexOf('\\') < 0 && defaultDomain != null && defaultDomain.length() > 0) {
|
||||
if (userName.indexOf('\\') < 0 && defaultDomain != null) {
|
||||
userName = defaultDomain + '\\' + userName;
|
||||
}
|
||||
PoolKey poolKey = new PoolKey(baseUrl, userName, password);
|
||||
|
Loading…
Reference in New Issue
Block a user