code: synchronized public static <T> Set<ClassInfo> getNonAbstractSubClassInfoSet(Class<T> parentClass, String... packageNames) {
          if (packageNames == null || packageNames.length == 0) {
              packageNames = defaultPackages();
          }
          try (ScanResult scanResult =
                       new ClassGraph()
                               .enableAllInfo()
                               .whitelistPackages(packageNames)
                               .scan()) {
              ClassInfoList classInfos = parentClass.isInterface() ?
                      scanResult.getClassesImplementing(parentClass.getName()) :
                      scanResult.getSubclasses(parentClass.getName());
              return classInfos
                      .stream()
                      .filter(classInfo -> !classInfo.isAbstract())
                      .collect(Collectors.toSet());
          }
      }
docs: Reflection is not thread-safe scanning the jars files in the classpath,
  must be synchronized otherwise a "java.lang.IllegalStateException: zip file closed" is thrown.