Details
-
Bug
-
Resolution: Works as Designed
-
Unknown
-
None
-
None
Description
null shouldn't be returned by a Scala library. None should be returned instead. So, Observable.head could be changed to this:
// Some comments here
|
def head(): Future[T] = { |
headOption().map {
|
case Some(result) => result |
case None => None.asInstanceOf[T] |
}(Helpers.DirectExecutionContext)
|
}
|
Attachments
Issue Links
- is duplicated by
-
JAVA-4322 Observable<T> toFuture() implicit returns a future with a null value
-
- Backlog
-