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

fix procedure syntax warnings #10869

Merged
merged 1 commit into from
Jun 16, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class JavaRoutingDslProvider @Inject() (
bodyParser: play.mvc.BodyParser.Default
) extends Provider[RoutingDsl] {
@deprecated("Use constructor without JavaContextComponents", "2.8.0")
def this(bodyParser: play.mvc.BodyParser.Default, contextComponents: JavaContextComponents) {
def this(bodyParser: play.mvc.BodyParser.Default, contextComponents: JavaContextComponents) = {
this(bodyParser)
}
override def get(): RoutingDsl = new RoutingDsl(bodyParser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import scala.compat.java8.FutureConverters
*/
class JavaHttpErrorHandlerAdapter @Inject() (underlying: JHttpErrorHandler) extends HttpErrorHandler {
@deprecated("Use constructor without JavaContextComponents", "2.8.0")
def this(underlying: JHttpErrorHandler, contextComponents: JavaContextComponents) {
def this(underlying: JHttpErrorHandler, contextComponents: JavaContextComponents) = {
this(underlying)
}

Expand Down
2 changes: 1 addition & 1 deletion core/play/src/main/scala/play/core/parsers/Multipart.scala
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ object Multipart {
) extends GraphStage[FlowShape[ByteString, RawPart]] {

@deprecated("Use the main constructor", "2.9.0")
def this(boundary: String, maxMemoryBufferSize: Long, maxHeaderSize: Int) {
def this(boundary: String, maxMemoryBufferSize: Long, maxHeaderSize: Int) = {
this(boundary, maxMemoryBufferSize, maxHeaderSize, false)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ package scalaguide.http.scalabodyparsers {
with BaseController {
protected def controllerComponents: ControllerComponents = app.injector.instanceOf[ControllerComponents]

def this(builder: GuiceApplicationBuilder => GuiceApplicationBuilder) {
def this(builder: GuiceApplicationBuilder => GuiceApplicationBuilder) = {
this(builder(GuiceApplicationBuilder()).build())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ class DatabaseEvolutions(
substitutionsSuffix: String = "}}}",
substitutionsEscape: Boolean = true
) {
def this(database: Database, schema: String, metaTable: String) {
def this(database: Database, schema: String, metaTable: String) = {
this(database, schema, metaTable, Map.empty, "$evolutions{{{", "}}}", true)
}
def this(database: Database, schema: String) {
def this(database: Database, schema: String) = {
this(database, schema, "play_evolutions")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class WithApplicationLoader(
* @param app The fake application
*/
abstract class WithApplication(val app: Application = GuiceApplicationBuilder().build()) extends Around with Scope {
def this(builder: GuiceApplicationBuilder => GuiceApplicationBuilder) {
def this(builder: GuiceApplicationBuilder => GuiceApplicationBuilder) = {
this(builder(GuiceApplicationBuilder()).build())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ object CSRF {

class JavaCSRFErrorHandlerAdapter @Inject() (underlying: CSRFErrorHandler) extends ErrorHandler {
@deprecated("Use constructor without JavaContextComponents", "2.8.0")
def this(underlying: CSRFErrorHandler, contextComponents: JavaContextComponents) {
def this(underlying: CSRFErrorHandler, contextComponents: JavaContextComponents) = {
this(underlying)
}
def handle(request: RequestHeader, msg: String) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ case class SecurityHeadersConfig(
referrerPolicy: Option[String] = Some("origin-when-cross-origin, strict-origin-when-cross-origin"),
allowActionSpecificHeaders: Boolean = false
) {
def this() {
def this() = {
this(frameOptions = Some("DENY"))
}

Expand Down