Skip to content

Commit

Permalink
classgraph#651 fixes NPE in JbossClassLoaderHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Hupka-Merle committed Feb 15, 2022
1 parent f874380 commit 3b726c6
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.emptySet();
for (final Entry<Object, Object> ent : moduleMapEntries) {
// type FutureModule
final Object val = ent.getValue();
// type Module
Expand Down

0 comments on commit 3b726c6

Please sign in to comment.