hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Returning null instead of empty array
Date Mon, 01 Dec 2008 14:09:53 GMT
On 30/11/2008, Oleg Kalnichevski <olegk@apache.org> wrote:
> 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.

OK, I'm happy to do it.

It will slightly change the behaviour for some public methods.

>  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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message