You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2002/02/12 02:50:54 UTC
cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpClient.java
dion 02/02/11 17:50:54
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpClient.java
Log:
Added check for debug enabled as per patch from Sean C. Sullivan
Revision Changes Path
1.43 +17 -10 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
Index: HttpClient.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- HttpClient.java 5 Jan 2002 11:15:59 -0000 1.42
+++ HttpClient.java 12 Feb 2002 01:50:54 -0000 1.43
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v 1.42 2002/01/05 11:15:59 vmassol Exp $
- * $Revision: 1.42 $
- * $Date: 2002/01/05 11:15:59 $
+ * $Header: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v 1.43 2002/02/12 01:50:54 dion Exp $
+ * $Revision: 1.43 $
+ * $Date: 2002/02/12 01:50:54 $
* ====================================================================
*
* The Apache Software License, Version 1.1
@@ -78,7 +78,8 @@
* </p>
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
* @author Rodney Waldhoff
- * @version $Revision: 1.42 $ $Date: 2002/01/05 11:15:59 $
+ * @author Sean C. Sullivan
+ * @version $Revision: 1.43 $ $Date: 2002/02/12 01:50:54 $
*/
public class HttpClient {
@@ -147,8 +148,9 @@
* @param https when <code>true</code>, create an HTTPS session
*/
public void startSession(String host, int port, boolean https) {
- if(log.isDebugEnabled()) {
- log.debug("HttpClient.startSession(String,int,boolean): Host:" + host + " Port:" + port + " HTTPS:" + https);
+ if (log.isDebugEnabled()) {
+ log.debug("HttpClient.startSession(String,int,boolean): Host:" +
+ host + " Port:" + port + " HTTPS:" + https);
}
connection = new HttpConnection(host,port,https);
}
@@ -177,9 +179,12 @@
*/
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);
+ if (log.isDebugEnabled()) {
+ 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);
}
@@ -262,7 +267,9 @@
* {@link HttpConnection connection} if any.
*/
public void endSession() throws IOException {
- log.debug("HttpClient.endSession()");
+ if (log.isDebugEnabled()) {
+ log.debug("HttpClient.endSession()");
+ }
if(null != connection) {
connection.close();
connection = null;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>