Initialization timing issue for static variable (#1671)
Initialization timing issue for static variable (#1671)

* Initialization timing issue for static variable

currentPlatform variable initialized in static block of this class.
But it's also accessed via constructor for validate unsupported environment.
This variable possible not initialized yet when access make a instance use constructor.
I'm already met this kind of issue when I run unit test use this library.
I think one more variable init checking required, at least If constructor want to check unsupported or not.

* Initialize static variable from static method instead of static block

Co-authored-by: sam <f16bed56189e249fe4ca8ed10a1ecae60e8ceac0@jennifersoft.com>
hazendaz/oshi,dbwiddis/oshi