Properly close ClassGraph scan
This commit is contained in:
parent
0695ddc1f2
commit
c7b9f694c7
|
@ -14,8 +14,8 @@ object FunctionTable {
|
||||||
.enableAnnotationInfo()
|
.enableAnnotationInfo()
|
||||||
.whitelistPackages("function.builtin")
|
.whitelistPackages("function.builtin")
|
||||||
|
|
||||||
private val allBuiltIns = with(classGraph.scan()) {
|
private val allBuiltIns = classGraph.scan().use { scan ->
|
||||||
getClassesWithAnnotation(FunctionNames::class.qualifiedName)
|
scan.getClassesWithAnnotation(FunctionNames::class.qualifiedName)
|
||||||
.map { it.loadClass() }
|
.map { it.loadClass() }
|
||||||
.filterIsInstance<Class<out LispFunction>>()
|
.filterIsInstance<Class<out LispFunction>>()
|
||||||
.toSet()
|
.toSet()
|
||||||
|
|
Loading…
Reference in New Issue