You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "brusdev (via GitHub)" <gi...@apache.org> on 2023/05/03 15:17:06 UTC

[GitHub] [activemq-artemis] brusdev commented on a diff in pull request #4461: ARTEMIS-4267 original exception lost for NoCacheLoginException

brusdev commented on code in PR #4461:
URL: https://github.com/apache/activemq-artemis/pull/4461#discussion_r1183835413


##########
artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java:
##########
@@ -141,8 +141,10 @@ private Subject getAuthenticatedSubject(final String user,
          try {
             lc.login();
          } catch (LoginException e) {
-            Throwable rootCause = ExceptionUtil.getRootCause(e);
+            Throwable rootCause = ExceptionUtils.getRootCause(e);
             if (rootCause instanceof NoCacheLoginException) {
+               // preserve the original exception for logging
+               rootCause.initCause(e);

Review Comment:
   Are we inverting exception chain items on purpose?



-- 
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: gitbox-unsubscribe@activemq.apache.org

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