diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/Utils.scala | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index d637a0a91d..b20c0e5308 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -823,10 +823,7 @@ private[spark] object Utils extends Logging { /** Returns a copy of the system properties that is thread-safe to iterator over. */ def getSystemProperties(): Map[String, String] = { - try { - return System.getProperties().toMap[String, String] - } catch { - case e: ConcurrentModificationException => getSystemProperties() - } + return System.getProperties().clone() + .asInstanceOf[java.util.Properties].toMap[String, String] } } |