Skip to content

Commit

Permalink
Obtain the sshj.properties resource from the ClassLoader that loaded …
Browse files Browse the repository at this point in the history
…the DefaultConfig class, not from the context classloader.
  • Loading branch information
David Solin authored and David Solin committed Dec 21, 2016
1 parent 766ab91 commit 9e3b9f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/schmizz/sshj/DefaultConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public DefaultConfig() {
private String readVersionFromProperties() {
try {
Properties properties = new Properties();
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("sshj.properties"));
properties.load(DefaultConfig.class.getClassLoader().getResourceAsStream("sshj.properties"));
String property = properties.getProperty("sshj.version");
return "SSHJ_" + property.replace('-', '_'); // '-' is a disallowed character, see RFC-4253#section-4.2
} catch (IOException e) {
Expand Down

0 comments on commit 9e3b9f7

Please sign in to comment.