Permalink
Browse files

Default should be by-name argument

  • Loading branch information...
1 parent 3d1b20c commit f01b9d5fc50533f3c2ba932357fac8c39a1fd1ea @jonifreeman jonifreeman committed Jun 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/json/src/main/scala/net/liftweb/json/JsonAST.scala
@@ -330,7 +330,7 @@ object JsonAST {
* JNothing.extractOrElse(Person("joe")) == Person("joe")
* </pre>
*/
- def extractOrElse[A](default: A)(implicit formats: Formats, mf: scala.reflect.Manifest[A]): A =
+ def extractOrElse[A](default: => A)(implicit formats: Formats, mf: scala.reflect.Manifest[A]): A =
Extraction.extractOpt(this)(formats, mf).getOrElse(default)
}

0 comments on commit f01b9d5

Please sign in to comment.