Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Charsets to StandardCharsets. #1571

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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