Browse files

Stop depending on MongoDBObject toMap to produce a map that can be su…

…ccessfully cast to immutable.Map
  • Loading branch information...
1 parent 1818c7a commit b0ba3f87b36ee66793c24d45a2db5c2d4c924f05 @rktoomey rktoomey committed Jun 25, 2012
@@ -197,7 +197,7 @@ needsProxyGrater: clazz='%s'
def lookup(dbo: MongoDBObject): Grater[_ <: AnyRef] = {
val g = extractTypeHint(dbo).map(lookup(_))
- if (g.isDefined) g.get else throw MissingTypeHint(dbo.toMap.asInstanceOf[Map[_, _]])(this)
+ if (g.isDefined) g.get else throw MissingTypeHint(dbo.iterator.toMap)(this)
@deprecated("Use lookup instead - will be removed for 0.0.9 release", "0.0.8") def lookup_!(dbo: MongoDBObject): Grater[_ <: AnyRef] = lookup(dbo)
@@ -46,7 +46,7 @@ case class ToObjectGlitch[X <: AnyRef with Product](grater: ConcreteGrater[X], s
case class GraterFromDboGlitch(path: String, dbo: MongoDBObject)(implicit ctx: Context) extends Error(MissingGraterExplanation(path, dbo)(ctx))
case class GraterGlitch(path: String)(implicit ctx: Context) extends Error(MissingGraterExplanation(path)(ctx))
-case class MissingTypeHint(m: Map[_, _])(implicit ctx: Context) extends Error("""
+case class MissingTypeHint[A, B](m: Map[A, B])(implicit ctx: Context) extends Error("""

0 comments on commit b0ba3f8

Please sign in to comment.