You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Phoenix_Dad (JIRA)" <ji...@apache.org> on 2017/05/19 08:09:04 UTC
[jira] [Comment Edited] (SPARK-20806) Launcher:redundant code,invalid branch of judgment
[ https://issues.apache.org/jira/browse/SPARK-20806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017041#comment-16017041 ]
Phoenix_Dad edited comment on SPARK-20806 at 5/19/17 8:08 AM:
--------------------------------------------------------------
[~srowen]
the " libdir.isDirectory()" express is always true within the "if"
if (new File(sparkHome, "jars").isDirectory()) {
libdir = new File(sparkHome, "jars");
checkState(!failIfNotFound || libdir.isDirectory(),
"Library directory '%s' does not exist.",
libdir.getAbsolutePath());
}
was (Author: phoenix_dad):
the " libdir.isDirectory()" express is always true within the "if"
if (new File(sparkHome, "jars").isDirectory()) {
libdir = new File(sparkHome, "jars");
checkState(!failIfNotFound || libdir.isDirectory(),
"Library directory '%s' does not exist.",
libdir.getAbsolutePath());
}
> Launcher:redundant code,invalid branch of judgment
> --------------------------------------------------
>
> Key: SPARK-20806
> URL: https://issues.apache.org/jira/browse/SPARK-20806
> Project: Spark
> Issue Type: Bug
> Components: Deploy, Spark Submit
> Affects Versions: 2.1.1
> Reporter: Phoenix_Dad
>
> org.apache.spark.launcher.CommandBuilderUtils
> In findJarsDir function, there is an “if or else” branch .
> the first input argument of 'checkState' in 'if' subclause is always true, so 'checkState' is useless here
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org