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

Comparing jsr166/src/jsr166e/extra/AtomicDoubleArray.java (file contents):
Revision 1.1 by jsr166, Wed Aug 10 02:03:29 2011 UTC vs.
Revision 1.2 by jsr166, Thu Oct 20 16:33:25 2011 UTC

# Line 162 | Line 162 | public class AtomicDoubleArray implement
162       * if the current value is <a href="#bitEquals">bitwise equal</a>
163       * to the expected value.
164       *
165 <     * <p>May <a href="package-summary.html#Spurious">fail spuriously</a>
165 >     * <p>May <a
166 >     * href="http://download.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/package-summary.html#Spurious">
167 >     * fail spuriously</a>
168       * and does not provide ordering guarantees, so is only rarely an
169       * appropriate alternative to {@code compareAndSet}.
170       *
# Line 222 | Line 224 | public class AtomicDoubleArray implement
224          if (iMax == -1)
225              return "[]";
226  
227 <        StringBuilder b = new StringBuilder();
227 >        // Double.toString(Math.PI).length() == 17
228 >        StringBuilder b = new StringBuilder((17 + 2) * (iMax + 1));
229          b.append('[');
230 <        for (int i = 0; ; i++) {
230 >        for (int i = 0;; i++) {
231              b.append(longBitsToDouble(getRaw(byteOffset(i))));
232              if (i == iMax)
233                  return b.append(']').toString();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines