fixed file path

This commit is contained in:
volodymyr-babak 2017-01-06 16:58:12 +02:00
parent 392c65ef6e
commit 95f5b3b19d

View File

@ -37,9 +37,8 @@ public class TestParams {
private Properties params = new Properties(); private Properties params = new Properties();
public TestParams() throws IOException { public TestParams() throws IOException {
URL location = TestParams.class.getProtectionDomain().getCodeSource().getLocation();
try { try {
params.load(new FileInputStream(location.getFile() + TEST_PROPERTIES)); params.load(TestParams.class.getClassLoader().getResourceAsStream(TEST_PROPERTIES));
} catch (Exception e) { } catch (Exception e) {
log.warn("Failed to read " + TEST_PROPERTIES); log.warn("Failed to read " + TEST_PROPERTIES);
} }