You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Thomas Broyer, Tino Desjardins, Ahmad K. Bawaneh, Alexander Leshkin, Adrien Baron, Eduardo Guardiola, yadavharsh, Matthew Davis and NΓ‘ndor ElΕd Fekete
I'm going to try to help with this missing emulation. I have made a pretty trivial PR just as starting point, and also, hehe it is an interface that I'm interested in πa reactive interface in the JRE. https://gwt-review.googlesource.com/c/gwt/+/21420
Reacted by Tino Desjardins, Colin Alworth, Ahmad K. Bawaneh, NΓ‘ndor ElΕd Fekete and Alexander Leshkin
Awesome! I've got the ones in my comment all written (and tests for about half of them), will try to get that batch up for review soon. The hard part at the moment is getting the tests to actually compile, as that requires using a java10+ jdk, which our current set of build scripts can't run on yet.
I've got this fork which refactors everything into modules (for use in maven, but gradle would be just as easy), maybe its time to pick that back up and finish it off...
@jnehlmeier when we started, it was from a list you had made as I recall, and were picking out existing classes that were missing methods/etc. My goal for 2.11 was to at least finish off bringing those existing types up to Java 11 compatibility, so that 2.12 can drop Java 8 support (at least for compiling to JS) and target Java 17 features, then backfill from there on emulation. From my perspective, with these closed, we should finalize any PRs that are going to get more testing, and then cut a release, and then bump JDT and Jetty to whatever we can reasonably manage.
But I'd be happy closing the door on this particular issue, and following up with specific other emulation later.
@jnehlmeier when we started, it was from a list you had made as I recall, and were picking out existing classes that were missing methods/etc. My goal for 2.11 was to at least finish off bringing those existing types up to Java 11 compatibility, so that 2.12 can drop Java 8 support (at least for compiling to JS) and target Java 17 features, then backfill from there on emulation. From my perspective, with these closed, we should finalize any PRs that are going to get more testing, and then cut a release, and then bump JDT and Jetty to whatever we can reasonably manage.
But I'd be happy closing the door on this particular issue, and following up with specific other emulation later.
@niloc132 Ok, then we are still missing some stuff in existing classes. But curating a list manually is always pretty time consuming. Maybe we should develop a tool that automates it. I once did a diff using Jdiff but because that tool is so old it was pretty annoying to get it running. Also the output is far from being instantly usable. Based on that diff I started jnehlmeier#15 but it is far from complete and also outdated right now.
With completion of #9860, which as far as I can tell covers the remaining items mentioned in this ticket, I'm going to close this. We can open other tickets to list additional missing APIs, but there are tons of PRs already tied to this, and all closed for the moment.
Activity
niloc132 commentedon Mar 28, 2018
As this seems to be the only jre+java9 issue so far, adding this too: http://openjdk.java.net/jeps/269
niloc132 commentedon Oct 18, 2018
Additions so far:
java.util.List
of(with its zero-10 overloads, plus a varargs overload)List copyOf(Collection)(Java 10)java.util.Map
of(with its zero-10 key/value pair overloads, plus a varargs overload)entry(K, V)ofEntries(Entry...)Map copyOf(Map)(Java 10)java.util.Set
of(with its zero-10 overloads, plus a varargs overload)Set copyOf(Collection)(Java 10)java.util.stream.Stream
static Stream<T> iterate(T, Predicate<T>, UnaryOperator<T>)static Stream<T> ofNullable(T)Stream<T> dropWhile(Predicate<T>)Stream<T> takeWhile(Predicate<T>)java.util.stream.Collectors
static Collector flatMapping(Function, Collector)static Collector filtering(Predicate, Collector)static Collector toUnmodifiableMap()(Java 10)static Collector toUnmodifiableList()(Java 10)static Collector toUnmodifiableSet()(Java 10)Anything I'm missing?
[-]Java 9 stream API extension [/-][+]Java 9, 10 JRE Emulation [/+]axls commentedon Oct 18, 2018
java.util.Enumeration
asIterator()java.util.Optional
ifPresentOrElse(Consumer, Runnable)or(Supplier)stream()orElseThrow()(Java 10)ibaca commentedon Oct 27, 2018
I'm going to try to help with this missing emulation. I have made a pretty trivial PR just as starting point, and also, hehe it is an interface that I'm interested in πa reactive interface in the JRE.
https://gwt-review.googlesource.com/c/gwt/+/21420
niloc132 commentedon Oct 27, 2018
Awesome! I've got the ones in my comment all written (and tests for about half of them), will try to get that batch up for review soon. The hard part at the moment is getting the tests to actually compile, as that requires using a java10+ jdk, which our current set of build scripts can't run on yet.
I've got this fork which refactors everything into modules (for use in maven, but gradle would be just as easy), maybe its time to pick that back up and finish it off...
Emulate java.util.concurrent.Flow
Emulate java.util.concurrent.Flow
abashev commentedon Aug 21, 2020
Missed API from Java 11
java.util.Optional
isEmpty()[-]Java 9, 10 JRE Emulation [/-][+]Java 9, 10, 11 JRE Emulation [/+]abashev commentedon Aug 23, 2020
There is my PR https://gwt-review.googlesource.com/c/gwt/+/22740 for Optional.isEmpty
abashev commentedon Sep 13, 2020
@axls do I need something more to merge it into master branch?
16 remaining items
Add Java 9 Stream APIs (#9837)
niloc132 commentedon Nov 10, 2023
With the last PRs submitted for review, I think everything here is covered?
natros commentedon Nov 10, 2023
java.util.function.Predicate#not(java 11) ?niloc132 commentedon Nov 10, 2023
Thanks @natros, I don't think that made any of the lists I'd seen so far. Want to propose a patch?
natros commentedon Nov 10, 2023
I can try it over the weekend.
jnehlmeier commentedon Nov 10, 2023
@niloc132 How far do you want to go? All reasonable to emulate method additions of classes we already emulate?
niloc132 commentedon Nov 10, 2023
@jnehlmeier when we started, it was from a list you had made as I recall, and were picking out existing classes that were missing methods/etc. My goal for 2.11 was to at least finish off bringing those existing types up to Java 11 compatibility, so that 2.12 can drop Java 8 support (at least for compiling to JS) and target Java 17 features, then backfill from there on emulation. From my perspective, with these closed, we should finalize any PRs that are going to get more testing, and then cut a release, and then bump JDT and Jetty to whatever we can reasonably manage.
But I'd be happy closing the door on this particular issue, and following up with specific other emulation later.
natros commentedon Nov 12, 2023
#9862
Updated Enumeration emul for Java 9 (#9861)
jnehlmeier commentedon Nov 13, 2023
@niloc132 Ok, then we are still missing some stuff in existing classes. But curating a list manually is always pretty time consuming. Maybe we should develop a tool that automates it. I once did a diff using Jdiff but because that tool is so old it was pretty annoying to get it running. Also the output is far from being instantly usable. Based on that diff I started jnehlmeier#15 but it is far from complete and also outdated right now.
Add 'not' method to Predicate. (#9862)
niloc132 commentedon Dec 23, 2023
With completion of #9860, which as far as I can tell covers the remaining items mentioned in this ticket, I'm going to close this. We can open other tickets to list additional missing APIs, but there are tons of PRs already tied to this, and all closed for the moment.
Add Java 10 Collections APIs (#9904)
Add Java 10 Collectors APIs (gwtproject#9860)