Various scala-2.13.0-M5 fixes

Clearer imports in TcpDnsClient

Accept SVG's when checking if diagrams were generated

Fix akka-actor MiMa issues

akka-testkit scalafix changes

Update scalatest to 2.13-released snapshot

akka-stream scalafix changes

Update ssl-config

To version that's released with -M5

Take elements directly out of buffer

Manually fix immutable.Seq / Doc link

Make sure the right Concat, Sink is imported

akka-stream binary compat

akka-stream-testkit scalafix

akka-actor-tests scalafix

Eta-expensions
This commit is contained in:
Arnout Engelen 2018-11-21 15:00:29 +01:00 committed by Arnout Engelen
parent 10575ce8c5
commit 0cc8e20a2e
No known key found for this signature in database
GPG key ID: BB8C0F854A1E2105
31 changed files with 102 additions and 60 deletions

View file

@ -22,13 +22,14 @@ import akka.stream.stage._
import org.reactivestreams.{ Publisher, Subscriber }
import scala.annotation.unchecked.uncheckedVariance
import scala.collection.generic.CanBuildFrom
import scala.collection.{ immutable, mutable }
import scala.compat.java8.FutureConverters._
import scala.compat.java8.OptionConverters._
import scala.concurrent.{ Future, Promise }
import scala.util.control.NonFatal
import scala.util.{ Failure, Success, Try }
import scala.collection.immutable
import scala.collection.compat._
/**
* INTERNAL API
@ -204,7 +205,7 @@ import scala.util.{ Failure, Success, Try }
}
override def onUpstreamFinish(): Unit = {
val elements = buffer.result().toList
val elements = buffer.toList
buffer.clear()
p.trySuccess(elements)
completeStage()
@ -265,7 +266,7 @@ import scala.util.{ Failure, Success, Try }
/**
* INTERNAL API
*/
@InternalApi private[akka] final class SeqStage[T, That](implicit cbf: CanBuildFrom[Nothing, T, That with immutable.Traversable[_]]) extends GraphStageWithMaterializedValue[SinkShape[T], Future[That]] {
@InternalApi private[akka] final class SeqStage[T, That](implicit cbf: Factory[T, That with immutable.Iterable[_]]) extends GraphStageWithMaterializedValue[SinkShape[T], Future[That]] {
val in = Inlet[T]("seq.in")
override def toString: String = "SeqStage"
@ -277,7 +278,7 @@ import scala.util.{ Failure, Success, Try }
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
val p: Promise[That] = Promise()
val logic = new GraphStageLogic(shape) with InHandler {
val buf = cbf()
val buf = cbf.newBuilder
override def preStart(): Unit = pull(in)
@ -395,7 +396,10 @@ import scala.util.{ Failure, Success, Try }
override def pull(): Future[Option[T]] = {
val p = Promise[Option[T]]
callback.invokeWithFeedback(Pull(p))
.onFailure { case NonFatal(e) p.tryFailure(e) }(akka.dispatch.ExecutionContexts.sameThreadExecutionContext)
.onComplete {
case scala.util.Failure(NonFatal(e)) p.tryFailure(e)
case _ ()
}(akka.dispatch.ExecutionContexts.sameThreadExecutionContext)
p.future
}
override def cancel(): Unit = {