CORDA-2157: Fix Windows build (#4361)

Or else tests:
AttachmentsClassLoaderTests.Test valid overlapping contract jar
ConstraintsPropagationTests.Happy path for Hash to Signature Constraint migration
are failing.
This commit is contained in:
Viktor Kolomeyko 2018-12-05 13:33:28 +00:00 committed by GitHub
parent 85ca832099
commit 316dc4ab92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,13 +89,14 @@ object ContractJarTestUtils {
}
fun signContractJar(jarURL: URL, copyFirst: Boolean, keyStoreDir: Path? = null, alias: String = "testAlias", pwd: String = "testPassword"): Pair<Path, PublicKey> {
val urlAsPath = jarURL.toPath()
val jarName =
if (copyFirst) {
val signedJarName = Paths.get(jarURL.path.substringBeforeLast(".") + "-SIGNED.jar")
Files.copy(jarURL.toPath(), signedJarName, StandardCopyOption.REPLACE_EXISTING)
val signedJarName = Paths.get(urlAsPath.toString().substringBeforeLast(".") + "-SIGNED.jar")
Files.copy(urlAsPath, signedJarName, StandardCopyOption.REPLACE_EXISTING)
signedJarName
}
else jarURL.toPath()
else urlAsPath
val workingDir =
if (keyStoreDir == null) {