-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException when load tinylog with BootstrapClassLoader #39
Comments
Looks good! Your pull request is welcome :-) https://github.com/pmwmedia/tinylog/blob/138e104fa1955e966eb20dab11dfcade896a8137/tinylog/src/org/pmw/tinylog/Configurator.java#L118 |
@pmwmedia yes, of course. This weekend I'll be working on this. |
Fix to #39 introducing the ClassLoaderResolver
This closed issue has been locked automatically. However, please feel free to file a new issue. |
First of all, thank you very much for this useful log library! We are using it in kamon-agent.
For some integration tests we need to load
tinylog
with theBootstrapClassLoader
, and this is when this problem manifests itself.The problem happens when it tries to do things like this:
The calling
Configurator.class.getClassLoader()
returns null since this is the way to say that it was loaded by the bootstrap class loader.The fix is very simple. For example introducing a method like this:
And call it from any place where the resource is required.
Let me know if you are agreed with this change and I'll be happy to send a PR.
The text was updated successfully, but these errors were encountered: