From: David ‘Bombe’ Roden Date: Mon, 21 Sep 2020 20:17:34 +0000 (+0200) Subject: 🎨 Use StandardCharsets instead of Charset.forName X-Git-Tag: v2~74 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6d8a3475d8e56cea63d53d456baef434318223a7;p=rhynodge.git 🎨 Use StandardCharsets instead of Charset.forName --- 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());