Skip to content

Commit

Permalink
Eliminated String.format call
Browse files Browse the repository at this point in the history
  • Loading branch information
David Solin committed Jul 16, 2021
1 parent 0d5fd9d commit 740a492
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,15 @@ private synchronized void verifyHost(PublicKey key)
return;
}
log.error(
String.format("Disconnecting because none of the configured Host key verifiers (%s) could verify '%s' host key with fingerprint %s for %s:%s",
"Disconnecting because none of the configured Host key verifiers ({}) could verify '{}' host key with fingerprint {} for {}:{}",
new String[] {
hostVerifiers.toString(),
KeyType.fromKey(key).toString(),
SecurityUtils.getFingerprint(key),
transport.getRemoteHost(),
Integer.toString(transport.getRemotePort())
)
);
}
);

throw new TransportException(DisconnectReason.HOST_KEY_NOT_VERIFIABLE,
"Could not verify `" + KeyType.fromKey(key)
Expand Down

0 comments on commit 740a492

Please sign in to comment.