Permalink
Browse files

Do not try to serialize transient fields

  • Loading branch information...
1 parent 58f11b5 commit 38930ae0c8bf92a725a5558584ea698c904f0400 Joni Freeman committed Apr 16, 2011
@@ -253,7 +253,7 @@ private[json] object Meta {
def fields(clazz: Class[_]): List[(String, TypeInfo)] = {
val fs = clazz.getDeclaredFields.toList
- .filterNot(f => Modifier.isStatic(f.getModifiers))
+ .filterNot(f => Modifier.isStatic(f.getModifiers) || Modifier.isTransient(f.getModifiers))
.map(f => (f.getName, TypeInfo(f.getType, f.getGenericType match {
case p: ParameterizedType => Some(p)
case _ => None
@@ -23,14 +23,15 @@ object FieldSerializerBugs extends Specification {
import Serialization.{read, write => swrite}
implicit val formats = DefaultFormats + FieldSerializer[AnyRef]()
-/*
+
+/* FIXME: For some reason this fails on CI
"AtomicInteger should not cause stack overflow" in {
import java.util.concurrent.atomic.AtomicInteger
val ser = swrite(new AtomicInteger(1))
val atomic = read[AtomicInteger](ser)
atomic.get mustEqual 1
}
-*/
+ */
}

0 comments on commit 38930ae

Please sign in to comment.