[SPARK-3854][BUILD] Scala style: require spaces before `{`.
## What changes were proposed in this pull request?
Since the opening curly brace, '{', has many usages as discussed in
[SPARK-3854](https://issues.apache.org/jira/browse/SPARK-3854), this PR adds a
ScalaStyle rule to prevent '){' pattern for the following majority pattern and
fixes the code accordingly. If we enforce this in ScalaStyle from now, it will
improve the Scala code quality and reduce review time.
```
// Correct:
if (true) {
println("Wow!")
}
// Incorrect:
if (true){
println("Wow!")
}
```
IntelliJ also shows new warnings based on this.
## How was this patch tested?
Pass the Jenkins ScalaStyle test.
Author: Dongjoon Hyun <[email protected]>
Closes #11637 from dongjoon-hyun/SPARK-3854.
Project: http://git-wip-us.apache.org/repos/asf/bahir/repo
Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/41ae1d27
Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/41ae1d27
Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/41ae1d27
Branch: refs/heads/master
Commit: 41ae1d27524342aa9bbf854a7cbfddd37e8e8370
Parents: 84a1471
Author: Dongjoon Hyun <[email protected]>
Authored: Thu Mar 10 15:57:22 2016 -0800
Committer: Andrew Or <[email protected]>
Committed: Thu Mar 10 15:57:22 2016 -0800
----------------------------------------------------------------------
.../org/apache/spark/examples/streaming/akka/ActorWordCount.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bahir/blob/41ae1d27/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala
----------------------------------------------------------------------
diff --git
a/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala
b/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala
index 2770b8a..844772a 100644
---
a/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala
+++
b/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala
@@ -100,7 +100,7 @@ class SampleActorReceiver[T](urlOfPublisher: String)
extends ActorReceiver {
object FeederActor {
def main(args: Array[String]) {
- if (args.length < 2){
+ if (args.length < 2) {
System.err.println("Usage: FeederActor <hostname> <port>\n")
System.exit(1)
}