equal
deleted
inserted
replaced
49 useOldMapping = true; |
49 useOldMapping = true; |
50 } else { |
50 } else { |
51 throw new RuntimeException("-old or -new must be specified; got " + arg); |
51 throw new RuntimeException("-old or -new must be specified; got " + arg); |
52 } |
52 } |
53 |
53 |
54 // Get a Field for TzIDOldMapping in sun.util.calendar. |
54 Map<String, String> oldmap = TzIDOldMapping.MAP; |
55 Map<String, String> oldmap = null; |
|
56 try { |
|
57 Class<?> oldmapClass = Class.forName("sun.util.calendar.TzIDOldMapping"); |
|
58 Field map = oldmapClass.getDeclaredField("MAP"); |
|
59 map.setAccessible(true); |
|
60 oldmap = (Map<String, String>) map.get(null); |
|
61 } catch (Exception e) { |
|
62 throw new RuntimeException("can't get TzIDOldMapping.MAP", e); |
|
63 } |
|
64 |
|
65 String prop = System.getProperty(MAPPING_PROPERTY_NAME); |
55 String prop = System.getProperty(MAPPING_PROPERTY_NAME); |
66 System.out.println(MAPPING_PROPERTY_NAME + "=" + prop); |
56 System.out.println(MAPPING_PROPERTY_NAME + "=" + prop); |
67 |
57 |
68 // Try the test multiple times with modifying TimeZones to |
58 // Try the test multiple times with modifying TimeZones to |
69 // make sure TimeZone instances for the old mapping are |
59 // make sure TimeZone instances for the old mapping are |