Skip to content
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

Warning log when oshi.properties not found #1285

Closed
ngyukman opened this issue Jul 2, 2020 · 3 comments
Closed

Warning log when oshi.properties not found #1285

ngyukman opened this issue Jul 2, 2020 · 3 comments
Labels
compatibility Extending OSHI compatibility to OSs or versions PR welcome Not maintainer's priority to do but will accept contributions!

Comments

@ngyukman
Copy link
Contributor

ngyukman commented Jul 2, 2020

Hi,

Thanks for the useful library
We have a warning log No default configuration found when loading oshi where the Thread.currentThread().getContextClassLoader() is not the classloader that loads the oshi jar

public static Properties readPropertiesFromFilename(String propsFilename) {

I have a proposal that if the resources is empty from the given classloader, we could try the ClassLoader of GlobalConfig.class.getClassLoader()

do you think it make sense?
I can create the pull request if it looks good to you

@dbwiddis
Copy link
Member

dbwiddis commented Jul 2, 2020

I will freely admit that classloading is a mystery to me many times. I'm more than happy to accept a "fallback" attempt you think will work.

@ngyukman
Copy link
Contributor Author

ngyukman commented Jul 2, 2020

thanks, I will try to make the fix for it

@dbwiddis dbwiddis added compatibility Extending OSHI compatibility to OSs or versions PR welcome Not maintainer's priority to do but will accept contributions! labels Jul 6, 2020
@dbwiddis
Copy link
Member

dbwiddis commented Jul 7, 2020

Fixed in #1287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Extending OSHI compatibility to OSs or versions PR welcome Not maintainer's priority to do but will accept contributions!
Projects
None yet
Development

No branches or pull requests

2 participants