From 558d2fd45c3ed04b39c8e0479fb6f64d7dcb3874 Mon Sep 17 00:00:00 2001 From: Florian Friemel Date: Fri, 11 Jan 2019 17:39:22 +0000 Subject: [PATCH] [CORDA-2403] Fix API breakage: PermissionException and CordappImpl constructor (#4554) * Undo renaming of c'tor parameter (API break). * Re-introduce default param in CordappImpl c'tor. * Make 'msg' a property of PermissionException to make it serializable. --- .../src/main/kotlin/net/corda/client/rpc/PermissionException.kt | 2 +- .../main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt index 92a78126a6..7e1fdf9477 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt @@ -10,4 +10,4 @@ import net.corda.nodeapi.exceptions.RpcSerializableError * Thrown to indicate that the calling user does not have permission for something they have requested (for example * calling a method). */ -class PermissionException(message: String) : CordaRuntimeException(message), RpcSerializableError, ClientRelevantError \ No newline at end of file +class PermissionException(val msg: String) : CordaRuntimeException(msg), RpcSerializableError, ClientRelevantError \ No newline at end of file diff --git a/core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt b/core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt index ac53d8ae5f..721d06bc15 100644 --- a/core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt +++ b/core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt @@ -32,7 +32,7 @@ data class CordappImpl( override val jarHash: SecureHash.SHA256, override val minimumPlatformVersion: Int, override val targetPlatformVersion: Int, - val notaryService: Class?, + val notaryService: Class? = null, /** Indicates whether the CorDapp is loaded from external sources, or generated on node startup (virtual). */ val isLoaded: Boolean = true ) : Cordapp {