Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.3.1
-
None
-
None
Description
We have unit tests that will create a new MultiPartRequestWrapper. Here is a code snippet of this:
MockHttpServletRequest req = new MockHttpServletRequest();
// Set request body to HTTP servlet request:
req.setContent(requestContent.toByteArray());
// Set content type to HTTP servlet request (important, includes Mime boundary string):
req.setContentType(multipartRequestEntity.getContentType());
LocaleProvider localeProvider = new DefaultLocaleProvider();
JakartaMultiPartRequest jak = new JakartaMultiPartRequest();
jak.setMaxSize(String.valueOf(2000));
File tempDir = new File(TEMP_DIR);
if (!tempDir.exists())
return new MultiPartRequestWrapper(jak, req, tempDir.getAbsolutePath(), localeProvider);
When the "return..." statement runs, seconds later the unit tests fail and we see the following in the unit test console:
java.lang.StackOverflowError
at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
at org.apache.commons.io.IOUtils.closeQuietly(IOUtils.java:60)
etc,etc,etc. (hundreds of times)
This behavior does not happen with a prior version of commons-fiileupload. We only see this with version 1.3.1.
Please advise and thank you in advance for your attention on this issue.