8154853: java/util/TimeZone/OldIDMappingTest.sh fails after JDK-8154231
Reviewed-by: chegar
--- a/jdk/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Apr 21 13:39:53 2016 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Apr 21 17:21:31 2016 +0200
@@ -245,8 +245,12 @@
};
static {
- USE_OLDMAPPING = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
- public Boolean run() {
+ String oldmapping = GetPropertyAction
+ .getProperty("sun.timezone.ids.oldmapping", "false")
+ .toLowerCase(Locale.ROOT);
+ USE_OLDMAPPING = (oldmapping.equals("yes") || oldmapping.equals("true"));
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
try {
String libDir = System.getProperty("java.home") + File.separator + "lib";
try (DataInputStream dis = new DataInputStream(
@@ -257,9 +261,7 @@
} catch (Exception x) {
throw new Error(x);
}
- String oldmapping = System.getProperty("sun.timezone.ids.oldmapping", "false")
- .toLowerCase(Locale.ROOT);
- return (oldmapping.equals("yes") || oldmapping.equals("true"));
+ return null;
}
});
}