[ 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:09 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): [~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()); } > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org