rmannibucau commented on a change in pull request #721:
URL: https://github.com/apache/cxf/pull/721#discussion_r521638575
##########
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:
Hmm,
Think it mixes two things, sorry if I was not clear about this point.
Until now we were generating proxies with asm, that was it.
Now we will be able to load proxies without using asm at all so we must
split loading and generation IMO and only trigger generation if not existing so
it means 2 independent services: GeneratedClassLoader maybe and ClassGenerator
(backend by ASM).
Splitting it avoids to have the generation API in build time generation case.
It also means CXF does not need the proxy code anymore since asmX
integration can now belong to another module (we can create a cxf-asm-compat
module for migration purposes maybe and only keep ow2 integration code in
cxf-core and register it only if asm is available and ClassGenerator not
registered in the bus already).
About the registration: I wouldn't register it by default but use something
like: if (not bus has ClassGenerator) tryLoadOw2AsmClassGenerator().
Hope it makes sense.
In all case I think it goes in the very right direction, thanks a lot for
the effort!
----------------------------------------------------------------
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]