Skip to content

Commit 302d42d

Browse files
committed
fix googlemaps#906 - secondary opening hours must be an array
1 parent 673b3b3 commit 302d42d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/main/java/com/google/maps/model/PlaceDetails.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public enum RatingType {
235235
* DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the
236236
* special_days subfield of all hours, set for dates that have exceptional hours.
237237
*/
238-
public OpeningHours secondaryOpeningHours;
238+
public OpeningHours[] secondaryOpeningHours;
239239

240240
/** Specifies if the place serves beer. */
241241
public Boolean servesBeer;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.google.maps.issues;
2+
3+
import org.junit.Test;
4+
5+
public class Issue906 {
6+
7+
@Test
8+
public void test() {
9+
// /maps/api/place/details/json
10+
// https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&placeid=ChIJTSQM7Smze0gR627zU4Cvkn4
11+
// The above placeid is expired/not_found sadly and thus cannot be used to test the fix, thus TODO find a place that has the secondary_opening_hours field
12+
// The example/test json provided in resources also does not contain a single example with this field
13+
}
14+
}

0 commit comments

Comments
 (0)