You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/05/26 17:26:58 UTC

(tomcat) branch 10.1.x updated: REvert previous fix. NPE should never happen here.

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

markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 44c4af0162 REvert previous fix. NPE should never happen here.
44c4af0162 is described below

commit 44c4af016261be3bbf655d07fcb3a341281930e4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue May 26 18:26:34 2026 +0100

    REvert previous fix. NPE should never happen here.
---
 java/org/apache/catalina/realm/JAASMemoryLoginModule.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
index 72decd13a1..e60a900b25 100644
--- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
+++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
@@ -318,10 +318,8 @@ public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule {
     public boolean logout() throws LoginException {
         subject.getPrincipals().remove(principal);
         if (principal instanceof GenericPrincipal) {
-            if (roles != null) {
-                for (Principal role : roles) {
-                    subject.getPrincipals().remove(role);
-                }
+            for (Principal role : roles) {
+                subject.getPrincipals().remove(role);
             }
         }
         committed = false;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org