We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11d0f1d commit 220391bCopy full SHA for 220391b
onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/core/Utils.kt
@@ -9,13 +9,8 @@ import java.util.Collections
9
import org.onebusaway.errors.OnebusawaySdkInvalidDataException
10
11
@JvmSynthetic
12
-internal fun <T : Any> T?.getOrThrow(name: String): T {
13
- if (this == null) {
14
- throw OnebusawaySdkInvalidDataException("'${name}' is not present")
15
- }
16
-
17
- return this
18
-}
+internal fun <T : Any> T?.getOrThrow(name: String): T =
+ this ?: throw OnebusawaySdkInvalidDataException("`${name}` is not present")
19
20
21
internal fun <T> List<T>.toUnmodifiable(): List<T> {
0 commit comments