Skip to content

Commit

Permalink
Remove unnecessary boxing
Browse files Browse the repository at this point in the history
  • Loading branch information
arturobernalg committed Sep 25, 2021
1 parent 538410d commit 22b094f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Expand Up @@ -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++;
Expand Down
Expand Up @@ -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());
}

/**
Expand Down
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Expand Up @@ -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());
}

Expand Down
Expand Up @@ -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());
}

Expand Down
Expand Up @@ -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());
}

Expand Down

0 comments on commit 22b094f

Please sign in to comment.