Skip to content

Update language level to JDK 17#3967

Draft
alecgrieser wants to merge 5 commits intoFoundationDB:mainfrom
alecgrieser:java-17-language-level
Draft

Update language level to JDK 17#3967
alecgrieser wants to merge 5 commits intoFoundationDB:mainfrom
alecgrieser:java-17-language-level

Conversation

@alecgrieser
Copy link
Collaborator

This updates the required project language level from 11 to 17, which is the next LTS version. This is a breaking change, in that downstream projects will need to update their language level to match. As a benefit, though, we get to use JDK 17 features that we've previously refrained from using for backwards compatibility reasons. To showcase this, I've updated some of our test files to use text blocks to more naturally specify the schema template, and I've updated one callsite to use Stream::toList instead of Collectors::toList.

This resolves #2360.

This updates the required project language level from 11 to 17, which is the next LTS version. This is a breaking change, in that downstream projects will need to update their language level to match. As a benefit, though, we get to use JDK 17 features that we've previously refrained from using for backwards compatibility reasons. To showcase this, I've updated some of our test files to use text blocks to more naturally specify the schema template, and I've updated one callsite to use `Stream::toList` instead of `Collectors::toList`.

This resolves FoundationDB#2360.
@alecgrieser alecgrieser added breaking change Changes that are not backwards compatible build improvement Improvement to the build system labels Feb 24, 2026
create index t3_i4 as select count(col2) from t3 group by col1
create index t3_i5 as select sum(col1) from t3
create index t3_i6 as select sum(col1) from t3 group by col2
""";
Copy link
Contributor

Choose a reason for hiding this comment

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

🤩

<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="javax.annotation.Nullable" />
<option name="myDefaultNotNull" value="javax.annotation.Nonnull" />
<option name="myOrdered" value="true" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably don't want that one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you know what it does? This is something that the IDE added for me when I updated the JDK version. I can take it out, but I'd prefer to know what exactly it was doing

Copy link
Collaborator

@MMcM MMcM Feb 26, 2026

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay, that sounds like we should include it then. This also adds a few more elements to the list, but that sounds fine, as it just means the static analysis is able to understand more of our dependencies' annotations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Changes that are not backwards compatible build improvement Improvement to the build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to JDK 17

3 participants