public class org.jruby.util.JRubyClassLoader extends org.jruby.util.ClassDefiningJRubyClassLoader
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.util.JRubyClassLoader
super_class: org.jruby.util.ClassDefiningJRubyClassLoader
{
private static final org.jruby.util.log.Logger LOG;
descriptor: Lorg/jruby/util/log/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private java.lang.Runnable unloader;
descriptor: Ljava/lang/Runnable;
flags: (0x0002) ACC_PRIVATE
private static volatile java.io.File tempDir;
descriptor: Ljava/io/File;
flags: (0x004a) ACC_PRIVATE, ACC_STATIC, ACC_VOLATILE
private final java.util.Map<java.lang.String, java.net.URL> cachedJarPaths;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/net/URL;>;
private static final java.lang.String TEMP_DIR_PREFIX;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "jruby-"
private static java.lang.String tempDirName;
descriptor: Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/jruby/util/JRubyClassLoader;
invokestatic org.jruby.util.log.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/jruby/util/log/Logger;
putstatic org.jruby.util.JRubyClassLoader.LOG:Lorg/jruby/util/log/Logger;
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.ClassLoader);
descriptor: (Ljava/lang/ClassLoader;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial org.jruby.util.ClassDefiningJRubyClassLoader.<init>:(Ljava/lang/ClassLoader;)V
1: aload 0
new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putfield org.jruby.util.JRubyClassLoader.cachedJarPaths:Ljava/util/Map;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/JRubyClassLoader;
0 3 1 parent Ljava/lang/ClassLoader;
MethodParameters:
Name Flags
parent
public void addURL(java.net.URL);
descriptor: (Ljava/net/URL;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=10, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.net.URL.toString:()Ljava/lang/String;
ldc "!/"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifne 2
1: aload 1
invokevirtual java.net.URL.getProtocol:()Ljava/lang/String;
ldc "file"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 29
aload 1
invokevirtual java.net.URL.getProtocol:()Ljava/lang/String;
ldc "http"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 29
aload 1
invokevirtual java.net.URL.getProtocol:()Ljava/lang/String;
ldc "https"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 29
2: StackMap locals:
StackMap stack:
ldc "jruby"
new java.io.File
dup
aload 1
invokevirtual java.net.URL.getFile:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokestatic org.jruby.util.JRubyClassLoader.getTempDir:()Ljava/io/File;
invokestatic java.io.File.createTempFile:(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
astore 2
start local 2 3: aconst_null
astore 3
aconst_null
astore 4
4: new java.io.FileOutputStream
dup
aload 2
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 5
start local 5 5: aload 1
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
astore 6
start local 6 6: new java.io.BufferedOutputStream
dup
aload 5
invokespecial java.io.BufferedOutputStream.<init>:(Ljava/io/OutputStream;)V
astore 7
start local 7 7: new java.io.BufferedInputStream
dup
aload 6
invokespecial java.io.BufferedInputStream.<init>:(Ljava/io/InputStream;)V
astore 8
start local 8 8: aload 8
invokevirtual java.io.InputStream.read:()I
istore 9
start local 9 9: goto 12
10: StackMap locals: org.jruby.util.JRubyClassLoader java.net.URL java.io.File java.lang.Throwable java.lang.Throwable java.io.FileOutputStream java.io.InputStream java.io.OutputStream java.io.InputStream int
StackMap stack:
aload 7
iload 9
invokevirtual java.io.OutputStream.write:(I)V
11: aload 8
invokevirtual java.io.InputStream.read:()I
istore 9
12: StackMap locals:
StackMap stack:
iload 9
iconst_m1
if_icmpne 10
13: aload 7
invokevirtual java.io.OutputStream.flush:()V
14: aload 2
invokevirtual java.io.File.toURI:()Ljava/net/URI;
invokevirtual java.net.URI.toURL:()Ljava/net/URL;
astore 1
15: aload 0
getfield org.jruby.util.JRubyClassLoader.cachedJarPaths:Ljava/util/Map;
aload 1
invokestatic org.jruby.util.URLUtil.getPath:(Ljava/net/URL;)Ljava/lang/String;
aload 1
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 9 end local 8 end local 7 16: aload 6
ifnull 19
aload 6
invokevirtual java.io.InputStream.close:()V
goto 19
StackMap locals: org.jruby.util.JRubyClassLoader java.net.URL java.io.File java.lang.Throwable java.lang.Throwable java.io.FileOutputStream java.io.InputStream
StackMap stack: java.lang.Throwable
17: astore 3
aload 6
ifnull 18
aload 6
invokevirtual java.io.InputStream.close:()V
end local 6 StackMap locals:
StackMap stack:
18: aload 3
athrow
StackMap locals:
StackMap stack:
19: aload 5
ifnull 29
aload 5
invokevirtual java.io.FileOutputStream.close:()V
goto 29
StackMap locals:
StackMap stack: java.lang.Throwable
20: astore 4
aload 3
ifnonnull 21
aload 4
astore 3
goto 22
StackMap locals:
StackMap stack:
21: aload 3
aload 4
if_acmpeq 22
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
22: aload 5
ifnull 23
aload 5
invokevirtual java.io.FileOutputStream.close:()V
end local 5 StackMap locals:
StackMap stack:
23: aload 3
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
24: astore 4
aload 3
ifnonnull 25
aload 4
astore 3
goto 26
StackMap locals:
StackMap stack:
25: aload 3
aload 4
if_acmpeq 26
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
26: aload 3
athrow
end local 2 27: StackMap locals: org.jruby.util.JRubyClassLoader java.net.URL
StackMap stack: java.io.IOException
astore 2
start local 2 28: new java.lang.RuntimeException
dup
ldc "BUG: we can not copy embedded jar to temp directory"
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 29: StackMap locals:
StackMap stack:
aload 0
aload 1
invokespecial org.jruby.util.ClassDefiningJRubyClassLoader.addURL:(Ljava/net/URL;)V
30: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lorg/jruby/util/JRubyClassLoader;
0 31 1 url Ljava/net/URL;
3 27 2 f Ljava/io/File;
5 23 5 fileOut Ljava/io/FileOutputStream;
6 18 6 urlIn Ljava/io/InputStream;
7 16 7 out Ljava/io/OutputStream;
8 16 8 in Ljava/io/InputStream;
9 16 9 i I
28 29 2 e Ljava/io/IOException;
Exception table:
from to target type
6 16 17 any
5 19 20 any
4 24 24 any
2 27 27 Class java.io.IOException
MethodParameters:
Name Flags
url
private static synchronized java.io.File getTempDir();
descriptor: ()Ljava/io/File;
flags: (0x002a) ACC_PRIVATE, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=0, args_size=0
0: getstatic org.jruby.util.JRubyClassLoader.tempDir:Ljava/io/File;
ifnull 1
getstatic org.jruby.util.JRubyClassLoader.tempDir:Ljava/io/File;
areturn
1: StackMap locals:
StackMap stack:
new java.io.File
dup
invokestatic org.jruby.util.JRubyClassLoader.tempDir:()Ljava/lang/String;
invokestatic org.jruby.util.JRubyClassLoader.tempDirName:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
putstatic org.jruby.util.JRubyClassLoader.tempDir:Ljava/io/File;
2: getstatic org.jruby.util.JRubyClassLoader.tempDir:Ljava/io/File;
invokevirtual java.io.File.mkdirs:()Z
ifeq 4
3: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
new org.jruby.util.JRubyClassLoader$1
dup
invokespecial org.jruby.util.JRubyClassLoader$1.<init>:()V
invokevirtual java.lang.Runtime.addShutdownHook:(Ljava/lang/Thread;)V
4: StackMap locals:
StackMap stack:
getstatic org.jruby.util.JRubyClassLoader.tempDir:Ljava/io/File;
areturn
LocalVariableTable:
Start End Slot Name Signature
private static java.lang.String tempDirName();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=0
0: getstatic org.jruby.util.JRubyClassLoader.tempDirName:Ljava/lang/String;
astore 0
start local 0 1: aload 0
ifnull 2
aload 0
areturn
2: StackMap locals: java.lang.String
StackMap stack:
invokestatic java.lang.management.ManagementFactory.getRuntimeMXBean:()Ljava/lang/management/RuntimeMXBean;
invokeinterface java.lang.management.RuntimeMXBean.getName:()Ljava/lang/String;
astore 1
start local 1 3: new java.lang.StringBuilder
dup
ldc "jruby-"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
ldc "@"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
iconst_0
aaload
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
dup
putstatic org.jruby.util.JRubyClassLoader.tempDirName:Ljava/lang/String;
4: areturn
end local 1 5: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
start local 1 6: getstatic org.jruby.util.JRubyClassLoader.LOG:Lorg/jruby/util/log/Logger;
aload 1
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/Throwable;)V
7: new java.lang.StringBuilder
dup
ldc "jruby-"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc Lorg/jruby/util/JRubyClassLoader;
invokestatic java.lang.System.identityHashCode:(Ljava/lang/Object;)I
invokestatic java.lang.Integer.toHexString:(I)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
dup
putstatic org.jruby.util.JRubyClassLoader.tempDirName:Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 dirName Ljava/lang/String;
3 5 1 processName Ljava/lang/String;
6 8 1 ex Ljava/lang/Throwable;
Exception table:
from to target type
2 4 5 Class java.lang.Throwable
private static java.lang.String tempDir();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=0
0: getstatic org.jruby.util.cli.Options.JI_NESTED_JAR_TMPDIR:Lcom/headius/options/Option;
invokevirtual com.headius.options.Option.load:()Ljava/lang/Object;
checkcast java.lang.String
astore 0
start local 0 1: aload 0
ifnull 3
2: aload 0
areturn
3: StackMap locals: java.lang.String
StackMap stack:
ldc "java.io.tmpdir"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
4: areturn
5: StackMap locals:
StackMap stack: java.lang.SecurityException
astore 1
start local 1 6: getstatic org.jruby.util.JRubyClassLoader.LOG:Lorg/jruby/util/log/Logger;
ldc "could not access 'java.io.tmpdir' will use working directory"
aload 1
invokeinterface org.jruby.util.log.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 1 7: ldc ""
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 jrubyTmpdir Ljava/lang/String;
6 7 1 ex Ljava/lang/SecurityException;
Exception table:
from to target type
3 4 5 Class java.lang.SecurityException
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic org.jruby.util.cli.Options.JI_CLOSE_CLASSLOADER:Lcom/headius/options/Option;
invokevirtual com.headius.options.Option.load:()Ljava/lang/Object;
checkcast java.lang.Boolean
invokevirtual java.lang.Boolean.booleanValue:()Z
ifeq 5
1: aload 0
invokespecial org.jruby.util.ClassDefiningJRubyClassLoader.close:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.Exception
3: astore 1
start local 1 4: getstatic org.jruby.util.JRubyClassLoader.LOG:Lorg/jruby/util/log/Logger;
aload 1
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/Throwable;)V
end local 1 5: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.util.JRubyClassLoader.getJDBCDriverUnloader:()Ljava/lang/Runnable;
invokeinterface java.lang.Runnable.run:()V
6: goto 9
7: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 8: getstatic org.jruby.util.JRubyClassLoader.LOG:Lorg/jruby/util/log/Logger;
aload 1
invokeinterface org.jruby.util.log.Logger.debug:(Ljava/lang/Throwable;)V
end local 1 9: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.util.JRubyClassLoader.terminateJarIndexCacheEntries:()V
10: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/jruby/util/JRubyClassLoader;
4 5 1 ex Ljava/lang/Exception;
8 9 1 ex Ljava/lang/Exception;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
5 6 7 Class java.lang.Exception
protected void terminateJarIndexCacheEntries();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.JRubyClassLoader.cachedJarPaths:Ljava/util/Map;
invokedynamic accept()Ljava/util/function/BiConsumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;Ljava/lang/Object;)V
org/jruby/util/JRubyClassLoader.lambda$0(Ljava/lang/String;Ljava/net/URL;)V (6)
(Ljava/lang/String;Ljava/net/URL;)V
invokeinterface java.util.Map.forEach:(Ljava/util/function/BiConsumer;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/util/JRubyClassLoader;
public synchronized java.lang.Runnable getJDBCDriverUnloader();
descriptor: ()Ljava/lang/Runnable;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.JRubyClassLoader.unloader:Ljava/lang/Runnable;
ifnonnull 15
1: aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc "/org/jruby/util/JDBCDriverUnloader.class"
invokevirtual java.lang.Class.getResourceAsStream:(Ljava/lang/String;)Ljava/io/InputStream;
astore 1
start local 1 2: new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
astore 2
start local 2 3: sipush 4096
newarray 8
astore 3
start local 3 4: goto 6
start local 4 5: StackMap locals: org.jruby.util.JRubyClassLoader java.io.InputStream java.io.ByteArrayOutputStream byte[] int
StackMap stack:
aload 2
aload 3
iconst_0
iload 4
invokevirtual java.io.ByteArrayOutputStream.write:([BII)V
end local 4 6: StackMap locals:
StackMap stack:
aload 1
aload 3
invokevirtual java.io.InputStream.read:([B)I
dup
istore 4
start local 4 7: iconst_m1
if_icmpne 5
8: aload 0
ldc "org.jruby.util.JDBCDriverUnloader"
aload 2
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
invokevirtual org.jruby.util.JRubyClassLoader.defineClass:(Ljava/lang/String;[B)Ljava/lang/Class;
astore 5
start local 5 9: aload 0
aload 5
invokevirtual java.lang.Class.newInstance:()Ljava/lang/Object;
checkcast java.lang.Runnable
putfield org.jruby.util.JRubyClassLoader.unloader:Ljava/lang/Runnable;
end local 5 end local 4 end local 3 end local 2 end local 1 10: goto 15
11: StackMap locals: org.jruby.util.JRubyClassLoader
StackMap stack: java.lang.RuntimeException
astore 1
start local 1 12: aload 1
athrow
end local 1 13: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 14: new java.lang.RuntimeException
dup
aload 1
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 15: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.JRubyClassLoader.unloader:Ljava/lang/Runnable;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/jruby/util/JRubyClassLoader;
2 10 1 unloaderStream Ljava/io/InputStream;
3 10 2 baos Ljava/io/ByteArrayOutputStream;
4 10 3 buf [B
5 6 4 bytesRead I
7 10 4 bytesRead I
9 10 5 unloaderClass Ljava/lang/Class<*>;
12 13 1 e Ljava/lang/RuntimeException;
14 15 1 e Ljava/lang/Exception;
Exception table:
from to target type
1 10 11 Class java.lang.RuntimeException
1 10 13 Class java.lang.Exception
RuntimeVisibleAnnotations:
java.lang.Deprecated()
private static void lambda$0(java.lang.String, java.net.URL);
descriptor: (Ljava/lang/String;Ljava/net/URL;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.net.URL.openConnection:()Ljava/net/URLConnection;
astore 2
start local 2 1: aload 2
instanceof java.net.JarURLConnection
ifeq 6
2: aload 2
checkcast java.net.JarURLConnection
invokevirtual java.net.JarURLConnection.getJarFile:()Ljava/util/jar/JarFile;
astore 3
start local 3 3: aload 3
invokevirtual java.util.jar.JarFile.close:()V
4: goto 6
StackMap locals: java.lang.String java.net.URL java.net.URLConnection java.util.jar.JarFile
StackMap stack: java.io.IOException
5: pop
end local 3 6: StackMap locals:
StackMap stack:
aload 0
invokestatic org.jruby.util.JarResource.removeJarResource:(Ljava/lang/String;)Z
pop
7: new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 3
start local 3 8: aload 3
invokevirtual java.io.File.delete:()Z
pop
end local 3 end local 2 9: goto 11
StackMap locals: java.lang.String java.net.URL
StackMap stack: java.lang.Exception
10: pop
11: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 path Ljava/lang/String;
0 12 1 url Ljava/net/URL;
1 9 2 connection Ljava/net/URLConnection;
3 6 3 jarFile Ljava/util/jar/JarFile;
8 9 3 jarFile Ljava/io/File;
Exception table:
from to target type
3 4 5 Class java.io.IOException
0 9 10 Class java.lang.Exception
}
SourceFile: "JRubyClassLoader.java"
NestMembers:
org.jruby.util.JRubyClassLoader$1
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
org.jruby.util.JRubyClassLoader$1