Processed review comments from @demobox. Thx!

This commit is contained in:
hierynomus
2015-01-20 09:31:24 +01:00
parent 18f364a283
commit 3cefda5bd3
3 changed files with 5 additions and 6 deletions

View File

@@ -78,6 +78,7 @@ public interface Transport
/**
* @return the interval in seconds at which a heartbeat message is sent to the server
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
* Scheduled to be removed in 0.12.0
*/
@Deprecated
int getHeartbeatInterval();
@@ -85,6 +86,7 @@ public interface Transport
/**
* @param interval the interval in seconds, {@code 0} means no hearbeat
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
* Scheduled to be removed in 0.12.0
*/
@Deprecated
void setHeartbeatInterval(int interval);

View File

@@ -127,10 +127,9 @@ public final class TransportImpl
this.sshClient = null;
}
/**
/*
* Temporary constructor until we remove support for the set/get Heartbeat interval from transport.
* @param config
* @param sshClient
* @deprecated To be removed in 0.12.0
*/
@Deprecated
public TransportImpl(Config config, SSHClient sshClient) {

View File

@@ -139,9 +139,7 @@ public class PKCS8KeyFile
JcePEMDecryptorProviderBuilder decryptorBuilder = new JcePEMDecryptorProviderBuilder();
decryptorBuilder.setProvider("BC");
try {
// Do not return null, as JcePEMDecryptorProviderBuilder$1$1.decrypt would throw an exception
// in that case because it requires a 'password' (i.e. passphrase).
passphrase = pwdf == null ? "".toCharArray() : pwdf.reqPassword(resource);
passphrase = pwdf == null ? null : pwdf.reqPassword(resource);
kp = pemConverter.getKeyPair(encryptedKeyPair.decryptKeyPair(decryptorBuilder.build(passphrase)));
} finally {
PasswordUtils.blankOut(passphrase);