You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2022/04/02 01:16:00 UTC

[jira] [Assigned] (SPARK-38620) Replace `value.formatted(formatString)` with `formatString.format(value)` to clean up compilation warning

     [ https://issues.apache.org/jira/browse/SPARK-38620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean R. Owen reassigned SPARK-38620:
------------------------------------

    Assignee: Yang Jie

> Replace `value.formatted(formatString)` with `formatString.format(value)` to clean up compilation warning
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-38620
>                 URL: https://issues.apache.org/jira/browse/SPARK-38620
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Yang Jie
>            Assignee: Yang Jie
>            Priority: Minor
>
> There are compile warnings as follows:
> {code:java}
> [WARNING] /spark-source/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala:67: [deprecation @ org.apache.spark.streaming.ui.RecordRateUIData.formattedAvg.$anonfun | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
> or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.
> [WARNING] /spark-source/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala:201: [deprecation @ org.apache.spark.sql.streaming.ui.StreamingQueryPagedTable.row | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
> or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.
> [WARNING] /spark-source/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala:202: [deprecation @ org.apache.spark.sql.streaming.ui.StreamingQueryPagedTable.row | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
> or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters. {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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