RFR: JDK-8223333: Use try-with-resources where feasible

Alexey Semenyuk alexey.semenyuk at oracle.com
Thu Jun 6 16:47:44 UTC 2019


http://cr.openjdk.java.net/~herrick/8223333/webrev.02/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacCertificate.java.sdiff.html, 
lines 81-93 can be replaced with a single statement, something like:
---
java.nio.file.Files.copy(
       new ByteArrayInputStream(baos.toByteArray()),
       output.toPath(),
       StandardCopyOption.REPLACE_EXISTING);
---

- Alexey

On 6/5/2019 7:54 PM, Andy Herrick wrote:
> Please review the jpackage fix for bug [1] at [2].
>
> This is a fix for the JDK-8200758-branch branch of the open sandbox 
> repository (jpackage).
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8223333
> [2] http://cr.openjdk.java.net/~herrick/8223333/
>
> /Andy
>



More information about the core-libs-dev mailing list