59 |
|
|
60 |
|
Object bomb() { |
61 |
|
return new Object() { |
62 |
< |
public boolean equals(Object x) { throw new AssertionError(); } |
63 |
< |
public int hashCode() { throw new AssertionError(); } |
64 |
< |
}; |
62 |
> |
public boolean equals(Object x) { throw new AssertionError(); } |
63 |
> |
public int hashCode() { throw new AssertionError(); } |
64 |
> |
}; |
65 |
|
} |
66 |
|
|
67 |
|
/** Checks properties of empty collections. */ |
140 |
|
} |
141 |
|
if (c instanceof BlockingQueue) { |
142 |
|
BlockingQueue q = (BlockingQueue) c; |
143 |
< |
assertNull(q.poll(0L, MILLISECONDS)); |
143 |
> |
assertNull(q.poll(randomExpiredTimeout(), randomTimeUnit())); |
144 |
|
} |
145 |
|
if (c instanceof BlockingDeque) { |
146 |
|
BlockingDeque q = (BlockingDeque) c; |
147 |
< |
assertNull(q.pollFirst(0L, MILLISECONDS)); |
148 |
< |
assertNull(q.pollLast(0L, MILLISECONDS)); |
147 |
> |
assertNull(q.pollFirst(randomExpiredTimeout(), randomTimeUnit())); |
148 |
> |
assertNull(q.pollLast(randomExpiredTimeout(), randomTimeUnit())); |
149 |
|
} |
150 |
|
} |
151 |
|
|