CrazyHZM commented on code in PR #1449:
URL: https://github.com/apache/maven/pull/1449#discussion_r1536759020


##########
maven-core/src/main/java/org/apache/maven/session/scope/internal/SessionScope.java:
##########
@@ -107,7 +107,11 @@ public <T> Provider<T> scope(final Key<T> key, final 
Provider<T> unscoped) {
     private <T> T createProxy(Key<T> key, Provider<T> unscoped) {
         InvocationHandler dispatcher = (proxy, method, args) -> {
             method.setAccessible(true);
-            return method.invoke(getScopeState().scope(key, unscoped).get(), 
args);
+            try {
+                return method.invoke(getScopeState().scope(key, 
unscoped).get(), args);
+            } catch (InvocationTargetException e) {
+                throw e.getCause();

Review Comment:
   If the target Exception is null, it will throw NPE, and this could affect 
exception tracing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to