On Thu, 9 Mar 2023 11:35:32 GMT, Adam Sotona <asot...@openjdk.org> wrote:
> jdk.jlink internal plugins are heavily using ASM > > This patch converts ASM calls to Classfile API. > > Please review. > Thanks, > Adam Looks good in general. src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/IncludeLocalesPlugin.java line 273: > 271: boolean modified = false; > 272: // I haven't found a way how to change content of existing CP > entries or get entry offset to the byteocde array using Bytecode lib > 273: // so scanning CP entries directly What about: Suggestion: // scan CP entries directly to read the bytes of UTF8 entries and // patch in place with unsupported locale tags stripped src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 619: > 617: "<init>", > 618: > MethodTypeDesc.of(CD_void), > 619: false); nit: extra space sorry this might be from the patch I sent you. src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 1644: > 1642: CD_SYSTEM_MODULES_MAP, > 1643: clb -> { > 1644: clb.withFlags(ACC_FINAL+ACC_SUPER); Nit: consistent with line 578 with a space before and after `+` ------------- PR: https://git.openjdk.org/jdk/pull/12944