Skip to content

Commit

Permalink
Merge pull request #79 from modelix/fix/missing-serialization-prefix
Browse files Browse the repository at this point in the history
MODELIX-423: prepend prefix and separator when serializing node references
  • Loading branch information
slisson authored Apr 14, 2023
2 parents bb32f1a + 1347303 commit 57e2b62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ interface INodeReferenceSerializer {

val serializer = serializersForClass[ref::class]
return if (serializer != null) {
serializer.serialize(ref)
serializer.prefix + INodeReferenceSerializerEx.SEPARATOR + serializer.serialize(ref)
} else {
legacySerializers.map { it.serialize(ref) }.firstOrNull { it != null }
?: throw RuntimeException("No serializer found for ${ref::class}")
Expand Down Expand Up @@ -101,7 +101,7 @@ interface INodeReferenceSerializerEx : INodeReferenceSerializer {
override fun deserialize(serialized: String): INodeReference

companion object {
val SEPARATOR = ":"
const val SEPARATOR = ":"
}
}

Expand Down

0 comments on commit 57e2b62

Please sign in to comment.