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


##########
solr/solrj/src/java/org/apache/solr/common/util/Utils.java:
##########
@@ -909,6 +909,15 @@ public static void reflectWrite(MapWriter.EntryWriter ew, 
Object o) {
    * @return a serializable version of the object
    */
   public static Object getReflectWriter(Object o) {
+    // Defensive: Avoid reflective serialization for Lucene Point types (e.g., 
LongPoint)
+    // which are not meant to be serialized this way and can cause 
IllegalAccessException.
+    String lucenePointPkg = "org.apache.lucene.document.";
+    if (o != null
+        && o.getClass().getName().startsWith(lucenePointPkg)

Review Comment:
   This feel like a hack to me.  Perhaps it's the best choice but hard for me 
to say at this time before understanding how this is invoked.  Maybe there's a 
solution preventing a Point field from getting here in the first place.  A test 
would help!



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