typesafehub/play-plugins — pull request #90 by ggrossman (2013-10-09 22:35:40+00:00)
Title: Fix serialization bugs in RedisPlugin and add support for serializing Results

This fixes a few problems in RedisPlugin:
1. The use of "value.getClass.isInstanceOf[T]" to identify various types for serialization was incorrect; it should be "value.isInstanceOf[T]"
2. When run under the dynamic reloadable ClassLoader used by "play run" development mode, ObjectInputStream would fail to deserialize objects. According to jroper, it is not safe to call Class.forName in Play code since the dynamic classloader may be in use. The fix is to subclass ObjectInputStream and override resolveClass to pass in the Play classloader.
3. The Cached decorator would not work with RedisPlugin because Result/SimpleResult/etc. are not serializable. Making them serializable would be difficult since they contain Enumerators, so I fixed this by converting Results to a simple case class RedisResult which contains a simple binary array for the response body.