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