Skip to content

Commit

Permalink
[JBEAP-20946] Do not register unsupported Java charset names
Browse files Browse the repository at this point in the history
  • Loading branch information
ropalka committed Feb 3, 2021
1 parent 8cd0c15 commit 9f3b1d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/apache/xml/serializer/Encodings.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
Expand Down Expand Up @@ -340,6 +341,9 @@ private static EncodingInfo[] loadEncodingInfo()
for (int i = 0; i < totalEntries; ++i)
{
String javaName = (String) keys.nextElement();
if (!Charset.isSupported(javaName)) {
continue; // Not all JDKs support all encodings specified in our config
}
String val = props.getProperty(javaName);
int len = lengthOfMimeNames(val);

Expand Down

0 comments on commit 9f3b1d1

Please sign in to comment.