Replies: 1 comment 1 reply
-
|
Thanks, I added a safety mechanism for this case, so it will not break Byte Buddy. Likely this will be irrelevant data for most people anyways. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Clearly this issue is a bit niche! This message is just a small heads up in case anyone hits this situation.
The issue is that code compiled with JDK21 and later can fail when accessing parameters via reflection in Oracle 1.8 u471 (the last update at this time), this code raises a
MalformedParametersException. This can hit tools that "walk" methods or constructors like Byte Buddy.Indeed, from JDK 21 (JDK-8292275), the compiler properly flag method parameters as synthetic (or mandate), however this has a side effect when the parameter names are accessed reflectively (via
Executable::getParameters) on Oracle 1.8 u471.A fix (via JDK-8058322) has been made and merged in Oct 2024 and as such is included in OpenJdk 8u since then, but at the time of this writing Oracle JDK 1.8 appear to not have it.
So the workaround are:
-parameterswhich may add some overheadI put up a tad more in this reproducer project : https://github.com/bric3/malformed-parameters-oracle-8
Beta Was this translation helpful? Give feedback.
All reactions