RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

Alexander Kriegisch duke at openjdk.org
Sat Jan 27 05:14:49 UTC 2024


On Fri, 26 Jan 2024 12:27:02 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

> Luckily, you and your customers are not obliged to use the JPMS

They are obliged to deal with it, and so am I as a tool maintainer. Just look the the approaches mentioned here. They all are in the category which in German we would call "von hinten durch die Brust ins Auge". That literally translates as "(a shot) from behind through the chest into the eye". Think Kennedy and "magic bullet". It means that something is unnecessarily complicated. But it is not of any developer's own choosing, but because the Java API and runtime environment requires them to jump through hoops. That is exactly what I meant before. Bytecode transformation should not be rocket science, but it progressively is developing in that direction. I have seen what Byte Buddy does to get access to an Unsafe instance, thought about what @JornVernee just suggested and have yet to look into the ByteMan source code. This all sounds pretty much like black magic and a maintenance nightmare to me.

A language ought to provide means to be productive and maybe offer some (opt-in) guard railing, but not be a corset so tight that I cannot breathe anymore. I need something that supports me without strangling me.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/3546#issuecomment-1912999685


More information about the core-libs-dev mailing list