From: Damyan Ivanov Date: Sat, 8 Dec 2018 11:38:00 +0000 (+0000) Subject: assert → if + throw X-Git-Tag: v0.3~289 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=818411a6e653bd24da9a964e286ec6cac85f3e37;p=mobile-ledger.git assert → if + throw --- diff --git a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java index 28eec693..2327ce49 100644 --- a/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/NewTransactionActivity.java @@ -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; }