Skip to content
Permalink
Browse files
Remove unnecessary boxing (#116)
  • Loading branch information
arturobernalg committed Sep 25, 2021
1 parent 538410d commit a8499b3c5d8e0740c263845e2a74d9b6ae5262e8
Showing 7 changed files with 10 additions and 10 deletions.
@@ -572,7 +572,7 @@ public String readHeaders() throws FileUploadIOException, MalformedStreamExcepti
if (++size > HEADER_PART_SIZE_MAX) {
throw new MalformedStreamException(
format("Header section has more than %s bytes (maybe it is not properly terminated)",
Integer.valueOf(HEADER_PART_SIZE_MAX)));
HEADER_PART_SIZE_MAX));
}
if (b == HEADER_SEPARATOR[i]) {
i++;
@@ -599,8 +599,8 @@ private static String getUniqueId() {
@Override
public String toString() {
return format("name=%s, StoreLocation=%s, size=%s bytes, isFormField=%s, FieldName=%s",
getName(), getStoreLocation(), Long.valueOf(getSize()),
Boolean.valueOf(isFormField()), getFieldName());
getName(), getStoreLocation(), getSize(),
isFormField(), getFieldName());
}

/**
@@ -168,7 +168,7 @@ protected void init(final FileUploadBase fileUploadBase, final RequestContext pR
if (requestSize != -1 && requestSize > sizeMax) {
throw new SizeLimitExceededException(
format("the request was rejected because its size (%s) exceeds the configured maximum (%s)",
Long.valueOf(requestSize), Long.valueOf(sizeMax)),
requestSize, sizeMax),
requestSize, sizeMax);
}
// N.B. this is eventually closed in MultipartStream processing
@@ -178,7 +178,7 @@ protected void raiseError(final long pSizeMax, final long pCount)
throws IOException {
final FileUploadException ex = new SizeLimitExceededException(
format("the request was rejected because its size (%s) exceeds the configured maximum (%s)",
Long.valueOf(pCount), Long.valueOf(pSizeMax)),
pCount, pSizeMax),
pCount, pSizeMax);
throw new FileUploadIOException(ex);
}
@@ -101,7 +101,7 @@ public FileItemStreamImpl(final FileItemIteratorImpl pFileItemIterator, final St
final FileSizeLimitExceededException e =
new FileSizeLimitExceededException(
format("The field %s exceeds its maximum permitted size of %s bytes.",
fieldName, Long.valueOf(fileSizeMax)),
fieldName, fileSizeMax),
pContentLength, fileSizeMax);
e.setFileName(pName);
e.setFieldName(pFieldName);
@@ -119,7 +119,7 @@ protected void raiseError(final long pSizeMax, final long pCount)
final FileSizeLimitExceededException e =
new FileSizeLimitExceededException(
format("The field %s exceeds its maximum permitted size of %s bytes.",
fieldName, Long.valueOf(pSizeMax)),
fieldName, pSizeMax),
pCount, pSizeMax);
e.setFieldName(fieldName);
e.setFileName(name);
@@ -123,7 +123,7 @@ public InputStream getInputStream() throws IOException {
@Override
public String toString() {
return format("ContentLength=%s, ContentType=%s",
Long.valueOf(this.contentLength()),
this.contentLength(),
this.getContentType());
}

@@ -125,7 +125,7 @@ public InputStream getInputStream() throws IOException {
@Override
public String toString() {
return format("ContentLength=%s, ContentType=%s",
Long.valueOf(this.contentLength()),
this.contentLength(),
this.getContentType());
}

@@ -123,7 +123,7 @@ public InputStream getInputStream() throws IOException {
@Override
public String toString() {
return format("ContentLength=%s, ContentType=%s",
Long.valueOf(this.contentLength()),
this.contentLength(),
this.getContentType());
}

0 comments on commit a8499b3

Please sign in to comment.