Skip to content
Permalink
Browse files
Merge pull request #97 from arturobernalg/feature/uploadContext
Use UploadContext instead deprecated method (RequestContext)
  • Loading branch information
jochenw committed May 27, 2021
2 parents 4a0264e + d690ffd commit f26e8240f961399728146bbeb3ada05ad7fd5b8c
Showing 1 changed file with 1 addition and 5 deletions.
@@ -138,11 +138,7 @@ protected void init(final FileUploadBase fileUploadBase, final RequestContext pR
format("the request doesn't contain a %s or %s stream, content type header is %s",
FileUploadBase.MULTIPART_FORM_DATA, FileUploadBase.MULTIPART_MIXED, contentType));
}


@SuppressWarnings("deprecation") // still has to be backward compatible
final int contentLengthInt = ctx.getContentLength();

final long contentLengthInt = ((UploadContext) ctx).contentLength();
final long requestSize = UploadContext.class.isAssignableFrom(ctx.getClass())
// Inline conditional is OK here CHECKSTYLE:OFF
? ((UploadContext) ctx).contentLength()

0 comments on commit f26e824

Please sign in to comment.