Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Disabled test which fails on 2.8.1. due to bug in Enumeration

  • Loading branch information...
commit 50162e70c44da898b52fb67aed7c9dbc36eb1e30 1 parent e2a287d
@jeppenejsum jeppenejsum authored
View
6 persistence/mapper/src/main/scala/net/liftweb/mapper/MappedInt.scala
@@ -30,6 +30,11 @@ import net.liftweb.http.jquery.{JqSHtml}
import scala.xml.NodeSeq
import js._
+/**
+ * Warning: Do not use unnamed Enumerations with 2.8.1 as this will cause too many items to be displayed in the dropdown.
+ *
+ * See https://issues.scala-lang.org/browse/SI-3687 for details
+ */
abstract class MappedEnum[T<:Mapper[T], ENUM <: Enumeration](val fieldOwner: T, val enum: ENUM) extends MappedField[ENUM#Value, T] {
private var data: ENUM#Value = defaultValue
private var orgData: ENUM#Value = defaultValue
@@ -54,6 +59,7 @@ abstract class MappedEnum[T<:Mapper[T], ENUM <: Enumeration](val fieldOwner: T,
if (value != data) {
data = value
dirty_?(true)
+
}
data
}
View
3  persistence/mapper/src/test/scala/net/liftweb/mapper/MappedEnumSpec.scala
@@ -35,13 +35,12 @@ class EnumObj extends LongKeyedMapper[EnumObj] with IdPK {
object enum extends MappedEnum(this, MyEnum)
}
-
object EnumObj extends EnumObj with LongKeyedMetaMapper[EnumObj]
-
object MappedEnumSpec extends Specification("MappedEnum Specification") {
"MappedEnum" should {
"preserve enumeration order when building display list" in {
+ skip("Will not work with Scala 2.8.1 https://issues.scala-lang.org/browse/SI-3687")
val v = EnumObj.create
import MyEnum._
Please sign in to comment.
Something went wrong with that request. Please try again.