]> git.ktnx.net Git - mobile-ledger.git/commitdiff
address nullability warning
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 6 Sep 2020 08:50:29 +0000 (08:50 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 6 Sep 2020 08:50:29 +0000 (08:50 +0000)
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java

index 373f13257362f8ea831d9e9bf70286767ca0ceff..d9fd260a4533e173aa2ac187a985f941a46d344a 100644 (file)
@@ -162,7 +162,7 @@ public final class MobileLedgerProfile {
         db.beginTransactionNonExclusive();
         try {
             int orderNo = 0;
-            for (MobileLedgerProfile p : Data.profiles.getValue()) {
+            for (MobileLedgerProfile p : Objects.requireNonNull(Data.profiles.getValue())) {
                 db.execSQL("update profiles set order_no=? where uuid=?",
                         new Object[]{orderNo, p.getUuid()});
                 p.orderNo = orderNo;