CORDA-3831: Prevent CordappImpl TEST_INSTANCE crashing node when PWD is file-system root directory. (#6360)

This commit is contained in:
Chris Rankin 2020-06-17 16:09:03 +01:00 committed by GitHub
parent 26d4bfb89f
commit 0f1bfb13da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ data class CordappImpl(
} }
companion object { companion object {
fun jarName(url: URL): String = url.toPath().fileName.toString().removeSuffix(".jar") fun jarName(url: URL): String = (url.toPath().fileName ?: "").toString().removeSuffix(".jar")
/** CorDapp manifest entries */ /** CorDapp manifest entries */
const val CORDAPP_CONTRACT_NAME = "Cordapp-Contract-Name" const val CORDAPP_CONTRACT_NAME = "Cordapp-Contract-Name"
@ -81,7 +81,7 @@ data class CordappImpl(
serializationCustomSerializers = emptyList(), serializationCustomSerializers = emptyList(),
customSchemas = emptySet(), customSchemas = emptySet(),
jarPath = Paths.get("").toUri().toURL(), jarPath = Paths.get("").toUri().toURL(),
info = CordappImpl.UNKNOWN_INFO, info = UNKNOWN_INFO,
allFlows = emptyList(), allFlows = emptyList(),
jarHash = SecureHash.allOnesHash, jarHash = SecureHash.allOnesHash,
minimumPlatformVersion = 1, minimumPlatformVersion = 1,