[resteasy-commits] [resteasy/Resteasy] 6684d7: [RESTEASY-1921] Async filter exception bug (#1538)

GitHub noreply at github.com
Fri Jun 8 18:43:11 EDT 2018


  Branch: refs/heads/master
  Home:   https://github.com/resteasy/Resteasy
  Commit: 6684d7c4ce3499b501036cc9d56aec47c3f3e459
      https://github.com/resteasy/Resteasy/commit/6684d7c4ce3499b501036cc9d56aec47c3f3e459
  Author: Stéphane Épardaud <stef at inforealm.org>
  Date:   2018-06-09 (Sat, 09 Jun 2018)

  Changed paths:
    M resteasy-jaxrs/src/main/java/org/jboss/resteasy/core/AsyncResponseConsumer.java
    M testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/UndertowTestRunner.java
    M testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/response/CompletionStageResponseTest.java
    M testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/rx/RxCompletionStageServerAsyncTest.java
    A testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/rx/resource/ExceptionThrowingFilter.java
    A testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/rx/resource/FilterException.java
    M testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/rx/resource/RxCompletionStageResource.java
    M testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/rx/resource/RxCompletionStageResourceImpl.java

  Log Message:
  -----------
  [RESTEASY-1921] Async filter exception bug (#1538)

* AsyncResponseConsumer: catch any sort of exception in listener

Otherwise it may get through and be silently ignored by CompletionStage because it
ignores exceptions thrown by exception handlers

* If writing an exception throws (by a filter) make sure we handle it

and log an error and send a response

* Improve UndertowTestRunner

* CompletionStageResponseTest: don't assume exception will be thrown by container

We can't guarantee that it will, in an async situation, so just be content with the status code

* Test filters that throw exceptions in async responses



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the resteasy-commits mailing list