Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "-Xsource:3" option #161

Merged
merged 1 commit into from
Oct 4, 2023
Merged
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
8 changes: 8 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ lazy val scalaOAuth2ProviderSettings =
scalaVersion := "3.3.0",
crossScalaVersions := Seq("2.13.12", "2.12.18", "2.11.12"),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"),
scalacOptions ++= {
scalaBinaryVersion.value match {
case "2.12" | "2.13" =>
Seq("-Xsource:3")
case _ =>
Nil
}
},
publishTo := {
val v = version.value
val nexus = "https://oss.sonatype.org/"
Expand Down
21 changes: 14 additions & 7 deletions src/test/scala/scalaoauth2/provider/TokenEndPointSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {

val dataHandler = successfulDataHandler()
val f = new TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down Expand Up @@ -128,7 +129,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {

val dataHandler = successfulDataHandler()
val f = new TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down Expand Up @@ -159,7 +161,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {
}

val f = new TokenEndpoint {
override val handlers = Map("password" -> passwordNoCred)
override val handlers: Map[String, Password] =
Map("password" -> passwordNoCred)
}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down Expand Up @@ -192,7 +195,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {
}

val f = new TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down Expand Up @@ -249,7 +253,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {
it should "be possible to customize supporting grant types" in {

object TestTokenEndpoint extends TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
}

val f = TestTokenEndpoint.handleRequest(
Expand Down Expand Up @@ -296,7 +301,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {
}

val f = new TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down Expand Up @@ -335,7 +341,8 @@ class TokenEndPointSpec extends AnyFlatSpec with ScalaFutures {
}

val f = new TokenEndpoint {
override val handlers = Map("password" -> new Password())
override val handlers: Map[String, Password] =
Map("password" -> new Password())
}.handleRequest(request, dataHandler)

whenReady(f) { result =>
Expand Down
Loading