mirror of
https://github.com/apache/jclouds.git
synced 2025-02-09 03:25:39 +00:00
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
|
@Override
|
||||||
public long getLength() {
|
public long getLength() {
|
||||||
return contents.getContentMetadata().getContentLength();
|
Long length = contents.getContentMetadata().getContentLength();
|
||||||
|
return length != null ? length : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user