steinarb commented on PR #2084: URL: https://github.com/apache/shiro/pull/2084#issuecomment-2802542723
(FWIW code that expect a flat classloader should have no side effect, since the thread context class loader would be the same as the regular class loader. And in OSGi the class loader set on the thread context will see everything the shiro-core classloader sees, which includes shiro-lang. Other than OSGi and flat/plain/normal classloaders I have no diea, because those two are the only ones I know) And the reason setting the thread context classloader works is this code https://github.com/apache/shiro/blob/main/lang/src/main/java/org/apache/shiro/lang/util/ClassUtils.java#L153 (so that setting the thread context classloader has nothing actually to do with OSGi except that the default classloader when running in OSGi is the OSGi class loader of the shiro-lang bundle, which can only see packages in the runtime, in the bundle itself and packages found in import-packages in the MANIFEST.MF) -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
