mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8322512: StringBuffer.repeat does not work correctly after toString() was called
Reviewed-by: rriggs, jpai
This commit is contained in:
parent
c3cd1f1814
commit
df22fb322e
2 changed files with 16 additions and 1 deletions
|
@ -715,6 +715,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
|
|||
*/
|
||||
@Override
|
||||
public synchronized StringBuffer repeat(int codePoint, int count) {
|
||||
toStringCache = null;
|
||||
super.repeat(codePoint, count);
|
||||
return this;
|
||||
}
|
||||
|
@ -726,6 +727,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
|
|||
*/
|
||||
@Override
|
||||
public synchronized StringBuffer repeat(CharSequence cs, int count) {
|
||||
toStringCache = null;
|
||||
super.repeat(cs, count);
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue