mirror of https://github.com/apache/druid.git
Remove unnecessary cast to URLClassLoader (#7603)
Java 9 and above will fail trying to cast the system classloader
This commit is contained in:
parent
751e1c9ba7
commit
c58aa2f2ab
|
@ -116,7 +116,8 @@ public class InitializationTest
|
||||||
public void test04DuplicateClassLoaderExtensions() throws Exception
|
public void test04DuplicateClassLoaderExtensions() throws Exception
|
||||||
{
|
{
|
||||||
final File extensionDir = temporaryFolder.newFolder();
|
final File extensionDir = temporaryFolder.newFolder();
|
||||||
Initialization.getLoadersMap().put(extensionDir, (URLClassLoader) Initialization.class.getClassLoader());
|
Initialization.getLoadersMap()
|
||||||
|
.put(extensionDir, new URLClassLoader(new URL[]{}, Initialization.class.getClassLoader()));
|
||||||
|
|
||||||
Collection<DruidModule> modules = Initialization.getFromExtensions(new ExtensionsConfig(), DruidModule.class);
|
Collection<DruidModule> modules = Initialization.getFromExtensions(new ExtensionsConfig(), DruidModule.class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue