Expense was meant to be sort of stateless (with the exception of isDeleted) to minimize risk of bugs but along the way became mutable.
Changes:
Made isSettlement flag immutable
Actually tried to make involvedIds[] immutable but it turned out to be lot more involved (pun not intended) than I thought it would be so didn't do it.
Expense was meant to be sort of stateless (with the exception of
isDeleted
) to minimize risk of bugs but along the way became mutable.Changes:
isSettlement
flag immutableActually tried to make
involvedIds[]
immutable but it turned out to be lot more involved (pun not intended) than I thought it would be so didn't do it.