-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Backport H2 to java8 #4250
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
Draft
toolforger
wants to merge
22
commits into
h2database:master
Choose a base branch
from
toolforger:backport-java8
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Backport H2 to java8 #4250
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, downgrade Lucene back to 8.5.2, which was built for Java 8 bytecode.
Java 8 type inference is weaker than in newer Javas.
Map.of() -> Collections.emptyMap() List.of(x) -> Collections.singletonList(x) List.of(...) -> Arrays.asList(...)
We exploit that .ofNullable()...filter(Objects.nonNull) is equivalent to .of()...filter(Objects.nonNull)
TCP_QUICKACK is supported only in Java 10 or later.
These were added to JdbcStatement in Java 9. I.e. they cannot be used by a Java 8 application, so removal is the correct choice.
There was a SecurityManager in some situations, and Unsafe is not allowed there unless you fight for it. Given that the tests actually run faster without these, using Unsafe just is not worth it.
VarHandle is far too generic and feature-rich to backport. Updatable-view classes ByteArrayAs(Int|Float)Array were enough for H2.
# Conflicts: # h2/src/test/org/h2/test/scripts/functions/numeric/random-uuid.sql
StackWalker is not yet available in Java 8, so we stick with the previous implementation. This reverts commit f0fdc19.
I would be ok with just keeping this on a separate branch, and then you can merge/etc new stuff to that branch. |
"Draft" seems better than "PR" until the H2 team has made a decision. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At-your-discretion PR
I just finished backporting H2 to Java 8.
This PR contains the results, both to let you officially know, and for you to decide what to do with it:
Deal with it at your discretion; options that I see are:
This might be of interest if there is interest from other users than the one that sponsored my work.
I'll be continuing work as long as somebody sponsors this.
Sponsorship would be cheap, backporting last year's updates was less than a day's work.
You'd probably want to clearly say that the backport is independent of the H2 project and any questions should be directed at me, not at the H2 team.
I am totally fine with that!
Improvement suggestions gladly accepted!
Including any that make it better conform to H2 conventions. H2 contributors should feel right at home whenever they have reason to work on the code.