Closed
Description
java.lang.NumberFormatException: For input string: "51747932945"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.valueOf(Integer.java:766)
at software.amazon.awssdk.services.s3.internal.handlers.SyncChecksumValidationInterceptor.modifyHttpResponseContent(SyncChecksumValidationInterceptor.java:84)
Possible Solution
in SyncChecksumValidationInterceptor.modifyHttpResponseContent
replace int with long
long contentLength = Long.valueOf(context.httpResponse().firstMatchingHeader(CONTENT_LENGTH_HEADER).orElse("0"));
in AsyncChecksumValidationInterceptor.modifyAsyncHttpResponseContent
replace int with long
long contentLength = Long.parseLong(context.httpResponse().firstMatchingHeader("Content-Length").orElse("0"));
Steps to Reproduce (for bugs)
use S3Client.getObject for large files (more than 2GB)
Context
Downloading a 50+ GB File
Your Environment
- AWS Java SDK version used: 2.2.0
- JDK version used: 1.8
- Operating System and version: Amazon Linux 1