Skip to content

Instantly share code, notes, and snippets.

@yawnt
Created May 22, 2015 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yawnt/2b44994b3ef969667c0c to your computer and use it in GitHub Desktop.
Save yawnt/2b44994b3ef969667c0c to your computer and use it in GitHub Desktop.
val refdMessage: AnyRef =
message match {
case b: jl.Boolean => AkkaWorker.Boxed(Boolean.unbox(b))
case b: jl.Byte => AkkaWorker.Boxed(Byte.unbox(b))
case c: jl.Character => AkkaWorker.Boxed(Char.unbox(c))
case s: jl.Short => AkkaWorker.Boxed(Char.unbox(s))
case i: jl.Integer => AkkaWorker.Boxed(Int.unbox(i))
case l: jl.Long => AkkaWorker.Boxed(Long.unbox(l))
case f: jl.Float => AkkaWorker.Boxed(Float.unbox(f))
case d: jl.Double => AkkaWorker.Boxed(Double.unbox(d))
case a: AnyRef => a
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment