mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
CORDA-3377: Upgrade to DJVM 1.0-RC06. (#5866)
This commit is contained in:
parent
49b4f66515
commit
a4d00b79d4
@ -30,7 +30,7 @@ snakeYamlVersion=1.19
|
||||
caffeineVersion=2.7.0
|
||||
metricsVersion=4.1.0
|
||||
metricsNewRelicVersion=1.1.1
|
||||
djvmVersion=1.0-RC05
|
||||
djvmVersion=1.0-RC06
|
||||
deterministicRtVersion=1.0-RC02
|
||||
openSourceBranch=https://github.com/corda/corda/blob/release/os/4.4
|
||||
openSourceSamplesBranch=https://github.com/corda/samples/blob/release-V4
|
||||
|
@ -208,9 +208,6 @@ publish {
|
||||
name jarBaseName
|
||||
}
|
||||
|
||||
// Must be after publish {} so that the previous install task exists for overwriting.
|
||||
task install(overwrite: true, dependsOn: 'publishToMavenLocal')
|
||||
|
||||
idea {
|
||||
module {
|
||||
if (project.hasProperty("deterministic_idea_sdk")) {
|
||||
|
@ -36,7 +36,16 @@ open class TransactionResolutionException @JvmOverloads constructor(val hash: Se
|
||||
* @property hash Hash of the bytes of the attachment, see [Attachment.id]
|
||||
*/
|
||||
@KeepForDJVM
|
||||
class AttachmentResolutionException(val hash: SecureHash) : FlowException("Attachment resolution failure for $hash")
|
||||
class AttachmentResolutionException(val hash: AttachmentId) : FlowException("Attachment resolution failure for $hash")
|
||||
|
||||
/**
|
||||
* A non-specific exception for the attachment identified by [attachmentId]. The context
|
||||
* for this error is provided via the [message] and [cause].
|
||||
* @property attachmentId
|
||||
*/
|
||||
@KeepForDJVM
|
||||
class BrokenAttachmentException(val attachmentId: AttachmentId, message: String?, cause: Throwable?)
|
||||
: FlowException("Attachment $attachmentId has error (${message ?: "no message"})", cause)
|
||||
|
||||
/**
|
||||
* Indicates that some aspect of the transaction named by [txId] violates the platform rules. The exact type of failure
|
||||
|
@ -15,10 +15,4 @@ open class MissingSerializerException private constructor(
|
||||
) : NotSerializableException(message) {
|
||||
constructor(message: String, typeDescriptor: String) : this(message, typeDescriptor, emptyList())
|
||||
constructor(message: String, typeNames: List<String>) : this(message, null, typeNames)
|
||||
|
||||
/**
|
||||
* This constructor allows instances of this exception to escape the DJVM sandbox.
|
||||
*/
|
||||
@Suppress("unused")
|
||||
private constructor(message: String) : this(message, null, emptyList())
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
package net.corda.node.djvm
|
||||
|
||||
import net.corda.core.contracts.Attachment
|
||||
import net.corda.core.contracts.BrokenAttachmentException
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.identity.Party
|
||||
import java.io.InputStream
|
||||
@ -56,7 +57,12 @@ class SandboxAttachment(
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
override val signers: List<Party> = emptyList()
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
override fun open(): InputStream {
|
||||
return streamer.apply(attachment)
|
||||
return try {
|
||||
streamer.apply(attachment)
|
||||
} catch (e: Exception) {
|
||||
throw BrokenAttachmentException(id, e.message, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,9 +196,6 @@ publish {
|
||||
name jarBaseName
|
||||
}
|
||||
|
||||
// Must be after publish {} so that the previous install task exists for overwriting.
|
||||
task install(overwrite: true, dependsOn: 'publishToMavenLocal')
|
||||
|
||||
idea {
|
||||
module {
|
||||
if (project.hasProperty("deterministic_idea_sdk")) {
|
||||
|
Loading…
Reference in New Issue
Block a user