Skip to content

Commit 4a3affc

Browse files
authored
Merge pull request #32 from securenative/dev
Fix loading resources from path
2 parents 731a416 + 4d790d7 commit 4a3affc

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.securenative.java</groupId>
77
<artifactId>securenative-java</artifactId>
88
<packaging>jar</packaging>
9-
<version>0.5.0</version>
9+
<version>0.5.1</version>
1010
<url>https://github.com/securenative/securenative-java</url>
1111

1212
<name>${project.groupId}:${project.artifactId}:${project.version}</name>

src/main/java/com/securenative/config/ConfigurationManager.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import com.securenative.enums.FailoverStrategy;
77
import com.securenative.utils.Utils;
88

9+
import java.io.FileInputStream;
10+
import java.io.FileNotFoundException;
11+
import java.io.IOException;
912
import java.io.InputStream;
1013
import java.net.URL;
1114
import java.nio.file.Path;
@@ -69,7 +72,15 @@ public static SecureNativeOptions loadConfig() {
6972
}
7073

7174
public static SecureNativeOptions loadConfig(Path path) {
72-
Properties properties = readResourceFile(path.toString());
75+
Properties properties = new Properties();
76+
InputStream input;
77+
try {
78+
input = new FileInputStream(path.toString());
79+
properties.load(input);
80+
} catch (IOException ignore) {
81+
82+
}
83+
7384
return getOptions(properties);
7485
}
7586

0 commit comments

Comments
 (0)