mirror of
https://github.com/corda/corda.git
synced 2025-06-16 14:18:20 +00:00
[CORDA-1468] Properly handle entites where NULLs can be inserted into DB (#3324)
* Allow proper null values on entities which fields can get NULL values.
This commit is contained in:
committed by
GitHub
parent
1aa1189b36
commit
c009cbd91a
@ -44,13 +44,13 @@ sealed class SecureHash(bytes: ByteArray) : OpaqueBytes(bytes) {
|
||||
* @throws IllegalArgumentException The input string does not contain 64 hexadecimal digits, or it contains incorrectly-encoded characters.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun parse(str: String): SHA256 {
|
||||
return str.toUpperCase().parseAsHex().let {
|
||||
fun parse(str: String?): SHA256 {
|
||||
return str?.toUpperCase()?.parseAsHex()?.let {
|
||||
when (it.size) {
|
||||
32 -> SHA256(it)
|
||||
else -> throw IllegalArgumentException("Provided string is ${it.size} bytes not 32 bytes in hex: $str")
|
||||
}
|
||||
}
|
||||
} ?: throw IllegalArgumentException("Provided string is null")
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,7 +49,7 @@ object CommonSchemaV1 : MappedSchema(schemaFamily = CommonSchema.javaClass, vers
|
||||
|
||||
/** X500Name of participant parties **/
|
||||
@Transient
|
||||
open var participants: MutableSet<AbstractParty>? = null,
|
||||
open var participants: MutableSet<AbstractParty?>? = null,
|
||||
|
||||
/** [OwnableState] attributes */
|
||||
|
||||
|
Reference in New Issue
Block a user