=str Change Detacher to an object. (#31287)

This commit is contained in:
kerr 2022-04-02 00:44:57 +08:00 committed by GitHub
parent 305220459b
commit 7bfd118c71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -0,0 +1,2 @@
#Change Detacher from class to object.
ProblemFilters.exclude[MissingClassProblem]("akka.stream.impl.fusing.GraphStages$Detacher")

View file

@ -77,7 +77,7 @@ import akka.stream.stage._
/**
* INTERNAL API
*/
@InternalApi private[akka] final class Detacher[T] extends SimpleLinearGraphStage[T] {
@InternalApi private[akka] object Detacher extends SimpleLinearGraphStage[Any] {
override def initialAttributes = DefaultAttributes.detacher
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic =
@ -114,8 +114,7 @@ import akka.stream.stage._
override def toString = "Detacher"
}
private val _detacher = new Detacher[Any]
def detacher[T]: GraphStage[FlowShape[T, T]] = _detacher.asInstanceOf[GraphStage[FlowShape[T, T]]]
def detacher[T]: GraphStage[FlowShape[T, T]] = Detacher.asInstanceOf[SimpleLinearGraphStage[T]]
private object TerminationWatcher extends GraphStageWithMaterializedValue[FlowShape[Any, Any], Future[Done]] {
val in = Inlet[Any]("terminationWatcher.in")