Skip to content
Closed
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
Expand Up @@ -646,7 +646,7 @@ object HttpEntity {
private var maxBytes = -1L
private var bytesLeft = Long.MaxValue

@nowarn("msg=deprecated") // Attributes.getFirst is deprecated, but we need to use it here
@nowarn("msg=getFirst in class Attributes is deprecated") // there's no valid alternative right now
override def preStart(): Unit = {
_attributes.getFirst[SizeLimit] match {
case Some(limit: SizeLimit) if limit.isDisabled =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object WSClientAutobahnTest extends App {
s"ws://localhost:9001/updateReports?agent=$agent"

def runCase(caseIndex: Int, agent: String = Agent): Future[CaseStatus] =
runWs(runCaseUri(caseIndex, agent), echo).recover { case _ => () }.flatMap { _ =>
runWs(runCaseUri(caseIndex, agent), echo).recover { case _ => (): Any }.flatMap { _ =>
getCaseStatus(caseIndex, agent)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import scala.collection.immutable.Seq
import org.apache.pekko
import pekko.http.scaladsl.settings.ParserSettings.CookieParsingMode
import pekko.http.impl.model.parser.HeaderParser.Settings
import org.scalatest.matchers.{ MatchResult, Matcher }
import pekko.http.impl.util._
import pekko.http.scaladsl.model.{ HttpHeader, _ }
import pekko.http.scaladsl.model.MediaRanges._
Expand Down Expand Up @@ -59,7 +58,8 @@ class HttpHeaderSpec extends AnyFreeSpec with Matchers {
MediaRange.custom("text", Map("foo" -> "bar")),
MediaType.customBinary("custom", "custom", MediaType.Compressible, params = Map("bar" -> "b>az")))
"Accept: application/*+xml; version=2" =!=
Accept(MediaType.customBinary("application", "*+xml", MediaType.Compressible, params = Map("version" -> "2")))
Accept(MediaType.customBinary("application", "*+xml", MediaType.Compressible,
params = Map("version" -> "2")): MediaRange)
}

"Accept-Charset" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

package org.apache.pekko.http.scaladsl.settings

import scala.util.Failure
import scala.util.Success
import scala.util.Try
import org.apache.pekko
import pekko.testkit.PekkoSpec
import pekko.http.scaladsl.model.headers.`User-Agent`
Expand Down Expand Up @@ -161,11 +158,6 @@ class ConnectionPoolSettingsSpec extends PekkoSpec {
settings.forHost("akka.com").minConnections shouldEqual 2
settings.minConnections shouldEqual 2
}

def expectError(configString: String): String = Try(config(configString)) match {
case Failure(cause) => cause.getMessage
case Success(_) => fail("Expected a failure when max-open-requests is not a power of 2")
}
}

def config(configString: String): ConnectionPoolSettings =
Expand Down
3 changes: 3 additions & 0 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ object Common extends AutoPlugin {
// verbosely. So, opt out of those in general.
"-Wconf:cat=other-match-analysis&msg=match may not be exhaustive:s")).value,
scalacOptions ++= onlyOnScala3(Seq("-Wconf:cat=deprecation:s")).value,
Test / scalacOptions ++= Seq(
// we sometimes use pattern definitions in tests just for the side-effects and don't care about the extra member
"-Wconf:msg=Pattern definition introduces Unit-valued member:s"),
javacOptions ++=
Seq("-encoding", "UTF-8", "--release", javacTarget),
mimaReportSignatureProblems := true,
Expand Down
Loading