< prev index next >

src/java.base/share/classes/java/util/PropertyResourceBundle.java

Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs

*** 41,51 **** import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.IOException; - import java.nio.charset.Charset; import java.nio.charset.MalformedInputException; import java.nio.charset.StandardCharsets; import java.nio.charset.UnmappableCharacterException; import java.security.AccessController; import java.util.Locale; --- 41,50 ----
*** 140,151 **** public class PropertyResourceBundle extends ResourceBundle { // Check whether the strict encoding is specified. // The possible encoding is either "ISO-8859-1" or "UTF-8". private static final String encoding = ! AccessController.doPrivileged( ! new GetPropertyAction("java.util.PropertyResourceBundle.encoding", "")) .toUpperCase(Locale.ROOT); /** * Creates a property resource bundle from an {@link java.io.InputStream * InputStream}. This constructor reads the property file in UTF-8 by default. --- 139,150 ---- public class PropertyResourceBundle extends ResourceBundle { // Check whether the strict encoding is specified. // The possible encoding is either "ISO-8859-1" or "UTF-8". private static final String encoding = ! GetPropertyAction ! .getProperty("java.util.PropertyResourceBundle.encoding", "") .toUpperCase(Locale.ROOT); /** * Creates a property resource bundle from an {@link java.io.InputStream * InputStream}. This constructor reads the property file in UTF-8 by default.
< prev index next >