Skip to content

Commit 28c5478

Browse files
committed
use charAt() because length() is number of chars
1 parent 23c3a7a commit 28c5478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mug-errorprone/src/main/java/com/google/mu/errorprone/Placeholder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public String toString() {
5353
// Find the full line surrounding the placeholder.
5454
int snippetStart = match.index();
5555
int snippetEnd = match.index() + match.length();
56-
while (snippetStart > 0 && context.codePointAt(snippetStart - 1) != '\n') {
56+
while (snippetStart > 0 && context.charAt(snippetStart - 1) != '\n') {
5757
snippetStart--;
5858
}
59-
while (snippetEnd < context.length() && context.codePointAt(snippetEnd) != '\n') {
59+
while (snippetEnd < context.length() && context.charAt(snippetEnd) != '\n') {
6060
snippetEnd++;
6161
}
6262

0 commit comments

Comments
 (0)