Allow empty tokens in strict grammar

In SQLiteQueryBuilder, allow empty tokens when checking for invalid
tokens during the strict grammar check.

Fixes: 151151800
Test: atest SQLiteQueryBuilderTest#testStrictQueryEmptyToken
Change-Id: Iac1cdd643253fd186a164b863d65d6e92698fd38
This commit is contained in:
Hall Liu
2020-03-11 15:15:42 -07:00
parent 4a63d9a90d
commit e409ec2492

View File

@@ -798,6 +798,7 @@ public class SQLiteQueryBuilder {
}
private void enforceStrictToken(@NonNull String token) {
if (TextUtils.isEmpty(token)) return;
if (isTableOrColumn(token)) return;
if (SQLiteTokenizer.isFunction(token)) return;
if (SQLiteTokenizer.isType(token)) return;