This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit 89c4db18419a2885359dda8c6e5443bc101e183b Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 13 14:57:30 2025 -0400 Remove unnecessary type cast --- .../java/org/apache/commons/fileupload2/core/MultipartInput.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java index 370f087c..18ff991b 100644 --- a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java +++ b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/core/MultipartInput.java @@ -937,11 +937,9 @@ public final class MultipartInput { throw new MalformedStreamException("Stream ended unexpectedly", e); } final int phsm = getPartHeaderSizeMax(); - if (phsm != -1 && ++size > phsm) { - throw new FileUploadSizeException(String.format( - "Header section has more than %s bytes (maybe it" - + " is not properly terminated)", Integer.valueOf(phsm)), - (long) phsm, (long) size); + if (phsm != -1 && ++size > phsm) { + throw new FileUploadSizeException( + String.format("Header section has more than %s bytes (maybe it is not properly terminated)", Integer.valueOf(phsm)), phsm, size); } if (b == HEADER_SEPARATOR[i]) { i++; @@ -950,7 +948,6 @@ public final class MultipartInput { } baos.write(b); } - try { return baos.toString(Charsets.toCharset(headerCharset, Charset.defaultCharset()).name()); } catch (final UnsupportedEncodingException e) {