From 50309fc6e2362a22ae5d1e892b3c8a6a5ce39686 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Sun, 11 Dec 2016 20:28:50 +0700 Subject: compile warnings are fixed --- .../src/main/java/com/juick/api/controllers/TelegramWebhook.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-api/src/main/java') diff --git a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java index 059a6156..ea645390 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java +++ b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java @@ -7,7 +7,6 @@ import com.juick.service.UserService; import com.pengrad.telegrambot.BotUtils; import com.pengrad.telegrambot.model.Message; import com.pengrad.telegrambot.model.Update; -import org.apache.commons.codec.Charsets; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -20,6 +19,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.List; /** @@ -39,7 +39,7 @@ public class TelegramWebhook { @RequestMapping(value = "/tlgmbtwbhk", method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) public void processUpdate(HttpServletRequest request) throws IOException { - Update update = BotUtils.parseUpdate(IOUtils.toString(request.getInputStream(), Charsets.UTF_8)); + Update update = BotUtils.parseUpdate(IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8)); Message message = update.message(); if (update.message() == null) { message = update.editedMessage(); -- cgit v1.2.3