You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/20 14:25:36 UTC

[GitHub] [spark] srowen commented on a change in pull request #24148: [MINOR][CORE] Leverage modified Utils.classForName to reduce scalastyle off for Class.forName

srowen commented on a change in pull request #24148: [MINOR][CORE] Leverage modified Utils.classForName to reduce scalastyle off for Class.forName
URL: https://github.com/apache/spark/pull/24148#discussion_r267364679
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala
 ##########
 @@ -378,10 +378,8 @@ private[spark] object ClosureCleaner extends Logging {
     } else {
       logDebug(s"Cleaning lambda: ${lambdaFunc.get.getImplMethodName}")
 
-      // scalastyle:off classforname
-      val captClass = Class.forName(lambdaFunc.get.getCapturingClass.replace('/', '.'),
-        false, Thread.currentThread.getContextClassLoader)
-      // scalastyle:on classforname
+      val captClass = Utils.classForName(lambdaFunc.get.getCapturingClass.replace('/', '.'),
+        initialize = false, noSparkClassLoader = false)
 
 Review comment:
   It looks like noSparkClassLoader should be true here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org