579 |
|
private E xfer(E e, boolean haveData, int how, long nanos) { |
580 |
|
if (haveData && (e == null)) |
581 |
|
throw new NullPointerException(); |
582 |
+ |
Node s = null; // the node to append, if needed |
583 |
|
|
584 |
|
restartFromHead: for (;;) { |
585 |
|
for (Node h = head, p = h; p != null;) { // find & match first node |
609 |
|
} |
610 |
|
|
611 |
|
if (how != NOW) { // No matches available |
612 |
< |
Node s = new Node(e); |
612 |
> |
if (s == null) |
613 |
> |
s = new Node(e); |
614 |
|
Node pred = tryAppend(s, haveData); |
615 |
|
if (pred == null) |
616 |
|
continue restartFromHead; // lost race vs opposite mode |