mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8270160: Remove redundant bounds check from AbstractStringBuilder.charAt()
Reviewed-by: redestad
This commit is contained in:
parent
6c4c48faea
commit
2536e4342e
2 changed files with 1 additions and 4 deletions
|
@ -349,9 +349,8 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
|
|||
*/
|
||||
@Override
|
||||
public char charAt(int index) {
|
||||
checkIndex(index, count);
|
||||
if (isLatin1()) {
|
||||
return (char)(value[index] & 0xff);
|
||||
return StringLatin1.charAt(value, index);
|
||||
}
|
||||
return StringUTF16.charAt(value, index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue