JSSE: defer creation of List<SNIServerName> ArrayList until needed in getRequestedServerNames()

pull/272/head
Chris Conlon 2025-06-09 15:06:11 -06:00
parent dab6d57011
commit e3eab4dee0
1 changed files with 1 additions and 1 deletions

View File

@ -1081,7 +1081,6 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession {
throws UnsupportedOperationException {
byte[] sniRequestArr = null;
List<SNIServerName> sniNames = new ArrayList<>(1);
if (this.ssl == null) {
return Collections.emptyList();
@ -1103,6 +1102,7 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession {
}
if (sniRequestArr != null) {
List<SNIServerName> sniNames = new ArrayList<>(1);
SNIHostName sniName = new SNIHostName(sniRequestArr);
sniNames.add(sniName);