Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Java 8 for JDBC driver target compatibility version #82274

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

mark-vieira
Copy link
Contributor

Updates the JDBC driver to compile against Java 8 for compatibility reasons. Some updates were made to remove references to post-Java 8 APIs.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Should there be any checks to prevent usage of non JDK 1.8 APIs?

@mark-vieira
Copy link
Contributor Author

Should there be any checks to prevent usage of non JDK 1.8 APIs?

This is accomplished by way of passing the -release flag to javac during compilation. Things like using String#repeat and Map#copyOf failed at compile time for this reason.

@mark-vieira mark-vieira merged commit 55dd861 into elastic:master Jan 6, 2022
@mark-vieira mark-vieira deleted the jdbc_java_8 branch January 6, 2022 18:28
mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Jan 6, 2022
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.0

astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
astefan pushed a commit to astefan/elasticsearch that referenced this pull request Jan 7, 2022
arteam added a commit to arteam/elasticsearch that referenced this pull request Jan 10, 2022
It was updated to Java 8 compatibility in elastic#82274
arteam added a commit that referenced this pull request Jan 10, 2022
It was updated to Java 8 compatibility in #82274
arteam added a commit to arteam/elasticsearch that referenced this pull request Jan 10, 2022
It was updated to Java 8 compatibility in elastic#82274

(cherry picked from commit 78509f4)
arteam added a commit that referenced this pull request Jan 10, 2022
JEP 361[https://openjdk.java.net/jeps/361] added support for switch expressions
which can be much more terse and less error-prone than switch statements.

Another useful feature of switch expressions is exhaustiveness: we can make
sure that an enum switch expression covers all the cases at compile time.

(cherry picked from commit 0699c93)

* Rollback switch expressions for the SQL plugin (#82349)

It was updated to Java 8 compatibility in #82274

(cherry picked from commit 78509f4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants