Merge pull request #291 from joval/master

Two minor changes
This commit is contained in:
Jeroen van Erp
2016-12-21 21:51:23 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ public class DefaultConfig
private String readVersionFromProperties() { private String readVersionFromProperties() {
try { try {
Properties properties = new Properties(); 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"); String property = properties.getProperty("sshj.version");
return "SSHJ_" + property.replace('-', '_'); // '-' is a disallowed character, see RFC-4253#section-4.2 return "SSHJ_" + property.replace('-', '_'); // '-' is a disallowed character, see RFC-4253#section-4.2
} catch (IOException e) { } catch (IOException e) {

View File

@@ -34,7 +34,7 @@ public class SSHRuntimeException
} }
public SSHRuntimeException(Throwable cause) { public SSHRuntimeException(Throwable cause) {
this(null, cause); this(cause.getMessage(), cause);
} }
} }