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.14 by jsr166, Sun Nov 6 03:35:25 2016 UTC vs.
Revision 1.15 by jsr166, Sun Nov 6 04:15:45 2016 UTC

# Line 169 | Line 169 | public class Collection8Test extends JSR
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,
# Line 177 | Line 177 | public class Collection8Test extends JSR
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,
# Line 192 | Line 197 | public class Collection8Test extends JSR
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      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines