On 12.05.2015 20:34, Martin Buchholz wrote:
Hi Ivan,

The code below looks wrong to me - sb.length() resolves to sb.count, not v2.length. If I'm correct, then there's a missing test to be added, since this error should be caught by some test.
      private boolean nonSyncContentEquals(AbstractStringBuilder sb) {
-        char v1[] = value;
-        char v2[] = sb.getValue();
+        char[] v1 = value;
+        char[] v2 = sb.getValue();
          int n = v1.length;
-        if (n != sb.length()) {
+        if (n != v2.length) {
              return false;
          }

Yes, of course you're right. This change looked so "obviously correct" to me, that I didn't care to run the tests before posting the webrev :-(

I've reverted this change back:
http://cr.openjdk.java.net/~igerasim/8071571/01/webrev/

Sincerely yours,
Ivan


On Mon, May 11, 2015 at 1:52 PM, Ivan Gerasimov <ivan.gerasi...@oracle.com <mailto:ivan.gerasi...@oracle.com>> wrote:

    I have to take over this fix.

    The latest webrev from the review thread above (with a few minor
    changes) is here:
    http://cr.openjdk.java.net/~igerasim/8071571/00/webrev/
    <http://cr.openjdk.java.net/%7Eigerasim/8071571/00/webrev/>

    Would you please review/approve the fix at your convenience?

    Sincerely yours,
    Ivan



Reply via email to