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

map-reducer: catch invalid timestamps #260

Closed
tyrasd opened this issue Aug 20, 2020 · 0 comments · Fixed by #469
Closed

map-reducer: catch invalid timestamps #260

tyrasd opened this issue Aug 20, 2020 · 0 comments · Fixed by #469
Assignees
Labels
bug Something isn't working as expected
Milestone

Comments

@tyrasd
Copy link
Member

tyrasd commented Aug 20, 2020

Describe the bug

Currently, when one supplies invalid datetime strings to the timestamps method of the map-reudcer (e.g. .timestamps("foo", "bar")), no exception is thrown immediately. Instead, this ends up in unspecified behaviour "down the road": the contribution view may throw null pointer exceptions, while the snapshot view simply ignores the invalid times and returns empty results.

Here's one part of the problem: unparseable timestamps are just ignored:

LOG.error("Unable to parse timestamp string, skipping: " + e.getMessage());

To fix, the .timestamps method (and/or the OSHDBTimestamps class) should check if the supplied timestamps are valid and parsable.

this bug was found by @rtroilo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants