Issue Details (XML | Word | Printable)

Key: JERSEY-1403
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Marek Potociar
Reporter: jan.supol
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jersey

AsyncInvoker makes Future<Response>.get() throw WebApplicationException

Created: 03/Sep/12 01:55 PM   Updated: 04/Sep/12 05:31 PM   Resolved: 04/Sep/12 05:00 PM
Component/s: core
Affects Version/s: 2.0-m06
Fix Version/s: 2.0-m08, 2.0

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0 minutes
Remaining Estimate - 0 minutes
Time Spent: 4 hours
Time Spent - 4 hours

Issue Links:
Duplicate
 

Tags:
Participants: jan.supol and Marek Potociar


 Description  « Hide

AsyncInvoker.<somemethod>(GenericType<Response>/InvocationCallback<Response>) throws exception when Response.Status != OK.
But javadoc says:

Note that calling the Future.get() method on the returned Future instance may throw
WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the specified response type is not Response.

But unless <somemethod> has just (Class) argument, the WebApplicationException is thrown anyway.

For instance:

AsyncInvoker async = ...
GenericType<Response> generic = createGeneric(Response.class);
Future<Response> future = async.delete(generic);
future.get();

throws the exception



There are no comments yet on this issue.