[SPARK-983] fix Scala style errors