Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
fix Issue #3 : place_id is a long value instead of int
Browse files Browse the repository at this point in the history
  • Loading branch information
kops committed Apr 1, 2012
1 parent f4f3e2d commit 57a9c21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/fr/dudie/nominatim/model/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class Address {

/** The OpenStreetMap place id. */
@SerializedName("place_id")
private int placeId;
private long placeId;

/** The data licence. */
private String licence;
Expand Down Expand Up @@ -103,7 +103,7 @@ public final class Address {
*
* @return the OpenStreetMap place id
*/
public int getPlaceId() {
public long getPlaceId() {

return placeId;
}
Expand All @@ -114,7 +114,7 @@ public int getPlaceId() {
* @param placeId
* the OpenStreetMap place id to set
*/
public void setPlaceId(final int placeId) {
public void setPlaceId(final long placeId) {

this.placeId = placeId;
}
Expand Down
17 changes: 17 additions & 0 deletions src/test/java/fr/dudie/nominatim/JsonNominatimClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,21 @@ public void testSearchWithoutResults() throws IOException {

LOGGER.info("testSearchWithoutResults.end");
}

@Test
public void testSearchWithForLongPlaceId() throws IOException {

LOGGER.info("testSearchWithResults.start");

final List<Address> addresses = nominatimClient.search("ул. Евдокимова,37, Ростов-на-дону");

assertNotNull("result list is not null", addresses);
for (final Address address : addresses) {
LOGGER.debug(ToStringBuilder
.reflectionToString(address, ToStringStyle.MULTI_LINE_STYLE));
}
assertTrue("list is not empty", !addresses.isEmpty());

LOGGER.info("testSearchWithResults.end");
}
}

0 comments on commit 57a9c21

Please sign in to comment.