jlprat commented on code in PR #15252:
URL: https://github.com/apache/kafka/pull/15252#discussion_r1466253059


##########
core/src/main/scala/kafka/admin/ZkSecurityMigrator.scala:
##########
@@ -116,11 +116,10 @@ object ZkSecurityMigrator extends Logging {
     try {
       run(args)
     } catch {
-        case e: Exception => {
+        case e: Exception =>
           e.printStackTrace()
           // must exit with non-zero status so system tests will know we failed
           Exit.exit(1)
-        }
     }

Review Comment:
   From: https://docs.scala-lang.org/style/control-structures.html#curlybraces
   
   > case - Always omit braces in case clauses.
   
   I also double checked with one of the most used Scala code bases in 
concurrent world (Pekko, fork of Akka) that this is the case. You can see this 
in this class for example (one of the key classes of Pekko):
   
https://github.com/apache/incubator-pekko/blob/e597a702b9a54a0e193e09a50a1d45dfd1f56785/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala#L659
   
   This is an instance where Java and Scala differ (in Java this diff would 
cause a different behaviour indeed).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to