JSSE: defer creation of List<SNIServerName> ArrayList until needed in getRequestedServerNames()
parent
dab6d57011
commit
e3eab4dee0
|
@ -1081,7 +1081,6 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession {
|
||||||
throws UnsupportedOperationException {
|
throws UnsupportedOperationException {
|
||||||
|
|
||||||
byte[] sniRequestArr = null;
|
byte[] sniRequestArr = null;
|
||||||
List<SNIServerName> sniNames = new ArrayList<>(1);
|
|
||||||
|
|
||||||
if (this.ssl == null) {
|
if (this.ssl == null) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
@ -1103,6 +1102,7 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sniRequestArr != null) {
|
if (sniRequestArr != null) {
|
||||||
|
List<SNIServerName> sniNames = new ArrayList<>(1);
|
||||||
SNIHostName sniName = new SNIHostName(sniRequestArr);
|
SNIHostName sniName = new SNIHostName(sniRequestArr);
|
||||||
sniNames.add(sniName);
|
sniNames.add(sniName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue