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

Fix MapboxDirections builder to allow use empty arrays instead of nulls #2077

Closed
Lebedinsky opened this issue Oct 1, 2019 · 5 comments
Closed
Assignees
Labels
bug Defect to be fixed.
Milestone

Comments

@Lebedinsky
Copy link
Contributor

Fix MapboxDirections.Builder#build() method to allow setting empty arrays (waypointNames, waypointIndices, approaches). Now it cause of throwing exception when we try to call build() method.

Issue link in MAS repository.

@Lebedinsky Lebedinsky added bug Defect to be fixed. high priority labels Oct 1, 2019
@Lebedinsky Lebedinsky added this to the v0.43.0 milestone Oct 1, 2019
@Lebedinsky Lebedinsky self-assigned this Oct 1, 2019
@Guardiola31337
Copy link
Contributor

@Guardiola31337
Copy link
Contributor

Is this still an issue @Lebedinsky @korshaknn? Are we good to close here?

@Lebedinsky
Copy link
Contributor Author

@Guardiola31337 As far as I know, we still didn't handle this case, so we need to address it before close this ticket.

@korshaknn
Copy link
Contributor

korshaknn commented Sep 2, 2020

@Guardiola31337 it was refactored from array to list

if (approaches != null) {
        if (approaches.length != coordinates.size()) {
          throw ...
        }
        ...
      }

now:

if (!approaches.isEmpty()) {
        if (approaches.size() != coordinates.size()) {
          throw ...
        }
        ...
      }

it is possible to pass empty list (or empty array with deprecated method)
the same with waypointNames, waypointIndices
we can close it

@Guardiola31337
Copy link
Contributor

Thanks for confirming @korshaknn

Closing here.

cc @Lebedinsky

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

No branches or pull requests

3 participants