> As noted in https://bugs.openjdk.org/browse/JDK-8386802, `Util.entryList` and > `Util.moduleEntryList` copy their input lists using indexed access. This is > fine for `RandomAccess` lists but can be inefficient for > sequentially-accessed implementations. > > This patch keeps the existing indexed path for `RandomAccess` lists and falls > back to iteration otherwise. Regression coverage is added for > non-`RandomAccess` inputs. > > Testing: > - `make CONF_CHECK=ignore java.base-java images` > - `make CONF_CHECK=ignore test-only > TEST="test/jdk/jdk/classfile/UtilTest.java"` > - `make CONF_CHECK=ignore test-only TEST="test/jdk/jdk/classfile"` > - `make CONF_CHECK=ignore test-only TEST="test/jdk:tier1" > JTREG="VERBOSE=summary"` > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
April Ivy has updated the pull request incrementally with one additional commit since the last revision: Use ModuleDesc overload in moduleEntryList ------------- Changes: - all: https://git.openjdk.org/jdk/pull/31719/files - new: https://git.openjdk.org/jdk/pull/31719/files/11c876b0..2553ed9a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=31719&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31719&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/31719.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31719/head:pull/31719 PR: https://git.openjdk.org/jdk/pull/31719
