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


##########
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)) {

Review Comment:
   why this line?  SOM isn't MapSerializable



##########
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:
   this should simply be ranked higher than MapWriter, where it will then apply 
to SimpleOrderedMap.



##########
solr/solrj/src/java/org/apache/solr/common/util/Utils.java:
##########
@@ -290,7 +290,7 @@ public static Object fromJSON(byte[] utf8) {
   }
 
   public static Object fromJSON(byte[] utf8, int offset, int length) {
-    return fromJSON(utf8, offset, length, STANDARDOBJBUILDER);
+    return fromJSON(utf8, offset, length, SIMPLEORDEREDMAPOBJBUILDER);

Review Comment:
   No; we should understand why the test or underlying functionality are 
breaking and then make decisions based on that.



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