Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

enum.valueOf gone, replaced with Option(enum.withName)

  • Loading branch information...
commit da8e40a56593fd36a77932ba998935d9c31a6739 1 parent 2646b2b
@indrajitr indrajitr authored
View
2  persistence/record/src/main/scala/net/liftweb/record/field/EnumField.scala
@@ -89,7 +89,7 @@ trait EnumTypedField[EnumType <: Enumeration] extends TypedField[EnumType#Value]
def asJStringName: JValue = valueBox.map(v => JString(v.toString)) openOr (JNothing: JValue)
def setFromJStringName(jvalue: JValue): Box[EnumType#Value] = jvalue match {
case JNothing|JNull if optional_? => setBox(Empty)
- case JString(s) => setBox(enum.valueOf(s) ?~ ("Unknown value \"" + s + "\""))
+ case JString(s) => setBox(Option(enum.withName(s)) ?~ ("Unknown value \"" + s + "\""))
case other => setBox(FieldHelpers.expectedA("JString", other))
}
Please sign in to comment.
Something went wrong with that request. Please try again.