Uh oh!
There was an error while loading. Please reload this page.
[SPARK-8962] Add Scalastyle rule to ban direct use of Class.forName; fix existing uses - #7350
[SPARK-8962] Add Scalastyle rule to ban direct use of Class.forName; fix existing uses#7350JoshRosen wants to merge 6 commits into
Conversation
JoshRosen
commented
Jul 10, 2015
JoshRosen
commented
Jul 10, 2015
This pull request might become intractable to review due to how many files it touches, so I recommend using the Reviewable link to keep track of changes. |
SparkQA
commented
Jul 10, 2015
Test build #37065 has finished for PR 7350 at commit
|
shivaram
commented
Jul 11, 2015
The RBackendHandler change looks good to me. I do find it weird that we have scala style rules for not using specific functions, but I guess its hard to track this during code review in a large codebase. |
JoshRosen
commented
Jul 12, 2015
@shivaram, in this case I think the style rule is justified even if it's inconvenient or a hassle to implement because this |
rxin
commented
Jul 13, 2015
@JoshRosen looks like you missed a few places. Can you fix them so we can merge this? |
SparkQA
commented
Jul 13, 2015
Test build #1053 has finished for PR 7350 at commit
|
SparkQA
commented
Jul 13, 2015
Test build #37158 has finished for PR 7350 at commit
|
SparkQA
commented
Jul 14, 2015
Test build #37159 has finished for PR 7350 at commit
|
rxin
commented
Jul 14, 2015
Unfortunately another pr created a conflict again ... |
JoshRosen
commented
Jul 14, 2015
Argh... will fix now. |
SparkQA
commented
Jul 14, 2015
Test build #37190 has finished for PR 7350 at commit
|
JoshRosen
commented
Jul 14, 2015
Jenkins, retest this please. |
1 similar comment
JoshRosen
commented
Jul 14, 2015
Jenkins, retest this please. |
SparkQA
commented
Jul 14, 2015
Test build #37247 has finished for PR 7350 at commit
|
JoshRosen
commented
Jul 14, 2015
Jenkins, retest this please. |
SparkQA
commented
Jul 14, 2015
Test build #37260 has finished for PR 7350 at commit
|
rxin
commented
Jul 14, 2015
Thanks - merging this in. |
This pull request adds a Scalastyle regex rule which fails the style check if
Class.forNameis used directly.Class.forNamealways loads classes from the default / system classloader, but in a majority of cases, we should be using Spark's ownUtils.classForNameinstead, which tries to load classes from the current thread's context classloader and falls back to the classloader which loaded Spark when the context classloader is not defined.