Skip to content

Conversation

@vlsi
Copy link
Contributor

@vlsi vlsi commented May 28, 2025

Previously, only sourceCompatibility and targetCompatibility were used, and they might cause issues like NoSuchMethodError when a newer javac compiles with -target older_release.

Note: it is good to use a new an up to date javac to avoid issues in the compiler itself, so having a proper -release .. configuration is vital.

See https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/

The change ensures the generated bytecode adheres to the APIs
for the target Java release.

Previously, only sourceCompatibility and targetCompatibility were used,
and they might cause issues like NoSuchMethodError when a newer javac
compiles with -target older_release.

Note: it is good to use a new an up to date javac to avoid issues
in the compiler itself, so having a proper `-release ..` configuration
is vital.

See https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderr
@vlsi vlsi mentioned this pull request May 28, 2025
3 tasks
Copy link
Member

@bioball bioball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@bioball bioball merged commit 7d50c46 into apple:main May 28, 2025
4 checks passed
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.

2 participants