madrob commented on a change in pull request #169:
URL: https://github.com/apache/solr/pull/169#discussion_r651254173



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java
##########
@@ -77,38 +77,26 @@ public Tuple() {
    * A copy constructor.
    * @param fields map containing keys and values to be copied to this tuple
    */
-  public Tuple(Map<?, ?> fields) {
-    for (Map.Entry<?, ?> entry : fields.entrySet()) {
-      put(entry.getKey(), entry.getValue());
-    }
+  public Tuple(Map<String, ?> fields) {
+    this.fields.putAll(fields);
+    EOF = this.fields.containsKey(StreamParams.EOF);
+    EXCEPTION = this.fields.containsKey(StreamParams.EXCEPTION);

Review comment:
       You're right that this might break if somebody had overridden `put`. 
There were no instances of this happening in our code, but users could have 
different ideas with plugins. Maybe we should declare `put` as `final`? I can 
back this change out and leave a note for a future JIRA if you'd prefer.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to