public class jdk.internal.net.http.websocket.OpeningHandshake
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.net.http.websocket.OpeningHandshake
super_class: java.lang.Object
{
private static final java.lang.String HEADER_CONNECTION;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Connection"
private static final java.lang.String HEADER_UPGRADE;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Upgrade"
private static final java.lang.String HEADER_ACCEPT;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Sec-WebSocket-Accept"
private static final java.lang.String HEADER_EXTENSIONS;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Sec-WebSocket-Extensions"
private static final java.lang.String HEADER_KEY;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Sec-WebSocket-Key"
private static final java.lang.String HEADER_PROTOCOL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Sec-WebSocket-Protocol"
private static final java.lang.String HEADER_VERSION;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Sec-WebSocket-Version"
private static final java.lang.String VERSION;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "13"
private static final java.util.Set<java.lang.String> ILLEGAL_HEADERS;
descriptor: Ljava/util/Set;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Ljava/lang/String;>;
private static final java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.security.MessageDigest sha1;
descriptor: Ljava/security/MessageDigest;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.net.http.HttpClient client;
descriptor: Ljava/net/http/HttpClient;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final jdk.internal.net.http.HttpRequestImpl request;
descriptor: Ljdk/internal/net/http/HttpRequestImpl;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Collection<java.lang.String> subprotocols;
descriptor: Ljava/util/Collection;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Collection<Ljava/lang/String;>;
private final java.lang.String nonce;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, 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=6, locals=0, args_size=0
0: ldc Ljdk/internal/net/http/websocket/OpeningHandshake;
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 jdk.internal.net.http.websocket.OpeningHandshake.$assertionsDisabled:Z
3: new java.util.TreeSet
dup
getstatic java.lang.String.CASE_INSENSITIVE_ORDER:Ljava/util/Comparator;
invokespecial java.util.TreeSet.<init>:(Ljava/util/Comparator;)V
putstatic jdk.internal.net.http.websocket.OpeningHandshake.ILLEGAL_HEADERS:Ljava/util/Set;
4: getstatic jdk.internal.net.http.websocket.OpeningHandshake.ILLEGAL_HEADERS:Ljava/util/Set;
ldc "Sec-WebSocket-Accept"
5: ldc "Sec-WebSocket-Extensions"
6: ldc "Sec-WebSocket-Key"
7: ldc "Sec-WebSocket-Protocol"
8: ldc "Sec-WebSocket-Version"
9: invokestatic java.util.List.of:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;
invokeinterface java.util.Set.addAll:(Ljava/util/Collection;)Z
pop
10: new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putstatic jdk.internal.net.http.websocket.OpeningHandshake.random:Ljava/security/SecureRandom;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(jdk.internal.net.http.websocket.BuilderImpl);
descriptor: (Ljdk/internal/net/http/websocket/BuilderImpl;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=8, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc "SHA-1"
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
putfield jdk.internal.net.http.websocket.OpeningHandshake.sha1:Ljava/security/MessageDigest;
2: goto 5
StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl
StackMap stack: java.security.NoSuchAlgorithmException
3: astore 2
start local 2 4: new java.lang.InternalError
dup
ldc "Minimum requirements"
aload 2
invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 5: StackMap locals:
StackMap stack:
aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getUri:()Ljava/net/URI;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkURI:(Ljava/net/URI;)Ljava/net/URI;
pop
6: aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getProxySelector:()Ljava/util/Optional;
aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getUri:()Ljava/net/URI;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.proxyFor:(Ljava/util/Optional;Ljava/net/URI;)Ljava/net/Proxy;
astore 2
start local 2 7: aload 1
aload 2
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkPermissions:(Ljdk/internal/net/http/websocket/BuilderImpl;Ljava/net/Proxy;)V
8: aload 0
aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getClient:()Ljava/net/http/HttpClient;
putfield jdk.internal.net.http.websocket.OpeningHandshake.client:Ljava/net/http/HttpClient;
9: aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getUri:()Ljava/net/URI;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.createRequestURI:(Ljava/net/URI;)Ljava/net/URI;
astore 3
start local 3 10: new jdk.internal.net.http.HttpRequestBuilderImpl
dup
aload 3
invokespecial jdk.internal.net.http.HttpRequestBuilderImpl.<init>:(Ljava/net/URI;)V
astore 4
start local 4 11: aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getConnectTimeout:()Ljava/time/Duration;
astore 5
start local 5 12: aload 5
ifnull 14
13: aload 4
aload 5
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.timeout:(Ljava/time/Duration;)Ljava/net/http/HttpRequest$Builder;
pop
14: StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl java.net.Proxy java.net.URI jdk.internal.net.http.HttpRequestBuilderImpl java.time.Duration
StackMap stack:
aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getHeaders:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 7
goto 19
StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl java.net.Proxy java.net.URI jdk.internal.net.http.HttpRequestBuilderImpl java.time.Duration top java.util.Iterator
StackMap stack:
15: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.net.http.common.Pair
astore 6
start local 6 16: getstatic jdk.internal.net.http.websocket.OpeningHandshake.ILLEGAL_HEADERS:Ljava/util/Set;
aload 6
getfield jdk.internal.net.http.common.Pair.first:Ljava/lang/Object;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 18
17: new java.lang.StringBuilder
dup
ldc "Illegal header: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
getfield jdk.internal.net.http.common.Pair.first:Ljava/lang/Object;
checkcast java.lang.String
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
18: StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl java.net.Proxy java.net.URI jdk.internal.net.http.HttpRequestBuilderImpl java.time.Duration jdk.internal.net.http.common.Pair java.util.Iterator
StackMap stack:
aload 4
aload 6
getfield jdk.internal.net.http.common.Pair.first:Ljava/lang/Object;
checkcast java.lang.String
aload 6
getfield jdk.internal.net.http.common.Pair.second:Ljava/lang/Object;
checkcast java.lang.String
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.header:(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/net/http/HttpRequestBuilderImpl;
pop
end local 6 19: StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl java.net.Proxy java.net.URI jdk.internal.net.http.HttpRequestBuilderImpl java.time.Duration top java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 15
20: aload 0
aload 1
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getSubprotocols:()Ljava/util/Collection;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.createRequestSubprotocols:(Ljava/util/Collection;)Ljava/util/Collection;
putfield jdk.internal.net.http.websocket.OpeningHandshake.subprotocols:Ljava/util/Collection;
21: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.subprotocols:Ljava/util/Collection;
invokeinterface java.util.Collection.isEmpty:()Z
ifne 24
22: ldc ", "
aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.subprotocols:Ljava/util/Collection;
invokestatic java.lang.String.join:(Ljava/lang/CharSequence;Ljava/lang/Iterable;)Ljava/lang/String;
astore 6
start local 6 23: aload 4
ldc "Sec-WebSocket-Protocol"
aload 6
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.header:(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/net/http/HttpRequestBuilderImpl;
pop
end local 6 24: StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake jdk.internal.net.http.websocket.BuilderImpl java.net.Proxy java.net.URI jdk.internal.net.http.HttpRequestBuilderImpl java.time.Duration
StackMap stack:
aload 4
ldc "Sec-WebSocket-Version"
ldc "13"
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.header:(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/net/http/HttpRequestBuilderImpl;
pop
25: aload 0
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.createNonce:()Ljava/lang/String;
putfield jdk.internal.net.http.websocket.OpeningHandshake.nonce:Ljava/lang/String;
26: aload 4
ldc "Sec-WebSocket-Key"
aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.nonce:Ljava/lang/String;
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.header:(Ljava/lang/String;Ljava/lang/String;)Ljdk/internal/net/http/HttpRequestBuilderImpl;
pop
27: aload 4
getstatic java.net.http.HttpClient$Version.HTTP_1_1:Ljava/net/http/HttpClient$Version;
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.version:(Ljava/net/http/HttpClient$Version;)Ljdk/internal/net/http/HttpRequestBuilderImpl;
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.GET:()Ljava/net/http/HttpRequest$Builder;
pop
28: aload 0
aload 4
invokevirtual jdk.internal.net.http.HttpRequestBuilderImpl.buildForWebSocket:()Ljdk/internal/net/http/HttpRequestImpl;
putfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
29: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
iconst_1
invokevirtual jdk.internal.net.http.HttpRequestImpl.isWebSocket:(Z)V
30: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
ldc "Upgrade"
ldc "websocket"
invokevirtual jdk.internal.net.http.HttpRequestImpl.setSystemHeader:(Ljava/lang/String;Ljava/lang/String;)V
31: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
ldc "Connection"
ldc "Upgrade"
invokevirtual jdk.internal.net.http.HttpRequestImpl.setSystemHeader:(Ljava/lang/String;Ljava/lang/String;)V
32: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
aload 2
invokevirtual jdk.internal.net.http.HttpRequestImpl.setProxy:(Ljava/net/Proxy;)V
33: 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 34 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
0 34 1 b Ljdk/internal/net/http/websocket/BuilderImpl;
7 34 2 proxy Ljava/net/Proxy;
10 34 3 httpURI Ljava/net/URI;
11 34 4 requestBuilder Ljdk/internal/net/http/HttpRequestBuilderImpl;
12 34 5 connectTimeout Ljava/time/Duration;
16 19 6 p Ljdk/internal/net/http/common/Pair<Ljava/lang/String;Ljava/lang/String;>;
23 24 6 p Ljava/lang/String;
4 5 2 e Ljava/security/NoSuchAlgorithmException;
Exception table:
from to target type
1 2 3 Class java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
b
private static java.util.Collection<java.lang.String> createRequestSubprotocols(java.util.Collection<java.lang.String>);
descriptor: (Ljava/util/Collection;)Ljava/util/Collection;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=4, args_size=1
start local 0 0: new java.util.LinkedHashSet
dup
aload 0
invokeinterface java.util.Collection.size:()I
fconst_1
invokespecial java.util.LinkedHashSet.<init>:(IF)V
astore 1
start local 1 1: aload 0
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 7
StackMap locals: java.util.Collection java.util.LinkedHashSet top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 3: aload 2
invokevirtual java.lang.String.trim:()Ljava/lang/String;
invokevirtual java.lang.String.isEmpty:()Z
ifne 4
aload 2
invokestatic jdk.internal.net.http.common.Utils.isValidName:(Ljava/lang/String;)Z
ifne 5
4: StackMap locals: java.util.Collection java.util.LinkedHashSet java.lang.String java.util.Iterator
StackMap stack:
new java.lang.StringBuilder
dup
ldc "Bad subprotocol syntax: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
5: StackMap locals:
StackMap stack:
aload 1
aload 2
invokevirtual java.util.LinkedHashSet.add:(Ljava/lang/Object;)Z
ifne 7
6: new java.lang.StringBuilder
dup
ldc "Duplicating subprotocol: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
end local 2 7: StackMap locals: java.util.Collection java.util.LinkedHashSet top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
8: aload 1
invokestatic java.util.Collections.unmodifiableCollection:(Ljava/util/Collection;)Ljava/util/Collection;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 subprotocols Ljava/util/Collection<Ljava/lang/String;>;
1 9 1 sp Ljava/util/LinkedHashSet<Ljava/lang/String;>;
3 7 2 s Ljava/lang/String;
Signature: (Ljava/util/Collection<Ljava/lang/String;>;)Ljava/util/Collection<Ljava/lang/String;>;
MethodParameters:
Name Flags
subprotocols
static java.net.URI createRequestURI(java.net.URI);
descriptor: (Ljava/net/URI;)Ljava/net/URI;
flags: (0x0008) ACC_STATIC
Code:
stack=9, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual java.net.URI.getScheme:()Ljava/lang/String;
astore 1
start local 1 1: getstatic jdk.internal.net.http.websocket.OpeningHandshake.$assertionsDisabled:Z
ifne 2
ldc "ws"
aload 1
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 2
ldc "wss"
aload 1
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 2
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
2: StackMap locals: java.lang.String
StackMap stack:
ldc "ws"
aload 1
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 3
ldc "http"
goto 4
StackMap locals:
StackMap stack:
3: ldc "https"
StackMap locals:
StackMap stack: java.lang.String
4: astore 2
start local 2 5: new java.net.URI
dup
aload 2
6: aload 0
invokevirtual java.net.URI.getUserInfo:()Ljava/lang/String;
7: aload 0
invokevirtual java.net.URI.getHost:()Ljava/lang/String;
8: aload 0
invokevirtual java.net.URI.getPort:()I
9: aload 0
invokevirtual java.net.URI.getPath:()Ljava/lang/String;
10: aload 0
invokevirtual java.net.URI.getQuery:()Ljava/lang/String;
11: aconst_null
12: invokespecial java.net.URI.<init>:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
13: areturn
14: StackMap locals: java.net.URI java.lang.String java.lang.String
StackMap stack: java.net.URISyntaxException
astore 3
start local 3 15: new java.lang.InternalError
dup
aload 3
invokespecial java.lang.InternalError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 uri Ljava/net/URI;
1 16 1 s Ljava/lang/String;
5 16 2 scheme Ljava/lang/String;
15 16 3 e Ljava/net/URISyntaxException;
Exception table:
from to target type
5 13 14 Class java.net.URISyntaxException
MethodParameters:
Name Flags
uri
public java.util.concurrent.CompletableFuture<jdk.internal.net.http.websocket.OpeningHandshake$Result> send();
descriptor: ()Ljava/util/concurrent/CompletableFuture;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=1
start local 0 0: aload 0
invokedynamic run(Ljdk/internal/net/http/websocket/OpeningHandshake;)Ljava/security/PrivilegedAction;
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;
jdk/internal/net/http/websocket/OpeningHandshake.lambda$0()Ljava/util/concurrent/CompletableFuture; (7)
()Ljava/util/concurrent/CompletableFuture;
astore 1
start local 1 1: aload 1
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.util.concurrent.CompletableFuture
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
1 2 1 pa Ljava/security/PrivilegedAction<Ljava/util/concurrent/CompletableFuture<Ljdk/internal/net/http/websocket/OpeningHandshake$Result;>;>;
Signature: ()Ljava/util/concurrent/CompletableFuture<Ljdk/internal/net/http/websocket/OpeningHandshake$Result;>;
private java.util.concurrent.CompletableFuture<jdk.internal.net.http.websocket.OpeningHandshake$Result> resultFrom(java.net.http.HttpResponse<?>);
descriptor: (Ljava/net/http/HttpResponse;)Ljava/util/concurrent/CompletableFuture;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aconst_null
astore 3
start local 3 2: aload 0
aload 1
invokevirtual jdk.internal.net.http.websocket.OpeningHandshake.handleResponse:(Ljava/net/http/HttpResponse;)Ljdk/internal/net/http/websocket/OpeningHandshake$Result;
astore 2
3: goto 9
StackMap locals: jdk.internal.net.http.websocket.OpeningHandshake java.net.http.HttpResponse jdk.internal.net.http.websocket.OpeningHandshake$Result java.lang.Exception
StackMap stack: java.io.IOException
4: astore 4
start local 4 5: aload 4
astore 3
end local 4 6: goto 9
7: StackMap locals:
StackMap stack: java.lang.Exception
astore 4
start local 4 8: new java.net.http.WebSocketHandshakeException
dup
aload 1
invokespecial java.net.http.WebSocketHandshakeException.<init>:(Ljava/net/http/HttpResponse;)V
aload 4
invokevirtual java.net.http.WebSocketHandshakeException.initCause:(Ljava/lang/Throwable;)Ljava/net/http/WebSocketHandshakeException;
astore 3
end local 4 9: StackMap locals:
StackMap stack:
aload 3
ifnonnull 11
10: aload 2
invokestatic jdk.internal.net.http.common.MinimalFuture.completedFuture:(Ljava/lang/Object;)Ljdk/internal/net/http/common/MinimalFuture;
areturn
11: StackMap locals:
StackMap stack:
aload 1
checkcast jdk.internal.net.http.websocket.RawChannel$Provider
invokeinterface jdk.internal.net.http.websocket.RawChannel$Provider.rawChannel:()Ljdk/internal/net/http/websocket/RawChannel;
invokeinterface jdk.internal.net.http.websocket.RawChannel.close:()V
12: goto 15
StackMap locals:
StackMap stack: java.io.IOException
13: astore 4
start local 4 14: aload 3
aload 4
invokevirtual java.lang.Exception.addSuppressed:(Ljava/lang/Throwable;)V
end local 4 15: StackMap locals:
StackMap stack:
aload 3
invokestatic jdk.internal.net.http.common.MinimalFuture.failedFuture:(Ljava/lang/Throwable;)Ljava/util/concurrent/CompletableFuture;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
0 16 1 response Ljava/net/http/HttpResponse<*>;
1 16 2 result Ljdk/internal/net/http/websocket/OpeningHandshake$Result;
2 16 3 exception Ljava/lang/Exception;
5 6 4 e Ljava/io/IOException;
8 9 4 e Ljava/lang/Exception;
14 15 4 e Ljava/io/IOException;
Exception table:
from to target type
2 3 4 Class java.io.IOException
2 3 7 Class java.lang.Exception
11 12 13 Class java.io.IOException
Signature: (Ljava/net/http/HttpResponse<*>;)Ljava/util/concurrent/CompletableFuture<Ljdk/internal/net/http/websocket/OpeningHandshake$Result;>;
MethodParameters:
Name Flags
response
private jdk.internal.net.http.websocket.OpeningHandshake$Result handleResponse(java.net.http.HttpResponse<?>);
descriptor: (Ljava/net/http/HttpResponse;)Ljdk/internal/net/http/websocket/OpeningHandshake$Result;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=12, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.net.http.HttpResponse.statusCode:()I
istore 2
start local 2 1: iload 2
bipush 101
if_icmpeq 3
2: new java.lang.StringBuilder
dup
ldc "Unexpected HTTP response status code "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
3: StackMap locals: int
StackMap stack:
aload 1
invokeinterface java.net.http.HttpResponse.headers:()Ljava/net/http/HttpHeaders;
astore 3
start local 3 4: aload 3
ldc "Upgrade"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireSingle:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/lang/String;
astore 4
start local 4 5: aload 4
ldc "websocket"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 7
6: ldc "Bad response field: Upgrade"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
7: StackMap locals: java.net.http.HttpHeaders java.lang.String
StackMap stack:
aload 3
ldc "Connection"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireSingle:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/lang/String;
astore 5
start local 5 8: aload 5
ldc "Upgrade"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 10
9: ldc "Bad response field: Connection"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
10: StackMap locals: java.lang.String
StackMap stack:
aload 3
ldc "Sec-WebSocket-Version"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireAtMostOne:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/util/Optional;
astore 6
start local 6 11: aload 6
invokevirtual java.util.Optional.isPresent:()Z
ifeq 13
aload 6
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast java.lang.String
ldc "13"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 13
12: ldc "Bad response field: Sec-WebSocket-Version"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
13: StackMap locals: java.util.Optional
StackMap stack:
aload 3
ldc "Sec-WebSocket-Extensions"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireAbsent:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)V
14: new java.lang.StringBuilder
dup
aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.nonce:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 7
start local 7 15: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.sha1:Ljava/security/MessageDigest;
aload 7
getstatic java.nio.charset.StandardCharsets.ISO_8859_1:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.security.MessageDigest.update:([B)V
16: invokestatic java.util.Base64.getEncoder:()Ljava/util/Base64$Encoder;
aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.sha1:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
invokevirtual java.util.Base64$Encoder.encodeToString:([B)Ljava/lang/String;
astore 8
start local 8 17: aload 3
ldc "Sec-WebSocket-Accept"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireSingle:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/lang/String;
astore 9
start local 9 18: aload 9
invokevirtual java.lang.String.trim:()Ljava/lang/String;
aload 8
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 20
19: ldc "Bad Sec-WebSocket-Accept"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
20: StackMap locals: java.lang.String java.lang.String java.lang.String
StackMap stack:
aload 0
aload 3
invokevirtual jdk.internal.net.http.websocket.OpeningHandshake.checkAndReturnSubprotocol:(Ljava/net/http/HttpHeaders;)Ljava/lang/String;
astore 10
start local 10 21: aload 1
checkcast jdk.internal.net.http.websocket.RawChannel$Provider
invokeinterface jdk.internal.net.http.websocket.RawChannel$Provider.rawChannel:()Ljdk/internal/net/http/websocket/RawChannel;
astore 11
start local 11 22: new jdk.internal.net.http.websocket.OpeningHandshake$Result
dup
aload 10
new jdk.internal.net.http.websocket.TransportFactoryImpl
dup
aload 11
invokespecial jdk.internal.net.http.websocket.TransportFactoryImpl.<init>:(Ljdk/internal/net/http/websocket/RawChannel;)V
invokespecial jdk.internal.net.http.websocket.OpeningHandshake$Result.<init>:(Ljava/lang/String;Ljdk/internal/net/http/websocket/TransportFactory;)V
areturn
end local 11 end local 10 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 23 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
0 23 1 response Ljava/net/http/HttpResponse<*>;
1 23 2 c I
4 23 3 headers Ljava/net/http/HttpHeaders;
5 23 4 upgrade Ljava/lang/String;
8 23 5 connection Ljava/lang/String;
11 23 6 version Ljava/util/Optional<Ljava/lang/String;>;
15 23 7 x Ljava/lang/String;
17 23 8 expected Ljava/lang/String;
18 23 9 actual Ljava/lang/String;
21 23 10 subprotocol Ljava/lang/String;
22 23 11 channel Ljdk/internal/net/http/websocket/RawChannel;
Exceptions:
throws java.io.IOException
Signature: (Ljava/net/http/HttpResponse<*>;)Ljdk/internal/net/http/websocket/OpeningHandshake$Result;
MethodParameters:
Name Flags
response
private java.lang.String checkAndReturnSubprotocol(java.net.http.HttpHeaders);
descriptor: (Ljava/net/http/HttpHeaders;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
ldc "Sec-WebSocket-Protocol"
invokevirtual java.net.http.HttpHeaders.firstValue:(Ljava/lang/String;)Ljava/util/Optional;
astore 2
start local 2 1: aload 2
invokevirtual java.util.Optional.isPresent:()Z
ifne 3
2: ldc ""
areturn
3: StackMap locals: java.util.Optional
StackMap stack:
aload 1
ldc "Sec-WebSocket-Protocol"
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.requireSingle:(Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.subprotocols:Ljava/util/Collection;
aload 3
invokeinterface java.util.Collection.contains:(Ljava/lang/Object;)Z
ifeq 6
5: aload 3
areturn
6: StackMap locals: java.lang.String
StackMap stack:
new java.lang.StringBuilder
dup
ldc "Unexpected subprotocol: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
0 7 1 responseHeaders Ljava/net/http/HttpHeaders;
1 7 2 opt Ljava/util/Optional<Ljava/lang/String;>;
4 7 3 s Ljava/lang/String;
Exceptions:
throws jdk.internal.net.http.websocket.CheckFailedException
MethodParameters:
Name Flags
responseHeaders
private static void requireAbsent(java.net.http.HttpHeaders, java.lang.String);
descriptor: (Ljava/net/http/HttpHeaders;Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.net.http.HttpHeaders.allValues:(Ljava/lang/String;)Ljava/util/List;
astore 2
start local 2 1: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifne 6
2: ldc "Response field '%s' present: %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: aload 1
aastore
dup
iconst_1
4: aload 2
invokestatic jdk.internal.net.http.common.Utils.stringOf:(Ljava/util/Collection;)Ljava/lang/String;
aastore
5: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
6: StackMap locals: java.util.List
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 responseHeaders Ljava/net/http/HttpHeaders;
0 7 1 headerName Ljava/lang/String;
1 7 2 values Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
responseHeaders
headerName
private static java.util.Optional<java.lang.String> requireAtMostOne(java.net.http.HttpHeaders, java.lang.String);
descriptor: (Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/util/Optional;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.net.http.HttpHeaders.allValues:(Ljava/lang/String;)Ljava/util/List;
astore 2
start local 2 1: aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmple 6
2: ldc "Response field '%s' multivalued: %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
3: aload 1
aastore
dup
iconst_1
4: aload 2
invokestatic jdk.internal.net.http.common.Utils.stringOf:(Ljava/util/Collection;)Ljava/lang/String;
aastore
5: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
6: StackMap locals: java.util.List
StackMap stack:
aload 2
invokeinterface java.util.List.stream:()Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findFirst:()Ljava/util/Optional;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 responseHeaders Ljava/net/http/HttpHeaders;
0 7 1 headerName Ljava/lang/String;
1 7 2 values Ljava/util/List<Ljava/lang/String;>;
Signature: (Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/util/Optional<Ljava/lang/String;>;
MethodParameters:
Name Flags
responseHeaders
headerName
private static java.lang.String requireSingle(java.net.http.HttpHeaders, java.lang.String);
descriptor: (Ljava/net/http/HttpHeaders;Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.net.http.HttpHeaders.allValues:(Ljava/lang/String;)Ljava/util/List;
astore 2
start local 2 1: aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 3
2: new java.lang.StringBuilder
dup
ldc "Response field missing: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
3: StackMap locals: java.util.List
StackMap stack:
aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmple 8
4: ldc "Response field '%s' multivalued: %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
5: aload 1
aastore
dup
iconst_1
6: aload 2
invokestatic jdk.internal.net.http.common.Utils.stringOf:(Ljava/util/Collection;)Ljava/lang/String;
aastore
7: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.checkFailed:(Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
athrow
8: StackMap locals:
StackMap stack:
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.String
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 responseHeaders Ljava/net/http/HttpHeaders;
0 9 1 headerName Ljava/lang/String;
1 9 2 values Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
responseHeaders
headerName
private static java.lang.String createNonce();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: bipush 16
newarray 8
astore 0
start local 0 1: getstatic jdk.internal.net.http.websocket.OpeningHandshake.random:Ljava/security/SecureRandom;
aload 0
invokevirtual java.security.SecureRandom.nextBytes:([B)V
2: invokestatic java.util.Base64.getEncoder:()Ljava/util/Base64$Encoder;
aload 0
invokevirtual java.util.Base64$Encoder.encodeToString:([B)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 3 0 bytes [B
private static jdk.internal.net.http.websocket.CheckFailedException checkFailed(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/internal/net/http/websocket/CheckFailedException;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new jdk.internal.net.http.websocket.CheckFailedException
dup
aload 0
invokespecial jdk.internal.net.http.websocket.CheckFailedException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 message Ljava/lang/String;
MethodParameters:
Name Flags
message
private static java.net.URI checkURI(java.net.URI);
descriptor: (Ljava/net/URI;)Ljava/net/URI;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.net.URI.getScheme:()Ljava/lang/String;
astore 1
start local 1 1: ldc "ws"
aload 1
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 3
ldc "wss"
aload 1
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 3
2: new java.lang.StringBuilder
dup
ldc "invalid URI scheme: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
3: StackMap locals: java.lang.String
StackMap stack:
aload 0
invokevirtual java.net.URI.getHost:()Ljava/lang/String;
ifnonnull 5
4: new java.lang.StringBuilder
dup
ldc "URI must contain a host: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.net.URI.getFragment:()Ljava/lang/String;
ifnull 7
6: new java.lang.StringBuilder
dup
ldc "URI must not contain a fragment: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.illegal:(Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
athrow
7: StackMap locals:
StackMap stack:
aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 uri Ljava/net/URI;
1 8 1 scheme Ljava/lang/String;
MethodParameters:
Name Flags
uri
private static java.lang.IllegalArgumentException illegal(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.IllegalArgumentException
dup
aload 0
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 message Ljava/lang/String;
MethodParameters:
Name Flags
message
private static java.net.Proxy proxyFor(java.util.Optional<java.net.ProxySelector>, java.net.URI);
descriptor: (Ljava/util/Optional;Ljava/net/URI;)Ljava/net/Proxy;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.util.Optional.isPresent:()Z
ifne 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 1
invokestatic jdk.internal.net.http.websocket.OpeningHandshake.createRequestURI:(Ljava/net/URI;)Ljava/net/URI;
astore 2
start local 2 3: aload 0
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast java.net.ProxySelector
aload 2
invokevirtual java.net.ProxySelector.select:(Ljava/net/URI;)Ljava/util/List;
astore 3
start local 3 4: aload 3
invokeinterface java.util.List.isEmpty:()Z
ifeq 6
5: aconst_null
areturn
6: StackMap locals: java.net.URI java.util.List
StackMap stack:
aload 3
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.net.Proxy
astore 4
start local 4 7: aload 4
invokevirtual java.net.Proxy.type:()Ljava/net/Proxy$Type;
getstatic java.net.Proxy$Type.HTTP:Ljava/net/Proxy$Type;
if_acmpeq 9
8: aconst_null
areturn
9: StackMap locals: java.net.Proxy
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 selector Ljava/util/Optional<Ljava/net/ProxySelector;>;
0 10 1 uri Ljava/net/URI;
3 10 2 requestURI Ljava/net/URI;
4 10 3 pl Ljava/util/List<Ljava/net/Proxy;>;
7 10 4 proxy Ljava/net/Proxy;
Signature: (Ljava/util/Optional<Ljava/net/ProxySelector;>;Ljava/net/URI;)Ljava/net/Proxy;
MethodParameters:
Name Flags
selector
uri
static void checkPermissions(jdk.internal.net.http.websocket.BuilderImpl, java.net.Proxy);
descriptor: (Ljdk/internal/net/http/websocket/BuilderImpl;Ljava/net/Proxy;)V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=6, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: return
3: StackMap locals: java.lang.SecurityManager
StackMap stack:
aload 0
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getHeaders:()Ljava/util/Collection;
invokeinterface java.util.Collection.stream:()Ljava/util/stream/Stream;
invokedynamic apply()Ljava/util/function/Function;
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;
jdk/internal/net/http/websocket/OpeningHandshake.lambda$2(Ljdk/internal/net/http/common/Pair;)Ljava/lang/String; (6)
(Ljdk/internal/net/http/common/Pair;)Ljava/lang/String;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.distinct:()Ljava/util/stream/Stream;
astore 3
start local 3 4: aload 0
invokevirtual jdk.internal.net.http.websocket.BuilderImpl.getUri:()Ljava/net/URI;
ldc ""
aload 3
invokestatic jdk.internal.net.http.common.Utils.permissionForServer:(Ljava/net/URI;Ljava/lang/String;Ljava/util/stream/Stream;)Ljava/net/URLPermission;
astore 4
start local 4 5: aload 2
aload 4
invokevirtual java.lang.SecurityManager.checkPermission:(Ljava/security/Permission;)V
6: aload 1
ifnonnull 8
7: return
8: StackMap locals: java.util.stream.Stream java.net.URLPermission
StackMap stack:
aload 1
invokevirtual java.net.Proxy.address:()Ljava/net/SocketAddress;
checkcast java.net.InetSocketAddress
invokestatic jdk.internal.net.http.common.Utils.permissionForProxy:(Ljava/net/InetSocketAddress;)Ljava/net/URLPermission;
astore 5
start local 5 9: aload 5
ifnull 11
10: aload 2
aload 5
invokevirtual java.lang.SecurityManager.checkPermission:(Ljava/security/Permission;)V
11: StackMap locals: java.net.URLPermission
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 12 0 b Ljdk/internal/net/http/websocket/BuilderImpl;
0 12 1 proxy Ljava/net/Proxy;
1 12 2 sm Ljava/lang/SecurityManager;
4 12 3 headers Ljava/util/stream/Stream<Ljava/lang/String;>;
5 12 4 perm1 Ljava/net/URLPermission;
9 12 5 perm2 Ljava/net/URLPermission;
MethodParameters:
Name Flags
b
proxy
private java.util.concurrent.CompletableFuture lambda$0();
descriptor: ()Ljava/util/concurrent/CompletableFuture;
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.client:Ljava/net/http/HttpClient;
aload 0
getfield jdk.internal.net.http.websocket.OpeningHandshake.request:Ljdk/internal/net/http/HttpRequestImpl;
invokestatic java.net.http.HttpResponse$BodyHandlers.discarding:()Ljava/net/http/HttpResponse$BodyHandler;
invokevirtual java.net.http.HttpClient.sendAsync:(Ljava/net/http/HttpRequest;Ljava/net/http/HttpResponse$BodyHandler;)Ljava/util/concurrent/CompletableFuture;
1: aload 0
invokedynamic apply(Ljdk/internal/net/http/websocket/OpeningHandshake;)Ljava/util/function/Function;
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;
jdk/internal/net/http/websocket/OpeningHandshake.resultFrom(Ljava/net/http/HttpResponse;)Ljava/util/concurrent/CompletableFuture; (7)
(Ljava/net/http/HttpResponse;)Ljava/util/concurrent/CompletionStage;
invokevirtual java.util.concurrent.CompletableFuture.thenCompose:(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/net/http/websocket/OpeningHandshake;
private static java.lang.String lambda$2(jdk.internal.net.http.common.Pair);
descriptor: (Ljdk/internal/net/http/common/Pair;)Ljava/lang/String;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.net.http.common.Pair.first:Ljava/lang/Object;
checkcast java.lang.String
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 p Ljdk/internal/net/http/common/Pair<Ljava/lang/String;Ljava/lang/String;>;
}
SourceFile: "OpeningHandshake.java"
NestMembers:
jdk.internal.net.http.websocket.OpeningHandshake$Result
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public final Type = java.net.Proxy$Type of java.net.Proxy
public final Version = java.net.http.HttpClient$Version of java.net.http.HttpClient
public abstract Builder = java.net.http.HttpRequest$Builder of java.net.http.HttpRequest
public abstract BodyHandler = java.net.http.HttpResponse$BodyHandler of java.net.http.HttpResponse
public BodyHandlers = java.net.http.HttpResponse$BodyHandlers of java.net.http.HttpResponse
public Encoder = java.util.Base64$Encoder of java.util.Base64
final Result = jdk.internal.net.http.websocket.OpeningHandshake$Result of jdk.internal.net.http.websocket.OpeningHandshake
public abstract Provider = jdk.internal.net.http.websocket.RawChannel$Provider of jdk.internal.net.http.websocket.RawChannel