diff options
author | Adrien Lavoillotte <streetpc@free.fr> | 2016-06-22 22:39:42 +0000 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-07 02:08:39 -0500 |
commit | b0d84f6663662cb20cc7535924903cd65a6b74b8 (patch) | |
tree | 34dc523cc07e7b1b6aac40f8192e5c34efd35c70 | |
parent | 1735070a997ba842d7108be7f332f0799ae05f3a (diff) | |
download | cbt-b0d84f6663662cb20cc7535924903cd65a6b74b8.tar.gz cbt-b0d84f6663662cb20cc7535924903cd65a6b74b8.tar.bz2 cbt-b0d84f6663662cb20cc7535924903cd65a6b74b8.zip |
Eval: add Serializable to wrapping class
Allows the compiled code to be executed remotely, e.g. using Apache Spark.
Another option would be to make `wrapCodeInClass` (and `codeWrapperLineOffset`) `protected` instead of `private[this]`.
Signed-off-by: Ruben Oanta <roanta@twitter.com>
RB_ID=844794
-rw-r--r-- | libraries/eval/Eval.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/eval/Eval.scala b/libraries/eval/Eval.scala index 8b03ec6..92329d3 100644 --- a/libraries/eval/Eval.scala +++ b/libraries/eval/Eval.scala @@ -299,7 +299,7 @@ class Eval(target: Option[File]) { * NB: If this method is changed, make sure `codeWrapperLineOffset` is correct. */ private[this] def wrapCodeInClass(className: String, code: String) = { - "class " + className + " extends (() => Any) {\n" + + "class " + className + " extends (() => Any) with java.io.Serializable {\n" + " def apply() = {\n" + code + "\n" + " }\n" + |