You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Nick Wilton (JIRA)" <ji...@apache.org> on 2014/03/22 07:08:42 UTC

[jira] [Created] (JCLOUDS-508) Add length argument to SshClient.put() method

Nick Wilton created JCLOUDS-508:
-----------------------------------

             Summary: Add length argument to SshClient.put() method
                 Key: JCLOUDS-508
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-508
             Project: jclouds
          Issue Type: Improvement
          Components: jclouds-core
    Affects Versions: 1.7.1
            Reporter: Nick Wilton


Due to JCLOUDS-410 the only remaining Payload types are stream based.

However, unfortunately the SshClient.put will not work unless a length is explicitly set using Payload.getContentMetadata().setContentLength(...), as the stream based payloads do not set this attribute (as there is no way of knowing how long a stream will be).

Failure to set the content length, will cause a NullPointerException to occur in the net.schmizz.sshj library.

I recommend that a length argument is added to the SshClient.put() argument, so that the user must specify the length when using this method. This is a much more friendly solution to modifying the payload meta data. 

Cheers.



--
This message was sent by Atlassian JIRA
(v6.2#6252)