Permalink
Browse files

Fix intlistfield support

  • Loading branch information...
1 parent d9dd942 commit 203e994dd2fcb7f360949845e2704da5baf141f9 Holden Karau committed Jun 26, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 build.sbt
  2. +2 −0 src/main/scala/com/foursquare/slashem/Schema.scala
View
@@ -1,6 +1,6 @@
name := "slashem"
-version := "0.12.3"
+version := "0.12.4"
organization := "com.foursquare"
@@ -992,6 +992,7 @@ class SlashemIntListField[T <: Record[T]](owner: T) extends IntListField[T](owne
case "" => Empty
case ar: Array[Int] => Full(ar.toList)
case ar: Array[Integer] => Full(ar.toList.map(x=>x.intValue))
+ case ar: ArrayList[_] => Full(set(ar.toArray.asInstanceOf[Array[Int]].toList))
case s: String => Full(s.split(" ").map(x => x.toInt).toList)
case _ => Empty
}
@@ -1226,6 +1227,7 @@ class IntListField[T <: Record[T]](override val owner: T) extends Field[List[Int
case "" => Empty
case ar: Array[Int] => Full(set(ar.toList))
case ar: Array[Integer] => Full(set(ar.toList.map(x=>x.intValue)))
+ case ar: ArrayList[_] => Full(set(ar.toArray.asInstanceOf[Array[Int]].toList))
case s: String => Full(set(s.split(" ").map(x => x.toInt).toList))
case _ => Empty
}

0 comments on commit 203e994

Please sign in to comment.