0
0
mirror of https://github.com/TrianguloY/UrlChecker.git synced 2024-09-19 20:02:16 +02:00

Fix code analysis warnings

This commit is contained in:
blankie 2023-06-04 22:38:23 +07:00
parent 72f57e43d9
commit cb58f3f22e
No known key found for this signature in database
GPG Key ID: CC15FC822C7F61F5

View File

@ -248,16 +248,16 @@ class PatternDialog extends AModuleDialog {
appendTail(text, sb, appendPos);
return sb.toString();
}
return text.toString();
return text;
}
private static int appendReplacement(String text, Matcher matcher, StringBuffer sb, String replacement, int appendPos) {
// Copied from https://android.googlesource.com/platform/libcore/+/refs/heads/android13-release/ojluni/src/main/java/java/util/regex/Matcher.java#714
sb.append(text.substring(appendPos, matcher.start()));
appendEvaluated(matcher, sb, replacement);
appendPos = matcher.end();
int newAppendPos = matcher.end();
return appendPos;
return newAppendPos;
}
@TargetApi(Build.VERSION_CODES.O)