Skip to content

Conversation

@ppkarwasz
Copy link
Contributor

@ppkarwasz ppkarwasz commented Dec 11, 2025

GraalVmProcessor currently emits canonical type names (JLS §6.7) for parameter types in the GraalVM reachability metadata. However, testing shows that GraalVM expects binary names (JLS §13.1) for reference types. For example:

  • Canonical: org.apache.logging.log4j.core.Filter.Result
  • Required (binary): org.apache.logging.log4j.core.Filter$Result

For array types, GraalVM accepts two forms:

  • The JVM descriptor form: [L<component_type>;
  • The Java-like form: <component_type>[]

This PR updates the processor to use binary names and emits the simpler Java-like syntax for arrays.

Fixes #3871

`GraalVmProcessor` currently emits canonical type names (JLS §6.7) for parameter types in the GraalVM reachability metadata.
However, testing shows that GraalVM expects **binary names** (JLS §13.1) for reference types. For example:

* Canonical: `org.apache.logging.log4j.core.Filter.Result`
* Required (binary): `org.apache.logging.log4j.core.Filter$Result`

For array types, GraalVM accepts two forms:

* The JVM descriptor form: `[L<component_type>;`
* The Java-like form: `<component_type>[]`

This PR updates the processor to use binary names and emits the simpler Java-like syntax for arrays.
@ppkarwasz
Copy link
Contributor Author

An integration test for this PR is contained in apache/logging-log4j-samples#385

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.

Log4j2 metadata issues when ThresholdFilter is being used with GraalVM

1 participant