Skip to content

Commit

Permalink
Make getCharacterEncoding in UrlModuleSourceProvider protected
Browse files Browse the repository at this point in the history
Allows subclasses to override the encoding used in case a local
javascript file is interpreted as being latin-1, when it should be
whatever the file is encoded with. Before openJDK 17.0.3 this was
automatically interpreted as utf-8.
  • Loading branch information
midgleyc committed May 29, 2022
1 parent 7a94441 commit 4b35811
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private static Reader getReader(URLConnection urlConnection) throws IOException
urlConnection.getInputStream(), getCharacterEncoding(urlConnection));
}

private static String getCharacterEncoding(URLConnection urlConnection) {
protected String getCharacterEncoding(URLConnection urlConnection) {
final ParsedContentType pct = new ParsedContentType(urlConnection.getContentType());
final String encoding = pct.getEncoding();
if (encoding != null) {
Expand Down

0 comments on commit 4b35811

Please sign in to comment.