Could you try doing something like this?
val l2: List[Rdv] = liste list ()
val l3 = ls map{
case x @ Rdv(_, null, _) => x.copy(telPrive = "")
case x => x
}
Honestly, should should make that field, if it's nullable to be an Option
and then have a member function which you call defined such that:
case class Rdv(a: String, b: Option[String], c: String){
def realC = b getOrElse ""
}