in src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java [205:221]
private Node<E> succ(Node<E> n) {
// Chains of deleted nodes ending in null or self-links
// are possible if multiple interior nodes are removed.
for (;;) {
final Node<E> s = nextNode(n);
if (s == null) {
return null;
}
if (s.item != null) {
return s;
}
if (s == n) {
return firstNode();
}
n = s;
}
}