Restoring working classLaoder to get Resource
This commit is contained in:
parent
72742086fd
commit
91c25084cd
|
@ -93,7 +93,7 @@ public class FacetBasedISConfigurationProxy extends ISConfigurationProxy<SimpleF
|
|||
}
|
||||
|
||||
protected File getBaseDirectory(String directoryName) {
|
||||
URL directoryURL = ClassLoader.getSystemClassLoader().getResource(directoryName);
|
||||
URL directoryURL = this.getClass().getClassLoader().getResource(directoryName);
|
||||
File directory = new File(directoryURL.getPath());
|
||||
return directory;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class Constants {
|
|||
try {
|
||||
if(clientSecret==null) {
|
||||
Properties properties = new Properties();
|
||||
URL url = ClassLoader.getSystemClassLoader().getResource(CLIENT_SECRET_FILENAME);
|
||||
URL url = Constants.class.getClassLoader().getResource(CLIENT_SECRET_FILENAME);
|
||||
logger.trace("Going to read {} at {}", CLIENT_SECRET_FILENAME, url.toString());
|
||||
InputStream input = ClassLoader.getSystemClassLoader().getResourceAsStream(CLIENT_SECRET_FILENAME);
|
||||
properties.load(input);
|
||||
|
|
Loading…
Reference in New Issue