Restoring working classLaoder to get Resource

This commit is contained in:
luca.frosini 2023-06-26 15:59:03 +02:00
parent 72742086fd
commit 91c25084cd
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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);