Author: norman
Date: Mon Nov 21 10:08:53 2011
New Revision: 1204427
URL: http://svn.apache.org/viewvc?rev=1204427&view=rev
Log:
Only allow to set the listen address when server is not running
Modified:
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
Modified:
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
URL:
http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java?rev=1204427&r1=1204426&r2=1204427&view=diff
==============================================================================
---
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
(original)
+++
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractAsyncServer.java
Mon Nov 21 10:08:53 2011
@@ -56,6 +56,7 @@ public abstract class AbstractAsyncServe
private List<InetSocketAddress> addresses = new
ArrayList<InetSocketAddress>();
public synchronized void setListenAddresses(InetSocketAddress...
addresses) {
+ if (started) throw new IllegalStateException("Can only be set when the
server is not running");
this.addresses =
Collections.unmodifiableList(Arrays.asList(addresses));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]