Adjust resolution of byteman jar to use java 11 compatible mechanism.

This commit is contained in:
josecoll 2019-09-18 17:59:22 +01:00
parent 2a5f631589
commit a10770928e

View File

@ -123,10 +123,10 @@ class DriverDSLImpl(
private val quasarJarPath: String by lazy { resolveJar("co.paralleluniverse.fibers.Suspendable") }
private val bytemanJarPath: String? by lazy {
val maybeResolvedJar = resolveJar(".*byteman-\\d.*\\.jar$", verbose = false)
when (maybeResolvedJar) {
is Try.Success -> maybeResolvedJar.getOrThrow()
is Try.Failure -> null
try {
resolveJar("org.jboss.byteman.agent.Transformer")
} catch (e: Exception) {
null
}
}