< prev index next >

src/java.base/share/classes/sun/security/ssl/SSLLogger.java

Print this page
@@ -37,10 +37,11 @@
  import java.security.cert.X509Certificate;
  import java.text.MessageFormat;
  import java.time.Instant;
  import java.time.ZoneId;
  import java.time.format.DateTimeFormatter;
+ import java.util.Hex;
  import java.util.Locale;
  import java.util.Map;
  import java.util.ResourceBundle;
  
  import sun.security.action.GetPropertyAction;

@@ -578,11 +579,11 @@
              } else if (value instanceof byte[]) {
                  formatted = "\"" + key + "\": \"" +
                      Utilities.toHexString((byte[])value) + "\"";
              } else if (value instanceof Byte) {
                  formatted = "\"" + key + "\": \"" +
-                     Utilities.toHexString((byte)value) + "\"";
+                         Hex.encoder().toHexPair((byte)value) + "\"";
              } else {
                  formatted = "\"" + key + "\": " +
                      "\"" + value.toString() + "\"";
              }
  
< prev index next >