LiangliangSui commented on code in PR #1792:
URL: https://github.com/apache/fury/pull/1792#discussion_r1704000144


##########
java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java:
##########
@@ -50,7 +52,13 @@ public class FuryPooledObjectFactory {
 
   /** ThreadLocal: ClassLoader. */
   private final ThreadLocal<ClassLoader> classLoaderLocal =
-      ThreadLocal.withInitial(() -> 
Thread.currentThread().getContextClassLoader());
+      ThreadLocal.withInitial(() -> {
+        ClassLoader loader = Thread.currentThread().getContextClassLoader();
+        if (loader == null) {
+          loader = Fury.class.getClassLoader();
+        }

Review Comment:
   Could we move this into `org.apache.fury.config.FuryBuilder#finish` ?



-- 
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: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org

Reply via email to