mirror of
https://github.com/apache/jclouds.git
synced 2025-02-19 16:56:14 +00:00
JCloudsVersion now uses the classloader that loaded the class instead of the TCCL
This commit is contained in:
parent
1684b02033
commit
fc2cc6c704
@ -66,7 +66,7 @@ public class JcloudsVersion {
|
|||||||
private static String readVersionPropertyFromClasspath() {
|
private static String readVersionPropertyFromClasspath() {
|
||||||
Properties versionProperties = new Properties();
|
Properties versionProperties = new Properties();
|
||||||
try {
|
try {
|
||||||
versionProperties.load(checkNotNull(Thread.currentThread().getContextClassLoader().getResourceAsStream(VERSION_RESOURCE_FILE), VERSION_RESOURCE_FILE));
|
versionProperties.load(checkNotNull(JcloudsVersion.class.getClassLoader().getResourceAsStream(VERSION_RESOURCE_FILE), VERSION_RESOURCE_FILE));
|
||||||
} catch (IOException exception) {
|
} catch (IOException exception) {
|
||||||
throw new IllegalStateException(format("Unable to load version resource file '%s'", VERSION_RESOURCE_FILE), exception);
|
throw new IllegalStateException(format("Unable to load version resource file '%s'", VERSION_RESOURCE_FILE), exception);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user