jakarta-commons httpclient inquiry:


Currently, HttpMethod.java (an interface) defines a 
method called "getResponseBody":

    /**
     * Return my response body, if any,
     * as a byte array.
     * Otherwise return <tt>null</tt>.
     */
    public byte[] getResponseBody();


I would prefer if this method returns a  zero-length array instead 
of null.

Returning a zero-length array is one of the API design tips that
is recommended in Josh Bloch's book:

       Effective Java Programming Language Guide
       http://www.amazon.com/exec/obidos/ASIN/0201310058/


==> Item 27: Return zero-length arrays, not nulls


Regards,

-Sean



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to