This is an automated email from the ASF dual-hosted git repository. hepin pushed a commit to branch fromArray2Apply in repository https://gitbox.apache.org/repos/asf/pekko.git
commit bd9af15026b2ed4bd0b00f70d4a7c056fb9f097e Author: He-Pin <[email protected]> AuthorDate: Mon Nov 3 06:05:15 2025 +0800 chore: Rename fromArray to apply in scaladsl --- stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala | 2 +- stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 412af13d34..bc9b2682bf 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 @@ -199,7 +199,7 @@ object Source { * * @since 1.1.0 */ - def fromArray[T](array: Array[T]): javadsl.Source[T, NotUsed] = new Source(scaladsl.Source.fromArray(array)) + def fromArray[T](array: Array[T]): javadsl.Source[T, NotUsed] = new Source(scaladsl.Source.apply(array)) /** * Create a `Source` from an `Optional` value, emitting the value if it is present. diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala index e6f587cd2a..83fc7c0fa4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala @@ -428,7 +428,7 @@ object Source { * * @since 1.3.0 */ - def fromArray[T](array: Array[T]): Source[T, NotUsed] = { + def apply[T](array: Array[T]): Source[T, NotUsed] = { if (array.length == 0) { empty } else if (array.length == 1) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
