ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ArrayDeque.java
(Generate patch)

Comparing jsr166/src/main/java/util/ArrayDeque.java (file contents):
Revision 1.77 by jsr166, Tue Oct 18 00:33:05 2016 UTC vs.
Revision 1.78 by jsr166, Tue Oct 18 17:31:18 2016 UTC

# Line 902 | Line 902 | public class ArrayDeque<E> extends Abstr
902              }
903              return deleted > 0;
904          } catch (Throwable ex) {
905 <            for (; remaining > 0;
906 <                 remaining--, i = inc(i, capacity), j = inc(j, capacity))
907 <                elements[j] = elements[i];
905 >            if (deleted > 0)
906 >                for (; remaining > 0;
907 >                     remaining--, i = inc(i, capacity), j = inc(j, capacity))
908 >                    elements[j] = elements[i];
909              throw ex;
910          } finally {
911              size -= deleted;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines