Sorry but no. The library still assumes that the classloader is an instance of URLClassLoader, which is simply not the case in OSGi (and in a lot of other places, e.g. Java EE). Thanks for the investigation work on that Felix.
So this Reflections library is fundamentally broken, and the classpath scanning technique itself is deeply flawed. It only ever works by accident, if it even works at all.
As Dave Smith points out, a far better approach is to scan the classes at build time using bnd, and construct a list of them in the manifest. This list can then be read very simply and very efficiently at runtime. This approach works because at build time we DO know the full list of classes we are putting into the jar.
Regards,
Neil