diff --git a/CHANGES.md b/CHANGES.md index 09d2d4c15..6b7239fdc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,6 +43,7 @@ ## New Features * New utility methods `SftpClient.put(Path localFile, String remoteFileName)` and `SftpClient.put(InputStream in, String remoteFileName)` facilitate SFTP file uploading. +* [GH-539](https://github.com/apache/mina-sshd/issues/539) Implement no-flow-control extension ## Potential compatibility issues diff --git a/sshd-cli/src/main/java/org/apache/sshd/cli/client/ScpCommandMain.java b/sshd-cli/src/main/java/org/apache/sshd/cli/client/ScpCommandMain.java index 72102c8cf..977b7ce8f 100644 --- a/sshd-cli/src/main/java/org/apache/sshd/cli/client/ScpCommandMain.java +++ b/sshd-cli/src/main/java/org/apache/sshd/cli/client/ScpCommandMain.java @@ -32,6 +32,7 @@ import java.util.Collection; import java.util.Collections; import java.util.EnumSet; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Set; @@ -42,12 +43,14 @@ import org.apache.sshd.client.auth.AuthenticationIdentitiesProvider; import org.apache.sshd.client.config.hosts.HostConfigEntry; import org.apache.sshd.client.session.ClientSession; +import org.apache.sshd.common.PropertyResolver; import org.apache.sshd.common.SshConstants; import org.apache.sshd.common.session.Session; import org.apache.sshd.common.util.GenericUtils; import org.apache.sshd.common.util.ReflectionUtils; import org.apache.sshd.common.util.io.input.NoCloseInputStream; import org.apache.sshd.common.util.threads.ThreadUtils; +import org.apache.sshd.core.CoreModuleProperties; import org.apache.sshd.scp.client.ScpClient; import org.apache.sshd.scp.client.ScpClient.Option; import org.apache.sshd.scp.client.ScpClientCreator; @@ -61,6 +64,8 @@ import org.apache.sshd.scp.common.helpers.ScpTimestampCommandDetails; import org.slf4j.Logger; +import static org.apache.sshd.common.PropertyResolverUtils.toPropertyResolver; + /** * @see SCP(1) - manual page * @author Apache MINA SSHD Project @@ -151,7 +156,7 @@ public static String[] normalizeCommandArguments(PrintStream stdout, PrintStream return null; } - return effective.toArray(new String[effective.size()]); + return effective.toArray(new String[0]); } /* -------------------------------------------------------------------------------- */ @@ -248,11 +253,11 @@ public static void showUsageMessage(PrintStream stderr) { public static void xferLocalToRemote( BufferedReader stdin, PrintStream stdout, PrintStream stderr, String[] args, ScpLocation source, ScpLocation target, Collection