public class org.apache.catalina.manager.util.SessionUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.catalina.manager.util.SessionUtils
super_class: java.lang.Object
{
private static final java.lang.String STRUTS_LOCALE_KEY;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "org.apache.struts.action.LOCALE"
private static final java.lang.String JSTL_LOCALE_KEY;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "jakarta.servlet.jsp.jstl.fmt.locale"
private static final java.lang.String SPRING_LOCALE_KEY;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE"
private static final java.lang.String[] LOCALE_TEST_ATTRIBUTES;
descriptor: [Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String[] USER_TEST_ATTRIBUTES;
descriptor: [Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: iconst_5
anewarray java.lang.String
dup
iconst_0
1: ldc "org.apache.struts.action.LOCALE"
aastore
dup
iconst_1
ldc "org.springframework.web.servlet.i18n.SessionLocaleResolver.LOCALE"
aastore
dup
iconst_2
ldc "jakarta.servlet.jsp.jstl.fmt.locale"
aastore
dup
iconst_3
ldc "Locale"
aastore
dup
iconst_4
ldc "java.util.Locale"
aastore
2: putstatic org.apache.catalina.manager.util.SessionUtils.LOCALE_TEST_ATTRIBUTES:[Ljava/lang/String;
3: bipush 6
anewarray java.lang.String
dup
iconst_0
4: ldc "Login"
aastore
dup
iconst_1
ldc "User"
aastore
dup
iconst_2
ldc "userName"
aastore
dup
iconst_3
ldc "UserName"
aastore
dup
iconst_4
ldc "Utilisateur"
aastore
dup
iconst_5
5: ldc "SPRING_SECURITY_LAST_USERNAME"
aastore
6: putstatic org.apache.catalina.manager.util.SessionUtils.USER_TEST_ATTRIBUTES:[Ljava/lang/String;
7: return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/catalina/manager/util/SessionUtils;
public static java.util.Locale guessLocaleFromSession(org.apache.catalina.Session);
descriptor: (Lorg/apache/catalina/Session;)Ljava/util/Locale;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface org.apache.catalina.Session.getSession:()Ljakarta/servlet/http/HttpSession;
invokestatic org.apache.catalina.manager.util.SessionUtils.guessLocaleFromSession:(Ljakarta/servlet/http/HttpSession;)Ljava/util/Locale;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 in_session Lorg/apache/catalina/Session;
MethodParameters:
Name Flags
in_session final
public static java.util.Locale guessLocaleFromSession(jakarta.servlet.http.HttpSession);
descriptor: (Ljakarta/servlet/http/HttpSession;)Ljava/util/Locale;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=7, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aconst_null
astore 1
start local 1 3: getstatic org.apache.catalina.manager.util.SessionUtils.LOCALE_TEST_ATTRIBUTES:[Ljava/lang/String;
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 18
StackMap locals: jakarta.servlet.http.HttpSession java.util.Locale top int int java.lang.String[]
StackMap stack:
4: aload 5
iload 3
aaload
astore 2
start local 2 5: aload 0
aload 2
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 6
start local 6 6: aload 6
instanceof java.util.Locale
ifeq 9
7: aload 6
checkcast java.util.Locale
astore 1
8: goto 19
9: StackMap locals: jakarta.servlet.http.HttpSession java.util.Locale java.lang.String int int java.lang.String[] java.lang.Object
StackMap stack:
aload 0
aload 2
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 6
10: aload 6
instanceof java.util.Locale
ifeq 13
11: aload 6
checkcast java.util.Locale
astore 1
12: goto 19
13: StackMap locals:
StackMap stack:
aload 0
aload 2
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 6
14: aload 6
instanceof java.util.Locale
ifeq 17
15: aload 6
checkcast java.util.Locale
astore 1
16: goto 19
end local 6 end local 2 17: StackMap locals: jakarta.servlet.http.HttpSession java.util.Locale top int int java.lang.String[]
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
18: iload 3
iload 4
if_icmplt 4
19: StackMap locals: jakarta.servlet.http.HttpSession java.util.Locale
StackMap stack:
aload 1
ifnull 22
20: aload 1
21: areturn
22: StackMap locals:
StackMap stack:
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 23: aload 0
invokeinterface jakarta.servlet.http.HttpSession.getAttributeNames:()Ljava/util/Enumeration;
astore 3
start local 3 24: goto 28
25: StackMap locals: java.util.List java.util.Enumeration
StackMap stack:
aload 3
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 26: aload 4
ldc "tapestry"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 28
aload 4
ldc "engine"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 28
aload 0
aload 4
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
ifnull 28
27: aload 2
aload 0
aload 4
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 4 28: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 25
end local 3 29: aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 41
30: aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
astore 3
start local 3 31: aload 3
ifnull 41
32: aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc "getLocale"
aconst_null
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 4
start local 4 33: aload 4
aload 3
aconst_null
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 5
start local 5 34: aload 5
instanceof java.util.Locale
ifeq 41
35: aload 5
checkcast java.util.Locale
astore 1
end local 5 end local 4 36: goto 41
StackMap locals: jakarta.servlet.http.HttpSession java.util.Locale java.util.List java.lang.Object
StackMap stack: java.lang.Exception
37: astore 4
start local 4 38: aload 4
invokestatic org.apache.tomcat.util.ExceptionUtils.unwrapInvocationTargetException:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
39: astore 5
start local 5 40: aload 5
invokestatic org.apache.tomcat.util.ExceptionUtils.handleThrowable:(Ljava/lang/Throwable;)V
end local 5 end local 4 end local 3 41: StackMap locals:
StackMap stack:
aload 1
ifnull 44
42: aload 1
43: areturn
44: StackMap locals:
StackMap stack:
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 45: aload 0
invokeinterface jakarta.servlet.http.HttpSession.getAttributeNames:()Ljava/util/Enumeration;
astore 4
start local 4 46: goto 51
47: StackMap locals: java.util.List java.util.Enumeration
StackMap stack:
aload 4
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.lang.String
astore 5
start local 5 48: aload 0
aload 5
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 6
start local 6 49: aload 6
instanceof java.util.Locale
ifeq 51
50: aload 3
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 6 end local 5 51: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 47
end local 4 52: aload 3
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 54
53: aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.util.Locale
astore 1
54: StackMap locals:
StackMap stack:
aload 1
55: areturn
end local 3 end local 2 end local 1 56: StackMap locals: jakarta.servlet.http.HttpSession
StackMap stack: java.lang.IllegalStateException
pop
57: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 58 0 in_session Ljakarta/servlet/http/HttpSession;
3 56 1 locale Ljava/util/Locale;
5 17 2 localeTestAttribute Ljava/lang/String;
6 17 6 obj Ljava/lang/Object;
23 56 2 tapestryArray Ljava/util/List<Ljava/lang/Object;>;
24 29 3 enumeration Ljava/util/Enumeration<Ljava/lang/String;>;
26 28 4 name Ljava/lang/String;
31 41 3 probableEngine Ljava/lang/Object;
33 36 4 readMethod Ljava/lang/reflect/Method;
34 36 5 possibleLocale Ljava/lang/Object;
38 41 4 e Ljava/lang/Exception;
40 41 5 t Ljava/lang/Throwable;
45 56 3 localeArray Ljava/util/List<Ljava/lang/Object;>;
46 52 4 enumeration Ljava/util/Enumeration<Ljava/lang/String;>;
48 51 5 name Ljava/lang/String;
49 51 6 obj Ljava/lang/Object;
Exception table:
from to target type
32 36 37 Class java.lang.Exception
2 21 56 Class java.lang.IllegalStateException
22 43 56 Class java.lang.IllegalStateException
44 55 56 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
in_session final
public static java.lang.Object guessUserFromSession(org.apache.catalina.Session);
descriptor: (Lorg/apache/catalina/Session;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=8, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokeinterface org.apache.catalina.Session.getPrincipal:()Ljava/security/Principal;
ifnull 4
3: aload 0
invokeinterface org.apache.catalina.Session.getPrincipal:()Ljava/security/Principal;
invokeinterface java.security.Principal.getName:()Ljava/lang/String;
areturn
4: StackMap locals:
StackMap stack:
aload 0
invokeinterface org.apache.catalina.Session.getSession:()Ljakarta/servlet/http/HttpSession;
astore 1
start local 1 5: aload 1
ifnonnull 7
6: aconst_null
areturn
7: StackMap locals: jakarta.servlet.http.HttpSession
StackMap stack:
aconst_null
astore 2
start local 2 8: getstatic org.apache.catalina.manager.util.SessionUtils.USER_TEST_ATTRIBUTES:[Ljava/lang/String;
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 23
StackMap locals: org.apache.catalina.Session jakarta.servlet.http.HttpSession java.lang.Object top int int java.lang.String[]
StackMap stack:
9: aload 6
iload 4
aaload
astore 3
start local 3 10: aload 1
aload 3
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 7
start local 7 11: aload 7
ifnull 14
12: aload 7
astore 2
13: goto 24
14: StackMap locals: org.apache.catalina.Session jakarta.servlet.http.HttpSession java.lang.Object java.lang.String int int java.lang.String[] java.lang.Object
StackMap stack:
aload 1
aload 3
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 7
15: aload 7
ifnull 18
16: aload 7
astore 2
17: goto 24
18: StackMap locals:
StackMap stack:
aload 1
aload 3
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 7
19: aload 7
ifnull 22
20: aload 7
astore 2
21: goto 24
end local 7 end local 3 22: StackMap locals: org.apache.catalina.Session jakarta.servlet.http.HttpSession java.lang.Object top int int java.lang.String[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
23: iload 4
iload 5
if_icmplt 9
24: StackMap locals: org.apache.catalina.Session jakarta.servlet.http.HttpSession java.lang.Object
StackMap stack:
aload 2
ifnull 27
25: aload 2
26: areturn
27: StackMap locals:
StackMap stack:
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 28: aload 1
invokeinterface jakarta.servlet.http.HttpSession.getAttributeNames:()Ljava/util/Enumeration;
astore 4
start local 4 29: goto 34
30: StackMap locals: java.util.List java.util.Enumeration
StackMap stack:
aload 4
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.lang.String
astore 5
start local 5 31: aload 1
aload 5
invokeinterface jakarta.servlet.http.HttpSession.getAttribute:(Ljava/lang/String;)Ljava/lang/Object;
astore 6
start local 6 32: aload 6
instanceof java.security.Principal
ifne 33
aload 6
instanceof javax.security.auth.Subject
ifeq 34
33: StackMap locals: java.lang.String java.lang.Object
StackMap stack:
aload 3
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 6 end local 5 34: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 30
end local 4 35: aload 3
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 37
36: aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
astore 2
37: StackMap locals:
StackMap stack:
aload 2
ifnull 40
38: aload 2
39: areturn
40: StackMap locals:
StackMap stack:
aload 2
41: areturn
end local 3 end local 2 42: StackMap locals: org.apache.catalina.Session jakarta.servlet.http.HttpSession
StackMap stack: java.lang.IllegalStateException
pop
43: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 44 0 in_session Lorg/apache/catalina/Session;
5 44 1 httpSession Ljakarta/servlet/http/HttpSession;
8 42 2 user Ljava/lang/Object;
10 22 3 userTestAttribute Ljava/lang/String;
11 22 7 obj Ljava/lang/Object;
28 42 3 principalArray Ljava/util/List<Ljava/lang/Object;>;
29 35 4 enumeration Ljava/util/Enumeration<Ljava/lang/String;>;
31 34 5 name Ljava/lang/String;
32 34 6 obj Ljava/lang/Object;
Exception table:
from to target type
7 26 42 Class java.lang.IllegalStateException
27 39 42 Class java.lang.IllegalStateException
40 41 42 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
in_session final
public static long getUsedTimeForSession(org.apache.catalina.Session);
descriptor: (Lorg/apache/catalina/Session;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
invokeinterface org.apache.catalina.Session.getThisAccessedTime:()J
aload 0
invokeinterface org.apache.catalina.Session.getCreationTime:()J
lsub
lstore 1
start local 1 1: lload 1
2: lreturn
end local 1 3: StackMap locals:
StackMap stack: java.lang.IllegalStateException
pop
4: ldc -1
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 in_session Lorg/apache/catalina/Session;
1 3 1 diffMilliSeconds J
Exception table:
from to target type
0 2 3 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
in_session
public static long getTTLForSession(org.apache.catalina.Session);
descriptor: (Lorg/apache/catalina/Session;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: sipush 1000
aload 0
invokeinterface org.apache.catalina.Session.getMaxInactiveInterval:()I
imul
i2l
invokestatic java.lang.System.currentTimeMillis:()J
aload 0
invokeinterface org.apache.catalina.Session.getThisAccessedTime:()J
lsub
lsub
lstore 1
start local 1 1: lload 1
2: lreturn
end local 1 3: StackMap locals:
StackMap stack: java.lang.IllegalStateException
pop
4: ldc -1
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 in_session Lorg/apache/catalina/Session;
1 3 1 diffMilliSeconds J
Exception table:
from to target type
0 2 3 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
in_session
public static long getInactiveTimeForSession(org.apache.catalina.Session);
descriptor: (Lorg/apache/catalina/Session;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: invokestatic java.lang.System.currentTimeMillis:()J
aload 0
invokeinterface org.apache.catalina.Session.getThisAccessedTime:()J
lsub
lstore 1
start local 1 1: lload 1
2: lreturn
end local 1 3: StackMap locals:
StackMap stack: java.lang.IllegalStateException
pop
4: ldc -1
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 in_session Lorg/apache/catalina/Session;
1 3 1 diffMilliSeconds J
Exception table:
from to target type
0 2 3 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
in_session
}
SourceFile: "SessionUtils.java"