From 6d8a3475d8e56cea63d53d456baef434318223a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 21 Sep 2020 22:17:34 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=8E=A8=20Use=20StandardCharsets=20instead?= =?utf8?q?=20of=20Charset.forName?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java index 98578eb..3a7bf54 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/TorrentState.java @@ -17,7 +17,7 @@ package net.pterodactylus.rhynodge.states; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -292,7 +292,7 @@ public class TorrentState extends AbstractState implements Iterable if ((magnetUri == null) || (magnetUri.length() < 8)) { return Optional.empty(); } - List parameters = URLEncodedUtils.parse(magnetUri.substring("magnet:?".length()), Charset.forName("UTF-8")); + List parameters = URLEncodedUtils.parse(magnetUri.substring("magnet:?".length()), StandardCharsets.UTF_8); for (NameValuePair parameter : parameters) { if (parameter.getName().equals("xt")) { return Optional.of(parameter.getValue().toLowerCase()); -- 2.7.4