Merge conditions using the same blocks.
This commit is contained in:
parent
6b4d75f725
commit
10f1f977dd
|
@ -535,9 +535,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
|
||||||
* @param node the node that was added
|
* @param node the node that was added
|
||||||
*/
|
*/
|
||||||
protected void nodeInserted(final Node<E> node) {
|
protected void nodeInserted(final Node<E> node) {
|
||||||
if (node.previous == current) {
|
if ((node.previous == current) || (next.previous == node)) {
|
||||||
next = node;
|
|
||||||
} else if (next.previous == node) {
|
|
||||||
next = node;
|
next = node;
|
||||||
} else {
|
} else {
|
||||||
nextIndexValid = false;
|
nextIndexValid = false;
|
||||||
|
|
Loading…
Reference in New Issue