1
0
mirror of https://github.com/google/nomulus synced 2026-02-04 03:52:33 +00:00

Replace deprecated CharMatcher method

CharMatcher.isLetterOrDigit() is deprecated for failing to support
supplementary characters. We explicitly declare a matcher for ascii
letters and digits.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=252671830
This commit is contained in:
weiminyu
2019-06-11 12:16:16 -07:00
committed by jianglai
parent 00c7c0f1af
commit d7da7f6da4
4 changed files with 76 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ public final class SqlTemplate {
Pattern.compile("(['\"]?)%(" + KEY_PATTERN + ")%(['\"]?)");
private static final CharMatcher LEGAL_SUBSTITUTIONS =
CharMatcher.javaLetterOrDigit().or(CharMatcher.anyOf("-_.,: "));
JavaCharMatchers.asciiLetterOrDigitMatcher().or(CharMatcher.anyOf("-_.,: "));
/** Returns a new immutable SQL template builder object, for query parameter substitution. */
public static SqlTemplate create(String template) {