Closed stuartwdouglas closed 4 years ago
@Emily-Jiang This code was added for OSGi, however, I agree with Stuart. WDYT?
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.
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.
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