quick fix for util method usage

This commit is contained in:
Ryan O'Neill 2015-08-06 14:20:47 -07:00
parent fd8d159919
commit f5e9354ba0

View File

@ -38,7 +38,7 @@ final class Tokenizer {
return "tab"; return "tab";
else if (codepoint == -1) else if (codepoint == -1)
return "end of file"; return "end of file";
else if (Character.isISOControl(codepoint)) else if (ConfigImplUtil.isC0Control(codepoint))
return String.format("control character 0x%x", codepoint); return String.format("control character 0x%x", codepoint);
else else
return String.format("%c", codepoint); return String.format("%c", codepoint);
@ -424,9 +424,6 @@ final class Tokenizer {
case 't': case 't':
sb.append('\t'); sb.append('\t');
break; break;
case '$':
sb.append("\\$");
break;
case 'u': { case 'u': {
// kind of absurdly slow, but screw it for now // kind of absurdly slow, but screw it for now
char[] a = new char[4]; char[] a = new char[4];
@ -537,7 +534,7 @@ final class Tokenizer {
// Reset and continue // Reset and continue
sb = new StringBuilder(); sb = new StringBuilder();
sbOrig = new StringBuilder(); sbOrig = new StringBuilder();
} else if (Character.isISOControl(c)) { } else if (ConfigImplUtil.isC0Control(c)) {
throw problem(asString(c), "JSON does not allow unescaped " + asString(c) throw problem(asString(c), "JSON does not allow unescaped " + asString(c)
+ " in quoted strings, use a backslash escape"); + " in quoted strings, use a backslash escape");
} else { } else {