diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java index d77b6de..6333d40 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java @@ -1081,7 +1081,6 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession { throws UnsupportedOperationException { byte[] sniRequestArr = null; - List sniNames = new ArrayList<>(1); if (this.ssl == null) { return Collections.emptyList(); @@ -1103,6 +1102,7 @@ public class WolfSSLImplementSSLSession extends ExtendedSSLSession { } if (sniRequestArr != null) { + List sniNames = new ArrayList<>(1); SNIHostName sniName = new SNIHostName(sniRequestArr); sniNames.add(sniName);