From 5d682103555dd4b9b281dce34e0a7108e72229a2 Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Tue, 16 Aug 2016 13:26:33 +0100 Subject: [PATCH 1/2] Driver now correctly resolves quasar path on Windows. --- node/src/main/kotlin/com/r3corda/node/driver/Driver.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt b/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt index 32ff224270..8196d1f01b 100644 --- a/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt +++ b/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt @@ -196,8 +196,8 @@ class DriverDSL( val cl = ClassLoader.getSystemClassLoader() val urls = (cl as URLClassLoader).urLs val quasarPattern = ".*quasar.*\\.jar$".toRegex() - val quasarPath = urls.map { it.path }.first { quasarPattern.matches(it) } - quasarPath + val quasarPath = urls.first { quasarPattern.matches(it.path) } + Paths.get(quasarPath.toURI()).toString() } val driverNodeConfiguration = NodeConfigurationFromConfig( From 77f568946866a95855fff167562327d7b35dba3e Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Tue, 16 Aug 2016 13:54:08 +0100 Subject: [PATCH 2/2] Renamed variable for clarity. --- node/src/main/kotlin/com/r3corda/node/driver/Driver.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt b/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt index 8196d1f01b..74e0152c47 100644 --- a/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt +++ b/node/src/main/kotlin/com/r3corda/node/driver/Driver.kt @@ -196,8 +196,8 @@ class DriverDSL( val cl = ClassLoader.getSystemClassLoader() val urls = (cl as URLClassLoader).urLs val quasarPattern = ".*quasar.*\\.jar$".toRegex() - val quasarPath = urls.first { quasarPattern.matches(it.path) } - Paths.get(quasarPath.toURI()).toString() + val quasarFileUrl = urls.first { quasarPattern.matches(it.path) } + Paths.get(quasarFileUrl.toURI()).toString() } val driverNodeConfiguration = NodeConfigurationFromConfig(