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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java (file contents):
Revision 1.64 by jsr166, Sat Feb 21 17:15:00 2015 UTC vs.
Revision 1.65 by jsr166, Wed Mar 4 00:22:30 2015 UTC

# Line 1204 | Line 1204 | public class ConcurrentLinkedDeque<E>
1204              if (size == 0)
1205                  return "[]";
1206  
1207 <            // Copy each string into a perfectly sized char[]
1208 <            final char[] chars = new char[charLength + 2 * size];
1209 <            chars[0] = '[';
1210 <            int j = 1;
1211 <            for (int i = 0; i < size; i++) {
1212 <                if (i > 0) {
1213 <                    chars[j++] = ',';
1214 <                    chars[j++] = ' ';
1215 <                }
1216 <                String s = a[i];
1217 <                int len = s.length();
1218 <                s.getChars(0, len, chars, j);
1219 <                j += len;
1220 <            }
1221 <            chars[j] = ']';
1222 <            return new String(chars);
1207 >            return Helpers.toString(a, size, charLength);
1208          }
1209      }
1210  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines