]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/utils/MLDB.java
Data: migrate profile to a private variable, provide methods for accessing it
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / utils / MLDB.java
index 03b207c8f02c017e1643e131e1a8ac6b3acde32e..178b7b2017484f6e93fa16bf09a60dbc8671b76e 100644 (file)
@@ -165,9 +165,7 @@ public final class MLDB {
             String sql;
             String[] params;
             if (profileSpecific) {
-                MobileLedgerProfile p = (profile == null) ? Data.profile.getValue() : profile;
-                if (p == null)
-                    throw new AssertionError();
+                MobileLedgerProfile p = (profile == null) ? Data.getProfile() : profile;
                 sql = String.format(
                         "SELECT rowid as _id, %s, CASE WHEN %s_upper LIKE ?||'%%' THEN 1 " +
                         "WHEN %s_upper LIKE '%%:'||?||'%%' then 2 " +