You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Nathan Coast <na...@levelseas.com> on 2001/11/29 17:45:10 UTC
HttpClient bug?
org.apache.commons.httpclient.HttpClient
Hi, I found line 183 throws a NullPointer if setState() hasn't been called
previously
public void startSession(String host, int port, Credentials creds,
boolean https) {
log.debug("HttpClient.startSession(String,int,Credentials,boolean):
Host:" +
host + " Port:" + port + " Credentials:" + creds +
" HTTPS:" + https);
state.setCredentials(null,creds);
connection = new HttpConnection(host,port,https);
}
replacing state with getState() would remove the need to call setState(new
HttpState());
public void startSession(String host, int port, Credentials creds,
boolean https) {
log.debug("HttpClient.startSession(String,int,Credentials,boolean):
Host:" +
host + " Port:" + port + " Credentials:" + creds +
" HTTPS:" + https);
getState().setCredentials(null,creds);
connection = new HttpConnection(host,port,https);
}
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper at LevelSeas for the presence of computer viruses.
**********************************************************************
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>