From 57efc12fb15a2a3d5a53896d5b73ddc83966a5c2 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 30 Oct 2014 17:04:36 +0100 Subject: [PATCH] !str switch to a stable `Source.empty` val --- .../src/main/scala/akka/stream/scaladsl/Source.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala index 4a44b83e0a..9dadc22883 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Source.scala @@ -167,10 +167,10 @@ object Source { def singleton[T](element: T): Source[T] = apply(SynchronousPublisherFromIterable(List(element))) /** - * Create a `Source` with no elements, i.e. an empty stream that is completed immediately - * for every connected `Sink`. + * A `Source` with no elements, i.e. an empty stream that is completed immediately for every connected `Sink`. */ - def empty[T](): Source[T] = apply(EmptyPublisher[T]) + def empty[T](): Source[T] = _empty + private[this] val _empty: Source[Nothing] = apply(EmptyPublisher) /** * Create a `Source` that immediately ends the stream with the `cause` error to every connected `Sink`.