entur / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
25 stars 10 forks source link

Bug fix: This fixes 2 bugs in the Netex calendar import. #91

Closed t2gran closed 4 years ago

t2gran commented 4 years ago
  1. The most critical is that days for DAY_TYPES used in more than on SJ some times get merged together, creating services with "extra" days in it. This was introduced when adding support for DSJ.
  2. If a DayType applies to EVERYDAY in a period, then merging to periods( A minus B) using DayTypeAssignments result in all days in period A + B, B is added not subtracted. This is a bug have "always" been there.

Extensive unit-tests are added to the Calendar mapping with 100% branch coverage. Also the code is changed to use unmodifiable sets to prevent bugs like the first one.