vanzin commented on a change in pull request #23901: [MINOR]Remove unnecessary 
gets when getting a value from map.
URL: https://github.com/apache/spark/pull/23901#discussion_r260950628
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/ui/ConsoleProgressBar.scala
 ##########
 @@ -40,7 +40,7 @@ private[spark] class ConsoleProgressBar(sc: SparkContext) 
extends Logging {
 
   // The width of terminal
   private val TerminalWidth = if (!sys.env.getOrElse("COLUMNS", "").isEmpty) {
-    sys.env.get("COLUMNS").get.toInt
+    sys.env("COLUMNS").toInt
 
 Review comment:
   Instead of just following what your IDE says, you could actually have 
simplified this whole block of code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to