Github user franz1981 commented on the issue:
https://github.com/apache/activemq-artemis/pull/2488
@michaelandrepearce Yep, I have written it everytime while reading the code
mate, sorry :)
Yes I do understand the bits related to byte vs int (and I agree) and
related to `Iterator:.reset` too (i agree there too).
Just I'm concerned about reducing as much as possible the code complexity
by having "inherited" a custom "CopyOnWriteArrayList".
I can't say if is better to simplify it as much as possible to get what we
really need or just having this custom version of it as we are doing now.
Using a final static `MethodHandle` to steal the array when we need it
could be not such a bad solution too: I'm not a fan of `reflection-magic-like`
things but I admit that it could avoid to copy an entire implementation just
for 1 or 2 missing methods.
---