public class org.apache.catalina.realm.UserDatabaseRealm extends org.apache.catalina.realm.RealmBase
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.catalina.realm.UserDatabaseRealm
super_class: org.apache.catalina.realm.RealmBase
{
protected volatile org.apache.catalina.UserDatabase database;
descriptor: Lorg/apache/catalina/UserDatabase;
flags: (0x0044) ACC_PROTECTED, ACC_VOLATILE
private final java.lang.Object databaseLock;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected java.lang.String resourceName;
descriptor: Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
private boolean localJndiResource;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.apache.catalina.realm.RealmBase.<init>:()V
1: aload 0
aconst_null
putfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
2: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield org.apache.catalina.realm.UserDatabaseRealm.databaseLock:Ljava/lang/Object;
3: aload 0
ldc "UserDatabase"
putfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
4: aload 0
iconst_0
putfield org.apache.catalina.realm.UserDatabaseRealm.localJndiResource:Z
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
public java.lang.String getResourceName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
public void setResourceName(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
0 2 1 resourceName Ljava/lang/String;
MethodParameters:
Name Flags
resourceName
public boolean getLocalJndiResource();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.localJndiResource:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
public void setLocalJndiResource(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.apache.catalina.realm.UserDatabaseRealm.localJndiResource:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
0 2 1 localJndiResource Z
MethodParameters:
Name Flags
localJndiResource
public boolean hasRole(org.apache.catalina.Wrapper, java.security.Principal, java.lang.String);
descriptor: (Lorg/apache/catalina/Wrapper;Ljava/security/Principal;Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=9, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getUserDatabase:()Lorg/apache/catalina/UserDatabase;
astore 4
start local 4 1: aload 4
ifnonnull 3
2: iconst_0
ireturn
3: StackMap locals: org.apache.catalina.UserDatabase
StackMap stack:
aload 1
ifnull 7
4: aload 1
aload 3
invokeinterface org.apache.catalina.Wrapper.findSecurityReference:(Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 5: aload 5
ifnull 7
6: aload 5
astore 3
end local 5 7: StackMap locals:
StackMap stack:
aload 2
instanceof org.apache.catalina.realm.GenericPrincipal
ifeq 11
8: aload 2
checkcast org.apache.catalina.realm.GenericPrincipal
astore 5
start local 5 9: aload 5
invokevirtual org.apache.catalina.realm.GenericPrincipal.getUserPrincipal:()Ljava/security/Principal;
instanceof org.apache.catalina.realm.UserDatabaseRealm$UserDatabasePrincipal
ifeq 11
10: aload 4
aload 5
invokevirtual org.apache.catalina.realm.GenericPrincipal.getName:()Ljava/lang/String;
invokeinterface org.apache.catalina.UserDatabase.findUser:(Ljava/lang/String;)Lorg/apache/catalina/User;
astore 2
end local 5 11: StackMap locals:
StackMap stack:
aload 2
instanceof org.apache.catalina.User
ifne 13
12: aload 0
aconst_null
aload 2
aload 3
invokespecial org.apache.catalina.realm.RealmBase.hasRole:(Lorg/apache/catalina/Wrapper;Ljava/security/Principal;Ljava/lang/String;)Z
ireturn
13: StackMap locals:
StackMap stack:
ldc "*"
aload 3
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 15
14: iconst_1
ireturn
15: StackMap locals:
StackMap stack:
aload 3
ifnonnull 17
16: iconst_0
ireturn
17: StackMap locals:
StackMap stack:
aload 2
checkcast org.apache.catalina.User
astore 5
start local 5 18: aload 4
aload 3
invokeinterface org.apache.catalina.UserDatabase.findRole:(Ljava/lang/String;)Lorg/apache/catalina/Role;
astore 6
start local 6 19: aload 6
ifnonnull 21
20: iconst_0
ireturn
21: StackMap locals: org.apache.catalina.User org.apache.catalina.Role
StackMap stack:
aload 5
aload 6
invokeinterface org.apache.catalina.User.isInRole:(Lorg/apache/catalina/Role;)Z
ifeq 23
22: iconst_1
ireturn
23: StackMap locals:
StackMap stack:
aload 5
invokeinterface org.apache.catalina.User.getGroups:()Ljava/util/Iterator;
astore 7
start local 7 24: goto 28
25: StackMap locals: java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.catalina.Group
astore 8
start local 8 26: aload 8
aload 6
invokeinterface org.apache.catalina.Group.isInRole:(Lorg/apache/catalina/Role;)Z
ifeq 28
27: iconst_1
ireturn
end local 8 28: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 25
29: iconst_0
ireturn
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
0 30 1 wrapper Lorg/apache/catalina/Wrapper;
0 30 2 principal Ljava/security/Principal;
0 30 3 role Ljava/lang/String;
1 30 4 database Lorg/apache/catalina/UserDatabase;
5 7 5 realRole Ljava/lang/String;
9 11 5 gp Lorg/apache/catalina/realm/GenericPrincipal;
18 30 5 user Lorg/apache/catalina/User;
19 30 6 dbrole Lorg/apache/catalina/Role;
24 30 7 groups Ljava/util/Iterator<Lorg/apache/catalina/Group;>;
26 28 8 group Lorg/apache/catalina/Group;
MethodParameters:
Name Flags
wrapper
principal
role
public void backgroundProcess();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getUserDatabase:()Lorg/apache/catalina/UserDatabase;
astore 1
start local 1 1: aload 1
ifnull 3
2: aload 1
invokeinterface org.apache.catalina.UserDatabase.backgroundProcess:()V
3: StackMap locals: org.apache.catalina.UserDatabase
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
1 4 1 database Lorg/apache/catalina/UserDatabase;
protected java.lang.String getPassword(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getUserDatabase:()Lorg/apache/catalina/UserDatabase;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: org.apache.catalina.UserDatabase
StackMap stack:
aload 2
aload 1
invokeinterface org.apache.catalina.UserDatabase.findUser:(Ljava/lang/String;)Lorg/apache/catalina/User;
astore 3
start local 3 4: aload 3
ifnonnull 6
5: aconst_null
areturn
6: StackMap locals: org.apache.catalina.User
StackMap stack:
aload 3
invokeinterface org.apache.catalina.User.getPassword:()Ljava/lang/String;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
0 7 1 username Ljava/lang/String;
1 7 2 database Lorg/apache/catalina/UserDatabase;
4 7 3 user Lorg/apache/catalina/User;
MethodParameters:
Name Flags
username
protected java.security.Principal getPrincipal(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/security/Principal;
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=9, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getUserDatabase:()Lorg/apache/catalina/UserDatabase;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: org.apache.catalina.UserDatabase
StackMap stack:
aload 2
aload 1
invokeinterface org.apache.catalina.UserDatabase.findUser:(Ljava/lang/String;)Lorg/apache/catalina/User;
astore 3
start local 3 4: aload 3
ifnonnull 6
5: aconst_null
areturn
6: StackMap locals: org.apache.catalina.User
StackMap stack:
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 4
start local 4 7: aload 3
invokeinterface org.apache.catalina.User.getRoles:()Ljava/util/Iterator;
astore 5
start local 5 8: goto 11
9: StackMap locals: java.util.List java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.catalina.Role
astore 6
start local 6 10: aload 4
aload 6
invokeinterface org.apache.catalina.Role.getName:()Ljava/lang/String;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 6 11: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
12: aload 3
invokeinterface org.apache.catalina.User.getGroups:()Ljava/util/Iterator;
astore 6
start local 6 13: goto 20
14: StackMap locals: java.util.Iterator
StackMap stack:
aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.catalina.Group
astore 7
start local 7 15: aload 7
invokeinterface org.apache.catalina.Group.getRoles:()Ljava/util/Iterator;
astore 5
16: goto 19
17: StackMap locals: org.apache.catalina.Group
StackMap stack:
aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.catalina.Role
astore 8
start local 8 18: aload 4
aload 8
invokeinterface org.apache.catalina.Role.getName:()Ljava/lang/String;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 8 19: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 17
end local 7 20: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 14
21: new org.apache.catalina.realm.GenericPrincipal
dup
aload 1
aload 4
22: new org.apache.catalina.realm.UserDatabaseRealm$UserDatabasePrincipal
dup
aload 0
aload 1
invokespecial org.apache.catalina.realm.UserDatabaseRealm$UserDatabasePrincipal.<init>:(Lorg/apache/catalina/realm/UserDatabaseRealm;Ljava/lang/String;)V
23: invokespecial org.apache.catalina.realm.GenericPrincipal.<init>:(Ljava/lang/String;Ljava/util/List;Ljava/security/Principal;)V
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
0 24 1 username Ljava/lang/String;
1 24 2 database Lorg/apache/catalina/UserDatabase;
4 24 3 user Lorg/apache/catalina/User;
7 24 4 roles Ljava/util/List<Ljava/lang/String;>;
8 24 5 uroles Ljava/util/Iterator<Lorg/apache/catalina/Role;>;
10 11 6 role Lorg/apache/catalina/Role;
13 24 6 groups Ljava/util/Iterator<Lorg/apache/catalina/Group;>;
15 20 7 group Lorg/apache/catalina/Group;
18 19 8 role Lorg/apache/catalina/Role;
MethodParameters:
Name Flags
username
private org.apache.catalina.UserDatabase getUserDatabase();
descriptor: ()Lorg/apache/catalina/UserDatabase;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=3, args_size=1
start local 0 0: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
ifnonnull 19
1: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.databaseLock:Ljava/lang/Object;
dup
astore 1
monitorenter
2: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
ifnonnull 15
3: aconst_null
astore 2
start local 2 4: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.localJndiResource:Z
ifeq 8
5: invokestatic org.apache.naming.ContextBindings.getClassLoader:()Ljavax/naming/Context;
astore 2
6: aload 2
ldc "comp/env"
invokeinterface javax.naming.Context.lookup:(Ljava/lang/String;)Ljava/lang/Object;
checkcast javax.naming.Context
astore 2
7: goto 9
8: StackMap locals: java.lang.Object javax.naming.Context
StackMap stack:
aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getServer:()Lorg/apache/catalina/Server;
invokeinterface org.apache.catalina.Server.getGlobalNamingContext:()Ljavax/naming/Context;
astore 2
9: StackMap locals:
StackMap stack:
aload 0
aload 2
aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
invokeinterface javax.naming.Context.lookup:(Ljava/lang/String;)Ljava/lang/Object;
checkcast org.apache.catalina.UserDatabase
putfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
end local 2 10: goto 15
StackMap locals: org.apache.catalina.realm.UserDatabaseRealm java.lang.Object
StackMap stack: java.lang.Throwable
11: astore 2
start local 2 12: aload 2
invokestatic org.apache.tomcat.util.ExceptionUtils.handleThrowable:(Ljava/lang/Throwable;)V
13: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.containerLog:Lorg/apache/juli/logging/Log;
getstatic org.apache.catalina.realm.UserDatabaseRealm.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "userDatabaseRealm.lookup"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 2
invokeinterface org.apache.juli.logging.Log.error:(Ljava/lang/Object;Ljava/lang/Throwable;)V
14: aload 0
aconst_null
putfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
end local 2 15: StackMap locals:
StackMap stack:
aload 1
monitorexit
16: goto 19
StackMap locals:
StackMap stack: java.lang.Throwable
17: aload 1
monitorexit
18: athrow
19: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
4 10 2 context Ljavax/naming/Context;
12 15 2 e Ljava/lang/Throwable;
Exception table:
from to target type
3 10 11 Class java.lang.Throwable
2 16 17 any
17 18 17 any
protected void startInternal();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=2, args_size=1
start local 0 0: aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.localJndiResource:Z
ifne 4
1: aload 0
invokevirtual org.apache.catalina.realm.UserDatabaseRealm.getUserDatabase:()Lorg/apache/catalina/UserDatabase;
astore 1
start local 1 2: aload 1
ifnonnull 4
3: new org.apache.catalina.LifecycleException
dup
getstatic org.apache.catalina.realm.UserDatabaseRealm.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "userDatabaseRealm.noDatabase"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.catalina.realm.UserDatabaseRealm.resourceName:Ljava/lang/String;
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.catalina.LifecycleException.<init>:(Ljava/lang/String;)V
athrow
end local 1 4: StackMap locals:
StackMap stack:
aload 0
invokespecial org.apache.catalina.realm.RealmBase.startInternal:()V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
2 4 1 database Lorg/apache/catalina/UserDatabase;
Exceptions:
throws org.apache.catalina.LifecycleException
protected void stopInternal();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.apache.catalina.realm.RealmBase.stopInternal:()V
1: aload 0
aconst_null
putfield org.apache.catalina.realm.UserDatabaseRealm.database:Lorg/apache/catalina/UserDatabase;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/catalina/realm/UserDatabaseRealm;
Exceptions:
throws org.apache.catalina.LifecycleException
}
SourceFile: "UserDatabaseRealm.java"
NestMembers:
org.apache.catalina.realm.UserDatabaseRealm$UserDatabasePrincipal
InnerClasses:
private UserDatabasePrincipal = org.apache.catalina.realm.UserDatabaseRealm$UserDatabasePrincipal of org.apache.catalina.realm.UserDatabaseRealm