diff options
author | Stephen Haberman <stephen@exigencecorp.com> | 2013-10-29 19:20:40 -0500 |
---|---|---|
committer | Stephen Haberman <stephen@exigencecorp.com> | 2013-10-29 19:20:40 -0500 |
commit | 3a388c320c5079bec44fe51d2f8218af2e56d98e (patch) | |
tree | b0eef5177c4978ae85824acef2361d7f7a63adfc /core | |
parent | a6ae2b48320d367be5fede60687331ce0d563d00 (diff) | |
download | spark-3a388c320c5079bec44fe51d2f8218af2e56d98e.tar.gz spark-3a388c320c5079bec44fe51d2f8218af2e56d98e.tar.bz2 spark-3a388c320c5079bec44fe51d2f8218af2e56d98e.zip |
Use Properties.clone() instead.
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] } } |