class com.sun.jndi.dns.DNSDatagramSocketFactory
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.sun.jndi.dns.DNSDatagramSocketFactory
super_class: java.lang.Object
{
static final int DEVIATION;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 3
static final int THRESHOLD;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 6
static final int BIT_DEVIATION;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 2
static final int HISTORY;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 32
static final int MAX_RANDOM_TRIES;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 5
int lastport;
descriptor: I
flags: (0x0000)
int suitablePortCount;
descriptor: I
flags: (0x0000)
int unsuitablePortCount;
descriptor: I
flags: (0x0000)
final java.net.ProtocolFamily family;
descriptor: Ljava/net/ProtocolFamily;
flags: (0x0010) ACC_FINAL
final int thresholdCount;
descriptor: I
flags: (0x0010) ACC_FINAL
final int deviation;
descriptor: I
flags: (0x0010) ACC_FINAL
final java.util.Random random;
descriptor: Ljava/util/Random;
flags: (0x0010) ACC_FINAL
final com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory history;
descriptor: Lcom/sun/jndi/dns/DNSDatagramSocketFactory$PortHistory;
flags: (0x0010) ACC_FINAL
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic com.sun.jndi.dns.DNSDatagramSocketFactory.$assertionsDisabled:Z
3: return
LocalVariableTable:
Start End Slot Name Signature
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new java.util.Random
dup
invokespecial java.util.Random.<init>:()V
invokespecial com.sun.jndi.dns.DNSDatagramSocketFactory.<init>:(Ljava/util/Random;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
void <init>(java.util.Random);
descriptor: (Ljava/util/Random;)V
flags: (0x0000)
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.Random
aconst_null
iconst_3
bipush 6
invokespecial com.sun.jndi.dns.DNSDatagramSocketFactory.<init>:(Ljava/util/Random;Ljava/net/ProtocolFamily;II)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
0 2 1 random Ljava/util/Random;
MethodParameters:
Name Flags
random
void <init>(java.util.Random, java.net.ProtocolFamily, int, int);
descriptor: (Ljava/util/Random;Ljava/net/ProtocolFamily;II)V
flags: (0x0000)
Code:
stack=5, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
2: aload 0
aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.Random
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.random:Ljava/util/Random;
3: aload 0
new com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory
dup
bipush 32
aload 1
invokespecial com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory.<init>:(ILjava/util/Random;)V
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.history:Lcom/sun/jndi/dns/DNSDatagramSocketFactory$PortHistory;
4: aload 0
aload 2
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.family:Ljava/net/ProtocolFamily;
5: aload 0
iconst_1
iload 3
invokestatic java.lang.Math.max:(II)I
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.deviation:I
6: aload 0
iconst_2
iload 4
invokestatic java.lang.Math.max:(II)I
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
7: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
0 8 1 random Ljava/util/Random;
0 8 2 family Ljava/net/ProtocolFamily;
0 8 3 deviation I
0 8 4 threshold I
MethodParameters:
Name Flags
random
family
deviation
threshold
public synchronized java.net.DatagramSocket open();
descriptor: ()Ljava/net/DatagramSocket;
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=8, args_size=1
start local 0 0: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
istore 1
start local 1 1: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
if_icmple 2
iconst_1
goto 3
StackMap locals: int
StackMap stack:
2: iconst_0
StackMap locals:
StackMap stack: int
3: istore 3
start local 3 4: iload 3
ifeq 8
5: aload 0
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory.openRandom:()Ljava/net/DatagramSocket;
astore 2
start local 2 6: aload 2
ifnull 7
aload 2
areturn
7: StackMap locals: java.net.DatagramSocket int
StackMap stack:
aload 0
iconst_0
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
aload 0
iconst_0
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
iconst_0
istore 1
end local 2 8: StackMap locals: com.sun.jndi.dns.DNSDatagramSocketFactory int top int
StackMap stack:
aload 0
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory.openDefault:()Ljava/net/DatagramSocket;
astore 2
start local 2 9: aload 0
aload 2
invokevirtual java.net.DatagramSocket.getLocalPort:()I
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
10: iload 1
ifne 13
11: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.history:Lcom/sun/jndi/dns/DNSDatagramSocketFactory$PortHistory;
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory.offer:(I)Z
pop
12: aload 2
areturn
13: StackMap locals: com.sun.jndi.dns.DNSDatagramSocketFactory int java.net.DatagramSocket int
StackMap stack:
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
if_icmple 14
iconst_1
goto 15
StackMap locals:
StackMap stack:
14: iconst_0
StackMap locals:
StackMap stack: int
15: istore 3
16: iload 1
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
ixor
invokestatic java.lang.Integer.bitCount:(I)I
iconst_2
if_icmple 19
17: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
iload 1
isub
invokestatic java.lang.Math.abs:(I)I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.deviation:I
18: if_icmple 19
iconst_1
goto 20
StackMap locals:
StackMap stack:
19: iconst_0
StackMap locals:
StackMap stack: int
20: istore 4
start local 4 21: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.history:Lcom/sun/jndi/dns/DNSDatagramSocketFactory$PortHistory;
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory.contains:(I)Z
istore 5
start local 5 22: iload 3
ifne 24
iload 4
ifeq 23
iload 5
ifeq 24
StackMap locals: int int
StackMap stack:
23: iconst_0
goto 25
StackMap locals:
StackMap stack:
24: iconst_1
StackMap locals:
StackMap stack: int
25: istore 6
start local 6 26: iload 6
ifeq 27
iload 5
ifne 27
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.history:Lcom/sun/jndi/dns/DNSDatagramSocketFactory$PortHistory;
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.lastport:I
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory.add:(I)Z
pop
27: StackMap locals: int
StackMap stack:
iload 6
ifeq 35
28: iload 3
ifne 31
29: aload 0
dup
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
iconst_1
iadd
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
30: goto 34
StackMap locals:
StackMap stack:
31: iload 4
ifeq 32
iload 5
ifeq 34
32: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
33: aload 0
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
iconst_2
idiv
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
34: StackMap locals:
StackMap stack:
aload 2
areturn
35: StackMap locals:
StackMap stack:
getstatic com.sun.jndi.dns.DNSDatagramSocketFactory.$assertionsDisabled:Z
ifne 36
iload 3
ifeq 36
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
36: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory.openRandom:()Ljava/net/DatagramSocket;
astore 7
start local 7 37: aload 7
ifnonnull 38
aload 2
areturn
38: StackMap locals: java.net.DatagramSocket
StackMap stack:
aload 0
dup
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
iconst_1
iadd
putfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
39: aload 2
invokevirtual java.net.DatagramSocket.close:()V
40: aload 7
areturn
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 41 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
1 41 1 lastseen I
6 8 2 s Ljava/net/DatagramSocket;
9 41 2 s Ljava/net/DatagramSocket;
4 41 3 thresholdCrossed Z
21 41 4 farEnough Z
22 41 5 recycled Z
26 41 6 suitable Z
37 41 7 ss Ljava/net/DatagramSocket;
Exceptions:
throws java.net.SocketException
private java.net.DatagramSocket openDefault();
descriptor: ()Ljava/net/DatagramSocket;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.family:Ljava/net/ProtocolFamily;
ifnull 15
1: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.family:Ljava/net/ProtocolFamily;
invokestatic java.nio.channels.DatagramChannel.open:(Ljava/net/ProtocolFamily;)Ljava/nio/channels/DatagramChannel;
astore 1
start local 1 2: aload 1
invokevirtual java.nio.channels.DatagramChannel.socket:()Ljava/net/DatagramSocket;
astore 2
start local 2 3: aload 2
aconst_null
invokevirtual java.net.DatagramSocket.bind:(Ljava/net/SocketAddress;)V
4: aload 2
5: areturn
end local 2 6: StackMap locals: com.sun.jndi.dns.DNSDatagramSocketFactory java.nio.channels.DatagramChannel
StackMap stack: java.lang.Throwable
astore 2
start local 2 7: aload 1
invokevirtual java.nio.channels.DatagramChannel.close:()V
8: aload 2
athrow
end local 2 end local 1 9: StackMap locals: com.sun.jndi.dns.DNSDatagramSocketFactory
StackMap stack: java.net.SocketException
astore 1
start local 1 10: aload 1
athrow
end local 1 11: StackMap locals:
StackMap stack: java.io.IOException
astore 1
start local 1 12: new java.net.SocketException
dup
aload 1
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial java.net.SocketException.<init>:(Ljava/lang/String;)V
astore 2
start local 2 13: aload 2
aload 1
invokevirtual java.net.SocketException.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
pop
14: aload 2
athrow
end local 2 end local 1 15: StackMap locals:
StackMap stack:
new java.net.DatagramSocket
dup
invokespecial java.net.DatagramSocket.<init>:()V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
2 9 1 c Ljava/nio/channels/DatagramChannel;
3 6 2 s Ljava/net/DatagramSocket;
7 9 2 x Ljava/lang/Throwable;
10 11 1 x Ljava/net/SocketException;
12 15 1 x Ljava/io/IOException;
13 15 2 e Ljava/net/SocketException;
Exception table:
from to target type
2 5 6 Class java.lang.Throwable
1 5 9 Class java.net.SocketException
6 9 9 Class java.net.SocketException
1 5 11 Class java.io.IOException
6 9 11 Class java.io.IOException
Exceptions:
throws java.net.SocketException
synchronized boolean isUsingNativePortRandomization();
descriptor: ()Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
if_icmpgt 3
1: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.suitablePortCount:I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
2: if_icmple 3
iconst_1
ireturn
StackMap locals:
StackMap stack:
3: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
synchronized boolean isUsingJavaPortRandomization();
descriptor: ()Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.unsuitablePortCount:I
aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.thresholdCount:I
if_icmple 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
synchronized boolean isUndecided();
descriptor: ()Z
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory.isUsingJavaPortRandomization:()Z
ifne 3
1: aload 0
invokevirtual com.sun.jndi.dns.DNSDatagramSocketFactory.isUsingNativePortRandomization:()Z
ifne 3
2: iconst_1
ireturn
StackMap locals:
StackMap stack:
3: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
private java.net.DatagramSocket openRandom();
descriptor: ()Ljava/net/DatagramSocket;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=1
start local 0 0: iconst_5
istore 1
start local 1 1: goto 17
2: StackMap locals: int
StackMap stack:
getstatic com.sun.jndi.dns.DNSDatagramSocketFactory$EphemeralPortRange.LOWER:I
3: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.random:Ljava/util/Random;
getstatic com.sun.jndi.dns.DNSDatagramSocketFactory$EphemeralPortRange.RANGE:I
invokevirtual java.util.Random.nextInt:(I)I
4: iadd
istore 2
start local 2 5: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.family:Ljava/net/ProtocolFamily;
ifnull 14
6: aload 0
getfield com.sun.jndi.dns.DNSDatagramSocketFactory.family:Ljava/net/ProtocolFamily;
invokestatic java.nio.channels.DatagramChannel.open:(Ljava/net/ProtocolFamily;)Ljava/nio/channels/DatagramChannel;
astore 3
start local 3 7: aload 3
invokevirtual java.nio.channels.DatagramChannel.socket:()Ljava/net/DatagramSocket;
astore 4
start local 4 8: aload 4
new java.net.InetSocketAddress
dup
iload 2
invokespecial java.net.InetSocketAddress.<init>:(I)V
invokevirtual java.net.DatagramSocket.bind:(Ljava/net/SocketAddress;)V
9: aload 4
10: areturn
end local 4 11: StackMap locals: com.sun.jndi.dns.DNSDatagramSocketFactory int int java.nio.channels.DatagramChannel
StackMap stack: java.lang.Throwable
astore 4
start local 4 12: aload 3
invokevirtual java.nio.channels.DatagramChannel.close:()V
13: aload 4
athrow
end local 4 end local 3 14: StackMap locals:
StackMap stack:
new java.net.DatagramSocket
dup
iload 2
invokespecial java.net.DatagramSocket.<init>:(I)V
15: areturn
16: StackMap locals:
StackMap stack: java.io.IOException
pop
end local 2 17: StackMap locals:
StackMap stack:
iload 1
iinc 1 -1
ifgt 2
18: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lcom/sun/jndi/dns/DNSDatagramSocketFactory;
1 19 1 maxtries I
5 17 2 port I
7 14 3 c Ljava/nio/channels/DatagramChannel;
8 11 4 s Ljava/net/DatagramSocket;
12 14 4 x Ljava/lang/Throwable;
Exception table:
from to target type
7 10 11 Class java.lang.Throwable
5 10 16 Class java.io.IOException
11 15 16 Class java.io.IOException
}
SourceFile: "DNSDatagramSocketFactory.java"
NestMembers:
com.sun.jndi.dns.DNSDatagramSocketFactory$EphemeralPortRange com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory
InnerClasses:
final EphemeralPortRange = com.sun.jndi.dns.DNSDatagramSocketFactory$EphemeralPortRange of com.sun.jndi.dns.DNSDatagramSocketFactory
final PortHistory = com.sun.jndi.dns.DNSDatagramSocketFactory$PortHistory of com.sun.jndi.dns.DNSDatagramSocketFactory