changeset 48256:b1993e334da1

8187985: Broken certificate number in debug output Reviewed-by: weijun
author igerasim
date Sun, 03 Dec 2017 01:47:23 -0800
parents fd53d07dade6
children 0b42613e35bf
files src/java.base/share/classes/sun/security/tools/keytool/Main.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sat Dec 02 18:37:45 2017 -0800
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sun Dec 03 01:47:23 2017 -0800
@@ -2746,12 +2746,12 @@
                     if (rfc) {
                         dumpCert(cert, out);
                     } else {
-                        out.println("Certificate #" + i++);
+                        out.println("Certificate #" + i);
                         out.println("====================================");
                         printX509Cert((X509Certificate)cert, out);
                         out.println();
                     }
-                    checkWeak(oneInMany(rb.getString("the.certificate"), i, chain.size()), cert);
+                    checkWeak(oneInMany(rb.getString("the.certificate"), i++, chain.size()), cert);
                 } catch (Exception e) {
                     if (debug) {
                         e.printStackTrace();