public final class io.undertow.server.DirectByteBufferDeallocator
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: io.undertow.server.DirectByteBufferDeallocator
super_class: java.lang.Object
{
private static final boolean SUPPORTED;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Method cleaner;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Method cleanerClean;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final sun.misc.Unsafe UNSAFE;
descriptor: Lsun/misc/Unsafe;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=7, args_size=0
0: ldc "java.specification.version"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 1: aload 0
ldc "1."
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 3
2: aload 0
iconst_2
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 0
3: StackMap locals: java.lang.String
StackMap stack:
aload 0
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 1
start local 1 4: aconst_null
astore 2
start local 2 5: aconst_null
astore 3
start local 3 6: aconst_null
astore 5
start local 5 7: iload 1
bipush 9
if_icmpge 16
8: ldc "java.nio.DirectByteBuffer"
ldc "cleaner"
invokestatic io.undertow.server.DirectByteBufferDeallocator.getAccesibleMethod:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;
astore 2
9: ldc "sun.misc.Cleaner"
ldc "clean"
invokestatic io.undertow.server.DirectByteBufferDeallocator.getAccesibleMethod:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;
astore 3
10: iconst_1
istore 4
start local 4 11: goto 24
end local 4 StackMap locals: java.lang.String int java.lang.reflect.Method java.lang.reflect.Method top sun.misc.Unsafe
StackMap stack: java.lang.Throwable
12: astore 6
start local 6 13: getstatic io.undertow.UndertowLogger.ROOT_LOGGER:Lio/undertow/UndertowLogger;
aload 6
invokeinterface io.undertow.UndertowLogger.directBufferDeallocatorInitializationFailed:(Ljava/lang/Throwable;)V
14: iconst_0
istore 4
end local 6 start local 4 15: goto 24
end local 4 16: StackMap locals:
StackMap stack:
invokestatic io.undertow.server.DirectByteBufferDeallocator.getUnsafe:()Lsun/misc/Unsafe;
astore 5
17: aload 5
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc "invokeCleaner"
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/nio/ByteBuffer;
aastore
invokevirtual java.lang.Class.getDeclaredMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 3
18: aload 3
iconst_1
invokevirtual java.lang.reflect.Method.setAccessible:(Z)V
19: iconst_1
istore 4
start local 4 20: goto 24
end local 4 StackMap locals:
StackMap stack: java.lang.Throwable
21: astore 6
start local 6 22: getstatic io.undertow.UndertowLogger.ROOT_LOGGER:Lio/undertow/UndertowLogger;
aload 6
invokeinterface io.undertow.UndertowLogger.directBufferDeallocatorInitializationFailed:(Ljava/lang/Throwable;)V
23: iconst_0
istore 4
end local 6 start local 4 24: StackMap locals: java.lang.String int java.lang.reflect.Method java.lang.reflect.Method int sun.misc.Unsafe
StackMap stack:
iload 4
putstatic io.undertow.server.DirectByteBufferDeallocator.SUPPORTED:Z
25: aload 2
putstatic io.undertow.server.DirectByteBufferDeallocator.cleaner:Ljava/lang/reflect/Method;
26: aload 3
putstatic io.undertow.server.DirectByteBufferDeallocator.cleanerClean:Ljava/lang/reflect/Method;
27: aload 5
putstatic io.undertow.server.DirectByteBufferDeallocator.UNSAFE:Lsun/misc/Unsafe;
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 28: return
LocalVariableTable:
Start End Slot Name Signature
1 28 0 versionString Ljava/lang/String;
4 28 1 version I
5 28 2 tmpCleaner Ljava/lang/reflect/Method;
6 28 3 tmpCleanerClean Ljava/lang/reflect/Method;
11 12 4 supported Z
15 16 4 supported Z
20 21 4 supported Z
24 28 4 supported Z
7 28 5 tmpUnsafe Lsun/misc/Unsafe;
13 15 6 t Ljava/lang/Throwable;
22 24 6 t Ljava/lang/Throwable;
Exception table:
from to target type
8 11 12 Class java.lang.Throwable
16 20 21 Class java.lang.Throwable
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 Lio/undertow/server/DirectByteBufferDeallocator;
public static void free(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 0: getstatic io.undertow.server.DirectByteBufferDeallocator.SUPPORTED:Z
ifeq 9
aload 0
ifnull 9
aload 0
invokevirtual java.nio.ByteBuffer.isDirect:()Z
ifeq 9
1: getstatic io.undertow.server.DirectByteBufferDeallocator.UNSAFE:Lsun/misc/Unsafe;
ifnull 4
2: getstatic io.undertow.server.DirectByteBufferDeallocator.cleanerClean:Ljava/lang/reflect/Method;
getstatic io.undertow.server.DirectByteBufferDeallocator.UNSAFE:Lsun/misc/Unsafe;
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
3: goto 9
4: StackMap locals:
StackMap stack:
getstatic io.undertow.server.DirectByteBufferDeallocator.cleaner:Ljava/lang/reflect/Method;
aload 0
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 1
start local 1 5: getstatic io.undertow.server.DirectByteBufferDeallocator.cleanerClean:Ljava/lang/reflect/Method;
aload 1
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 1 6: goto 9
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 1
start local 1 8: getstatic io.undertow.UndertowLogger.ROOT_LOGGER:Lio/undertow/UndertowLogger;
aload 1
invokeinterface io.undertow.UndertowLogger.directBufferDeallocationFailed:(Ljava/lang/Throwable;)V
end local 1 9: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 buffer Ljava/nio/ByteBuffer;
5 6 1 cleaner Ljava/lang/Object;
8 9 1 t Ljava/lang/Throwable;
Exception table:
from to target type
1 6 7 Class java.lang.Throwable
MethodParameters:
Name Flags
buffer
private static sun.misc.Unsafe getUnsafe();
descriptor: ()Lsun/misc/Unsafe;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
ifnull 2
1: new io.undertow.server.DirectByteBufferDeallocator$1
dup
invokespecial io.undertow.server.DirectByteBufferDeallocator$1.<init>:()V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast sun.misc.Unsafe
areturn
2: StackMap locals:
StackMap stack:
invokestatic io.undertow.server.DirectByteBufferDeallocator.getUnsafe0:()Lsun/misc/Unsafe;
areturn
LocalVariableTable:
Start End Slot Name Signature
private static sun.misc.Unsafe getUnsafe0();
descriptor: ()Lsun/misc/Unsafe;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=1, args_size=0
0: ldc Lsun/misc/Unsafe;
ldc "theUnsafe"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 0
start local 0 1: aload 0
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
2: aload 0
aconst_null
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast sun.misc.Unsafe
3: areturn
end local 0 4: StackMap locals:
StackMap stack: java.lang.Throwable
astore 0
start local 0 5: new java.lang.RuntimeException
dup
ldc "JDK did not allow accessing unsafe"
aload 0
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 theUnsafe Ljava/lang/reflect/Field;
5 6 0 t Ljava/lang/Throwable;
Exception table:
from to target type
0 3 4 Class java.lang.Throwable
private static java.lang.reflect.Method getAccesibleMethod(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
ifnull 2
1: new io.undertow.server.DirectByteBufferDeallocator$2
dup
aload 0
aload 1
invokespecial io.undertow.server.DirectByteBufferDeallocator$2.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.lang.reflect.Method
areturn
2: StackMap locals:
StackMap stack:
aload 0
aload 1
invokestatic io.undertow.server.DirectByteBufferDeallocator.getAccesibleMethod0:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 className Ljava/lang/String;
0 3 1 methodName Ljava/lang/String;
MethodParameters:
Name Flags
className
methodName
private static java.lang.reflect.Method getAccesibleMethod0(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Method;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
aload 1
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 2
start local 2 1: aload 2
iconst_1
invokevirtual java.lang.reflect.Method.setAccessible:(Z)V
2: aload 2
3: areturn
end local 2 4: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
start local 2 5: new java.lang.RuntimeException
dup
ldc "JDK did not allow accessing method"
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 className Ljava/lang/String;
0 6 1 methodName Ljava/lang/String;
1 4 2 method Ljava/lang/reflect/Method;
5 6 2 t Ljava/lang/Throwable;
Exception table:
from to target type
0 3 4 Class java.lang.Throwable
MethodParameters:
Name Flags
className
methodName
}
SourceFile: "DirectByteBufferDeallocator.java"
NestMembers:
io.undertow.server.DirectByteBufferDeallocator$1 io.undertow.server.DirectByteBufferDeallocator$2
InnerClasses:
io.undertow.server.DirectByteBufferDeallocator$1
io.undertow.server.DirectByteBufferDeallocator$2