You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/01/25 22:09:26 UTC

[jira] [Resolved] (CALCITE-1602) Remove uses of deprecated APIs

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

Julian Hyde resolved CALCITE-1602.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.12.0
                   avatica-1.10.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/5181563f (covers both Calcite and Avatica) and accompanied by changes to my batch scripts in https://github.com/julianhyde/share/commit/a0b9ec403884fba911618d4878954517f2970f90.

> Remove uses of deprecated APIs
> ------------------------------
>
>                 Key: CALCITE-1602
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1602
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>             Fix For: avatica-1.10.0, 1.12.0
>
>
> Calcite should not use deprecated methods and classes, especially in third-party libraries. I propose that we adopt a zero-tolerance policy, fixing deprecated calls as soon as they occur. As long as the third-party libraries use semantic versioning, this should give us prior warning before things disappear.
> You can find the calls to deprecated APIs by adding {{<compilerArgument>-Xlint:deprecation</compilerArgument>}} then running {{mvn clean package -DskipTests | grep 'has been deprecated' | grep -v 'in org.apache.calcite'}}. Currently there are 51 when you run in JDK9 and Guava 20.0. Here are the first few:
> {noformat}
> [WARNING] /home/jhyde/open1/calcite.2/linq4j/src/main/java/org/apache/calcite/linq4j/tree/Types.java:[254,38] getPackage(java.lang.String) in java.lang.Package has been deprecated
> [WARNING] /home/jhyde/open1/calcite.2/linq4j/src/test/java/org/apache/calcite/linq4j/test/Linq4jTest.java:[736,25] Integer(int) in java.lang.Integer has been deprecated
> [WARNING] /home/jhyde/open1/calcite.2/linq4j/src/test/java/org/apache/calcite/linq4j/test/Linq4jTest.java:[737,26] Integer(int) in java.lang.Integer has been deprecated
> [WARNING] /home/jhyde/open1/calcite.2/linq4j/src/test/java/org/apache/calcite/linq4j/test/Linq4jTest.java:[738,25] Integer(int) in java.lang.Integer has been deprecated
> [WARNING] /home/jhyde/open1/calcite.2/core/src/main/java/org/apache/calcite/rex/RexBuilder.java:[539,47] ROUND_HALF_DOWN in java.math.BigDecimal has been deprecated
> {noformat}
> We should fix these (and other deprecated APIs when we run on other JDK versions and other Guava versions), then add a nightly check that none are added back.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)