Index: HttpConnection.java
===================================================================
RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
retrieving revision 1.6
diff -c -r1.6 HttpConnection.java
*** HttpConnection.java	15 Jan 2002 20:32:00 -0000	1.6
--- HttpConnection.java	10 Feb 2002 03:16:34 -0000
***************
*** 117,128 ****
       * Fully-specified constructor.
       * @param proxyHost the host I should proxy via
       * @param proxyPort the port I should proxy via
!      * @param host the host I should connect to
       * @param port the port I should connect to
       * @param secure when <tt>true</tt>, connect via HTTPS (SSL)
       */
      public HttpConnection(String proxyHost, int proxyPort, String host, int port, boolean secure) {
          log.debug("HttpConnection.HttpConnection");
          _proxyHost = proxyHost;
          _proxyPort = proxyPort;
          _host = host;
--- 117,132 ----
       * Fully-specified constructor.
       * @param proxyHost the host I should proxy via
       * @param proxyPort the port I should proxy via
!      * @param host the host I should connect to. Parameter value must be non-null.
       * @param port the port I should connect to
       * @param secure when <tt>true</tt>, connect via HTTPS (SSL)
       */
      public HttpConnection(String proxyHost, int proxyPort, String host, int port, boolean secure) {
          log.debug("HttpConnection.HttpConnection");
+ 	if (host == null)
+ 	{
+ 		throw new NullPointerException("host parameter is null");
+ 	}
          _proxyHost = proxyHost;
          _proxyPort = proxyPort;
          _host = host;
***************
*** 142,151 ****
  
      /**
       * Set my host.
!      * @param host the host I should connect to
       * @throws IllegalStateException if I am already connected
       */
      public void setHost(String host) throws IllegalStateException {
          assertNotOpen();
          _host = host;
      }
--- 146,159 ----
  
      /**
       * Set my host.
!      * @param host the host I should connect to. Parameter value must be non-null.
       * @throws IllegalStateException if I am already connected
       */
      public void setHost(String host) throws IllegalStateException {
+ 	if (host == null)
+ 	{
+ 		throw new NullPointerException("host parameter is null");
+ 	}
          assertNotOpen();
          _host = host;
      }
