Skip to content

Commit

Permalink
[3.2][Kernel] Change Class.forName() usage in the `LogStoreProvider…
Browse files Browse the repository at this point in the history
…`. (delta-io#3304)

Look for the `LogStore` class more broadly in the class loader than just
the thread local's class loader. The thread context class loader
requires the Thread local variables to have the `LogStore` in it, but
this class loader may not have all the dependencies wired up.

Not tested yet.

Fixes delta-io#3299.
  • Loading branch information
abhishekrb19 authored and vkorukanti committed Aug 30, 2024
1 parent 84c71fe commit 183322b
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ static String getLogStoreSchemeConfKey(String scheme) {
*/
private static Class<? extends LogStore> getLogStoreClass(String logStoreClassName)
throws ClassNotFoundException {
return Class.forName(
logStoreClassName,
true /* initialize */,
Thread.currentThread().getContextClassLoader())
.asSubclass(LogStore.class);
return Class.forName(logStoreClassName).asSubclass(LogStore.class);
}

/**
Expand Down

0 comments on commit 183322b

Please sign in to comment.