ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/Collection8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/Collection8Test.java (file contents):
Revision 1.57 by jsr166, Fri Jun 22 00:04:58 2018 UTC vs.
Revision 1.58 by jsr166, Fri Feb 22 19:27:47 2019 UTC

# Line 210 | Line 210 | public class Collection8Test extends JSR
210              BlockingQueue q = (BlockingQueue) c;
211              assertThrows(
212                  NullPointerException.class,
213 <                () -> {
214 <                    try { q.offer(null, 1L, HOURS); }
215 <                    catch (InterruptedException ex) {
216 <                        throw new AssertionError(ex);
217 <                    }},
218 <                () -> {
219 <                    try { q.put(null); }
220 <                    catch (InterruptedException ex) {
221 <                        throw new AssertionError(ex);
222 <                    }});
213 >                () -> q.offer(null, 1L, HOURS),
214 >                () -> q.put(null));
215          }
216          if (c instanceof BlockingDeque) {
217              BlockingDeque q = (BlockingDeque) c;
218              assertThrows(
219                  NullPointerException.class,
220 <                () -> {
221 <                    try { q.offerFirst(null, 1L, HOURS); }
222 <                    catch (InterruptedException ex) {
223 <                        throw new AssertionError(ex);
232 <                    }},
233 <                () -> {
234 <                    try { q.offerLast(null, 1L, HOURS); }
235 <                    catch (InterruptedException ex) {
236 <                        throw new AssertionError(ex);
237 <                    }},
238 <                () -> {
239 <                    try { q.putFirst(null); }
240 <                    catch (InterruptedException ex) {
241 <                        throw new AssertionError(ex);
242 <                    }},
243 <                () -> {
244 <                    try { q.putLast(null); }
245 <                    catch (InterruptedException ex) {
246 <                        throw new AssertionError(ex);
247 <                    }});
220 >                () -> q.offerFirst(null, 1L, HOURS),
221 >                () -> q.offerLast(null, 1L, HOURS),
222 >                () -> q.putFirst(null),
223 >                () -> q.putLast(null));
224          }
225      }
226  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines