You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by se...@apache.org on 2002/02/27 06:06:22 UTC
cvs commit: jakarta-james/src/java/org/apache/james/pop3server POP3Server.java
serge 02/02/26 21:06:22
Modified: src/java/org/apache/james/pop3server POP3Server.java
Log:
Patch from Eung-ju Park <co...@apache.org> to use getValueAsBoolean to make code more readable.
Revision Changes Path
1.3 +10 -8 jakarta-james/src/java/org/apache/james/pop3server/POP3Server.java
Index: POP3Server.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/pop3server/POP3Server.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- POP3Server.java 18 Jan 2002 02:48:37 -0000 1.2
+++ POP3Server.java 27 Feb 2002 05:06:22 -0000 1.3
@@ -20,7 +20,7 @@
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
*/
-public class POP3Server
+public class POP3Server
extends AbstractService {
protected ConnectionHandlerFactory createFactory()
@@ -33,21 +33,23 @@
m_port = configuration.getChild( "port" ).getValueAsInteger( 25 );
- try
- {
+ try
+ {
final String bindAddress = configuration.getChild( "bind" ).getValue( null );
if( null != bindAddress )
{
- m_bindTo = InetAddress.getByName( bindAddress );
+ m_bindTo = InetAddress.getByName( bindAddress );
}
}
- catch( final UnknownHostException unhe )
+ catch( final UnknownHostException unhe )
{
throw new ConfigurationException( "Malformed bind parameter", unhe );
}
- final String useTLS = configuration.getChild("useTLS").getValue( "" );
- if( useTLS.equals( "TRUE" ) ) m_serverSocketType = "ssl";
+ final boolean useTLS = configuration.getChild("useTLS").getValueAsBoolean( false );
+ if( useTLS ) {
+ m_serverSocketType = "ssl";
+ }
super.configure( configuration.getChild( "handler" ) );
}
@@ -61,4 +63,4 @@
System.out.println("Started POP3 Server "+m_connectionName);
}
}
-
+
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>