8302323: Add repeat methods to StringBuilder/StringBuffer

Reviewed-by: tvaleev, redestad
This commit is contained in:
Jim Laskey 2023-04-03 15:29:21 +00:00
parent dd7ca757a7
commit 9b9b5a7a5c
6 changed files with 571 additions and 5 deletions

View file

@ -708,6 +708,28 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
return this;
}
/**
* @throws IllegalArgumentException {@inheritDoc}
*
* @since 21
*/
@Override
public synchronized StringBuffer repeat(int codePoint, int count) {
super.repeat(codePoint, count);
return this;
}
/**
* @throws IllegalArgumentException {@inheritDoc}
*
* @since 21
*/
@Override
public synchronized StringBuffer repeat(CharSequence cs, int count) {
super.repeat(cs, count);
return this;
}
@Override
@IntrinsicCandidate
public synchronized String toString() {