diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala index b1c7a166c90..99a54bbf0ad 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala @@ -845,7 +845,7 @@ object Source { * * @param create - function that is called on stream start and creates/opens resource. * @param read - function that reads data from opened resource. It is called each time backpressure signal - * is received. Stream calls close and completes when `read` returns None. + * is received. Stream calls close and completes when `read` returns an empty Optional. * @param close - function that closes resource */ def unfoldResource[T, S]( @@ -871,7 +871,7 @@ object Source { * * @param create - function that is called on stream start and creates/opens resource. * @param read - function that reads data from opened resource. It is called each time backpressure signal - * is received. Stream calls close and completes when `CompletionStage` from read function returns None. + * is received. Stream calls close and completes when `CompletionStage` from read function returns an empty Optional. * @param close - function that closes resource */ def unfoldResourceAsync[T, S](