RFR: 8301120: Cleanup utility classes java.util.Arrays and java.util.Collections [v2]
Joe Darcy
darcy at openjdk.org
Fri Jan 27 00:51:26 UTC 2023
On Fri, 27 Jan 2023 00:19:49 GMT, Stuart Marks <smarks at openjdk.org> wrote:
>> Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert cast removal
>
> src/java.base/share/classes/java/util/Collections.java line 1068:
>
>> 1066:
>> 1067: public Iterator<E> iterator() {
>> 1068: return new Iterator<>() {
>
> Interesting, this whole family of changes is now possible because the original version of diamond didn't allow it to be used in the context of an anonymous inner class, because of non-denotability of types or some such. That restriction has been relaxed, but we never went back to fix these up.
>
> I also note think that Martin objected to this sort of change in java.util.concurrent, but I'm OK with it here.
Yes, the improved version of diamond was
JDK-8062373: Project Coin: diamond and anonymous classes
as part of JEP 213.
-------------
PR: https://git.openjdk.org/jdk/pull/12207
More information about the core-libs-dev
mailing list