The LinkedBlockingDeque has an interesting feature in addAll(), where they first build up the linked nodes and then add them all to the tail. However, a bug allowed us to overflow the size, resulting in a negative count. In this newsletter we look at this bug, and also how it was fixed in Java 26.| www.javaspecialists.eu
This advanced Java newsletter will answer all your questions about Java ;-) We also offer Java courses, code reviews and consulting.| www.javaspecialists.eu
LinkedHashSet implements the SequencedCollection interface, allowing us to addLast(), addFirst() and even reverse the collection. This sometimes causes some surprises.| www.javaspecialists.eu