ese-unibe-ch / ese2013-team5

3 stars 4 forks source link

Database doesn't handle "no data" correctly #77

Open exside opened 10 years ago

exside commented 10 years ago

Steps to reproduce:

uninstall the app on the device (to remove an existing database), disable any network connection (also mobile data), so the device will try to load the data from the database...

the problem now is, that it actually loads a model from NO DATA, so it will nicely load and then crash because an empty model gets returned...basically NullPointer in FragmentStart at line 91 when the inflateHeader() method calls mMensa.getName();, this will naturally be null...

so what we need is some sort of feedback from the database, that there is no data available (and in that case the app will try to get the data from the api again and again...I'll do that, but I need a correct response from the database manager, that there is no data in the database...)