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


##########
solr/solrj/src/java/org/apache/solr/common/util/TextWriter.java:
##########
@@ -84,11 +84,11 @@ default void writeVal(String name, Object val, boolean raw) 
throws IOException {
       }
     } else if (val instanceof IteratorWriter) {
       writeIterator(name, (IteratorWriter) val, raw);
-    } else if (val instanceof MapWriter) {
+    } else if (val instanceof MapWriter && !(val instanceof SimpleOrderedMap)) 
{
       writeMap(name, (MapWriter) val);
     } else if (val instanceof ReflectWritable) {
       writeVal(name, Utils.getReflectWriter(val));
-    } else if (val instanceof MapSerializable) {
+    } else if (val instanceof MapSerializable && !(val instanceof 
SimpleOrderedMap)) {
       // todo find a better way to reuse the map more efficiently
       writeMap(name, ((MapSerializable) val).toMap(new LinkedHashMap<>()), 
false, true);
     } else if (val instanceof Map) {

Review Comment:
   I've tried rearranging the order before adding the instanceof-checks, but 
much code, or at least many tests seem to depend on this order.
   If I just move up the 'instanceof Map' check as you suggest, I have 42 new 
tests failing.



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