String.format("[fragment] removing profile %s", mProfile.getUuid()));
mProfile.removeFromDB();
ArrayList<MobileLedgerProfile> oldList = Data.profiles.getValue();
- assert oldList != null;
+ if (oldList == null) throw new AssertionError();
ArrayList<MobileLedgerProfile> newList =
(ArrayList<MobileLedgerProfile>) oldList.clone();
newList.remove(mProfile);
int index = Data.getProfileIndex(mProfile);
MobileLedgerProfile newProfile = new MobileLedgerProfile(mProfile);
final ArrayList<MobileLedgerProfile> profiles = Data.profiles.getValue();
- assert profiles != null;
+ if (profiles == null) throw new AssertionError();
profiles.set(index, newProfile);
if (mProfile.equals(Data.profile.getValue())) Data.profile.setValue(newProfile);
}
updateProfileFromUI();
mProfile.storeInDB();
final ArrayList<MobileLedgerProfile> profiles = Data.profiles.getValue();
- assert profiles != null;
+ if (profiles == null) throw new AssertionError();
ArrayList<MobileLedgerProfile> newList =
(ArrayList<MobileLedgerProfile>) profiles.clone();
newList.add(mProfile);