public class org.apache.catalina.startup.ExpandWar
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.catalina.startup.ExpandWar
super_class: java.lang.Object
{
private static final org.apache.juli.logging.Log log;
descriptor: Lorg/apache/juli/logging/Log;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
protected static final org.apache.tomcat.util.res.StringManager sm;
descriptor: Lorg/apache/tomcat/util/res/StringManager;
flags: (0x001c) ACC_PROTECTED, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/catalina/startup/ExpandWar;
invokestatic org.apache.juli.logging.LogFactory.getLog:(Ljava/lang/Class;)Lorg/apache/juli/logging/Log;
putstatic org.apache.catalina.startup.ExpandWar.log:Lorg/apache/juli/logging/Log;
1: ldc "org.apache.catalina.startup"
invokestatic org.apache.tomcat.util.res.StringManager.getManager:(Ljava/lang/String;)Lorg/apache/tomcat/util/res/StringManager;
2: putstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
3: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/catalina/startup/ExpandWar;
public static java.lang.String expand(org.apache.catalina.Host, java.net.URL, java.lang.String);
descriptor: (Lorg/apache/catalina/Host;Ljava/net/URL;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=27, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
checkcast java.net.JarURLConnection
astore 3
start local 3 1: aload 3
iconst_0
invokevirtual java.net.JarURLConnection.setUseCaches:(Z)V
2: aload 3
invokevirtual java.net.JarURLConnection.getJarFileURL:()Ljava/net/URL;
astore 4
start local 4 3: aload 4
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
astore 5
start local 5 4: iconst_0
istore 6
start local 6 5: new java.io.File
dup
aload 0
invokeinterface org.apache.catalina.Host.getAppBaseFile:()Ljava/io/File;
aload 2
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 7
start local 7 6: new java.io.File
dup
aload 0
invokeinterface org.apache.catalina.Host.getAppBaseFile:()Ljava/io/File;
new java.lang.StringBuilder
dup
aload 2
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "/META-INF/war-tracker"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 8
start local 8 7: ldc -1
lstore 9
start local 9 8: aconst_null
astore 11
aconst_null
astore 12
9: aload 5
invokevirtual java.net.URLConnection.getInputStream:()Ljava/io/InputStream;
astore 13
start local 13 10: aload 5
invokevirtual java.net.URLConnection.getLastModified:()J
lstore 9
11: aload 13
ifnull 17
aload 13
invokevirtual java.io.InputStream.close:()V
goto 17
StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: java.lang.Throwable
12: astore 11
aload 13
ifnull 13
aload 13
invokevirtual java.io.InputStream.close:()V
end local 13 StackMap locals:
StackMap stack:
13: aload 11
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
14: astore 12
aload 11
ifnonnull 15
aload 12
astore 11
goto 16
StackMap locals:
StackMap stack:
15: aload 11
aload 12
if_acmpeq 16
aload 11
aload 12
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
16: aload 11
athrow
17: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.io.File.exists:()Z
ifeq 24
18: aload 8
invokevirtual java.io.File.exists:()Z
ifeq 19
aload 8
invokevirtual java.io.File.lastModified:()J
lload 9
lcmp
ifne 21
19: StackMap locals:
StackMap stack:
iconst_1
istore 6
20: aload 7
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
areturn
21: StackMap locals:
StackMap stack:
getstatic org.apache.catalina.startup.ExpandWar.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.deleteOld"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 7
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface org.apache.juli.logging.Log.info:(Ljava/lang/Object;)V
22: aload 7
invokestatic org.apache.catalina.startup.ExpandWar.delete:(Ljava/io/File;)Z
ifne 24
23: new java.io.IOException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.deleteFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 7
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
24: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.io.File.mkdir:()Z
ifne 26
aload 7
invokevirtual java.io.File.isDirectory:()Z
ifne 26
25: new java.io.IOException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.createFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 7
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
26: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
astore 11
start local 11 27: aload 11
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 29
28: new java.lang.StringBuilder
dup
aload 11
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 11
29: StackMap locals: java.lang.String
StackMap stack:
aload 8
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 12
start local 12 30: aload 12
invokevirtual java.io.File.isDirectory:()Z
ifne 32
aload 12
invokevirtual java.io.File.mkdirs:()Z
ifne 32
31: new java.io.IOException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.createFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 12
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
32: StackMap locals: java.io.File
StackMap stack:
aconst_null
astore 13
aconst_null
astore 14
33: aload 3
invokevirtual java.net.JarURLConnection.getJarFile:()Ljava/util/jar/JarFile;
astore 15
start local 15 34: aload 15
invokevirtual java.util.jar.JarFile.entries:()Ljava/util/Enumeration;
astore 16
start local 16 35: goto 79
36: StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File java.lang.Throwable java.lang.Throwable java.util.jar.JarFile java.util.Enumeration
StackMap stack:
aload 16
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.util.jar.JarEntry
astore 17
start local 17 37: aload 17
invokevirtual java.util.jar.JarEntry.getName:()Ljava/lang/String;
astore 18
start local 18 38: new java.io.File
dup
aload 7
aload 18
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 19
start local 19 39: aload 19
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
40: aload 11
41: invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
42: ifne 49
43: new java.lang.IllegalArgumentException
dup
44: getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.illegalPath"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 18
aastore
dup
iconst_2
45: aload 19
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
aastore
dup
iconst_3
46: aload 11
aastore
47: invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
48: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
49: StackMap locals: java.util.jar.JarEntry java.lang.String java.io.File
StackMap stack:
aload 18
bipush 47
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 20
start local 20 50: iload 20
iflt 58
51: new java.io.File
dup
aload 7
52: aload 18
iconst_0
iload 20
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
53: invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 21
start local 21 54: aload 21
invokevirtual java.io.File.mkdirs:()Z
ifne 58
aload 21
invokevirtual java.io.File.isDirectory:()Z
ifne 58
55: new java.io.IOException
dup
56: getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.createFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 21
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
57: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 21 58: StackMap locals: int
StackMap stack:
aload 18
ldc "/"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 60
59: goto 79
60: StackMap locals:
StackMap stack:
aconst_null
astore 21
aconst_null
astore 22
61: aload 15
aload 17
invokevirtual java.util.jar.JarFile.getInputStream:(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
astore 23
start local 23 62: aload 23
ifnonnull 66
63: new java.util.zip.ZipException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.missingJarEntry"
iconst_1
anewarray java.lang.Object
dup
iconst_0
64: aload 17
invokevirtual java.util.jar.JarEntry.getName:()Ljava/lang/String;
aastore
65: invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.util.zip.ZipException.<init>:(Ljava/lang/String;)V
athrow
66: StackMap locals: java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack:
aload 23
aload 19
invokestatic org.apache.catalina.startup.ExpandWar.expand:(Ljava/io/InputStream;Ljava/io/File;)V
67: aload 17
invokevirtual java.util.jar.JarEntry.getTime:()J
lstore 24
start local 24 68: lload 24
ldc -1
lcmp
ifeq 73
lload 24
lconst_0
lcmp
ifeq 73
69: aload 19
lload 24
invokevirtual java.io.File.setLastModified:(J)Z
ifne 73
70: new java.io.IOException
dup
71: getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.lastModifiedFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 19
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
72: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 24 73: StackMap locals:
StackMap stack:
aload 23
ifnull 79
aload 23
invokevirtual java.io.InputStream.close:()V
goto 79
StackMap locals:
StackMap stack: java.lang.Throwable
74: astore 21
aload 23
ifnull 75
aload 23
invokevirtual java.io.InputStream.close:()V
end local 23 StackMap locals:
StackMap stack:
75: aload 21
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
76: astore 22
aload 21
ifnonnull 77
aload 22
astore 21
goto 78
StackMap locals:
StackMap stack:
77: aload 21
aload 22
if_acmpeq 78
aload 21
aload 22
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
78: aload 21
athrow
end local 20 end local 19 end local 18 end local 17 79: StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File java.lang.Throwable java.lang.Throwable java.util.jar.JarFile java.util.Enumeration
StackMap stack:
aload 16
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 36
80: aload 8
invokevirtual java.io.File.createNewFile:()Z
ifne 82
81: new java.io.IOException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.createFileFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 8
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
82: StackMap locals:
StackMap stack:
aload 8
lload 9
invokevirtual java.io.File.setLastModified:(J)Z
ifne 84
83: new java.io.IOException
dup
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.lastModifiedFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 8
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
84: StackMap locals:
StackMap stack:
iconst_1
istore 6
end local 16 85: aload 15
ifnull 97
aload 15
invokevirtual java.util.jar.JarFile.close:()V
goto 97
StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File java.lang.Throwable java.lang.Throwable java.util.jar.JarFile
StackMap stack: java.lang.Throwable
86: astore 13
aload 15
ifnull 87
aload 15
invokevirtual java.util.jar.JarFile.close:()V
end local 15 StackMap locals:
StackMap stack:
87: aload 13
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
88: astore 14
aload 13
ifnonnull 89
aload 14
astore 13
goto 90
StackMap locals:
StackMap stack:
89: aload 13
aload 14
if_acmpeq 90
aload 13
aload 14
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
90: aload 13
athrow
StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File
StackMap stack: java.io.IOException
91: astore 13
start local 13 92: aload 13
athrow
end local 13 93: StackMap locals:
StackMap stack: java.lang.Throwable
astore 26
94: iload 6
ifne 96
95: aload 7
invokestatic org.apache.catalina.startup.ExpandWar.deleteDir:(Ljava/io/File;)Z
pop
96: StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File top top top top top top top top top top top top top java.lang.Throwable
StackMap stack:
aload 26
athrow
97: StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.net.JarURLConnection java.net.URL java.net.URLConnection int java.io.File java.io.File long java.lang.String java.io.File
StackMap stack:
iload 6
ifne 99
98: aload 7
invokestatic org.apache.catalina.startup.ExpandWar.deleteDir:(Ljava/io/File;)Z
pop
99: StackMap locals:
StackMap stack:
aload 7
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
areturn
end local 12 end local 11 end local 9 end local 8 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 100 0 host Lorg/apache/catalina/Host;
0 100 1 war Ljava/net/URL;
0 100 2 pathname Ljava/lang/String;
1 100 3 juc Ljava/net/JarURLConnection;
3 100 4 jarFileUrl Ljava/net/URL;
4 100 5 jfuc Ljava/net/URLConnection;
5 100 6 success Z
6 100 7 docBase Ljava/io/File;
7 100 8 warTracker Ljava/io/File;
8 100 9 warLastModified J
10 13 13 is Ljava/io/InputStream;
27 100 11 canonicalDocBasePrefix Ljava/lang/String;
30 100 12 warTrackerParent Ljava/io/File;
34 87 15 jarFile Ljava/util/jar/JarFile;
35 85 16 jarEntries Ljava/util/Enumeration<Ljava/util/jar/JarEntry;>;
37 79 17 jarEntry Ljava/util/jar/JarEntry;
38 79 18 name Ljava/lang/String;
39 79 19 expandedFile Ljava/io/File;
50 79 20 last I
54 58 21 parent Ljava/io/File;
62 75 23 input Ljava/io/InputStream;
68 73 24 lastModified J
92 93 13 e Ljava/io/IOException;
Exception table:
from to target type
10 11 12 any
9 14 14 any
62 73 74 any
61 76 76 any
34 85 86 any
33 88 88 any
32 91 91 Class java.io.IOException
32 93 93 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
host
war
pathname
public static void validate(org.apache.catalina.Host, java.net.URL, java.lang.String);
descriptor: (Lorg/apache/catalina/Host;Ljava/net/URL;Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=13, args_size=3
start local 0 start local 1 start local 2 0: new java.io.File
dup
aload 0
invokeinterface org.apache.catalina.Host.getAppBaseFile:()Ljava/io/File;
aload 2
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 3
start local 3 1: aload 3
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
astore 4
start local 4 2: aload 4
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 4
3: new java.lang.StringBuilder
dup
aload 4
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
4: StackMap locals: java.io.File java.lang.String
StackMap stack:
aload 1
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
checkcast java.net.JarURLConnection
astore 5
start local 5 5: aload 5
iconst_0
invokevirtual java.net.JarURLConnection.setUseCaches:(Z)V
6: aconst_null
astore 6
aconst_null
astore 7
7: aload 5
invokevirtual java.net.JarURLConnection.getJarFile:()Ljava/util/jar/JarFile;
astore 8
start local 8 8: aload 8
invokevirtual java.util.jar.JarFile.entries:()Ljava/util/Enumeration;
astore 9
start local 9 9: goto 23
10: StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.io.File java.lang.String java.net.JarURLConnection java.lang.Throwable java.lang.Throwable java.util.jar.JarFile java.util.Enumeration
StackMap stack:
aload 9
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.util.jar.JarEntry
astore 10
start local 10 11: aload 10
invokevirtual java.util.jar.JarEntry.getName:()Ljava/lang/String;
astore 11
start local 11 12: new java.io.File
dup
aload 3
aload 11
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 12
start local 12 13: aload 12
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
14: aload 4
15: invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
16: ifne 23
17: new java.lang.IllegalArgumentException
dup
18: getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.illegalPath"
iconst_4
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
dup
iconst_1
aload 11
aastore
dup
iconst_2
19: aload 12
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
aastore
dup
iconst_3
20: aload 4
aastore
21: invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
22: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 12 end local 11 end local 10 23: StackMap locals:
StackMap stack:
aload 9
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 10
end local 9 24: aload 8
ifnull 32
aload 8
invokevirtual java.util.jar.JarFile.close:()V
goto 32
StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.io.File java.lang.String java.net.JarURLConnection java.lang.Throwable java.lang.Throwable java.util.jar.JarFile
StackMap stack: java.lang.Throwable
25: astore 6
aload 8
ifnull 26
aload 8
invokevirtual java.util.jar.JarFile.close:()V
end local 8 StackMap locals:
StackMap stack:
26: aload 6
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
27: astore 7
aload 6
ifnonnull 28
aload 7
astore 6
goto 29
StackMap locals:
StackMap stack:
28: aload 6
aload 7
if_acmpeq 29
aload 6
aload 7
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
29: aload 6
athrow
StackMap locals: org.apache.catalina.Host java.net.URL java.lang.String java.io.File java.lang.String java.net.JarURLConnection
StackMap stack: java.io.IOException
30: astore 6
start local 6 31: aload 6
athrow
end local 6 32: StackMap locals:
StackMap stack:
return
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 33 0 host Lorg/apache/catalina/Host;
0 33 1 war Ljava/net/URL;
0 33 2 pathname Ljava/lang/String;
1 33 3 docBase Ljava/io/File;
2 33 4 canonicalDocBasePrefix Ljava/lang/String;
5 33 5 juc Ljava/net/JarURLConnection;
8 26 8 jarFile Ljava/util/jar/JarFile;
9 24 9 jarEntries Ljava/util/Enumeration<Ljava/util/jar/JarEntry;>;
11 23 10 jarEntry Ljava/util/jar/JarEntry;
12 23 11 name Ljava/lang/String;
13 23 12 expandedFile Ljava/io/File;
31 32 6 e Ljava/io/IOException;
Exception table:
from to target type
8 24 25 any
7 27 27 any
6 30 30 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
host
war
pathname
public static boolean copy(java.io.File, java.io.File);
descriptor: (Ljava/io/File;Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=11, args_size=2
start local 0 start local 1 0: iconst_1
istore 2
start local 2 1: aconst_null
astore 3
start local 3 2: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 6
3: aload 0
invokevirtual java.io.File.list:()[Ljava/lang/String;
astore 3
4: aload 1
invokevirtual java.io.File.mkdir:()Z
istore 2
5: goto 8
6: StackMap locals: int java.lang.String[]
StackMap stack:
iconst_1
anewarray java.lang.String
astore 3
7: aload 3
iconst_0
ldc ""
aastore
8: StackMap locals:
StackMap stack:
aload 3
ifnonnull 10
9: iconst_0
anewarray java.lang.String
astore 3
10: StackMap locals:
StackMap stack:
iconst_0
istore 4
start local 4 11: goto 36
12: StackMap locals: int
StackMap stack:
new java.io.File
dup
aload 0
aload 3
iload 4
aaload
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 5
start local 5 13: new java.io.File
dup
aload 1
aload 3
iload 4
aaload
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 6
start local 6 14: aload 5
invokevirtual java.io.File.isDirectory:()Z
ifeq 17
15: aload 5
aload 6
invokestatic org.apache.catalina.startup.ExpandWar.copy:(Ljava/io/File;Ljava/io/File;)Z
istore 2
16: goto 35
17: StackMap locals: java.io.File java.io.File
StackMap stack:
aconst_null
astore 7
aconst_null
astore 8
18: new java.io.FileInputStream
dup
aload 5
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
astore 9
start local 9 19: new java.io.FileOutputStream
dup
aload 6
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokevirtual java.io.FileOutputStream.getChannel:()Ljava/nio/channels/FileChannel;
astore 10
start local 10 20: aload 9
lconst_0
aload 9
invokevirtual java.nio.channels.FileChannel.size:()J
aload 10
invokevirtual java.nio.channels.FileChannel.transferTo:(JJLjava/nio/channels/WritableByteChannel;)J
pop2
21: aload 10
ifnull 24
aload 10
invokevirtual java.nio.channels.FileChannel.close:()V
goto 24
StackMap locals: java.io.File java.io.File int java.lang.String[] int java.io.File java.io.File java.lang.Throwable java.lang.Throwable java.nio.channels.FileChannel java.nio.channels.FileChannel
StackMap stack: java.lang.Throwable
22: astore 7
aload 10
ifnull 23
aload 10
invokevirtual java.nio.channels.FileChannel.close:()V
end local 10 StackMap locals:
StackMap stack:
23: aload 7
athrow
StackMap locals:
StackMap stack:
24: aload 9
ifnull 35
aload 9
invokevirtual java.nio.channels.FileChannel.close:()V
goto 35
StackMap locals:
StackMap stack: java.lang.Throwable
25: astore 8
aload 7
ifnonnull 26
aload 8
astore 7
goto 27
StackMap locals:
StackMap stack:
26: aload 7
aload 8
if_acmpeq 27
aload 7
aload 8
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
27: aload 9
ifnull 28
aload 9
invokevirtual java.nio.channels.FileChannel.close:()V
end local 9 StackMap locals:
StackMap stack:
28: aload 7
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
29: astore 8
aload 7
ifnonnull 30
aload 8
astore 7
goto 31
StackMap locals:
StackMap stack:
30: aload 7
aload 8
if_acmpeq 31
aload 7
aload 8
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
31: aload 7
athrow
StackMap locals: java.io.File java.io.File int java.lang.String[] int java.io.File java.io.File
StackMap stack: java.io.IOException
32: astore 7
start local 7 33: getstatic org.apache.catalina.startup.ExpandWar.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
ldc "expandWar.copy"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 5
aastore
dup
iconst_1
aload 6
aastore
invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 7
invokeinterface org.apache.juli.logging.Log.error:(Ljava/lang/Object;Ljava/lang/Throwable;)V
34: iconst_0
istore 2
end local 7 end local 6 end local 5 35: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
36: iload 4
aload 3
arraylength
if_icmpge 37
iload 2
ifne 12
end local 4 37: StackMap locals:
StackMap stack:
iload 2
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 38 0 src Ljava/io/File;
0 38 1 dest Ljava/io/File;
1 38 2 result Z
2 38 3 files [Ljava/lang/String;
11 37 4 i I
13 35 5 fileSrc Ljava/io/File;
14 35 6 fileDest Ljava/io/File;
19 28 9 ic Ljava/nio/channels/FileChannel;
20 23 10 oc Ljava/nio/channels/FileChannel;
33 35 7 e Ljava/io/IOException;
Exception table:
from to target type
20 21 22 any
19 24 25 any
18 29 29 any
17 32 32 Class java.io.IOException
MethodParameters:
Name Flags
src
dest
public static boolean delete(java.io.File);
descriptor: (Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
invokestatic org.apache.catalina.startup.ExpandWar.delete:(Ljava/io/File;Z)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 dir Ljava/io/File;
MethodParameters:
Name Flags
dir
public static boolean delete(java.io.File, boolean);
descriptor: (Ljava/io/File;Z)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 3
1: aload 0
iload 1
invokestatic org.apache.catalina.startup.ExpandWar.deleteDir:(Ljava/io/File;Z)Z
istore 2
start local 2 2: goto 7
end local 2 3: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.exists:()Z
ifeq 6
4: aload 0
invokevirtual java.io.File.delete:()Z
istore 2
start local 2 5: goto 7
end local 2 6: StackMap locals:
StackMap stack:
iconst_1
istore 2
start local 2 7: StackMap locals: int
StackMap stack:
iload 1
ifeq 11
iload 2
ifne 11
8: getstatic org.apache.catalina.startup.ExpandWar.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
9: ldc "expandWar.deleteFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
10: invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface org.apache.juli.logging.Log.error:(Ljava/lang/Object;)V
11: StackMap locals:
StackMap stack:
iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 dir Ljava/io/File;
0 12 1 logFailure Z
2 3 2 result Z
5 6 2 result Z
7 12 2 result Z
MethodParameters:
Name Flags
dir
logFailure
public static boolean deleteDir(java.io.File);
descriptor: (Ljava/io/File;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
invokestatic org.apache.catalina.startup.ExpandWar.deleteDir:(Ljava/io/File;Z)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 dir Ljava/io/File;
MethodParameters:
Name Flags
dir
public static boolean deleteDir(java.io.File, boolean);
descriptor: (Ljava/io/File;Z)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=8, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.io.File.list:()[Ljava/lang/String;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: iconst_0
anewarray java.lang.String
astore 2
3: StackMap locals: java.lang.String[]
StackMap stack:
aload 2
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 11
StackMap locals: java.io.File int java.lang.String[] top int int java.lang.String[]
StackMap stack:
4: aload 6
iload 4
aaload
astore 3
start local 3 5: new java.io.File
dup
aload 0
aload 3
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 7
start local 7 6: aload 7
invokevirtual java.io.File.isDirectory:()Z
ifeq 9
7: aload 7
iload 1
invokestatic org.apache.catalina.startup.ExpandWar.deleteDir:(Ljava/io/File;Z)Z
pop
8: goto 10
9: StackMap locals: java.io.File int java.lang.String[] java.lang.String int int java.lang.String[] java.io.File
StackMap stack:
aload 7
invokevirtual java.io.File.delete:()Z
pop
end local 7 end local 3 10: StackMap locals: java.io.File int java.lang.String[] top int int java.lang.String[]
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
11: iload 4
iload 5
if_icmplt 4
12: aload 0
invokevirtual java.io.File.exists:()Z
ifeq 15
13: aload 0
invokevirtual java.io.File.delete:()Z
istore 3
start local 3 14: goto 16
end local 3 15: StackMap locals: java.io.File int java.lang.String[]
StackMap stack:
iconst_1
istore 3
start local 3 16: StackMap locals: int
StackMap stack:
iload 1
ifeq 20
iload 3
ifne 20
17: getstatic org.apache.catalina.startup.ExpandWar.log:Lorg/apache/juli/logging/Log;
getstatic org.apache.catalina.startup.ExpandWar.sm:Lorg/apache/tomcat/util/res/StringManager;
18: ldc "expandWar.deleteFailed"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aastore
19: invokevirtual org.apache.tomcat.util.res.StringManager.getString:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface org.apache.juli.logging.Log.error:(Ljava/lang/Object;)V
20: StackMap locals:
StackMap stack:
iload 3
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 dir Ljava/io/File;
0 21 1 logFailure Z
1 21 2 files [Ljava/lang/String;
5 10 3 s Ljava/lang/String;
6 10 7 file Ljava/io/File;
14 15 3 result Z
16 21 3 result Z
MethodParameters:
Name Flags
dir
logFailure
private static void expand(java.io.InputStream, java.io.File);
descriptor: (Ljava/io/InputStream;Ljava/io/File;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
aconst_null
astore 3
1: new java.io.BufferedOutputStream
dup
new java.io.FileOutputStream
dup
aload 1
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokespecial java.io.BufferedOutputStream.<init>:(Ljava/io/OutputStream;)V
2: astore 4
start local 4 3: sipush 2048
newarray 8
astore 5
start local 5 4: StackMap locals: java.io.InputStream java.io.File java.lang.Throwable java.lang.Throwable java.io.BufferedOutputStream byte[]
StackMap stack:
aload 0
aload 5
invokevirtual java.io.InputStream.read:([B)I
istore 6
start local 6 5: iload 6
ifgt 7
6: goto 9
7: StackMap locals: int
StackMap stack:
aload 4
aload 5
iconst_0
iload 6
invokevirtual java.io.BufferedOutputStream.write:([BII)V
end local 6 8: goto 4
end local 5 9: StackMap locals:
StackMap stack:
aload 4
ifnull 15
aload 4
invokevirtual java.io.BufferedOutputStream.close:()V
goto 15
StackMap locals:
StackMap stack: java.lang.Throwable
10: astore 2
aload 4
ifnull 11
aload 4
invokevirtual java.io.BufferedOutputStream.close:()V
end local 4 StackMap locals:
StackMap stack:
11: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
12: astore 3
aload 2
ifnonnull 13
aload 3
astore 2
goto 14
StackMap locals:
StackMap stack:
13: aload 2
aload 3
if_acmpeq 14
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
14: aload 2
athrow
15: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 input Ljava/io/InputStream;
0 16 1 file Ljava/io/File;
3 11 4 output Ljava/io/BufferedOutputStream;
4 9 5 buffer [B
5 8 6 n I
Exception table:
from to target type
3 9 10 any
1 12 12 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
input
file
}
SourceFile: "ExpandWar.java"