theigl commented on issue #1878:
URL: https://github.com/apache/fury/issues/1878#issuecomment-2404302673
Unfortunately, it does not work. Here is a simplified test-case that
demonstrates the issue:
```java
import org.apache.fury.Fury;
import org.apache.fury.ThreadSafeFury;
import org.apache.fury.config.Language;
import org.junit.jupiter.api.Test;
import java.util.concurrent.CountDownLatch;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
class ClassLoaderTest {
static class MyClassLoader extends ClassLoader {}
@Test
void shouldUseProvidedClassLoader() throws InterruptedException {
final MyClassLoader myClassLoader = new MyClassLoader();
final ThreadSafeFury fury = Fury.builder()
.withClassLoader(myClassLoader)
.withLanguage(Language.JAVA)
.requireClassRegistration(false)
.buildThreadSafeFuryPool(1, 1);
fury.setClassLoader(myClassLoader);
final CountDownLatch latch = new CountDownLatch(1);
new Thread(() -> {
final ClassLoader t = fury.getClassLoader();
assertInstanceOf(MyClassLoader.class, t);
latch.countDown();
}).start();
latch.await();
}
}
```
--
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]