CMPUT301F23T01 / Sigma-Blue

Introduction to Software engineering project repository
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Creating items creates a NullPointerException #138

Closed echeng-git closed 10 months ago

echeng-git commented 10 months ago

The error stems from when the user is creating a new tag, the getTagNames() method throws a NullPointerException since tags is null. Error log below:

at com.example.sigma_blue.entity.item.Item.getTagNames(Item.java:324)
at com.example.sigma_blue.entity.item.Item.lambda$static$2(Item.java:459)
at com.example.sigma_blue.entity.item.Item$$ExternalSyntheticLambda3.apply(Unknown Source:2)
at com.example.sigma_blue.database.ADatabaseHandler.addDocument(ADatabaseHandler.java:42)
at com.example.sigma_blue.entity.item.ItemDB.add(ItemDB.java:91)
at com.example.sigma_blue.entity.item.ItemList.add(ItemList.java:117)
at com.example.sigma_blue.fragments.EditFragment$4.onClick(EditFragment.java:219)