Replace lambda with the enum to prevent runtime/cds/ServiceLoaderTest.java test failure
------------- Commit messages: - 8374923: runtime/cds/ServiceLoaderTest.java fails with mismatch between cds and non-cds Changes: https://git.openjdk.org/jdk/pull/29151/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29151&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8374923 Stats: 11 lines in 1 file changed: 5 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29151.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29151/head:pull/29151 PR: https://git.openjdk.org/jdk/pull/29151
