`jlink --generate-jli-classes` plugin should retain the original holder classes if the default_jli_trace.txt file does not exist.
Before JDK-8252725, `JavaLangInvokeAccess::generateXXXHolderClassesBytes` methods are invoked unconditionally and therefore the holder classes are "regenerated" when default_jli_trace.txt does not exist. JDK-8252725 does not handle this case properly and results in an image missing the holder classes when the specified trace file does not exist. The fix is very simple. Retains the original holder classes when the file does not exist. ------------- Commit messages: - 8252919: JDK built with --enable-cds=no fails with NoClassDefFoundError: DirectMethodHandle Changes: https://git.openjdk.java.net/jdk/pull/96/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=96&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8252919 Stats: 47 lines in 2 files changed: 36 ins; 4 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/96.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/96/head:pull/96 PR: https://git.openjdk.java.net/jdk/pull/96