Fix KOptional.ofNullable signature
This commit is contained in:
parent
7ca9ff3a5b
commit
a19437667a
@ -4,7 +4,7 @@ kotlin.code.style=official
|
|||||||
specifyKotlinAsDependency=false
|
specifyKotlinAsDependency=false
|
||||||
|
|
||||||
projectGroup=ru.dbotthepony.kommons
|
projectGroup=ru.dbotthepony.kommons
|
||||||
projectVersion=2.7.3
|
projectVersion=2.7.4
|
||||||
|
|
||||||
guavaDepVersion=33.0.0
|
guavaDepVersion=33.0.0
|
||||||
gsonDepVersion=2.8.9
|
gsonDepVersion=2.8.9
|
||||||
|
@ -130,7 +130,7 @@ class KOptional<T> private constructor(private val _value: T, val isPresent: Boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun <T> ofNullable(value: T): KOptional<T> {
|
fun <T : Any> ofNullable(value: T?): KOptional<T> {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return EMPTY as KOptional<T>
|
return EMPTY as KOptional<T>
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user