You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by oassuncao <gi...@git.apache.org> on 2017/01/09 12:32:59 UTC

[GitHub] maven-wagon pull request #32: ScpWagon file size Integer to Long

GitHub user oassuncao opened a pull request:

    https://github.com/apache/maven-wagon/pull/32

    ScpWagon file size Integer to Long

    Change filesize to Long as `resource.setContentLength`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/oassuncao/maven-wagon master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-wagon/pull/32.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
    
----
commit a72a144a93e08ca85d55a37aebf17ffb510ca4ec
Author: silvioj <si...@me.com.br>
Date:   2017-01-09T12:32:03Z

    Change filesize to Long as `resource.setContentLength`

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by stephenc <gi...@git.apache.org>.
Github user stephenc commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: ScpWagon file size Integer to Long

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    Is the value in bytes? If though, this truly can fail with intergers. Please open a JIRA issue for that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon pull request #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/maven-wagon/pull/32


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by oassuncao <gi...@git.apache.org>.
Github user oassuncao commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    Changed the code to use `Long.parseLong`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon pull request #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on a diff in the pull request:

    https://github.com/apache/maven-wagon/pull/32#discussion_r95234762
  
    --- Diff: wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java ---
    @@ -297,7 +297,7 @@ public void fillInputData( InputData inputData )
                     throw new IOException( "Invalid transfer header: " + line );
                 }
     
    -            int filesize = Integer.valueOf( line.substring( 5, index ) ).intValue();
    +            long filesize = Long.valueOf( line.substring( 5, index ) );
    --- End diff --
    
    Good point. Waiting for this to be integrated and I will ran all tests against the patch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by oassuncao <gi...@git.apache.org>.
Github user oassuncao commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    I squash the commits.
    
    Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: ScpWagon file size Integer to Long

Posted by oassuncao <gi...@git.apache.org>.
Github user oassuncao commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    If you check the `resource.setContentLength` this method receive a long value as a parameter. In the `ScpWagon` convert the integer to long (java cast). 
    
    I only parse the value to Long, because if you have large file you will receive a error. My file has 3.8 GB in bytes is 3865470566. It is more than the capability of Integer Java


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon pull request #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by Tunaki <gi...@git.apache.org>.
Github user Tunaki commented on a diff in the pull request:

    https://github.com/apache/maven-wagon/pull/32#discussion_r95232415
  
    --- Diff: wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagon.java ---
    @@ -297,7 +297,7 @@ public void fillInputData( InputData inputData )
                     throw new IOException( "Invalid transfer header: " + line );
                 }
     
    -            int filesize = Integer.valueOf( line.substring( 5, index ) ).intValue();
    +            long filesize = Long.valueOf( line.substring( 5, index ) );
    --- End diff --
    
    Small note, `Long.parseLong` is better here as it wouldn't involve an unboxing conversion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-wagon issue #32: [WAGON-485] ScpWagon file size Integer to Long

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on the issue:

    https://github.com/apache/maven-wagon/pull/32
  
    Please squash them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org