[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: remove redundant loop in StringBuffer
From: |
Tom Tromey |
Subject: |
Re: Patch: remove redundant loop in StringBuffer |
Date: |
24 Feb 2004 09:25:25 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> "Anthony" == Anthony Green <address@hidden> writes:
Anthony> No, I don't think so. That's what I meant in my comment by
Anthony> "No part of StringBuffer depends on padding out the rest of
Anthony> the StringBuffer with '\0'". I looked through the code and
Anthony> couldn't find where this would matter.
Suppose you do:
sb = new StringBuffer ("abcdefgh");
sb.setLength(1);
sb.setLength(3);
sb.toString();
I think the result should be "a\0\0", not "abc". This is why the loop
matters.
Tom