rmannibucau commented on a change in pull request #721:
URL: https://github.com/apache/cxf/pull/721#discussion_r521212171
##########
File path: core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
##########
@@ -342,7 +342,10 @@ public ClassWriter createClassWriter() {
TypeHelperClassLoader loader = getTypeHelperClassLoader(l);
return loader.lookupDefinedClass(className);
}
-
+ public static void addExternalClass(String className, ClassLoader l,
Class<?> cls) {
Review comment:
Is it possible to not make it quarkus specific? Here is my proposal:
1. Make ASMHelper a SPI set as cxf bus extension
2. Provide current default impls
3. Have a a) generate proxy at build time mojo AND b) a load first proxy
(before generating it) strategy (note that it makes asm useless and must not
trigger asm classloading to work).
3 is close to
https://github.com/apache/openwebbeans/blob/1f83552e74c7966fc1009a3a7417900e7ce42b32/webbeans-impl/src/main/java/org/apache/webbeans/service/ClassLoaderProxyService.java#L85
for runtime and
https://github.com/apache/openwebbeans/blob/1f83552e74c7966fc1009a3a7417900e7ce42b32/webbeans-impl/src/main/java/org/apache/webbeans/service/ClassLoaderProxyService.java#L62
for build time (and dump the proxies as .class).
This way the code is not quarkus specific and benefits all applications in
JVM and native mode.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]