kz
04/26/2018, 3:07 PMthis
reference? I'm using Apache Spark and my jobs is failing due to the task not being serializable because one of my lambda's generated class includes the SparkJob
reference (which I don't want Serializable
). The reference is included as a class field even though it's not actually accessed.
Then in my other spark jobs I have plenty other lambdas that also don't access the this
reference and properly do not have that code generated.Andreas Sinz
04/26/2018, 4:00 PMkz
04/26/2018, 4:06 PMthis
reference. I will try to come up with a small example but our current theory is that Kotlin will capture in the lambda any reference that appears on the line the lambda is defined (even if it is not actually used in the lambda)Andreas Sinz
04/26/2018, 4:07 PMkz
04/26/2018, 4:08 PMdsavvinov
04/27/2018, 9:43 AMkz
04/27/2018, 2:02 PM