jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-336

AsyncResponse#cancel() does return false when already resumed

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: server
    • Labels:
      None

      Description

      javadoc says:

      Invoking a cancel(...) method on an asynchronous response instance that has already been resumed has no effect and the method call is ignored while returning true.

      but having server side:

      @Path("resource")
      public class Resource {
        @GET
        public String cancel(){
           AsyncResponse response = ...
           response.resume("ok");
           response.cancel(); //return false;
        }
      
      }
      

        Activity

        Hide
        Marek Potociar added a comment -

        This is a javadoc issue in the JAX-RS API.

        Show
        Marek Potociar added a comment - This is a javadoc issue in the JAX-RS API.
        Hide
        Marek Potociar added a comment -

        Fixed on the master branch.

        Show
        Marek Potociar added a comment - Fixed on the master branch.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: