Description
ScpWagon class parses a string value to integer (file size) but if you have a large file (3.6 GB for example) the file size is 3865470566 in bytes, the number is larger than the MAX_VALUE of integer.
ScpWagon.java
public void fillInputData( InputData inputData ) throws TransferFailedException, ResourceDoesNotExistException { ... int filesize = Integer.valueOf( line.substring( 5, index ) ).intValue(); fireTransferDebug( "Remote file size: " + filesize ); resource.setContentLength( filesize ); ...
I changed the line to parse using Long because the resource.setContentLength method receive a long value too.
ScpWagon.java
long filesize = Long.valueOf( line.substring( 5, index ) );
Please check the pull-request https://github.com/apache/maven-wagon/pull/32
Attachments
Issue Links
- links to