[
https://issues.apache.org/jira/browse/SPARK-25984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Apache Spark reassigned SPARK-25984:
------------------------------------
Assignee: Sean Owen (was: Apache Spark)
> Remove deprecated .newInstance(), primitive box class constructor calls
> -----------------------------------------------------------------------
>
> Key: SPARK-25984
> URL: https://issues.apache.org/jira/browse/SPARK-25984
> Project: Spark
> Issue Type: Sub-task
> Components: Spark Core, SQL, Structured Streaming
> Affects Versions: 3.0.0
> Reporter: Sean Owen
> Assignee: Sean Owen
> Priority: Minor
>
> While working on JDK 11 support, I noticed a lot of new deprecation warnings.
> 80% of them seem to be from two easily-fixable sources:
> - Class.newInstance() is deprecated
> - Almost all constructors from primitive box classes like Integer are
> deprecated
> These are easy to fix because there have long been equivalent, better
> alternatives:
> - Just call .getConstructor().getInstance()
> - Replace new Integer(x) with Integer.valueOf(x), etc
> The latter has the advantage, for integral types, of not even allocating a
> new object for small values.
> We should just fix these to clean up the build output.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]