[ 
https://issues.apache.org/jira/browse/CALCITE-5737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728481#comment-17728481
 ] 

Sergey Nuyanzin commented on CALCITE-5737:
------------------------------------------

it looks like for JDK20 it will be a bit more tricky...

In case of JDK20 there are several issues:
1. {{URL}} constructors are deprecated
{noformat}
java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String)
java.net.URL#URL(java.lang.String, java.lang.String, java.lang.String)
java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String, 
java.net.URLStreamHandler)
java.net.URL#URL(java.lang.String)
java.net.URL#URL(java.net.URL, java.lang.String)
java.net.URL#URL(java.net.URL, java.lang.String, java.net.URLStreamHandler)
{noformat}
2. Some changes on gradle level
3. For some reason {{javac}} with {{-Xlint:deprecation}} started to complain 
about methods with {{@deprecated}} in javadoc and not marked with corresponding 
annotation.
Usually there is a separate {{Xlint}} flag for that {{-Xlint:dep-ann}}. The 
main problem for that is that it detects a couple of methods in 
{{org.apache.calcite.sql.parser.parserextensiontesting.SimpleCharStream}} 
generated by JavaCC and currently no idea how to exclude generated code here... 
As a WA turn off it with {{-Xlint:-dep-ann}} so that {{-Xlint:deprecation}} 
keeps working.
4. Several more deprecation were added by forbiddenapis. It looks like there 
are some usages however the code is never invoked at least during tests
{noformat}
The whole classes java.security.AccessController
java.lang.reflect.AccessibleObject#isAccessible 
{noformat}

> Support JDK 19, JDK 20
> ----------------------
>
>                 Key: CALCITE-5737
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5737
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>             Fix For: 1.35.0
>
>
> Support JDK 19, JDK 20.
> We currently support JDK (and OpenJDK) versions up to 18. JDK 20 is the 
> latest. We should support it in Calcite 1.35.
> This change would modify history.md (for the upcoming release), add JDK 20 to 
> the GitHub CI, and fix the build. I see a couple of deprecation warnings 
> compiling under JDK 19:
> {noformat}
> core/src/main/java/org/apache/calcite/util/Util.java:1723: warning: 
> [deprecation] Locale(String) in Locale has been deprecated
>       return new Locale(strings[0]);
>              ^
> core/src/main/java/org/apache/calcite/util/Util.java:1725: warning: 
> [deprecation] Locale(String,String) in Locale has been deprecated
>       return new Locale(strings[0], strings[1]);
>              ^
> core/src/main/java/org/apache/calcite/util/Util.java:1727: warning: 
> [deprecation] Locale(String,String,String) in Locale has been deprecated
>       return new Locale(strings[0], strings[1], strings[2]);
>              ^
> error: warnings found and -Werror specified
> core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java:744: 
> warning: [deprecation] Locale(String) in Locale has been deprecated
>       locale = new Locale(localeParts[0]);
>                ^
> core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java:746: 
> warning: [deprecation] Locale(String,String) in Locale has been deprecated
>       locale = new Locale(localeParts[0], localeParts[1]);
>                ^
> core/src/main/java/org/apache/calcite/sql/parser/SqlParserUtil.java:748: 
> warning: [deprecation] Locale(String,String,String) in Locale has been 
> deprecated
>       locale = new Locale(localeParts[0], localeParts[1], localeParts[2]);
>                ^
> {noformat}
> These definitely need to be fixed. I don't know whether there's anything else.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to