mirror of
https://github.com/corda/corda.git
synced 2025-01-31 00:24:59 +00:00
Merge pull request #462 from corda/mnesbit-tactical-patch-explorer
Tactical fix for Explorer crash issue under Kotlin 1.1.1
This commit is contained in:
commit
b62f901892
@ -111,8 +111,14 @@ fun <A> ObservableList<out A>.filter(predicate: ObservableValue<(A) -> Boolean>)
|
||||
* val owners: ObservableList<Person> = dogs.map(Dog::owner).filterNotNull()
|
||||
*/
|
||||
fun <A> ObservableList<out A?>.filterNotNull(): ObservableList<A> {
|
||||
//TODO This is a tactical work round for an issue with SAM conversion (https://youtrack.jetbrains.com/issue/ALL-1552) so that the M10 explorer works.
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return filtered { it != null } as ObservableList<A>
|
||||
return (this as ObservableList<A?>).filtered(object : Predicate<A?> {
|
||||
override fun test(t: A?): Boolean {
|
||||
return t != null
|
||||
|
||||
}
|
||||
}) as ObservableList<A>
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user