You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "hvanhovell (via GitHub)" <gi...@apache.org> on 2023/05/10 01:47:44 UTC
[GitHub] [spark] hvanhovell commented on a diff in pull request #41109: [SPARK-43428] Move some class utils to common/utils
hvanhovell commented on code in PR #41109:
URL: https://github.com/apache/spark/pull/41109#discussion_r1189275908
##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -197,7 +197,7 @@ private[spark] object Utils extends Logging {
/**
* Get the ClassLoader which loaded Spark.
*/
- def getSparkClassLoader: ClassLoader = getClass.getClassLoader
+ def getSparkClassLoader: ClassLoader = SparkClassUtils.getSparkClassLoader
Review Comment:
You implement `SparkClassUtils` as a trait, and make `Utils` implement that trait. That will save you from writing a lot of code like this.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org