Olaf Otto created WAGON-557: ------------------------------- Summary: Wrap around in AbstractWagon.getBufferCapacityForTransfer prevents optimal buffer size selection for large artifacts Key: WAGON-557 URL: https://issues.apache.org/jira/browse/WAGON-557 Project: Maven Wagon Issue Type: Bug Components: wagon-provider-api Affects Versions: 3.3.2 Reporter: Olaf Otto
The change introduced for WAGON-537 was slightly modified from the original PR (see https://github.com/apache/maven-wagon/pull/51/commits/e4d34eb86906317536f2adfde4f70f3f45cb34c4) and introduced a wrap around in getBufferCapacityForTransfer: {code} final int numberOfBufferSegments = (int) numberOfBytes / ( BUFFER_SEGMENT_SIZE * MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS ); {code} Here, the integer cast is applied prior to the division, resulting in negative numbers for larger artifact sizes. This means the buffer capacity falls back to the minimum buffer size (4k) for such artifacts. While the overall performance is still better than prior to WAGON-537, this significantly reducies portential transfer speed for such large artifacts. -- This message was sent by Atlassian JIRA (v7.6.3#76005)