Skip to content

Commit

Permalink
Replace "UTF8" with StandardCharsets.UTF_8
Browse files Browse the repository at this point in the history
Avoids NON-NLS and possible UnsupportedEncodingException
  • Loading branch information
EcljpseB0T authored and jukzi committed Jul 2, 2024
1 parent d47753c commit 61f32bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Collections;
Expand Down Expand Up @@ -283,7 +284,7 @@ public void doTestSpaceCharsBundleEntry(char c) throws IOException, BundleExcept
InputStream is = entryURL.openStream();
is.close();

String encodeEntry = URLEncoder.encode(entryName, "UTF-8");
String encodeEntry = URLEncoder.encode(entryName, StandardCharsets.UTF_8);
String urlString = entryURL.toExternalForm();
urlString = urlString.substring(0, urlString.indexOf(entryName)) + encodeEntry;
URL encodedURL = new URL(urlString);
Expand Down

0 comments on commit 61f32bd

Please sign in to comment.