[prev in list] [next in list] [prev in thread] [next in thread]
List: httpclient-commons-dev
Subject: Re: Returning null instead of empty array
From: Oleg Kalnichevski <olegk () apache ! org>
Date: 2008-11-30 23:59:41
Message-ID: 1228089581.5753.15.camel () ubuntu
[Download RAW message or body]
On Mon, 2008-12-01 at 12:54 +0000, sebb wrote:
> Various HttpClient methods currently return null instead of an array
> under some circumstances.
>
> This means that the calling code has to check for null before
> processing the result, whereas in most cases the code would work just
> as well if there was an empty array, thus saving the null check.
>
> For example:
> private String[] org.apache.http.conn.ssl.AbstractVerifier.getSubjectAlts()
>
> int[] org.apache.http.impl.cookie.BasicClientCookie.getPorts()
>
> Any thoughts on this?
>
This is obviously wrong and should be fixed.
Oleg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic