You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2004/12/19 04:15:51 UTC
DO NOT REPLY [Bug 32765] New: -
HostConfiguration.setHost(Sting) causes NullPointerException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32765>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32765
Summary: HostConfiguration.setHost(Sting) causes
NullPointerException
Product: HttpClient
Version: 3.0 Beta 1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Commons HttpClient
AssignedTo: httpclient-dev@jakarta.apache.org
ReportedBy: apache@stuartherring.com
Calling setHost(String) on a HostConfiguration object causes a null pointer
exception.
As far as I can tell, this is due to it incorrectly calling the deprecated
setHost(String, String, int, Protocol) method, rather than setHost(String, int,
Protocol)
So:
public synchronized void setHost(final String host) {
Protocol defaultProtocol = Protocol.getProtocol("http");
setHost(host, null, defaultProtocol.getDefaultPort(), defaultProtocol);
}
should become :
public synchronized void setHost(final String host) {
Protocol defaultProtocol = Protocol.getProtocol("http");
setHost(host, defaultProtocol.getDefaultPort(), defaultProtocol);
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org