Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33285

Too many "Auto-application to `()` is deprecated." related compilation warnings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 3.1.0
    • None
    • Build
    • None

    Description

      There are too many  "Auto-application to `()` is deprecated." related compilation warnings when compile with Scala 2.13 like

      [WARNING] [Warn] /spark-src/core/src/test/scala/org/apache/spark/PartitioningSuite.scala:246: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method stdev,
      or remove the empty argument list from its definition (Java-defined methods are exempt).
      In Scala 3, an unapplied method like this will be eta-expanded into a function.
      

      A lot of them, but it's easy to fix.

      If there is a definition as follows:

      Class Foo {
         def bar(): Unit = {}
      }
      
      val foo = new Foo

      Should be

      foo.bar()
      

      not

      foo.bar 

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: