commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: [latka] [PATCH] RequestImpl.setVersion () throws NPE
Date Tue, 17 Sep 2002 22:09:04 GMT
Janek Bogucki <yan@studylink.com> writes:

> Index: RequestImpl.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java,v
> retrieving revision 1.29
> diff -u -r1.29 RequestImpl.java
> --- RequestImpl.java	4 Sep 2002 02:59:26 -0000	1.29
> +++ RequestImpl.java	17 Sep 2002 09:49:56 -0000
> @@ -511,8 +511,10 @@
>       * @param version  HTTP version
>       */
>      public void setVersion(String version) {
> -        if (version.equals(HTTP_10)) {
> +        if (HTTP_10.equals(version)) {
>              ((HttpMethodBase) _httpMethod).setHttp11(false);
> +        } else {
> +            ((HttpMethodBase) _httpMethod).setHttp11(true);
>          }
>      }
>  }

I generally prefer the more brief style:

  ((HttpMethodBase) _httpMethod).setHttp11(!HTTP_10.equals(version));

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


Mime
View raw message