On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

> Hello,
> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a 
> related finally clause or try with resources. That should better be changed.
> See also the Sonar check result :
> 
> https://sonarcloud.io/project/issues?id=shipilev_jdk&languages=java&open=AXcqM8zf8sPJZZzON5qG&resolved=false&severities=BLOCKER&types=BUG
> 
>     public static boolean isClassPathAttributePresent(String path) {
>         try {
>             Manifest man = (new JarFile(path)).getManifest();
> Use try-with-resources or close this "JarFile" in a "finally" clause.

This pull request has now been integrated.

Changeset: 8ebed284
Author:    Matthias Baesken <mbaes...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/8ebed284
Stats:     20 lines in 1 file changed: 0 ins; 19 del; 1 mod

8261237: remove isClassPathAttributePresent method

Reviewed-by: shade, clanger, redestad, alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/2429

Reply via email to