fixed misc FIXMEs and TODOs

This commit is contained in:
Jonas Bonér 2009-12-27 08:24:11 +01:00
parent 5ee81af697
commit ac5451a9fa
49 changed files with 95 additions and 242 deletions

View file

@ -88,7 +88,7 @@ object Serializer {
}
def in(bytes: Array[Byte], clazz: Class[_]): AnyRef = {
if (clazz == null) throw new IllegalArgumentException("Protobuf message can't be null")
if (clazz eq null) throw new IllegalArgumentException("Protobuf message can't be null")
in(bytes, Some(clazz))
}
}
@ -119,7 +119,7 @@ object Serializer {
}
def in(json: String, clazz: Class[_]): AnyRef = {
if (clazz == null) throw new IllegalArgumentException("Can't deserialize JSON to instance if no class is provided")
if (clazz eq null) throw new IllegalArgumentException("Can't deserialize JSON to instance if no class is provided")
mapper.readValue(json, clazz).asInstanceOf[AnyRef]
}
}