From c8a99aa590e0c0a718397c3d707068960167b678 Mon Sep 17 00:00:00 2001 From: "He-Pin(kerr)" Date: Thu, 29 Feb 2024 13:11:11 +0800 Subject: [PATCH] chore: Remove the deprecation of statefulMapConcat operator. (#1147) --- .../stream/operators/Source-or-Flow/statefulMapConcat.md | 2 +- .../src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala | 1 - .../src/main/scala/org/apache/pekko/stream/javadsl/Source.scala | 1 - .../main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala | 1 - .../main/scala/org/apache/pekko/stream/javadsl/SubSource.scala | 1 - .../src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala | 1 - 6 files changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/src/main/paradox/stream/operators/Source-or-Flow/statefulMapConcat.md b/docs/src/main/paradox/stream/operators/Source-or-Flow/statefulMapConcat.md index 3315fe9d5a5..20185d480cb 100644 --- a/docs/src/main/paradox/stream/operators/Source-or-Flow/statefulMapConcat.md +++ b/docs/src/main/paradox/stream/operators/Source-or-Flow/statefulMapConcat.md @@ -6,7 +6,7 @@ Transform each element into zero or more elements that are individually passed d @@@ warning -The `statefulMapConcat` operator has been deprecated. +The `statefulMapConcat` operator doesn't handle upstream's completion signal since the state kept in the closure can be lost. - for stateful mapping, use @ref:[statefulMap](./statefulMap.md) - for stateful map concat, use @ref:[statefulMap](./statefulMap.md) with @ref:[mapConcat](./mapConcat.md). diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala index 3ed9bdf1505..e4bb2eb476a 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala @@ -896,7 +896,6 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream cancels */ - @deprecated("Use `statefulMap` with `mapConcat` instead.", "1.0.2") def statefulMapConcat[T]( f: function.Creator[function.Function[Out, java.lang.Iterable[T]]]): javadsl.Flow[In, T, Mat] = new Flow(delegate.statefulMapConcat { () => 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 b8d521a4209..c4b44f6c1b9 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 @@ -2609,7 +2609,6 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream cancels */ - @deprecated("Use `statefulMap` with `mapConcat` instead.", "1.0.2") def statefulMapConcat[T](f: function.Creator[function.Function[Out, java.lang.Iterable[T]]]): javadsl.Source[T, Mat] = new Source(delegate.statefulMapConcat { () => val fun = f.create() diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala index fc258e512ba..ea339fc70fe 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala @@ -353,7 +353,6 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream cancels */ - @deprecated("Use `statefulMap` with `mapConcat` instead.", "1.0.2") def statefulMapConcat[T](f: function.Creator[function.Function[Out, java.lang.Iterable[T]]]): SubFlow[In, T, Mat] = new SubFlow(delegate.statefulMapConcat { () => val fun = f.create() diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala index 340ea3063cb..a3b39c391da 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala @@ -344,7 +344,6 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream cancels */ - @deprecated("Use `statefulMap` with `mapConcat` instead.", "1.0.2") def statefulMapConcat[T](f: function.Creator[function.Function[Out, java.lang.Iterable[T]]]): SubSource[T, Mat] = new SubSource(delegate.statefulMapConcat { () => val fun = f.create() diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala index 0b73b0b90a0..7918a7edf54 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala @@ -1206,7 +1206,6 @@ trait FlowOps[+Out, +Mat] { * * See also [[FlowOps.mapConcat]] */ - @deprecated("Use `statefulMap` with `mapConcat` instead.", "1.0.2") def statefulMapConcat[T](f: () => Out => IterableOnce[T]): Repr[T] = via(new StatefulMapConcat(f))