Skip to content

Commit 01d0904

Browse files
committed
scalastyle
1 parent 9e4ac10 commit 01d0904

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,13 +2052,16 @@ private[spark] object Utils extends Logging {
20522052
}
20532053

20542054

2055-
private[this] val nonSpaceOrNaturalLineDelimiter: Char => Boolean = { ch => ch > ' ' || ch == '\r' || ch == '\n' }
2055+
private[this] val nonSpaceOrNaturalLineDelimiter: Char => Boolean = {
2056+
ch => ch > ' ' || ch == '\r' || ch == '\n'
2057+
}
20562058

20572059
/**
2058-
* Implements the same logic as JDK java.lang.String#trim by removing leading and trailing non-printable characters
2059-
* less or equal to '\u0020' (SPACE) but preserves natural line delimiters according to
2060-
* [[java.util.Properties]] load method. The natural line delimiters are removed by JDK during load.
2061-
* Therefore any remaining ones have been specifically provided and escaped by the user, and must not be ignored
2060+
* Implements the same logic as JDK java.lang.String#trim by removing leading and trailing
2061+
* non-printable characters less or equal to '\u0020' (SPACE) but preserves natural line
2062+
* delimiters according to [[java.util.Properties]] load method. The natural line delimiters are
2063+
* removed by JDK during load. Therefore any remaining ones have been specifically provided and
2064+
* escaped by the user, and must not be ignored
20622065
*
20632066
* @param str
20642067
* @return the trimmed value of str

core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,10 +1155,12 @@ class SparkSubmitSuite
11551155
val infixDelimFromFile = s"${delimKey}infixDelimFromFile" -> s"${CR}blah${LF}"
11561156
val nonDelimSpaceFromFile = s"${delimKey}nonDelimSpaceFromFile" -> " blah\f"
11571157

1158-
val testProps = Seq(leadingDelimKeyFromFile, trailingDelimKeyFromFile, infixDelimFromFile, nonDelimSpaceFromFile)
1158+
val testProps = Seq(leadingDelimKeyFromFile, trailingDelimKeyFromFile, infixDelimFromFile,
1159+
nonDelimSpaceFromFile)
11591160

11601161
val props = new java.util.Properties()
1161-
val propsFile = File.createTempFile("test-spark-conf", ".properties", Utils.createTempDir())
1162+
val propsFile = File.createTempFile("test-spark-conf", ".properties",
1163+
Utils.createTempDir())
11621164
val propsOutputStream = new FileOutputStream(propsFile)
11631165
try {
11641166
testProps.foreach { case (k, v) => props.put(k, v) }

0 commit comments

Comments
 (0)