Skip to content

[poc] using the Java-24 classfile API instead of ASM - #2477

Draft
laeubi wants to merge 1 commit into
eclipse-pde:masterfrom
laeubi:poc_class_file_api
Draft

laeubi wants to merge 1 commit into
eclipse-pde:masterfrom
laeubi:poc_class_file_api

Conversation

@laeubi

@laeubi laeubi commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

As ASM tends to become cumbersome to maintain, this is a small proof-of-concept using the new java.lang.classfile API instead.

@laeubi
laeubi marked this pull request as draft September 9, 2026 16:39
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Test Results

  129 files  ±0    129 suites  ±0   38m 29s ⏱️ - 1m 17s
3 551 tests ±0  3 497 ✅ +40   54 💤 ±0  0 ❌  - 40 
9 456 runs  ±0  9 326 ✅ +40  130 💤 ±0  0 ❌  - 40 

Results for commit c52feab. ± Comparison against base commit 2e6aa5a.

@HannesWell

HannesWell commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Thank you Christoph for working on this.
We also discussed about replacing ASM in the PMC call last week and @mpalat suggested that we could also use JDT's disassembler API to read class-files and walk their AST.

This could avoid the restriction that we can only consider language elements known to the running JVM's Java version and could allow to analyze code targetting newer Java versions with constructs unknown to the running Java version.

Of course we would depend on JDT supporting that Java version, but we generally do that in PDE already, so that wouldn't be a new restriction.

What do you think about that and would you be interested in investigate that alternative too?

@mpalat

mpalat commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Thank you Christoph for working on this. We also discussed about replacing ASM in the PMC call last week and @mpalat suggested that we could also use JDT's disassembler API to read class-files and walk their AST.

This could avoid the restriction that we can only consider language elements known to the running JVM's Java version and could allow to analyze code targetting newer Java versions with constructors unknown to the running Java version.

We are planning to look at this option of JDT Disassembler and any changes required for the same. In jdt.debug, there is this work eclipse-jdt/eclipse.jdt.debug#994 ongoing on a related note to moving away from ASM.

See also eclipse-jdt/eclipse.jdt.core#5418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants