Merge branch '6.0.x'

This commit is contained in:
Sam Brannen 2023-06-23 12:07:37 +02:00
commit 171535f680
1 changed files with 5 additions and 4 deletions

View File

@ -112,10 +112,11 @@ final class TransactionalOperatorImpl implements TransactionalOperator {
* @param ex the throwable to try to unwrap
*/
private Throwable unwrapIfResourceCleanupFailure(Throwable ex) {
if (ex instanceof RuntimeException &&
ex.getCause() != null &&
ex.getMessage().startsWith("Async resource cleanup failed")) {
return ex.getCause();
if (ex instanceof RuntimeException && ex.getCause() != null) {
String msg = ex.getMessage();
if (msg != null && msg.startsWith("Async resource cleanup failed")) {
return ex.getCause();
}
}
return ex;
}