diff --git a/core/src/main/scala/org/apache/spark/Logging.scala b/core/src/main/scala/org/apache/spark/Logging.scala
index a8892737fad15b3544accfacb7e109ebc0c614f4..b97697d587aada9d51a3e014659549fdf93d16b9 100644
--- a/core/src/main/scala/org/apache/spark/Logging.scala
+++ b/core/src/main/scala/org/apache/spark/Logging.scala
@@ -93,7 +93,7 @@ trait Logging {
   // threads do it concurrently (as SLF4J initialization is not thread safe).
   protected def initLogging() {
     // If Log4j doesn't seem initialized, load a default properties file
-    def log4jInitialized = LogManager.getRootLogger.getAllAppenders.hasMoreElements
+    val log4jInitialized = LogManager.getRootLogger.getAllAppenders.hasMoreElements
     if (!log4jInitialized) {
       val defaultLogProps = "org/apache/spark/default-log4j.properties"
       val classLoader = this.getClass.getClassLoader
diff --git a/spark-class b/spark-class
index 1c4323ee53200b483bf0efe22f029503ee1ba81d..1858ea62476d9216aa5cf31563962408983ae279 100755
--- a/spark-class
+++ b/spark-class
@@ -115,27 +115,30 @@ if [ ! -f "$FWDIR/RELEASE" ]; then
   fi
 fi
 
-if [ "$1" == "org.apache.spark.tools.JavaAPICompletenessChecker" ]; then
-  TOOLS_DIR="$FWDIR"/tools
-  SPARK_TOOLS_JAR=""
-  if [ -e "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar ]; then
-    # Use the JAR from the SBT build
-    export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar`
-  fi
-  if [ -e "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar ]; then
-    # Use the JAR from the Maven build
-    # TODO: this also needs to become an assembly!
-    export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar`
-  fi
+TOOLS_DIR="$FWDIR"/tools
+SPARK_TOOLS_JAR=""
+if [ -e "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar ]; then
+  # Use the JAR from the SBT build
+  export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar`
+fi
+if [ -e "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar ]; then
+  # Use the JAR from the Maven build
+  # TODO: this also needs to become an assembly!
+  export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar`
 fi
 
 # Compute classpath using external script
 CLASSPATH=`$FWDIR/bin/compute-classpath.sh`
-CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR"
+
+if [ "$1" == "org.apache.spark.tools.JavaAPICompletenessChecker" ]; then
+  CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR"
+fi
 
 if $cygwin; then
   CLASSPATH=`cygpath -wp $CLASSPATH`
-  export SPARK_TOOLS_JAR=`cygpath -w $SPARK_TOOLS_JAR`
+  if [ "$1" == "org.apache.spark.tools.JavaAPICompletenessChecker" ]; then
+    export SPARK_TOOLS_JAR=`cygpath -w $SPARK_TOOLS_JAR`
+  fi
 fi
 export CLASSPATH