I am getting the following error .. scala.MatchError: null
Is there something wrong with my code ? And if so, how do I fix it ?
val a : Option[String] = {
company.customUrl match {
case Some(a) => company.a
case None => null
}
}
val b :Option[String] = {
company.b match {
case Some(b) => company.b
case _ => null
}
}
val c : Option[Long] = {
company.c match {
case Some(c) => Option(company.c.get.toLong)
case _ => null
}
}
Option[T]? - Yuval Itzchakov