Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When adding an Exam or Event, app crash when 1 time field is empty #17

Open
f4ww4z opened this issue Feb 26, 2019 · 0 comments
Open

When adding an Exam or Event, app crash when 1 time field is empty #17

f4ww4z opened this issue Feb 26, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed ready for work This issue is valid and can be assigned to someone. validation

Comments

@f4ww4z
Copy link
Owner

f4ww4z commented Feb 26, 2019

Steps to reproduce:

  1. Add a new event
  2. Fill in the Date and Start time field, leave Time finished empty.
  3. Click the check (done) button.
  4. App crash

Log:

org.threeten.bp.format.DateTimeParseException: Text '26/01/2019 ' could not be parsed at index 11
        at org.threeten.bp.format.DateTimeFormatter.parseToBuilder(DateTimeFormatter.java:1588)
        at org.threeten.bp.format.DateTimeFormatter.parse(DateTimeFormatter.java:1491)
        at org.threeten.bp.LocalDateTime.parse(LocalDateTime.java:444)

This is because the program tries to combine Date and Start time, which returns a good DateTime format as both fields are filled. But when it combines Date with Time finished, it returns just a Date format as Time finished is empty.

It can be vice versa (e.g. Start time is empty, Time finished is filled)

Possible solution

Make sure that all fields are filled in first, before parsing dates.

@f4ww4z f4ww4z added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers ready for work This issue is valid and can be assigned to someone. validation labels Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed ready for work This issue is valid and can be assigned to someone. validation
Projects
None yet
Development

No branches or pull requests

1 participant