/** * Same as {@link SSHUserPrivateKey#getPrivateKeys} but backward compatible for old implementations. * * @since 1.3 */ @SuppressWarnings("deprecation") public static List<String> getPrivateKeys(SSHUserPrivateKey user) { try { return user.getPrivateKeys(); } catch (AbstractMethodError x) { return Collections.singletonList(user.getPrivateKey()); } }