Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25075 Build and test Spark against Scala 2.13
  3. SPARK-33352

Fix procedure-like declaration compilation warning in Scala 2.13

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.0
    • 3.1.0
    • Build
    • None

    Description

      Similar to spark-29291, just to track Spark 3.1.0.

      There are two similar compilation warnings about procedure-like declaration in Scala 2.13.3:

       

      [WARNING] [Warn] /spark/core/src/main/scala/org/apache/spark/HeartbeatReceiver.scala:70: procedure syntax is deprecated for constructors: add `=`, as in method definition
      
      [WARNING] [Warn] /spark/core/src/main/scala/org/apache/spark/storage/BlockManagerDecommissioner.scala:211: procedure syntax is deprecated: instead, add `: Unit =` to explicitly declare `run`'s return type
      

       

      For constructors method definition should be `this(...) = { }` not `this(...) { }`, for without 

      `return type` methods definition should be `def methodName(...): Unit = {}` not `def methodName(...) {}`

      Attachments

        Activity

          People

            LuciferYang Yang Jie
            LuciferYang Yang Jie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: