Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3449#discussion_r20849000
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -262,7 +262,7 @@ private[spark] object Utils extends Logging {
             if (dir.exists() || !dir.mkdirs()) {
               dir = null
             }
    -      } catch { case e: IOException => ; }
    +      } catch { case e: SecurityException => dir = null; }
    --- End diff --
    
    It looks like these two methods can't throw `IOException` after all, is 
that the gist of it? `mkdirs` just returns `false` if it fails, hm. 
https://docs.oracle.com/javase/7/docs/api/java/io/File.html#mkdirs()
    
    `dir = null` is a good bug fix. I might have changed this to not even 
assign `dir` and hold the new `File` in a temp variable until the checks 
succeeded. This looks equivalent though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to