Rafael Winterhalter
Rafael Winterhalter
Lambda instrumentation is fairly experimental and I recommend against using it unless using a controlled JVM version that is proven to work with a specific setup. Is there a crash...
Yes, it certainly would. A `ClassFileLocator` is querying a class loader or file system location which resolves a `.class` file. If the file cannot be resolved, this exception is thrown.
You would intercept via `.executable(isTypeInitializer())` and in the code you add, you would read the field and write back a modified value.
As pointed out, removal is not currently well-supported. Unfortunately, this is still true today.
Normally, the attach should not write data back, but this indeed possible if data is written back. How do you encounter this problem? The issue is that it would require...
Can you give me a pointer to this documented bug? How could it be avoided?
There's ByteArrayClassLoader. Wouldn't that work for you?
There's a constructor that takes strings instead of type descriptions.
https://javadoc.io/doc/net.bytebuddy/byte-buddy/1.10.2/net/bytebuddy/dynamic/loading/ByteArrayClassLoader.html#ByteArrayClassLoader-java.lang.ClassLoader-boolean-java.util.Map-
It seems to be backported to 8.