Closed britzl closed 1 year ago
it feels strange they may have
null
everywhere
I agree. But we saw that productDetailsList.get(0) could return null. And it is possible to have a null element in a java.util.List so we might as well assume that this can happen throughout the code. I do not like defensive programming but if we can't trust that there is data where there is supposed to be data then it's better to check for it.
Added extra null checks when receiving products and purchases.
Fixes #47 Fixes #34