Merge pull request #319 from iocanel/master

Class loading issue in JcloudsVersion prevents jclouds 1.3.0 to work under OSGi
This commit is contained in:
Adrian Cole 2012-01-16 14:57:17 -08:00
commit 3d071b09b1
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class JcloudsVersion {
private static String readVersionPropertyFromClasspath() {
Properties versionProperties = new Properties();
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) {
throw new IllegalStateException(format("Unable to load version resource file '%s'", VERSION_RESOURCE_FILE), exception);
}