Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

=str Make SubFlow and SubSource a final class. #619

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Mark SubSource and SubFlow final class
ProblemFilters.exclude[FinalClassProblem]("org.apache.pekko.stream.javadsl.SubSource")
ProblemFilters.exclude[FinalClassProblem]("org.apache.pekko.stream.javadsl.SubFlow")
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object SubFlow {
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*/
class SubFlow[In, Out, Mat](
final class SubFlow[In, Out, Mat](
delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Flow[In, Out, Mat]#Repr, scaladsl.Sink[In, Mat]]) {

/** Converts this Flow to its Scala DSL counterpart */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object SubSource {
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*/
class SubSource[Out, Mat](
final class SubSource[Out, Mat](
delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source[Out, Mat]#Repr, scaladsl.RunnableGraph[Mat]]) {

/** Converts this Flow to its Scala DSL counterpart */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@

package org.apache.pekko.stream.scaladsl

import scala.annotation.unchecked.uncheckedVariance
import org.apache.pekko
import pekko.annotation.DoNotInherit
import pekko.stream._

import org.apache.pekko.stream._
import scala.annotation.unchecked.uncheckedVariance

/**
* A “stream of streams” sub-flow of data elements, e.g. produced by `groupBy`.
* SubFlows cannot contribute to the super-flow’s materialized value since they
* are materialized later, during the runtime of the flow graph processing.
*
* Not for user extension
*/
@DoNotInherit
trait SubFlow[+Out, +Mat, +F[+_], C] extends FlowOps[Out, Mat] {

override type Repr[+T] = SubFlow[T, Mat @uncheckedVariance, F @uncheckedVariance, C @uncheckedVariance]
Expand Down
Loading