GitHub user JoshRosen opened a pull request:
https://github.com/apache/spark/pull/7350
[SPARK-8962] Add Scalastyle rule to ban direct use of Class.forName; fix
existing uses
This pull request adds a Scalastyle regex rule which fails the style check
if `Class.forName` is used directly. `Class.forName` always loads classes from
the default / system classloader, but in a majority of cases, we should be
using Spark's own `Utils.classForName` instead, 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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JoshRosen/spark ban-Class.forName
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7350.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #7350
----
commit d9abade8f10b8031883f49af658c9adc3e9141af
Author: Josh Rosen <[email protected]>
Date: 2015-07-10T19:45:29Z
Add stylechecker rule to ban uses of Class.forName
commit 62882ee6fd01c67742e6411ec445a1b1b8c5f7ab
Author: Josh Rosen <[email protected]>
Date: 2015-07-10T23:32:47Z
Fix uses of Class.forName or add exclusion.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]