This change adds an API note to these methods recommending that the caller should perform further validation steps on the code signers that signed the JAR file, such as validating the code signer's certificate chain, and determining if the signer should be trusted. There was already a similar warning in the `JarFile` and `JarInputStream` class descriptions, but this adds a similar and more direct warning at the methods that return the code signer's certificates.
2 other smaller changes: - In `JarEntry.getCertificates`, added a recommendation to use the `getCodeSigners` method instead - Added details of the order of the returned certificates to `JarURLConnection.getCertificates` (copied from `JarEntry.getCertificates`) ------------- Commit messages: - Fix whitespace. - Add additional text about trusting signers. - Merge - Initial fix. Changes: https://git.openjdk.org/jdk/pull/23616/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23616&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8347946 Stats: 38 lines in 3 files changed: 32 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/23616.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/23616/head:pull/23616 PR: https://git.openjdk.org/jdk/pull/23616