Clarify method name in QuotedStringTokenizer

This commit is contained in:
Luck 2020-03-19 11:06:41 +00:00
parent 05b82cdbab
commit 46c9e3b713
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -50,7 +50,7 @@ public class QuotedStringTokenizer {
return output; return output;
} }
private static boolean isQuotedStringStart(char c) { private static boolean isQuoteCharacter(char c) {
// return c == '"' || c == '“' || c == '”'; // return c == '"' || c == '“' || c == '”';
return c == '\u0022' || c == '\u201C' || c == '\u201D'; return c == '\u0022' || c == '\u201C' || c == '\u201D';
} }
@ -60,7 +60,7 @@ public class QuotedStringTokenizer {
} }
private String readString() { private String readString() {
if (isQuotedStringStart(peek())) { if (isQuoteCharacter(peek())) {
return readQuotedString(); return readQuotedString();
} else { } else {
return readUnquotedString(); return readUnquotedString();
@ -85,7 +85,7 @@ public class QuotedStringTokenizer {
skip(); // skip start quote skip(); // skip start quote
final int start = this.cursor; final int start = this.cursor;
while (hasNext() && !isQuotedStringStart(peek())) { while (hasNext() && !isQuoteCharacter(peek())) {
skip(); skip();
} }
final int end = this.cursor; final int end = this.cursor;