8296787: Unify debug printing format of X.509 cert serial numbers

Reviewed-by: mullan, coffeys
This commit is contained in:
Ben Perez 2023-12-14 17:57:36 +00:00 committed by Sean Mullan
parent fde5b16817
commit c328f9589d
18 changed files with 62 additions and 46 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -27,6 +27,7 @@ package sun.security.x509;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.HexFormat;
import sun.security.util.*;
@ -101,7 +102,7 @@ public class SerialNumber {
* Return the SerialNumber as user readable string.
*/
public String toString() {
return "SerialNumber: [" + Debug.toHexString(serialNum) + ']';
return "SerialNumber: " + Debug.toString(serialNum);
}
/**