Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Alan Bateman
On Mon, 26 Aug 2024 03:47:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8338445? >> >> The JDK internal class `jdk.internal.loader.URLClassPath` is used by >> classloader implementations i

Integrated: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI

2024-08-26 Thread Maurizio Cimadamore
On Mon, 13 May 2024 10:42:26 GMT, Maurizio Cimadamore wrote: > This PR implements [JEP 472](https://openjdk.org/jeps/472), by restricting > the use of JNI in the following ways: > > * `System::load` and `System::loadLibrary` are now restricted methods > * `Runtime::load` and `Runtime::loadLibr

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Alan Bateman
On Mon, 26 Aug 2024 03:47:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8338445? >> >> The JDK internal class `jdk.internal.loader.URLClassPath` is used by >> classloader implementations i

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Michael McMahon
On Mon, 26 Aug 2024 03:47:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8338445? >> >> The JDK internal class `jdk.internal.loader.URLClassPath` is used by >> classloader implementations i

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Daniel Fuchs
On Mon, 26 Aug 2024 15:17:18 GMT, Michael McMahon wrote: >> Jaikiran Pai has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - revert to old code comment >> - use "JAR file" consistently in test's code comments >> - rename closeLoaderIgn

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Michael McMahon
On Mon, 26 Aug 2024 15:27:39 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 470: >> >>> 468: continue; >>> 469: } >>> 470: if (loaderClassPathURLs != null) { >> >> I'm missing something here. Why does th

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Jaikiran Pai
On Mon, 26 Aug 2024 15:33:58 GMT, Michael McMahon wrote: >> Because we would not reach here - since it's either assigned at line 447 or >> we continue at line 457, 468, or exit throwing an uncaught exception? > > Is the if statement at line 470 redundant then? Presumably the code can reach > he

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Michael McMahon
On Mon, 26 Aug 2024 15:36:25 GMT, Jaikiran Pai wrote: >> Is the if statement at line 470 redundant then? Presumably the code can >> reach here. > > Hello Michael, >> Is the if statement at line 470 redundant then? > > `Loader.getClassPath()` can return null (and it does for some implementations

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Michael McMahon
On Mon, 26 Aug 2024 03:47:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8338445? >> >> The JDK internal class `jdk.internal.loader.URLClassPath` is used by >> classloader implementations i

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Jaikiran Pai
On Mon, 26 Aug 2024 07:06:54 GMT, Alan Bateman wrote: > Separately, I've often wondered how many plugins are putting file paths into > the value by mistake, this has historically been an area of confusion. You are right - the values that get used in a `Class-Path` entry keeps coming up for dis

Re: RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

2024-08-26 Thread Christian Stein
On Mon, 26 Aug 2024 03:47:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8338445? >> >> The JDK internal class `jdk.internal.loader.URLClassPath` is used by >> classloader implementations i