dsmiley commented on code in PR #3163:
URL: https://github.com/apache/solr/pull/3163#discussion_r1947895092
##########
solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java:
##########
@@ -863,6 +871,21 @@ 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 {
+
+ SimpleOrderedMap<Object> entries = new SimpleOrderedMap<>(sz);
+
+ for (int i = 0; i < sz; i++) {
+ Object key = readVal(dis);
+ assert key instanceof String;
+ Object val = readVal(dis);
+ entries.put((String) key, val);
Review Comment:
```suggestion
entries.add((String) key, val); // using NL.add() since key won't
repeat
```
##########
solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java:
##########
@@ -1436,4 +1459,8 @@ public void close() throws IOException {
daos.flushBuffer();
}
}
+
Review Comment:
TODO javadocs.
##########
solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java:
##########
@@ -409,12 +419,17 @@ private static byte[] getBytes(Object o, boolean
readAsCharSeq) throws IOExcepti
}
}
- private static Object getObject(byte[] bytes) throws IOException {
+ private static Object getObject(byte[] bytes, boolean mapAsNamedList) throws
IOException {
Review Comment:
don't need these getObject anymore, I think
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]