ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/extra/ReadMostlyVector.java
(Generate patch)

Comparing jsr166/src/jsr166e/extra/ReadMostlyVector.java (file contents):
Revision 1.29 by jsr166, Fri Oct 12 16:23:28 2012 UTC vs.
Revision 1.30 by jsr166, Fri Oct 12 16:27:47 2012 UTC

# Line 172 | Line 172 | public class ReadMostlyVector<E>
172      static int findFirstIndex(Object[] items, Object x, int index, int fence) {
173          int len;
174          if (items != null && (len = items.length) > 0) {
175 <            int start = (index < 0)? 0 : index;
175 >            int start = (index < 0) ? 0 : index;
176              int bound = (fence < len) ? fence : len;
177              for (int i = start; i < bound; ++i) {
178                  Object e = items[i];
# Line 406 | Line 406 | public class ReadMostlyVector<E>
406                  sb.append('[');
407                  for (;;) {
408                      Object e = items[i];
409 <                    sb.append((e == this)? "(this Collection)" : e.toString());
409 >                    sb.append((e == this) ? "(this Collection)" : e.toString());
410                      if (++i < fence)
411                          sb.append(',').append(' ');
412                      else
# Line 1039 | Line 1039 | public class ReadMostlyVector<E>
1039              long stamp = lock.writeLock();
1040              try {
1041                  Object[] items = array;
1042 <                int cap = (items == null)? 0 : items.length;
1042 >                int cap = (items == null) ? 0 : items.length;
1043                  if (minCapacity - cap > 0)
1044                      grow(minCapacity);
1045              } finally {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines