Skip to content

Commit de13b79

Browse files
committed
Style fixes
1 parent 295b6a5 commit de13b79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,17 @@ private[spark]
188188
class ReturnStatementFinder extends ClassVisitor(ASM4) {
189189
override def visitMethod(access: Int, name: String, desc: String,
190190
sig: String, exceptions: Array[String]): MethodVisitor = {
191-
if(name.contains("apply"))
191+
if(name.contains("apply")) {
192192
new MethodVisitor(ASM4) {
193193
override def visitTypeInsn(op: Int, tp: String) {
194-
if(op == NEW && tp.contains("scala/runtime/NonLocalReturnControl"))
194+
if(op == NEW && tp.contains("scala/runtime/NonLocalReturnControl")) {
195195
throw new SparkException("Return statements aren't allowed in Spark closures")
196+
}
196197
}
197198
}
198-
else
199+
} else {
199200
new MethodVisitor(ASM4) {}
201+
}
200202
}
201203
}
202204

0 commit comments

Comments
 (0)