Hi Matt,

On Mon, 13 Nov 2023 at 19:18, Matt Sicker <m...@musigma.org> wrote:
> * Removal of legacy OSGi support. We will rely on ServiceLoader and things 
> like SPI Fly or other common OSGi mechanisms for supporting ServiceLoader 
> while deferring lower level OSGi integration to libraries like Pax-Logging.

We must just check if SPI Fly supports weaving code like this:

final MethodHandle loadHandle = lookup.findStatic(ServiceLoader.class, "load",
        MethodType.methodType(ServiceLoader.class, Class.class,
ClassLoader.class));

Otherwise we need to use a simple `ServiceLoader.load(..., ...)`.

Maybe, instead of passing `MethodHandles.Lookup` to
`ServiceLoaderUtil`, we could pass the result of
`ServiceLoader.load(Class)` and get rid of all this JPMS crap?

Piotr

Reply via email to