On Tue, 14 Sep 2021 00:33:32 GMT, Bernd Eckenfels <e...@zusammenkunft.net> wrote:
>Maybe better use addFirst(), for example in CommandProcessor there is a >comment that order matters (did not check it more closely), so it?s probably >best to not reverse orders in any place? In all other places (except HTMLReader), iteration order don't matter. Stack only accessed via _classic_ well known stack operations: push, pop, peek. This methods work in the same way in ArrayDeque. So I think replacing with `addFirst` isn't necessary. ------------- PR: https://git.openjdk.java.net/jdk/pull/5294