]> git.ktnx.net Git - mobile-ledger.git/commitdiff
assert → if + throw
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 11:38:00 +0000 (11:38 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 8 Dec 2018 11:38:00 +0000 (11:38 +0000)
app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java

index 28eec69375924e63acd0b6d167b717de80964984..2327ce494d371263617a608d0628bcc5b5d4ecb9 100644 (file)
@@ -230,7 +230,7 @@ public class NewTransactionActivity extends AppCompatActivity implements TaskCal
         // Inflate the menu; this adds items to the action bar if it is present.
         getMenuInflater().inflate(R.menu.new_transaction, menu);
         mSave = menu.findItem(R.id.action_submit_transaction);
-        assert mSave != null;
+        if (mSave == null) throw new AssertionError();
 
         return true;
     }