On Fri, 8 Sep 2023 16:13:16 GMT, Per Minborg <pminb...@openjdk.org> wrote:
>> This PR proposes to slightly improve some iterators of `AbstractMap`: >> >> * Declare two fields `final` >> * Use distinct classes rather than anonymous classes > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Fix additional formating issue > - Don't use polymorphism and reformat code Marked as reviewed by smarks (Reviewer). src/java.base/share/classes/java/util/AbstractMap.java line 901: > 899: > 900: // Iterator implementations. > 901: // Here, we avoid polymorphism to ensure full VM optimization > capabilities. I would remove this comment about avoiding polymorphism, since I think it's a total red herring and is potentially confusing. Otherwise this is fine. ------------- PR Review: https://git.openjdk.org/jdk/pull/15615#pullrequestreview-1671892215 PR Review Comment: https://git.openjdk.org/jdk/pull/15615#discussion_r1355366295