Skip to content
Snippets Groups Projects
Commit 67e50442 authored by Martin Strbacka's avatar Martin Strbacka
Browse files

Resolved a bug with null poiner exception if message has no acceptance date.

parent 55ad4cfe
No related merge requests found
......@@ -351,7 +351,11 @@ public class AddAccountService extends Service {
rcvdMessageValues.put(DatabaseHelper.MESSAGE_TO_HANDS, msgEnvelope.getToHands());
rcvdMessageValues.put(DatabaseHelper.MESSAGE_ALLOW_SUBST_DELIVERY, msgEnvelope.getAllowSubstDelivery());
rcvdMessageValues.put(DatabaseHelper.MESSAGE_PERSONAL_DELIVERY, msgEnvelope.getPersonalDelivery());
rcvdMessageValues.put(DatabaseHelper.MESSAGE_ACCEPTANCE_DATE, AndroidUtils.toXmlDate(msgEnvelope.getAcceptanceTime().getTime()));
GregorianCalendar acceptanceDate = msgEnvelope.getAcceptanceTime();
if(acceptanceDate != null)
rcvdMessageValues.put(DatabaseHelper.MESSAGE_ACCEPTANCE_DATE, AndroidUtils.toXmlDate(acceptanceDate.getTime()));
rcvdMessageValues.put(DatabaseHelper.MESSAGE_SENT_DATE, AndroidUtils.toXmlDate(msgEnvelope.getDeliveryTime().getTime()));
rcvdMessageValues.put(DatabaseHelper.MESSAGE_IS_READ, NOT_READ);
rcvdMessageValues.put(DatabaseHelper.MESSAGE_LEGALTITLE_LAW, msgEnvelope.getLegalTitle().getLaw());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment