lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [01/11] lucene-solr:jira/solr-8593: SOLR-9053: Fix attribution, apply the code refactor part from mdrob's patch
Date Thu, 05 May 2016 13:41:53 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-8593 4ea7f4ef9 -> aae6f2703


SOLR-9053: Fix attribution, apply the code refactor part from mdrob's patch


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b6f8c650
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b6f8c650
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b6f8c650

Branch: refs/heads/jira/solr-8593
Commit: b6f8c6500ed67d96b17213c62a21982b78bb36e1
Parents: 0a20dd4
Author: Jan Høydahl <janhoy@apache.org>
Authored: Wed May 4 23:19:55 2016 +0200
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Wed May 4 23:19:55 2016 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  2 +-
 .../apache/solr/servlet/SolrRequestParsers.java | 28 +++++++++-----------
 2 files changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b6f8c650/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c84affa..1ffbb72 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -241,7 +241,7 @@ Other Changes
 
 * SOLR-9047: zkcli should allow alternative locations for log4j configuration (Gregory Chanan)
 
-* SOLR-9053: Upgrade commons-fileupload to 1.3.1, fixing a potential vulnerability (Jeff
Field, janhoy)
+* SOLR-9053: Upgrade commons-fileupload to 1.3.1, fixing a potential vulnerability (Jeff
Field, Mike Drob via janhoy)
 
 * SOLR-9066 Make CountMetric return long instead of double (Kevin Risden)
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b6f8c650/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
index a91f6a2..9d7e7d9 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
@@ -57,7 +57,6 @@ import org.apache.solr.core.SolrConfig;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequestBase;
-import org.apache.solr.util.RTimer;
 import org.apache.solr.util.RTimerTree;
 
 import static org.apache.solr.common.params.CommonParams.PATH;
@@ -564,21 +563,18 @@ public class SolrRequestParsers
       upload.setSizeMax( ((long) uploadLimitKB) * 1024L );
 
       // Parse the request
-      List items = upload.parseRequest(req);
-      Iterator iter = items.iterator();
-      while (iter.hasNext()) {
-          FileItem item = (FileItem) iter.next();
-
-          // If it's a form field, put it in our parameter map
-          if (item.isFormField()) {
-            MultiMapSolrParams.addParam( 
-              item.getFieldName().trim(),
-              item.getString(), params.getMap() );
-          }
-          // Add the stream
-          else { 
-            streams.add( new FileItemContentStream( item ) );
-          }
+      List<FileItem> items = upload.parseRequest(req);
+      for (FileItem item : items) {
+        // If it's a form field, put it in our parameter map
+        if (item.isFormField()) {
+          MultiMapSolrParams.addParam(
+            item.getFieldName().trim(),
+            item.getString(), params.getMap() );
+        }
+        // Add the stream
+        else {
+          streams.add( new FileItemContentStream( item ) );
+        }
       }
       return params;
     }


Mime
View raw message