RFR: 8376406: Avoid loading ArrayDeque in jdk.internal.loader.NativeLibraries [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Mon Jan 26 21:16:41 UTC 2026


> Please review this PR which replaces `ArrayDeque` with `ArrayList` for the native library context stack in `jdk.internal.loader.NativeLibraries.NativeLibraryContext`.
> 
> With this follow-up to similar changes in #29288 and #29430, a simple JAR-based "hello world" program no longer loads the `ArrayDeque` class during startup.
> 
> The change here is mostly a straightforward replacement. The existing processing was a FIFO stack, which it still is after this PR, just backed by ArrayList instead.
> 
> Since ArrayList is null-friendly, I added an explicit `Objects.requireNullNull` before pushing to the stack.
> 
> Pure refactoring, no tests updated, `noreg-cleanup`.

Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:

  Update copyright year

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29432/files
  - new: https://git.openjdk.org/jdk/pull/29432/files/62aba370..0a12622c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29432&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29432&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/29432.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29432/head:pull/29432

PR: https://git.openjdk.org/jdk/pull/29432


More information about the core-libs-dev mailing list