From a565b5fdd56860524d459473485137592603de7b Mon Sep 17 00:00:00 2001 From: Rubenlagus Date: Thu, 26 Jan 2017 01:37:54 +0100 Subject: [PATCH] Closes #184 --- .../org/telegram/telegrambots/api/objects/Location.java | 8 ++++---- .../telegram/telegrambots/test/TestDeserialization.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Location.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Location.java index 026faf24..e3044933 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Location.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/api/objects/Location.java @@ -16,19 +16,19 @@ public class Location implements BotApiObject { private static final String LATITUDE_FIELD = "latitude"; @JsonProperty(LONGITUDE_FIELD) - private Double longitude; ///< Longitude as defined by sender + private Float longitude; ///< Longitude as defined by sender @JsonProperty(LATITUDE_FIELD) - private Double latitude; ///< Latitude as defined by sender + private Float latitude; ///< Latitude as defined by sender public Location() { super(); } - public Double getLongitude() { + public Float getLongitude() { return longitude; } - public Double getLatitude() { + public Float getLatitude() { return latitude; } diff --git a/telegrambots-meta/src/test/java/org/telegram/telegrambots/test/TestDeserialization.java b/telegrambots-meta/src/test/java/org/telegram/telegrambots/test/TestDeserialization.java index 6ad6504a..77b125c2 100644 --- a/telegrambots-meta/src/test/java/org/telegram/telegrambots/test/TestDeserialization.java +++ b/telegrambots-meta/src/test/java/org/telegram/telegrambots/test/TestDeserialization.java @@ -172,8 +172,8 @@ public class TestDeserialization { Assert.assertEquals("offset", inlineQuery.getOffset()); assertFromUser(inlineQuery.getFrom()); Assert.assertNotNull(inlineQuery.getLocation()); - Assert.assertEquals(Double.valueOf("0.234242534"), inlineQuery.getLocation().getLatitude()); - Assert.assertEquals(Double.valueOf("0.234242534"), inlineQuery.getLocation().getLongitude()); + Assert.assertEquals(Float.valueOf("0.234242534"), inlineQuery.getLocation().getLatitude()); + Assert.assertEquals(Float.valueOf("0.234242534"), inlineQuery.getLocation().getLongitude()); } private void assertCallbackQuery(CallbackQuery callbackQuery) {