File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
basex-core/src/main/java/org/basex/query/util/pkg Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,20 @@ public ModuleLoader(final Context context) {
4949 * implementing {@link QueryResource}.
5050 */
5151 public void close () {
52- if (loader != LOADER ) {
53- try {
54- ((URLClassLoader ) loader ).close ();
55- } catch (final IOException ex ) {
56- Util .stack (ex );
57- }
58- }
5952 for (final Object jm : javaModules ) {
6053 for (final Class <?> c : jm .getClass ().getInterfaces ()) {
6154 if (c == QueryResource .class ) Reflect .invoke (CLOSE , jm );
6255 }
6356 }
57+ try {
58+ while (loader != LOADER ) {
59+ final ClassLoader parent = loader .getParent ();
60+ ((URLClassLoader ) loader ).close ();
61+ loader = parent ;
62+ }
63+ } catch (final IOException ex ) {
64+ Util .stack (ex );
65+ }
6466 }
6567
6668 /**
You can’t perform that action at this time.
0 commit comments