Skip to content

Commit

Permalink
fix: ExchangeVendor valueOf return null when not exists in list
Browse files Browse the repository at this point in the history
  • Loading branch information
traeper committed Jul 3, 2019
1 parent f1ec096 commit c3eb3c4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ data class ExchangeVendor(val name: String) {

@JvmStatic
fun valueOf(value: String): ExchangeVendor {
return mapCache[value] ?: throw NoSuchElementException()
return mapCache[value] ?: ExchangeVendor(value)
}

@JvmStatic
Expand Down

0 comments on commit c3eb3c4

Please sign in to comment.