eclipse / microprofile-reactive-streams-operators

Microprofile project
Apache License 2.0
79 stars 33 forks source link

Remove broken ClassLoader delegation #130

Closed stuartwdouglas closed 4 years ago

stuartwdouglas commented 4 years ago

It is up to the ClassLoader to do parent delegation, we should not be second guessing it by attempting to manually delegate to the parent.

Signed-off-by: Stuart Douglas stuart.w.douglas@gmail.com

cescoffier commented 4 years ago

@Emily-Jiang This code was added for OSGi, however, I agree with Stuart. WDYT?

stuartwdouglas commented 4 years ago

This was also fixed in config: https://github.com/eclipse/microprofile-config/commit/0218d57e44e1b2e6051066be2fb55c6252634576

I am 99% sure it is also wrong for OSGI, as OSGI does not really use the concept of a parent CL, even if it made it work I am pretty sure it was not the correct way to do it.

stuartwdouglas commented 4 years ago

In terms of OSGi a fallback to the CL that loaded the actual resolver would probably be the correct solution, assuming the implementation is accessible from the CL that loaded the API.