Select correct classloader

This commit is contained in:
Georgy Litvinov 2020-07-31 19:13:47 +02:00
parent 51dbaa5c54
commit 2d9d6e32de

View file

@ -43,7 +43,7 @@ public class ConverterFactory {
*/
public static String getVersion() {
Properties prop = new Properties();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
ClassLoader loader = ConverterFactory.class.getClassLoader();
InputStream stream = loader.getResourceAsStream(propPath);
String version = "Failed to get version";
try {
@ -61,7 +61,7 @@ public class ConverterFactory {
*/
public static String getDate() {
Properties prop = new Properties();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
ClassLoader loader = ConverterFactory.class.getClassLoader();
InputStream stream = loader.getResourceAsStream(propPath);
String date = "Failed to get date";
try {