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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to