commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25167] - NullPointerException in SocketClient.getRemoteAddress()
Date Wed, 03 Dec 2003 17:53:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25167>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25167

NullPointerException in SocketClient.getRemoteAddress()





------- Additional Comments From dfs@apache.org  2003-12-03 17:53 -------
I forgot to add than an argument can be made to protect against the setting
of SocketClient._socket_ to a null value by a user-defined subclass, but that
can be addressed by documenting a requirement to set SocketClient._socket_
to null only in a constructor or in disconnect() and to assign it a non-null
value only in connect().  In general, Commons Net has been implemented to
avoid checks for illegal state conditions and delegate responsibility
to the programmer not to call connection-dependent methods while disconnected.
If we agree to use methods specific to J2SE 1.4, then changing
SocketClient.isConnected() to
{ return (_socket_ != null && _socket_.isConnected()); }
would go a long way to helping programmers.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message