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

Prevent RouteLeg list access for current step creation #1896

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

danesfeder
Copy link
Contributor

Description

Found while testing:

Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
       at java.util.ArrayList.get(ArrayList.java:411)
       at com.mapbox.services.android.navigation.v5.routeprogress.RouteLegProgress$Builder.build(RouteLegProgress.java:255)
       at com.mapbox.services.android.navigation.v5.routeprogress.RouteProgress$Builder.build(RouteProgress.java:298)
       at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.buildRouteProgressFrom(NavigationRouteProcessor.java:112)
       at com.mapbox.services.android.navigation.v5.navigation.NavigationRouteProcessor.buildNewRouteProgress(NavigationRouteProcessor.java:49)
       at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorRunnable.process(RouteProcessorRunnable.java:61)
       at com.mapbox.services.android.navigation.v5.navigation.RouteProcessorRunnable.run(RouteProcessorRunnable.java:46)
       at android.os.Handler.handleCallback(Handler.java:761)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:156)
       at android.os.HandlerThread.run(HandlerThread.java:61)

Implementation

Pass current LegStep to RouteProgress builder directly.

Testing

Please describe the manual tests that you ran to verify your changes

  • New and existing unit tests pass locally with my changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@danesfeder danesfeder added bug Defect to be fixed. ✓ ready for review labels Apr 17, 2019
@danesfeder danesfeder added this to the v0.36.0 milestone Apr 17, 2019
@danesfeder danesfeder self-assigned this Apr 17, 2019
@danesfeder danesfeder merged commit 3b523d6 into master Apr 17, 2019
@danesfeder danesfeder deleted the dan-index-legstep branch April 17, 2019 19:07
@Guardiola31337 Guardiola31337 mentioned this pull request Apr 17, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants