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

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

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

revision 1.36, Sat May 23 00:53:08 2015 UTC revision 1.37, Sun May 24 01:23:17 2015 UTC
# Line 660  Line 660 
660    
661      void checkToArray2(ArrayDeque q) {      void checkToArray2(ArrayDeque q) {
662          int size = q.size();          int size = q.size();
663          Integer[] a1 = size == 0 ? null : new Integer[size-1];          Integer[] a1 = (size == 0) ? null : new Integer[size - 1];
664          Integer[] a2 = new Integer[size];          Integer[] a2 = new Integer[size];
665          Integer[] a3 = new Integer[size+2];          Integer[] a3 = new Integer[size+2];
666          if (size > 0) Arrays.fill(a1, 42);          if (size > 0) Arrays.fill(a1, 42);
667          Arrays.fill(a2, 42);          Arrays.fill(a2, 42);
668          Arrays.fill(a3, 42);          Arrays.fill(a3, 42);
669          Integer[] b1 = size == 0 ? null : (Integer[]) q.toArray(a1);          Integer[] b1 = (size == 0) ? null : (Integer[]) q.toArray(a1);
670          Integer[] b2 = (Integer[]) q.toArray(a2);          Integer[] b2 = (Integer[]) q.toArray(a2);
671          Integer[] b3 = (Integer[]) q.toArray(a3);          Integer[] b3 = (Integer[]) q.toArray(a3);
672          assertSame(a2, b2);          assertSame(a2, b2);

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8