silence compiler warnings new in scala 2.13.17 (#2255)
* silence compiler warning new in scala 2.13.17 * Update FrequencySketch.scala
This commit is contained in:
parent
ff3bed8cdc
commit
92ca0314c0
12 changed files with 16 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ object ActorSystemSpec {
|
|||
|
||||
class SlowDispatcher(_config: Config, _prerequisites: DispatcherPrerequisites)
|
||||
extends MessageDispatcherConfigurator(_config, _prerequisites) {
|
||||
@nowarn("msg=inferred structural type")
|
||||
private val instance = new Dispatcher(
|
||||
this,
|
||||
this.config.getString("id"),
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ class LoggingReceiveSpec extends AnyWordSpec with BeforeAndAfterAll {
|
|||
case null =>
|
||||
}
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
val actor = TestActorRef(new Actor {
|
||||
def switch: Actor.Receive = { case "becomenull" => context.become(r, false) }
|
||||
def receive =
|
||||
|
|
|
|||
|
|
@ -921,6 +921,7 @@ sealed abstract class ByteString
|
|||
*
|
||||
* @return this ByteString copied into a byte array
|
||||
*/
|
||||
@nowarn("msg=easy to mistake")
|
||||
protected[ByteString] def toArray: Array[Byte] = toArray[Byte]
|
||||
|
||||
final override def toArray[B >: Byte](implicit arg0: ClassTag[B]): Array[B] = {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ final case class Address private[pekko] (protocol: String, system: String, host:
|
|||
def hasGlobalScope: Boolean = host.isDefined
|
||||
|
||||
// store hashCode
|
||||
@scala.annotation.nowarn("msg=deprecated")
|
||||
@transient override lazy val hashCode: Int = scala.util.hashing.MurmurHash3.productHash(this)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
package org.apache.pekko.util
|
||||
|
||||
import scala.annotation.nowarn
|
||||
import scala.util.hashing.MurmurHash3
|
||||
|
||||
import org.apache.pekko.annotation.InternalApi
|
||||
|
|
@ -74,6 +75,7 @@ private[pekko] object FrequencySketch {
|
|||
implicit val StringHasher: StringHasher = new StringHasher(DefaultSeed)
|
||||
|
||||
final class StringHasher(seed: Int) extends Hasher[String] {
|
||||
@nowarn("msg=deprecated")
|
||||
override def hash(value: String): Int = MurmurHash3.stringHash(value, seed)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,6 +628,7 @@ private[persistence] trait Eventsourced
|
|||
* @param replayMax maximum number of messages to replay.
|
||||
* @param timeout recovery event timeout
|
||||
*/
|
||||
@nowarn("msg=inferred structural type")
|
||||
private def recoveryStarted(replayMax: Long, timeout: FiniteDuration) = new State {
|
||||
|
||||
val timeoutCancellable = {
|
||||
|
|
@ -745,6 +746,7 @@ private[persistence] trait Eventsourced
|
|||
*
|
||||
* All incoming messages are stashed.
|
||||
*/
|
||||
@nowarn("msg=inferred structural type")
|
||||
private def recovering(recoveryBehavior: Receive, timeout: FiniteDuration) =
|
||||
new State {
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ private[remote] class OutboundControlJunction(
|
|||
val out: Outlet[OutboundEnvelope] = Outlet("OutboundControlJunction.out")
|
||||
override val shape: FlowShape[OutboundEnvelope, OutboundEnvelope] = FlowShape(in, out)
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
|
||||
|
||||
val logic = new GraphStageLogic(shape)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import pekko.stream.stage._
|
|||
val out = Outlet[T]("queueSource.out")
|
||||
override val shape: SourceShape[T] = SourceShape.of(out)
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
|
||||
val completion = Promise[Done]()
|
||||
val name = inheritedAttributes.nameOrDefault(getClass.toString)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import pekko.stream.stage.OutHandler
|
|||
(createStageLogic(matPromise), matPromise.future)
|
||||
}
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
private def createStageLogic(matPromise: Promise[M]) = new GraphStageLogic(shape) {
|
||||
import SetupStage._
|
||||
|
||||
|
|
@ -88,6 +89,7 @@ import pekko.stream.stage.OutHandler
|
|||
(createStageLogic(matPromise), matPromise.future)
|
||||
}
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
private def createStageLogic(matPromise: Promise[M]) = new GraphStageLogic(shape) {
|
||||
import SetupStage._
|
||||
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ import org.reactivestreams.Subscriber
|
|||
|
||||
override protected def initialAttributes: Attributes = DefaultAttributes.seqSink
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
|
||||
val p: Promise[That] = Promise()
|
||||
val logic = new GraphStageLogic(shape) with InHandler {
|
||||
|
|
@ -312,6 +313,7 @@ import org.reactivestreams.Subscriber
|
|||
|
||||
override def toString: String = "QueueSink"
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes) = {
|
||||
val stageLogic = new GraphStageLogic(shape) with InHandler with SinkQueueWithCancel[T] {
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ import pekko.util.ByteString
|
|||
throw new UnsupportedOperationException("Not used")
|
||||
|
||||
// TODO: Timeout on bind
|
||||
@nowarn("msg=inferred structural type")
|
||||
override def createLogicAndMaterializedValue(inheritedAttributes: Attributes, eagerMaterialzer: Materializer) = {
|
||||
val bindingPromise = Promise[ServerBinding]()
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ private[pekko] object MetricsKit {
|
|||
override def matches(name: String, metric: Metric) = classOf[KnownOpsInTimespanTimer].isInstance(metric)
|
||||
}
|
||||
|
||||
@scala.annotation.nowarn("msg=inferred structural type")
|
||||
val GcMetricsFilter = new MetricFilter {
|
||||
val keyPattern = """.*\.gc\..*""".r.pattern
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue