8210974: No extensions debug log for ClientHello
authorxuelei
Thu, 20 Sep 2018 14:19:53 -0700
changeset 51829 c26fbf1434c4
parent 51828 a7448f4f89a0
child 51830 d2c72de3cf83
8210974: No extensions debug log for ClientHello Reviewed-by: jnimeh, wetmore
src/java.base/share/classes/sun/security/ssl/SSLExtensions.java
--- a/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java	Wed Sep 12 16:38:13 2018 +0200
+++ b/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java	Thu Sep 20 14:19:53 2018 -0700
@@ -333,7 +333,7 @@
             return "<no extension>";
         } else {
             StringBuilder builder = new StringBuilder(512);
-            if (logMap != null) {
+            if (logMap != null && !logMap.isEmpty()) {
                 for (Map.Entry<Integer, byte[]> en : logMap.entrySet()) {
                     SSLExtension ext = SSLExtension.valueOf(
                             handshakeMessage.handshakeType(), en.getKey());