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

    https://github.com/apache/spark/pull/577#discussion_r12303556
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -325,14 +325,19 @@ object SparkSubmitArguments {
       def getPropertiesFromFile(file: File): Seq[(String, String)] = {
         require(file.exists(), s"Properties file ${file.getName} does not 
exist")
         val inputStream = new FileInputStream(file)
    -    val properties = new Properties()
         try {
    -      properties.load(inputStream)
    -    } catch {
    -      case e: IOException =>
    -        val message = s"Failed when loading Spark properties file 
${file.getName}"
    -        throw new SparkException(message, e)
    +      val properties = new Properties()
    +      try {
    +        properties.load(inputStream)
    +      } catch {
    +        case e: IOException =>
    +          val message = s"Failed when loading Spark properties file 
${file.getName}"
    +          throw new SparkException(message, e)
    +      }
    --- End diff --
    
    Do we need a nested try/catch here or could we put the catch as part of the 
same try/finally we have outside?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to