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
Describe the bug
Currently, when one supplies invalid datetime strings to the
timestampsmethod 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:
oshdb/oshdb-util/src/main/java/org/heigit/bigspatialdata/oshdb/util/time/OSHDBTimestamps.java
Line 145 in 04abd72
To fix, the
.timestampsmethod (and/or theOSHDBTimestampsclass) should check if the supplied timestamps are valid and parsable.this bug was found by @rtroilo