169 |
|
() -> d.push(null), |
170 |
|
() -> d.descendingIterator().forEachRemaining(null)); |
171 |
|
} |
172 |
< |
if (!impl.permitsNulls() && c instanceof BlockingQueue) { |
172 |
> |
if (c instanceof BlockingQueue) { |
173 |
|
BlockingQueue q = (BlockingQueue) c; |
174 |
|
assertThrows( |
175 |
|
NullPointerException.class, |
177 |
|
try { q.offer(null, 1L, MILLISECONDS); } |
178 |
|
catch (InterruptedException ex) { |
179 |
|
throw new AssertionError(ex); |
180 |
+ |
}}, |
181 |
+ |
() -> { |
182 |
+ |
try { q.put(null); } |
183 |
+ |
catch (InterruptedException ex) { |
184 |
+ |
throw new AssertionError(ex); |
185 |
|
}}); |
186 |
|
} |
187 |
< |
if (!impl.permitsNulls() && c instanceof BlockingDeque) { |
187 |
> |
if (c instanceof BlockingDeque) { |
188 |
|
BlockingDeque q = (BlockingDeque) c; |
189 |
|
assertThrows( |
190 |
|
NullPointerException.class, |
197 |
|
try { q.offerLast(null, 1L, MILLISECONDS); } |
198 |
|
catch (InterruptedException ex) { |
199 |
|
throw new AssertionError(ex); |
200 |
+ |
}}, |
201 |
+ |
() -> { |
202 |
+ |
try { q.putFirst(null); } |
203 |
+ |
catch (InterruptedException ex) { |
204 |
+ |
throw new AssertionError(ex); |
205 |
+ |
}}, |
206 |
+ |
() -> { |
207 |
+ |
try { q.putLast(null); } |
208 |
+ |
catch (InterruptedException ex) { |
209 |
+ |
throw new AssertionError(ex); |
210 |
|
}}); |
211 |
|
} |
212 |
|
} |