< 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,53 **** 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.security.action.GetPropertyAction; import sun.util.PropertyResourceBundleCharset; import sun.util.ResourceBundleEnumeration; /** --- 42,54 ---- 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.UnmappableCharacterException; + + import sun.nio.cs.ISO_8859_1; import sun.security.action.GetPropertyAction; import sun.util.PropertyResourceBundleCharset; import sun.util.ResourceBundleEnumeration; /**
*** 174,184 **** */ @SuppressWarnings({"unchecked", "rawtypes"}) public PropertyResourceBundle (InputStream stream) throws IOException { this(new InputStreamReader(stream, "ISO-8859-1".equals(encoding) ? ! StandardCharsets.ISO_8859_1.newDecoder() : new PropertyResourceBundleCharset("UTF-8".equals(encoding)).newDecoder())); } /** * Creates a property resource bundle from a {@link java.io.Reader --- 175,185 ---- */ @SuppressWarnings({"unchecked", "rawtypes"}) public PropertyResourceBundle (InputStream stream) throws IOException { this(new InputStreamReader(stream, "ISO-8859-1".equals(encoding) ? ! 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 >