[cvs] / jsr166 / src / test / tck / ArrayBlockingQueueTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/ArrayBlockingQueueTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.66, Sat May 23 00:53:08 2015 UTC revision 1.67, Sun May 24 01:23:17 2015 UTC
# Line 629  Line 629 
629    
630      void checkToArray2(ArrayBlockingQueue q) {      void checkToArray2(ArrayBlockingQueue q) {
631          int size = q.size();          int size = q.size();
632          Integer[] a1 = size == 0 ? null : new Integer[size-1];          Integer[] a1 = (size == 0) ? null : new Integer[size - 1];
633          Integer[] a2 = new Integer[size];          Integer[] a2 = new Integer[size];
634          Integer[] a3 = new Integer[size+2];          Integer[] a3 = new Integer[size+2];
635          if (size > 0) Arrays.fill(a1, 42);          if (size > 0) Arrays.fill(a1, 42);
636          Arrays.fill(a2, 42);          Arrays.fill(a2, 42);
637          Arrays.fill(a3, 42);          Arrays.fill(a3, 42);
638          Integer[] b1 = size == 0 ? null : (Integer[]) q.toArray(a1);          Integer[] b1 = (size == 0) ? null : (Integer[]) q.toArray(a1);
639          Integer[] b2 = (Integer[]) q.toArray(a2);          Integer[] b2 = (Integer[]) q.toArray(a2);
640          Integer[] b3 = (Integer[]) q.toArray(a3);          Integer[] b3 = (Integer[]) q.toArray(a3);
641          assertSame(a2, b2);          assertSame(a2, b2);

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8