From f462d7335567960978e16c5e042c99b54daa94b6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Dec 2019 11:28:12 +0300 Subject: Cleanup IDEA code issues --- src/main/java/ru/sape/SapeConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/ru/sape') diff --git a/src/main/java/ru/sape/SapeConnection.java b/src/main/java/ru/sape/SapeConnection.java index a15658fa..ee5a5e5c 100644 --- a/src/main/java/ru/sape/SapeConnection.java +++ b/src/main/java/ru/sape/SapeConnection.java @@ -11,6 +11,7 @@ import java.io.Reader; import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.*; public class SapeConnection { @@ -48,7 +49,7 @@ public class SapeConnection { connection.setRequestMethod("GET"); connection.connect(); - r = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); + r = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)); StringWriter sw = new StringWriter(); -- cgit v1.2.3