< prev index next >
src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
*** 25,34 ****
--- 25,35 ----
package sun.util.calendar;
import java.security.AccessController;
import java.util.TimeZone;
+ import sun.security.action.GetPropertyAction;
/**
*
* @author Masayoshi Okutsu
* @since 1.6
*** 140,151 ****
if (!"japanese".equals(name)) {
return null;
}
// Append an era to the predefined eras if it's given by the property.
! String prop = AccessController.doPrivileged(
! new sun.security.action.GetPropertyAction("jdk.calendar.japanese.supplemental.era"));
if (prop != null) {
Era era = parseEraEntry(prop);
if (era != null) {
if (isValidEra(era, JAPANESE_ERAS)) {
int length = JAPANESE_ERAS.length;
--- 141,152 ----
if (!"japanese".equals(name)) {
return null;
}
// Append an era to the predefined eras if it's given by the property.
! String prop = GetPropertyAction
! .getProperty("jdk.calendar.japanese.supplemental.era");
if (prop != null) {
Era era = parseEraEntry(prop);
if (era != null) {
if (isValidEra(era, JAPANESE_ERAS)) {
int length = JAPANESE_ERAS.length;
< prev index next >