Skip to content
Snippets Groups Projects
Commit 60851bc7 authored by Jakob Odersky's avatar Jakob Odersky Committed by Sean Owen
Browse files

[SPARK-11110][BUILD] Remove transient annotation for parameters.

`transient` annotations on class parameters (not case class parameters or vals) causes compilation errors during compilation with Scala 2.11.
I understand that transient *parameters* make no sense, however I don't quite understand why the 2.10 compiler accepted them.

Note: in case it is preferred to keep the annotations in case someone would in the future want to redefine them as vals, it would also be possible to just add `val` after the annotation, e.g. `class Foo(transient x: Int)` becomes `class Foo(transient private val x: Int)`.

I chose to remove the annotation as it also reduces needles clutter, however please feel free to tell me if you prefer the second option and I'll update the PR

Author: Jakob Odersky <jodersky@gmail.com>

Closes #9126 from jodersky/sbt-scala-2.11.
parent 8f74aa63
No related branches found
No related tags found
No related merge requests found
......@@ -308,7 +308,7 @@ private[netty] class NettyRpcEnvFactory extends RpcEnvFactory with Logging {
}
}
private[netty] class NettyRpcEndpointRef(@transient conf: SparkConf)
private[netty] class NettyRpcEndpointRef(@transient private val conf: SparkConf)
extends RpcEndpointRef(conf) with Serializable with Logging {
@transient @volatile private var nettyEnv: NettyRpcEnv = _
......
......@@ -89,9 +89,9 @@ private[hive] case class CurrentDatabase(ctx: HiveContext)
class HiveContext private[hive](
sc: SparkContext,
cacheManager: CacheManager,
@transient listener: SQLListener,
@transient execHive: ClientWrapper,
@transient metaHive: ClientInterface,
listener: SQLListener,
@transient private val execHive: ClientWrapper,
@transient private val metaHive: ClientInterface,
isRootContext: Boolean)
extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
self =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment