diff --git a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java index 74c687912fe..4e82872ef7a 100644 --- a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java +++ b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -76,16 +76,16 @@ import java.util.zip.ZipOutputStream; * a {@link NullPointerException}. *
* Example: - *
- * JarSigner signer = new JarSigner.Builder(key, certPath) - * .digestAlgorithm("SHA-1") - * .signatureAlgorithm("SHA1withDSA") - * .build(); - * try (ZipFile in = new ZipFile(inputFile); - * FileOutputStream out = new FileOutputStream(outputFile)) { - * signer.sign(in, out); + * {@snippet lang="java" : + * JarSigner signer = new JarSigner.Builder(key, certPath) + * .digestAlgorithm("SHA-256") + * .signatureAlgorithm("SHA256withRSA") + * .build(); + * try (ZipFile in = new ZipFile(inputFile); + * FileOutputStream out = new FileOutputStream(outputFile)) { + * signer.sign(in, out); + * } * } - ** * @since 9 */