On Sat, 25 Mar 2023 07:25:33 GMT, Rémi Forax <fo...@openjdk.org> wrote:

>> Stuart Marks has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - More specification tweaks.
>>  - Add simple overrides to ArrayList.
>
> src/java.base/share/classes/java/util/LinkedHashSet.java line 297:
> 
>> 295:      */
>> 296:     public SequencedSet<E> reversed() {
>> 297:         class ReverseLinkedHashSetView extends AbstractSet<E> 
>> implements SequencedSet<E> {
> 
> This class should be declared `static` (and private) which means it should 
> not be declared inside reversed.

Can't be static because it uses type variable `E` and also refers to `this`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r1170751498

Reply via email to