jersey
  1. jersey
  2. JERSEY-1403

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-m06
    • Fix Version/s: 2.0-m08, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      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

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Marek Potociar
              Reporter:
              jan.supol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h