mirror of https://github.com/apache/jclouds.git
JCLOUDS-629: SshjSshClient Payload without length
sshj treats -1 as an unknown length and uses a less efficient copying mechanism.
This commit is contained in:
parent
a8b106c2bb
commit
086fb9c728
|
@ -318,7 +318,8 @@ public class SshjSshClient implements SshClient {
|
|||
|
||||
@Override
|
||||
public long getLength() {
|
||||
return contents.getContentMetadata().getContentLength();
|
||||
Long length = contents.getContentMetadata().getContentLength();
|
||||
return length != null ? length : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue