On Fri, 10 Mar 2023 12:45:05 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 > > Adam Sotona has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 208 commits: > > - Merge branch 'master' into JDK-8294972-jlink-plugins > > # Conflicts: > # src/java.base/share/classes/module-info.java > - Merge branch 'master' into JDK-8294972-jlink-plugins > - fixed SystemModulesPlugin formatting > - 8303624: The java.lang.Thread.FieldHolder can be null for JNI attaching > threads > > Reviewed-by: alanb, dcubed > - 8302360: Atomic*.compareAndExchange Javadoc unclear > > Reviewed-by: martin, dholmes > - 8302779: HelidonAppTest.java fails with "assert(_cb == > CodeCache::find_blob(pc())) failed: Must be the same" or SIGSEGV > > Reviewed-by: coleenp, sspitsyn > - 8303691: Fedora based devkit build should load more packages from archive > location > > Reviewed-by: mbaesken, erikj > - 8303924: ProblemList serviceability/sa/UniqueVtableTest.java on Linux > > Reviewed-by: dcubed > - 8303609: ProblemList serviceability/sa/TestSysProps.java with ZGC > > Reviewed-by: dcubed > - 8289765: JDI EventSet/resume/resume008 failed with "ERROR: suspendCounts > don't match for : VirtualThread-unparker" > > Reviewed-by: sspitsyn, kevinw > - ... and 198 more: https://git.openjdk.org/jdk/compare/b1d89f30...cfc612ec src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java line 158: > 156: }); > 157: } > 158: }); Suggestion: }); } else { clb.with(cle); Other `ClassElement`s need to be added to the builder; otherwise they are dropped. One more thing I notice is that the attributes for example `LineNumberTable` attribute in `<clinit>` method after transformed are dropped. But this plugin should only transform the code and leave everything else touched. ------------- PR: https://git.openjdk.org/jdk/pull/12944