StringBuffer.java (replace): Calculate length for arraycopy() correctly.
2000-05-10 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/StringBuffer.java (replace): Calculate length for arraycopy() correctly. From-SVN: r33822
This commit is contained in:
parent
ede1dbac05
commit
ac83e16bc4
2 changed files with 3 additions and 1 deletions
|
@ -519,7 +519,7 @@ public final class StringBuffer implements Serializable
|
|||
ensureCapacity_unsynchronized (count + delta);
|
||||
|
||||
if (delta != 0 && end < count)
|
||||
System.arraycopy(value, end, value, end + delta, count - start);
|
||||
System.arraycopy(value, end, value, end + delta, count - end);
|
||||
|
||||
str.getChars (0, len, value, start);
|
||||
count += delta;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue