Skip to content

Commit 950f8c2

Browse files
authored
Semicolon should be used as radiuses and timestamps delimiters (#821)
1 parent 646ea95 commit 950f8c2

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

services-matching/src/main/java/com/mapbox/api/matching/v5/MapboxMapMatching.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ public abstract Builder voiceUnits(
506506
* {@link DirectionsCriteria#ANNOTATION_DISTANCE},
507507
* {@link DirectionsCriteria#ANNOTATION_DURATION},
508508
* {@link DirectionsCriteria#ANNOTATION_DURATION} and
509-
* {@link DirectionsCriteria#ANNOTATION_CONGESTION}. Several annotation can be used by
510-
* separating them with {@code ,}.
509+
* {@link DirectionsCriteria#ANNOTATION_CONGESTION}.
511510
*
512511
* @param annotations string referencing one of the annotation direction criteria's. The strings
513512
* restricted to one or multiple values inside the {@link AnnotationCriteria}
@@ -529,7 +528,7 @@ public Builder annotations(@Nullable @AnnotationCriteria String... annotations)
529528
/**
530529
* Timestamps corresponding to each coordinate provided in the request; must be numbers in Unix
531530
* time (seconds since the Unix epoch) converted to a String. There must be as many timestamps
532-
* as there are coordinates in the request, each separated by {@code ;} .
531+
* as there are coordinates in the request.
533532
*
534533
* @param timestamps timestamp corresponding to the coordinate added at the identical index
535534
* @return this builder for chaining options together
@@ -679,9 +678,9 @@ public MapboxMapMatching build() {
679678
}
680679

681680
coordinates(formatCoordinates(coordinates));
682-
timestamps(TextUtils.join(",", timestamps));
681+
timestamps(TextUtils.join(";", timestamps));
683682
annotations(TextUtils.join(",", annotations));
684-
radiuses(TextUtils.join(",", radiuses));
683+
radiuses(TextUtils.join(";", radiuses));
685684
waypoints(TextUtils.join(";", waypoints));
686685

687686
// Generate build so that we can check that values are valid.

services-matching/src/test/java/com/mapbox/api/matching/v5/MapboxMapMatchingTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public void radiuses_doesShowInUrlCorrectly() throws Exception {
282282
.radiuses(1d, 2d, 3d)
283283
.build();
284284
assertTrue(mapMatching.cloneCall().request().url().toString()
285-
.contains("radiuses=1.0,2.0,3.0"));
285+
.contains("radiuses=1.0;2.0;3.0"));
286286
}
287287

288288
@Test
@@ -324,7 +324,7 @@ public void timestamps_doesShowInUrlCorrectly() throws Exception {
324324
.timestamps("1", "2", "3")
325325
.build();
326326
assertTrue(mapMatching.cloneCall().request().url().toString()
327-
.contains("timestamps=1,2,3"));
327+
.contains("timestamps=1;2;3"));
328328
}
329329

330330
@Test

0 commit comments

Comments
 (0)