Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6340

Return value of AsyncResponseImpl.cancel() not follow JAXRS 2.0 javadoc

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.1, 3.0.5
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      According to JAX-RS2.0 javadoc:
      Invoking a cancel(...) method multiple times to cancel request processing has the same effect as canceling the request processing only once. Invoking a cancel(...) method on an asynchronous response instance that has already been cancelled or resumed has no effect and the method call is ignored while returning true, in case the request has been cancelled previously.

      But current implementation of AsyncResponseImpl.cancel() return false when response instance has already been cancelled or resumed.
      In method doCancel, found:
      private synchronized boolean doCancel(String retryAfterHeader) {
      if (!isSuspended()) {
      return false;

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              weiz Wei Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified