Ignore UnrestrictedPublicTransportAreas that do not contain regular stops - #4919
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4919 +/- ##
=============================================
+ Coverage 62.95% 63.03% +0.07%
- Complexity 13276 13310 +34
=============================================
Files 1663 1663
Lines 66341 66399 +58
Branches 7221 7232 +11
=============================================
+ Hits 41768 41855 +87
+ Misses 22194 22168 -26
+ Partials 2379 2376 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
3c12191 to
ce50c42
Compare
ce50c42 to
9df5ed0
Compare
|
|
||
| @Test | ||
| void mapInvalidAreaStop() { | ||
| void testMapInvalidAreaStop() { |
There was a problem hiding this comment.
Since I am the opposite, I'm curious: why do you prefer to prefix the test methods with test?
There was a problem hiding this comment.
this is a recommendation of SonarQube.
test* is the recommended pattern.
There was a problem hiding this comment.
(and for the actual reasoning: a method name should reflect what the method does. The method does not map invalid area stops, it tests what happens when invalid area stops are mapped)
There was a problem hiding this comment.
The second is actually a good point. I had never thought about it that way.
Summary
This PR fixes #4918: The OTP graph builder should ignore FlexibleStopPlaces of type UnrestrictedPublicTransportAreas when they do not contain any stop.
The FlexibleStopPlace is dropped and an issue is logged in the issue store.
Additionally a null-check is added in the GroupStop constructor to prevent the creation of a GroupStop without a centroid (that triggers NullPointerExceptions downstream in the code)
Issue
Fixes #4918
Unit tests
Added unit test
Documentation
No