RFR: 8303755: Clean up around JavacElements.getAllMembers [v3]
Pavel Rappo
prappo at openjdk.org
Wed Mar 8 10:25:55 UTC 2023
On Wed, 8 Mar 2023 10:05:03 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/util/Iterators.java line 83:
>>
>>> 81: }
>>> 82:
>>> 83: // Iterator is assumed to never return null from next()
>>
>> Not sure about this comment - it seems to explain what is wrong in the code that is removed?
>
> It's a coincidence: it just happens so that the removed code also implements Iterator.next() by returning null unconditionally. But that comment and the removed code are unrelated.
>
> That comment captures the fact that the filter iterator _below_ that comment relies on the input iterator never to return null from input.next().
I clarified that comment in cf90819.
-------------
PR: https://git.openjdk.org/jdk/pull/12904
More information about the compiler-dev
mailing list