Don't use StandardCharsets class

This commit is contained in:
wb9688 2020-03-01 09:41:06 +01:00
parent 705896aca0
commit df219a9453

View File

@ -20,7 +20,6 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URL; import java.net.URL;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
@ -279,7 +278,7 @@ public class YoutubeParsingHelper {
if (param.split("=")[0].equals("q")) { if (param.split("=")[0].equals("q")) {
String url; String url;
try { try {
url = URLDecoder.decode(param.split("=")[1], StandardCharsets.UTF_8.name()); url = URLDecoder.decode(param.split("=")[1], "UTF-8");
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
return null; return null;
} }