You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2015/06/20 16:07:48 UTC

[6/9] wicket git commit: FindBugs: Use more optimal iteration over the entry set instead of over the key set + lookup by key

FindBugs: Use more optimal iteration over the entry set instead of over the key set + lookup by key


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/003d1c3e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/003d1c3e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/003d1c3e

Branch: refs/heads/master
Commit: 003d1c3e7b3af03ab43e58231ab2d40fe5425283
Parents: ae3b2d6
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Sat Jun 20 16:19:49 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Sat Jun 20 16:19:49 2015 +0300

----------------------------------------------------------------------
 .../wicket/protocol/http/mock/MockHttpServletRequest.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/003d1c3e/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
index 5acc2a5..354d1c0 100755
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java
@@ -1680,9 +1680,10 @@ public class MockHttpServletRequest implements HttpServletRequest
 			// Add files
 			if (uploadedFiles != null)
 			{
-				for (String fieldName : uploadedFiles.keySet())
+				for (Map.Entry<String, List<UploadedFile>> entry : uploadedFiles.entrySet())
 				{
-					List<UploadedFile> files = uploadedFiles.get(fieldName);
+					String fieldName = entry.getKey();
+					List<UploadedFile> files = entry.getValue();
 
 					for (UploadedFile uf : files)
 					{