Skip to content

Commit

Permalink
Merge pull request #652 from actico/bugfix/#651-fix-npe
Browse files Browse the repository at this point in the history
#651 fixes NPE in JbossClassLoaderHandler
  • Loading branch information
lukehutch committed Feb 17, 2022
2 parents f874380 + 7afa63b commit 44cb42e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@
import java.io.File;
import java.lang.reflect.Array;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -212,7 +213,9 @@ public static void findClasspathOrder(final ClassLoader classLoader, final Class
@SuppressWarnings("unchecked")
final Map<Object, Object> moduleMap = (Map<Object, Object>) ReflectionUtils.getFieldVal(false,
callerModuleLoader, "moduleMap");
for (final Entry<Object, Object> ent : moduleMap.entrySet()) {
Set<Entry<Object, Object>> moduleMapEntries =
moduleMap != null ? moduleMap.entrySet() : Collections.<Entry<Object, Object>>emptySet();
for (final Entry<Object, Object> ent : moduleMapEntries) {
// type FutureModule
final Object val = ent.getValue();
// type Module
Expand Down

0 comments on commit 44cb42e

Please sign in to comment.