jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: No error conditions defined for get() in javadoc

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Thu, 26 Jan 2012 09:57:56 +0000

JavaDocs for

http://java.net/projects/jax-rs-spec/sources/git/content/src/jax-rs-api/src/main/java/javax/ws/rs/client/InvocationException.java?rev=acfb7ecf63799ab6d726ad206bcd6eb49e9142ee

say that InvocationException needs to be thrown in case of 204,

which is not correct IMHO.
204 is clearly not an error.

Cheers, Sergey

On 26/01/12 09:45, Sergey Beryozkin wrote:
> On 25/01/12 23:42, Bill Burke wrote:
>> For methods like
>>
>> SyncInvoker
>>
>> <T> T get(Class<T> responseType) throws InvocationException;
>>
>>
>> There is no javadoc specifying what happens if the response code is
>> other than 200. An InvocationException should thrown for anything other
>> than 200, but what about 204? I was thinking a null value should be
>> returned in that case.
>
> +1
>
> Sergey
>
>>
>> Bill
>>
>>