Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ import com.google.common.collect.Multimaps
import java.util.Collections

@JvmSynthetic
internal fun <T : Any> T?.getOrThrow(name: String): T {
if (this == null) {
throw BraintrustInvalidDataException("'${name}' is not present")
}

return this
}
internal fun <T : Any> T?.getOrThrow(name: String): T =
this ?: throw BraintrustInvalidDataException("`${name}` is not present")

@JvmSynthetic
internal fun <T> List<T>.toUnmodifiable(): List<T> {
Expand Down