Skip to content
Snippets Groups Projects
Commit 3a388c32 authored by Stephen Haberman's avatar Stephen Haberman
Browse files

Use Properties.clone() instead.

parent a6ae2b48
No related branches found
No related tags found
No related merge requests found
...@@ -823,10 +823,7 @@ private[spark] object Utils extends Logging { ...@@ -823,10 +823,7 @@ private[spark] object Utils extends Logging {
/** Returns a copy of the system properties that is thread-safe to iterator over. */ /** Returns a copy of the system properties that is thread-safe to iterator over. */
def getSystemProperties(): Map[String, String] = { def getSystemProperties(): Map[String, String] = {
try { return System.getProperties().clone()
return System.getProperties().toMap[String, String] .asInstanceOf[java.util.Properties].toMap[String, String]
} catch {
case e: ConcurrentModificationException => getSystemProperties()
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment