We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d4b486 commit 123124cCopy full SHA for 123124c
src/main/java/com/box/sdk/BinaryBodyUtils.java
@@ -100,11 +100,12 @@ private static long getContentLengthFromAPIResponse(BoxAPIResponse response) {
100
}
101
102
if (headerValue != null) {
103
+ String trimmedHeaderValue = headerValue.trim();
104
try {
- length = Long.parseLong(headerValue.trim());
105
+ length = Long.parseLong(trimmedHeaderValue);
106
} catch (NumberFormatException e) {
- throw new RuntimeException("Invalid content length: " + headerValue.trim() + " with: "
107
- + headerValue.trim().length() + " number of characters.");
+ throw new RuntimeException("Invalid content length: " + trimmedHeaderValue + " with: "
108
+ + trimmedHeaderValue.length() + " number of characters.");
109
110
111
0 commit comments