Skip to content

Commit e4b617c

Browse files
committed
Refactor removePass to follow scala style
1 parent 1bee0da commit e4b617c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/main/scala/org/apache/spark/ui/env/EnvironmentPage.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ private[ui] class EnvironmentPage(parent: EnvironmentTab) extends WebUIPage("")
2727
private val listener = parent.listener
2828

2929
private def removePass(kv: (String, String)): (String, String) = {
30-
if (kv._1.toLowerCase.contains("password")) {
31-
return (kv._1, "******")
32-
}
33-
kv
30+
if (kv._1.toLowerCase.contains("password")) (kv._1, "******") else kv
3431
}
32+
3533
def render(request: HttpServletRequest): Seq[Node] = {
3634
val runtimeInformationTable = UIUtils.listingTable(
3735
propertyHeader, jvmRow, listener.jvmInformation, fixedWidth = true)

0 commit comments

Comments
 (0)