< prev index next >
src/java.base/share/classes/java/util/PropertyResourceBundle.java
Print this page
rev 49550 : 8201179: Regression due loading java.nio.charset.StandardCharsets during bootstrap
Reviewed-by: sherman
@@ -42,12 +42,13 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.IOException;
import java.nio.charset.MalformedInputException;
-import java.nio.charset.StandardCharsets;
import java.nio.charset.UnmappableCharacterException;
+
+import sun.nio.cs.ISO_8859_1;
import sun.security.action.GetPropertyAction;
import sun.util.PropertyResourceBundleCharset;
import sun.util.ResourceBundleEnumeration;
/**
@@ -174,11 +175,11 @@
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public PropertyResourceBundle (InputStream stream) throws IOException {
this(new InputStreamReader(stream,
"ISO-8859-1".equals(encoding) ?
- StandardCharsets.ISO_8859_1.newDecoder() :
+ ISO_8859_1.INSTANCE.newDecoder() :
new PropertyResourceBundleCharset("UTF-8".equals(encoding)).newDecoder()));
}
/**
* Creates a property resource bundle from a {@link java.io.Reader
< prev index next >