Yang Jie created SPARK-33352:
--------------------------------

             Summary: Fix procedure-like declaration compilation warning in 
Scala 2.13
                 Key: SPARK-33352
                 URL: https://issues.apache.org/jira/browse/SPARK-33352
             Project: Spark
          Issue Type: Sub-task
          Components: Build
    Affects Versions: 3.1.0
            Reporter: Yang Jie


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:

 
{code:java}
[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
{code}
 

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

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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to