You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AbstractProperties class attempts to load a properties file with:
URL url = getClass().getResource(filename);
This is not guaranteed to work in modular class loading environments such as in OSGi or some JavaEE containers.
Perhaps it'd be better to use the _applicationClassLoader to load resources. But even this is currently not guaranteed to work at present because XMLContextforces a specific ClassLoader, which itself may not be the correct one.
The text was updated successfully, but these errors were encountered:
Fell free to provide a pull request for both "points", in other words one that fixes the problem in AbstractProperties and another one that highlights the second point with an example that can be used to (re)play the problem.
Thanks, I'll try to put a pull request together shortly.
Just to clarify, you want me to provide a second PR with an example that shows why the _applicationClassLoader may not be the correct ClassLoader, based on the one provided by XMLContext (before making any changes to fix this)?
If so, what form does this take? A unit test? Or an example application like the ones in the examples directory.
Yes, a Unit test would be fine. In case you want to show me something in the context of a webapp, why not provide me with a Spring boot app that highlights the problem(s) at hand.
The
AbstractProperties
class attempts to load a properties file with:URL url = getClass().getResource(filename);
This is not guaranteed to work in modular class loading environments such as in OSGi or some JavaEE containers.
Perhaps it'd be better to use the
_applicationClassLoader
to load resources. But even this is currently not guaranteed to work at present becauseXMLContext
forces a specific ClassLoader, which itself may not be the correct one.The text was updated successfully, but these errors were encountered: