> I want the behavior of > getResponseBody to be consistent with > the behavior of other > "standard" (java.*) classes. > > Example 1: java.util.Vector.toArray > > The return value, Object[], will never be null. > > Example 2: java.lang.String.getBytes > > The return value, byte[], will never be null.
Neither of these examples is comparable to HttpMethod.getResponseBody(). It's not possible to have a null-Vector to invoke toArray on, or a null-String to invoke getBytes on. It is possible to have an HttpMethod without a response, or for that matter, a response without a body. That's a different state from have a zero-length response, and the API should distinguish between the two.
