Hi,

I'd like to propose updating the *ASM* dependency in standalone Nashorn
*from 7.3.1 to 9.7.1*. This addresses JDK-8316344
<https://bugs.openjdk.org/browse/JDK-8316344> [1].

*Problem:*
Nashorn currently depends on org.ow2.asm 7.3.1, released in January
2020. This version does not recognize class file format version 65
(Java 21) or later. While Nashorn primarily uses ASM for bytecode
generation rather than reading class files, the outdated dependency
causes version conflicts with other popular libraries (JaCoCo, Mockito,
ByteBuddy, jnr-ffi, etc.) that depend on ASM 9.x. When both versions
end up on the classpath, the resolution is unpredictable and can break
either Nashorn or the other library.

*Proposed change:*
Update asm.version property in make/nashorn/build.xml from 7.3.1 to
9.7.1. This is a one-line change. The POM template for Maven Central
publication picks up the version automatically.

ASM 9.7.1 supports class file formats through Java 23, providing
forward compatibility headroom.

*Testing:*
I have built Nashorn with ASM 9.7.1 and all 1698 existing tests pass
with zero failures on JDK 21.

The change is available at:
https://github.com/Brankursine/nashorn/tree/JDK-8316344

I'm a new contributor and in the process of signing the OCA. I would
appreciate
a sponsor for this change if the approach looks acceptable.

Thanks,
Brankursine

[1] https://bugs.openjdk.org/browse/JDK-8316344

Reply via email to