=str,htp clean up build warnings
- explicitly provide Unit values and place parens around tuple creation - remove structural type usage in TestUtils - fix Java double-casts - use unused Java values by asserting their non-nullness - work around inability to place case class in trait (scripted test) The remaining warnings about using private types in public methods are bogus as reported in https://issues.scala-lang.org/browse/SI-9490.
This commit is contained in:
parent
ae83053a64
commit
68ba0643d6
58 changed files with 160 additions and 132 deletions
|
|
@ -23,13 +23,13 @@ object MyRejectionHandler {
|
|||
complete(HttpResponse(BadRequest, entity = "No cookies, no service!!!"))
|
||||
}
|
||||
.handle { case AuthorizationFailedRejection ⇒
|
||||
complete(Forbidden, "You're out of your depth!")
|
||||
complete((Forbidden, "You're out of your depth!"))
|
||||
}
|
||||
.handleAll[MethodRejection] { methodRejections ⇒
|
||||
val names = methodRejections.map(_.supported.name)
|
||||
complete(MethodNotAllowed, s"Can't do that! Supported: ${names mkString " or "}!")
|
||||
complete((MethodNotAllowed, s"Can't do that! Supported: ${names mkString " or "}!"))
|
||||
}
|
||||
.handleNotFound { complete(NotFound, "Not here!") }
|
||||
.handleNotFound { complete((NotFound, "Not here!")) }
|
||||
.result()
|
||||
|
||||
object MyApp extends App {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue