Triggered by gh-25650 which replaces LinkedList all over the place in the 5.3 codebase, we've identified several spots where the use of ArrayDeque instead of LinkedList specifically avoids performance issues (e.g. for a larger number of elements). In particular, StringUtils.cleanPath, FastByteArrayOutputStream and ParseState benefit from such a change in the 5.2.x line as well.