diff --git a/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes b/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes new file mode 100644 index 0000000000..c3d8231dec --- /dev/null +++ b/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Remove internal legacy Unzip implementation +ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.stream.impl.Unzip") +ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.stream.impl.Unzip$") diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala index f3265f76ad..c8b2a12e48 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala @@ -313,37 +313,3 @@ import org.reactivestreams.Subscription def receive = primaryInputs.subreceive.orElse[Any, Unit](outputBunch.subreceive) } - -/** - * INTERNAL API - */ -@InternalApi private[pekko] object Unzip { - def props(attributes: Attributes): Props = - Props(new Unzip(attributes)).withDeploy(Deploy.local) -} - -/** - * INTERNAL API - */ -@InternalApi private[pekko] class Unzip(attributes: Attributes) extends FanOut(attributes, outputCount = 2) { - outputBunch.markAllOutputs() - - initialPhase( - 1, - TransferPhase(primaryInputs.NeedsInput && outputBunch.AllOfMarkedOutputs) { () => - primaryInputs.dequeueInputElement() match { - case (a, b) => - outputBunch.enqueue(0, a) - outputBunch.enqueue(1, b) - - case t: pekko.japi.Pair[_, _] => - outputBunch.enqueue(0, t.first) - outputBunch.enqueue(1, t.second) - - case t => - throw new IllegalArgumentException( - s"Unable to unzip elements of type ${t.getClass.getName}, " + - s"can only handle Tuple2 and org.apache.pekko.japi.Pair!") - } - }) -}