(3) Fixing NullPointerException
License and Copyright Notice
By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).
Branch Name
issue_234_null_pointer_exception
Related Issues
Closes #234 (closed); Closes #241 (closed);
Dependencies
Description
This merge request will fix an issue with a NullPointerException
being thrown when an item has a null
dop_pantryLife
(Such as water). It will also update the app to use pantryLife
if dop_pantryLife
is null
.
Steps to Test
- Go to the 'Check Expiration Date' feature within the app.
- Scan or enter a barcode that is not already in the database.
- Select 'Beverages' as the 'Category'
- Select 'Water' as the 'Product'
- Select 'commercially bottled' as the 'Type'
- Press 'Accept'
- Press 'Accept'
- Press 'More Info'
Make sure each fragment is displaying the correct information for water, such as "Indefinite", and make sure the app is no longer crashing due to a NullPointerException
.
Relevant Screenshots
Relevant Logs
N/A
Developer Notes
- Optimized code in
StatusFragment
so it can pass the additional info needed inMoreInfoFragment
- Optimized code in
MoreInfoFragment
to use data passed fromStatusFragment
- Merged branch
issue_235_select_new_date_btn
into this branch - Fixed
NullPointerException
- Updated to use
pantryLife
whendop_pantryLife
isnull
Labels
NEST
component::check-expiration-date
type::bug
status::done