Skip to content

Commit

Permalink
Extend UUIDFormatException from IllegalArgumentException (#259)
Browse files Browse the repository at this point in the history
Co-authored-by: hfhbd <[email protected]>
  • Loading branch information
hfhbd and hfhbd authored Oct 31, 2023
1 parent f90e6f4 commit dda2f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public class UUID private constructor(
return UUID(timeStampAndVersionRaw, clockSequenceVariantAndNodeRaw)
}

private fun versionFor(id: Int): Version? = Version.values().firstOrNull { it.id == id }
private fun versionFor(id: Int): Version? = Version.entries.firstOrNull { it.id == id }
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package kotlinx.uuid

internal class UUIDFormatException(override val message: String) : Exception(message)
internal class UUIDFormatException(override val message: String) : IllegalArgumentException(message)

0 comments on commit dda2f01

Please sign in to comment.