Skip to content

Commit

Permalink
refactor: migrate from Charsets to StandardCharsets
Browse files Browse the repository at this point in the history
  • Loading branch information
kluever authored and rdeltour committed Dec 29, 2024
1 parent 05b9cb4 commit 33b577a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.adobe.epubcheck.messages;

import com.google.common.base.Charsets;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Locale;
Expand Down Expand Up @@ -211,7 +211,7 @@ public ResourceBundle newBundle(
// Only this line is changed to make it to read properties files as
// UTF-8.
bundle = new PropertyResourceBundle(
new BufferedReader(new InputStreamReader(stream, Charsets.UTF_8)));
new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8)));
} finally
{
stream.close();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/adobe/epubcheck/util/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import java.util.ResourceBundle.Control;

import com.google.common.base.Charsets;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;

Expand Down Expand Up @@ -188,7 +188,7 @@ private class UTF8Control extends Control
// Only this line is changed to make it to read properties files as UTF-8.
bundle = new PropertyResourceBundle(
new BufferedReader(
new InputStreamReader(stream, Charsets.UTF_8)));
new InputStreamReader(stream, StandardCharsets.UTF_8)));
}
finally
{
Expand Down

0 comments on commit 33b577a

Please sign in to comment.