Author: norman Date: Fri Jun 4 15:43:57 2010 New Revision: 951454 URL: http://svn.apache.org/viewvc?rev=951454&view=rev Log: Fix Exception on first startup when using JDBCDomainList and fix the usage of DefaultDomain. See JAMES-990, thanks to Eric Charles for the patch!
Modified: james/server/trunk/spoolmanager/src/main/java/org/apache/james/AbstractMailServer.java Modified: james/server/trunk/spoolmanager/src/main/java/org/apache/james/AbstractMailServer.java URL: http://svn.apache.org/viewvc/james/server/trunk/spoolmanager/src/main/java/org/apache/james/AbstractMailServer.java?rev=951454&r1=951453&r2=951454&view=diff ============================================================================== --- james/server/trunk/spoolmanager/src/main/java/org/apache/james/AbstractMailServer.java (original) +++ james/server/trunk/spoolmanager/src/main/java/org/apache/james/AbstractMailServer.java Fri Jun 4 15:43:57 2010 @@ -235,7 +235,7 @@ public abstract class AbstractMailServer String defaultDomain = getDefaultDomain(); if (domains.containsDomain(defaultDomain) == false) { if (domains instanceof ManageableDomainList) { - if(((ManageableDomainList) domains).addDomain(defaultDomain) != false) { + if(((ManageableDomainList) domains).addDomain(defaultDomain) == false) { throw new ConfigurationException("Configured defaultdomain could not get added to DomainList"); } } else { @@ -416,7 +416,7 @@ public abstract class AbstractMailServer if (defaultDomain == null) { List<String> domainList = domains.getDomains(); if (domainList == null || domainList.isEmpty()) { - return "localhost"; + return conf.getString("defaultDomain", "localhost"); } else { return (String) domainList.get(0); } --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org