# | Line 325 | Line 325 | public class SynchronousQueue<E> extends | |
---|---|---|
325 | qlock.unlock(); | |
326 | } | |
327 | ||
328 | < | if (mustWait) |
329 | < | return (E)node.waitForPut(); |
330 | < | |
328 | > | if (mustWait) { |
329 | > | Object x = node.waitForPut(); |
330 | > | return (E)x; |
331 | > | } |
332 | else { | |
333 | Object x = node.getItem(); | |
334 | if (x != null) | |
# | Line 366 | Line 367 | public class SynchronousQueue<E> extends | |
367 | qlock.unlock(); | |
368 | } | |
369 | ||
370 | < | if (mustWait) |
371 | < | return (E) node.waitForPut(nanos); |
372 | < | |
370 | > | if (mustWait) { |
371 | > | Object x = node.waitForPut(nanos); |
372 | > | return (E)x; |
373 | > | } |
374 | else { | |
375 | Object x = node.getItem(); | |
376 | if (x != null) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |