fix compilation warnings in akka-stream
* fix compilation warning in StreamLayout StreamLayout.scala:742: The outer reference in this type test cannot be checked at run time. [warn] final case class Buffering(demand: Long) extends SubscriptionState * fix compilation warning in OutputStreamSourceStage logic.wakeUp "method invocation uses reflection" * fix compilation warning in TLSActor TLSActor.scala:155: Reference to uninitialized variable lastHandshakeStatus [warn] lastHandshakeStatus = engine.getHandshakeStatus
This commit is contained in:
parent
5b5cf4fc7b
commit
a813afeb04
3 changed files with 9 additions and 6 deletions
|
|
@ -739,7 +739,7 @@ private[stream] final class VirtualProcessor[T] extends AtomicReference[AnyRef]
|
|||
object WrappedSubscription {
|
||||
sealed trait SubscriptionState { def demand: Long }
|
||||
case object PassThrough extends SubscriptionState { override def demand: Long = 0 }
|
||||
final case class Buffering(demand: Long) extends SubscriptionState
|
||||
case class Buffering(demand: Long) extends SubscriptionState
|
||||
|
||||
val NoBufferedDemand = Buffering(0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@ final private[stream] class OutputStreamSourceStage(writeTimeout: FiniteDuration
|
|||
val dataQueue = new LinkedBlockingQueue[ByteString](maxBuffer)
|
||||
val downstreamStatus = new AtomicReference[DownstreamStatus](Ok)
|
||||
|
||||
val logic = new GraphStageLogic(shape) with CallbackWrapper[(AdapterToStageMessage, Promise[Unit])] {
|
||||
final class OutputStreamSourceLogic extends GraphStageLogic(shape)
|
||||
with CallbackWrapper[(AdapterToStageMessage, Promise[Unit])] {
|
||||
|
||||
var flush: Option[Promise[Unit]] = None
|
||||
var close: Option[Promise[Unit]] = None
|
||||
|
||||
|
|
@ -148,6 +150,7 @@ final private[stream] class OutputStreamSourceStage(writeTimeout: FiniteDuration
|
|||
}
|
||||
}
|
||||
|
||||
val logic = new OutputStreamSourceLogic
|
||||
(logic, new OutputStreamAdapter(dataQueue, downstreamStatus, logic.wakeUp, writeTimeout))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,9 @@ private[stream] class TLSActor(
|
|||
private val transportInChoppingBlock = new ChoppingBlock(TransportIn, "TransportIn")
|
||||
transportInChoppingBlock.prepare(transportInBuffer)
|
||||
|
||||
var lastHandshakeStatus: HandshakeStatus = null
|
||||
var corkUser = true
|
||||
|
||||
// The engine could also be instantiated in ActorMaterializerImpl but if creation fails
|
||||
// during materialization it would be worse than failing later on.
|
||||
val engine =
|
||||
|
|
@ -189,9 +192,6 @@ private[stream] class TLSActor(
|
|||
* representing the Engine.
|
||||
*/
|
||||
|
||||
var lastHandshakeStatus: HandshakeStatus = _
|
||||
var corkUser = true
|
||||
|
||||
val engineNeedsWrap = new TransferState {
|
||||
def isReady = lastHandshakeStatus == NEED_WRAP
|
||||
def isCompleted = engine.isOutboundDone
|
||||
|
|
@ -482,4 +482,4 @@ private[stream] object TlsUtils {
|
|||
newParameters.setWantClientAuth(old.getWantClientAuth)
|
||||
newParameters
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue