diff options
author | tedyu <yuzhihong@gmail.com> | 2015-12-16 19:02:12 -0800 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-12-16 19:02:12 -0800 |
commit | f590178d7a06221a93286757c68b23919bee9f03 (patch) | |
tree | 94e096dc45037353b602d29f1b2df7d471bcab2d /scalastyle-config.xml | |
parent | 38d9795a4fa07086d65ff705ce86648345618736 (diff) | |
download | spark-f590178d7a06221a93286757c68b23919bee9f03.tar.gz spark-f590178d7a06221a93286757c68b23919bee9f03.tar.bz2 spark-f590178d7a06221a93286757c68b23919bee9f03.zip |
[SPARK-12365][CORE] Use ShutdownHookManager where Runtime.getRuntime.addShutdownHook() is called
SPARK-9886 fixed ExternalBlockStore.scala
This PR fixes the remaining references to Runtime.getRuntime.addShutdownHook()
Author: tedyu <yuzhihong@gmail.com>
Closes #10325 from ted-yu/master.
Diffstat (limited to 'scalastyle-config.xml')
-rw-r--r-- | scalastyle-config.xml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scalastyle-config.xml b/scalastyle-config.xml index dab1ebddc6..6925e18737 100644 --- a/scalastyle-config.xml +++ b/scalastyle-config.xml @@ -157,6 +157,18 @@ This file is divided into 3 sections: ]]></customMessage> </check> + <check customId="runtimeaddshutdownhook" level="error" class="org.scalastyle.file.RegexChecker" enabled="true"> + <parameters><parameter name="regex">Runtime\.getRuntime\.addShutdownHook</parameter></parameters> + <customMessage><![CDATA[ + Are you sure that you want to use Runtime.getRuntime.addShutdownHook? In most cases, you should use + ShutdownHookManager.addShutdownHook instead. + If you must use Runtime.getRuntime.addShutdownHook, wrap the code block with + // scalastyle:off runtimeaddshutdownhook + Runtime.getRuntime.addShutdownHook(...) + // scalastyle:on runtimeaddshutdownhook + ]]></customMessage> + </check> + <check customId="classforname" level="error" class="org.scalastyle.file.RegexChecker" enabled="true"> <parameters><parameter name="regex">Class\.forName</parameter></parameters> <customMessage><![CDATA[ |