Skip to content

(3) Fixing NullPointerException

Tyler Sizse requested to merge issue_234_null_pointer_exception into main

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

!249 (merged)

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

  1. Go to the 'Check Expiration Date' feature within the app.
  2. Scan or enter a barcode that is not already in the database.
  3. Select 'Beverages' as the 'Category'
  4. Select 'Water' as the 'Product'
  5. Select 'commercially bottled' as the 'Type'
  6. Press 'Accept'
  7. Press 'Accept'
  8. 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

Screenshot_1629562117 Screenshot_1629562129

Relevant Logs

N/A

Developer Notes

  • Optimized code in StatusFragment so it can pass the additional info needed in MoreInfoFragment
  • Optimized code in MoreInfoFragment to use data passed from StatusFragment
  • Merged branch issue_235_select_new_date_btn into this branch
  • Fixed NullPointerException
  • Updated to use pantryLife when dop_pantryLife is null

Labels

NEST component::check-expiration-date type::bug status::done

Edited by Tyler Sizse

Merge request reports