dsmiley commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1946576896


##########
solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java:
##########
@@ -863,6 +868,26 @@ protected Map<Object, Object> readMap(DataInputInputStream 
dis, int sz) throws I
     return m;
   }
 
+  @SuppressWarnings({"rawtypes", "unchecked"})
+  protected Map<?, Object> 
readMapAsSimpleOrderedMapForStringKeys(DataInputInputStream dis, int sz)
+      throws IOException {
+    Map m = null;
+    for (int i = 0; i < sz; i++) {
+      Object key = readVal(dis);
+
+      if (m == null) {
+        if (key instanceof String) {
+          m = new SimpleOrderedMap<>(sz);
+        } else {
+          m = newMap(sz);
+        }
+      }
+      Object val = readVal(dis);
+      m.put(key, val);
+    }
+    return m;
+  }
+

Review Comment:
   Yes; consider this a hypothesis to be tested (by the results of the totality 
of Solr's test suite).



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

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