Allow empty tokens in strict grammar

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

Fixes: 151151800
Fixes: 161769478
Test: atest SQLiteQueryBuilderTest#testStrictQueryEmptyToken
Change-Id: Iac1cdd643253fd186a164b863d65d6e92698fd38
(cherry picked from commit e409ec2492)
This commit is contained in:
Hall Liu
2020-03-11 15:15:42 -07:00
parent ccaa8826eb
commit b7cffcab32

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;