More external reader refinements (#766)

* org.pkl.core.Readers -> org.pkl.core.Closeables
* Remove coupling between pkl.core.module/resource and pkl.core.messaging
This commit is contained in:
Josh B
2024-11-01 14:05:45 -07:00
committed by GitHub
parent 3f38173ed5
commit fa25fb46fd
16 changed files with 70 additions and 55 deletions

View File

@@ -20,8 +20,8 @@ import org.pkl.commons.cli.CliCommand
import org.pkl.commons.cli.CliException
import org.pkl.commons.createParentDirectories
import org.pkl.commons.writeString
import org.pkl.core.Closeables
import org.pkl.core.ModuleSource
import org.pkl.core.Readers
/** API for the Java code generator CLI. */
class CliJavaCodeGenerator(private val options: CliJavaCodeGeneratorOptions) :
@@ -49,8 +49,8 @@ class CliJavaCodeGenerator(private val options: CliJavaCodeGeneratorOptions) :
}
}
} finally {
Readers.closeQuietly(builder.moduleKeyFactories)
Readers.closeQuietly(builder.resourceReaders)
Closeables.closeQuietly(builder.moduleKeyFactories)
Closeables.closeQuietly(builder.resourceReaders)
}
}
}