Skip to content

Commit

Permalink
solve issue playframework#88
Browse files Browse the repository at this point in the history
solve issue playframework#88
  • Loading branch information
sunnykaka committed Apr 9, 2015
1 parent 18f774c commit 00a3a31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions redis/src/main/scala/com/typesafe/plugin/RedisPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ class RedisPlugin(app: Application) extends CachePlugin {
oos.writeObject(value)
oos.flush()
prefix = "result"
} else if (value.isInstanceOf[Serializable]) {
oos = new ObjectOutputStream(baos)
oos.writeObject(value)
oos.flush()
} else if (value.isInstanceOf[String]) {
dos = new DataOutputStream(baos)
dos.writeUTF(value.asInstanceOf[String])
Expand All @@ -135,6 +131,10 @@ class RedisPlugin(app: Application) extends CachePlugin {
dos = new DataOutputStream(baos)
dos.writeBoolean(value.asInstanceOf[Boolean])
prefix = "boolean"
} else if (value.isInstanceOf[Serializable]) {
oos = new ObjectOutputStream(baos)
oos.writeObject(value)
oos.flush()
} else {
throw new IOException("could not serialize: "+ value.toString)
}
Expand Down

0 comments on commit 00a3a31

Please sign in to comment.