diff --git a/src/de/dhbwstuttgart/parser/PackageCrawler.java b/src/de/dhbwstuttgart/parser/PackageCrawler.java index 18bcd444..7028c8e7 100644 --- a/src/de/dhbwstuttgart/parser/PackageCrawler.java +++ b/src/de/dhbwstuttgart/parser/PackageCrawler.java @@ -12,7 +12,7 @@ import java.util.LinkedList; import java.util.List; import java.util.ArrayList; import java.util.Set; - +import java.lang.InterruptedException; /** * Hilft beim Durchsuchen von Packages * Benutzt die Reflections-Library (https://github.com/ronmamo/reflections) @@ -20,10 +20,11 @@ import java.util.Set; */ public class PackageCrawler { - public static Set> getClassesInPackage(String packageName) { + public static Set> getClassesInPackage(String packageName){ List classLoadersList = new LinkedList(); - classLoadersList.add(ClasspathHelper.contextClassLoader()); + classLoadersList.add(Thread.currentThread().getContextClassLoader()); classLoadersList.add(ClasspathHelper.staticClassLoader()); + classLoadersList.add(Thread.currentThread().getContextClassLoader().getParent()); Reflections reflections = new Reflections(new ConfigurationBuilder() .setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())