Skip to content

Overriding a primitive converter (UUID) #119

Description

@mplokita-figure

I'm hoping to override the default behavior of zeroing an invalid UUID string. (For example, I might prefer to throw an exception or return null.)

Does this constitute a new feature request?

primitive {
    try {
        UUID.fromString(it)
    } catch (e: IllegalArgumentException) {
        null
    } ?: UUID(0, 0)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions