From a383ba9587ad056dc586a9497af2c8a8f4d07e7b Mon Sep 17 00:00:00 2001 From: yyang Date: Fri, 21 Jul 2023 20:52:57 +0800 Subject: [PATCH] Fix issue of e.getCause() returns null --- .../arc/impl/TargetAroundInvokeInvocationContext.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/TargetAroundInvokeInvocationContext.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/TargetAroundInvokeInvocationContext.java index 7647744e50a253..67e8b80092ac37 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/TargetAroundInvokeInvocationContext.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/TargetAroundInvokeInvocationContext.java @@ -45,6 +45,11 @@ protected Object proceed(int currentPosition) throws Exception { } } catch (Exception e) { Throwable cause = e.getCause(); + + // e.getCause() may return null + if (cause == null) { + cause = e; + } if (cause instanceof Error) { throw (Error) cause; }