def checkJsonPayload(json: JValue)(request: HttpServletRequest): Option[CodedError] = json match {
case JNothing => Some(codedError)
case _ => None
}
This has a warning as I don’t use the ‘request’ parameter, but wait!; I remember reading that I can replace request with ‘_’. However, it doesn’t compile.
You can’t replace request with a _ not sure where you read that but it was either in another context or plain wrong.
You can just ignore the warning, suppress it, or remove the parameter.
Why would you even add it if you do not need it?
If you are overriding a superclass that already defines such a method but your particular implementation doesn’t require that parameter then the compiler should not warn. If rather, you are providing a default implementation that is meant to be overridden and those implementations may use that parameter and that is why you are adding it here you can just use the @unused annotation to suppress the warning.