Skip to content

Commit

Permalink
Clarifies Java platform requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 2, 2023
1 parent 7c4805f commit be5c118
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import org.apache.commons.fileupload2.core.AbstractFileUploadTest;
import org.apache.commons.fileupload2.core.Constants;
Expand Down Expand Up @@ -107,6 +108,14 @@ public void parseParameterMap() throws Exception {

assertTrue(mappedParameters.containsKey("multi"));
assertEquals(2, mappedParameters.get("multi").size());

final var itemCount = new AtomicInteger();
// Replace iterator with this one to make test passed
JakartaMockServletHttpRequest request2 = new JakartaMockServletHttpRequest(bytes, Constants.CONTENT_TYPE);
upload.parseParameterMap(request);
upload.getItemIterator(request2).forEachRemaining(item -> itemCount.incrementAndGet());
upload.getItemIterator(request).forEachRemaining(item -> itemCount.incrementAndGet());
assertEquals(4, itemCount.get());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/changes/release-notes.vm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The ${developmentTeam} is pleased to announce the release of ${project.name} ${v

The Apache Commons FileUpload component provides a simple yet flexible means of
adding support for multipart file upload functionality to servlets and web
applications. This version requires Java 8 or later.
applications. This version requires Java 11 or above.

No client code changes are required to migrate from version 1.3.0 to 1.3.1.

Expand Down

0 comments on commit be5c118

Please sign in to comment.