You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by fp...@apache.org on 2022/09/26 06:37:56 UTC

[shiro] 02/02: added comments

This is an automated email from the ASF dual-hosted git repository.

fpapon pushed a commit to branch 1.10.x
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit 536603f0c0eb18c73f05270e7adcbc49021d76b2
Author: lprimak <le...@flowlogix.com>
AuthorDate: Mon Sep 5 08:52:52 2022 -0700

    added comments
---
 .../main/java/org/apache/shiro/subject/support/DelegatingSubject.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java b/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
index 431c8464..e0326b91 100644
--- a/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
+++ b/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
@@ -473,6 +473,10 @@ public class DelegatingSubject implements Subject {
             try {
                 return (List<PrincipalCollection>) session.getAttribute(RUN_AS_PRINCIPALS_SESSION_KEY);
             } catch (SessionException se) {
+                // There could be a rare race condition when a session is invalidated in another thread,
+                // this thread could throw this exception, so we catch it
+                // similar issue as in clearRunAsIdentitiesInternal()
+                // See https://issues.apache.org/jira/browse/SHIRO-512
                 log.debug("Encountered session exception trying to get 'runAs' principal stack.  This "
                         + "can generally safely be ignored.", se);
             }