提交 c51763e9 编写于 作者: R robm

Merge

......@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2017c
tzdata2018c
......@@ -181,7 +181,6 @@ Link Africa/Abidjan Africa/Freetown # Sierra Leone
Link Africa/Abidjan Africa/Lome # Togo
Link Africa/Abidjan Africa/Nouakchott # Mauritania
Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso
Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe
Link Africa/Abidjan Atlantic/St_Helena # St Helena
# Djibouti
......@@ -448,7 +447,7 @@ Link Africa/Nairobi Indian/Mayotte
#
# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30.
#
# In 1972 Liberia was the last country to switch from a UTC offset
# In 1972 Liberia was the last country to switch from a UT offset
# that was not a multiple of 15 or 20 minutes. The 1972 change was on
# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of:
# Presidential Papers: First year of the administration of
......@@ -1060,6 +1059,19 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
# Inaccessible, Nightingale: uninhabited
# São Tomé and Príncipe
# From Steffen Thorsen (2018-01-08):
# Multiple sources tell that São Tomé changed from UTC to UTC+1 as
# they entered the year 2018.
# From Michael Deckers (2018-01-08):
# the switch is from 01:00 to 02:00 ... [Decree No. 25/2017]
# http://www.mnec.gov.st/index.php/publicacoes/documentos/file/90-decreto-lei-n-25-2017
Zone Africa/Sao_Tome 0:26:56 - LMT 1884
-0:36:45 - LMT 1912 # Lisbon Mean Time
0:00 - GMT 2018 Jan 1 01:00
1:00 - WAT
# Senegal
# See Africa/Abidjan.
......
......@@ -73,7 +73,7 @@
# 9:00 KST KDT Korea when at +09
# 9:30 ACST Australian Central Standard Time
# Otherwise, these tables typically use numeric abbreviations like +03
# and +0330 for integer hour and minute UTC offsets. Although earlier
# and +0330 for integer hour and minute UT offsets. Although earlier
# editions invented alphabetic time zone abbreviations for every
# offset, this did not reflect common practice.
#
......@@ -670,17 +670,17 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30
# time", in which abolished the adoption of Western Standard Time in
# western islands (listed above), which means the whole Japan
# territory, including later occupations, adopt Japan Central Time
# (UTC+9). The adoption began on Oct 1, 1937. The original text can
# (UT+9). The adoption began on Oct 1, 1937. The original text can
# be found on Wikisource:
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
#
# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
# That is, the time zone of Taipei switched to UT+9 on Oct 1, 1937.
# From Yu-Cheng Chuang (2014-07-02):
# I've found more evidence about when the time zone was switched from UTC+9
# back to UTC+8 after WW2. I believe it was on Sep 21, 1945. In a document
# I've found more evidence about when the time zone was switched from UT+9
# back to UT+8 after WW2. I believe it was on Sep 21, 1945. In a document
# during Japanese era [1] in which the officer told the staff to change time
# zone back to Western Standard Time (UTC+8) on Sep 21. And in another
# zone back to Western Standard Time (UT+8) on Sep 21. And in another
# history page of National Cheng Kung University [2], on Sep 21 there is a
# note "from today, switch back to Western Standard Time". From these two
# materials, I believe that the time zone change happened on Sep 21. And
......@@ -1487,17 +1487,17 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880
# of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who
# wanted to keep it.)
# From Paul Eggert (2006-03-22):
# Shanks & Pottenger write that DST in Japan during those years was as follows:
# From Takayuki Nikai (2018-01-19):
# The source of information is Japanese law.
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00219480428029.htm
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
# ... In summary, it is written as follows. From 24:00 on the first Saturday
# in May, until 0:00 on the day after the second Saturday in September.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Japan 1948 only - May Sun>=1 2:00 1:00 D
Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S
Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D
Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
# but the only locations using it (for birth certificates, presumably, since
# their audience is astrologers) were US military bases. For now, assume
# that for most purposes daylight-saving time was observed; otherwise, what
# would have been the point of the 1951 poll?
Rule Japan 1948 only - May Sat>=1 24:00 1:00 D
Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S
Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D
Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
# From Hideyuki Suzuki (1998-11-09):
# 'Tokyo' usually stands for the former location of Tokyo Astronomical
......@@ -1528,7 +1528,7 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
#
# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
# means the whole Japan territory, including later occupations, adopt Japan
# Central Time (UTC+9). The adoption began on Oct 1, 1937.
# Central Time (UT+9). The adoption began on Oct 1, 1937.
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
......@@ -2089,8 +2089,8 @@ Zone Asia/Kuching 7:21:20 - LMT 1926 Mar
# Maldives
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
4:54:00 - MMT 1960 # Male Mean Time
Zone Indian/Maldives 4:54:00 - LMT 1880 # Malé
4:54:00 - MMT 1960 # Malé Mean Time
5:00 - +05
# Mongolia
......
......@@ -706,8 +706,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
# From Steffen Thorsen (2012-07-25)
# ... we double checked by calling hotels and offices based in Tokelau asking
# about the time there, and they all told a time that agrees with UTC+13....
# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change
# actually was to UTC-11 back then.
# Shanks says UT-10 from 1901 [but] ... there is a good chance the change
# actually was to UT-11 back then.
#
# From Paul Eggert (2012-07-25)
# A Google Books snippet of Appendix to the Journals of the House of
......@@ -1473,7 +1473,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
#
# From Paul Eggert (2006-03-22):
# The Department of Internal Affairs (DIA) maintains a brief history,
# as does Carol Squires; see tz-link.htm for the full references.
# as does Carol Squires; see tz-link.html for the full references.
# Use these sources in preference to Shanks & Pottenger.
#
# For Chatham, IATA SSIM (1991/1999) gives the NZ rules but with
......
......@@ -91,14 +91,15 @@
# 0:00 WET WEST WEMT Western Europe
# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937)
# 1:00 BST British Standard (1968-1971)
# 1:00 IST GMT Irish Standard (1968-) with winter DST
# 1:00 CET CEST CEMT Central Europe
# 1:00:14 SET Swedish (1879-1899)
# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)*
# 2:00 EET EEST Eastern Europe
# 3:00 MSK MSD MDST* Moscow
# From Peter Ilieve (1994-12-04),
# The original six [EU members]: Belgium, France, (West) Germany, Italy,
# From Peter Ilieve (1994-12-04), re EEC/EC/EU members:
# The original six: Belgium, France, (West) Germany, Italy,
# Luxembourg, the Netherlands.
# Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom.
# Plus, from 1 Jan 81: Greece.
......@@ -301,16 +302,31 @@
# The following claim by Shanks & Pottenger is possible though doubtful;
# we'll ignore it for now.
# * Dublin's 1971-10-31 switch was at 02:00, even though London's was 03:00.
# From Paul Eggert (2017-12-04):
#
#
# Whitman says Dublin Mean Time was -0:25:21, which is more precise than
# Shanks & Pottenger.
# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory
# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was
# to London. For example:
# Dunsink Observatory (8 km NW of Dublin's center) was to Dublin as
# Greenwich was to London. For example:
#
# "Timeball on the ballast office is down. Dunsink time."
# -- James Joyce, Ulysses
#
# The abbreviation DMT stood for "Dublin Mean Time" or "Dunsink Mean Time";
# this being Ireland, opinions differed.
#
# Whitman says Dublin/Dunsink Mean Time was UT-00:25:21, which agrees
# with measurements of recent visitors to the Meridian Room of Dunsink
# Observatory; see Malone D. Dunsink and timekeeping. 2016-01-24.
# <https://www.maths.tcd.ie/~dwmalone/time/dunsink.html>. Malone
# writes that the Nautical Almanac listed UT-00:25:22 until 1896, when
# it moved to UT-00:25:21.1 (I confirmed that the 1893 edition used
# the former and the 1896 edition used the latter). Evidently the
# news of this change propagated slowly, as Milne 1899 still lists
# UT-00:25:22 and cites the International Telegraph Bureau. As it is
# not clear that there was any practical significance to the change
# from UT-00:25:22 to UT-00:25:21.1 in civil timekeeping, omit this
# transition for now and just use the latter value, omitting its
# fraction since our format cannot represent fractions.
# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time
# was among various actions undertaken by the 'English' government that
......@@ -370,12 +386,28 @@
# regulations. I spoke this morning with the Secretary of the Department of
# Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
# "Irish Summer Time", abbreviated to "IST".
#
# From Paul Eggert (2017-12-07):
# The 1996 anonymous contributor's goal was to determine the correct
# abbreviation for summer time in Dublin and so the contributor
# focused on the "IST", not on the "Irish Summer Time". Though the
# "IST" was correct, the "Irish Summer Time" appears to have been an
# error, as Ireland's Standard Time (Amendment) Act, 1971 states that
# standard time in Ireland remains at UT +01 and is observed in
# summer, and that Greenwich mean time is observed in winter. (Thanks
# to Derick Rethans for pointing out the error.) That is, when
# Ireland amended the 1968 act that established UT +01 as Irish
# Standard Time, it left standard time unchanged and established GMT
# as a negative daylight saving time in winter. So, in this database
# IST stands for Irish Summer Time for timestamps before 1968, and for
# Irish Standard Time after that. See:
# http://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print
# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Summer Time Act, 1916
......@@ -499,9 +531,23 @@ Link Europe/London Europe/Jersey
Link Europe/London Europe/Guernsey
Link Europe/London Europe/Isle_of_Man
# From Paul Eggert (2018-01-19):
# The following is like GB-Eire and EU, except with standard time in
# summer and negative daylight saving time in winter.
# Although currently commented out, this will need to become uncommented
# once the ICU/OpenJDK workaround is removed; see below.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
#Rule Eire 1971 only - Oct 31 2:00u -1:00 GMT
#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 IST
#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 GMT
#Rule Eire 1981 max - Mar lastSun 1:00u 0 IST
#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 GMT
#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 GMT
#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 GMT
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00s # Dublin MT
-0:25:21 - DMT 1916 May 21 2:00s
-0:25:21 1:00 IST 1916 Oct 1 2:00s
0:00 GB-Eire %s 1921 Dec 6 # independence
0:00 GB-Eire GMT/IST 1940 Feb 25 2:00s
......@@ -510,16 +556,33 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
0:00 1:00 IST 1947 Nov 2 2:00s
0:00 - GMT 1948 Apr 18 2:00s
0:00 GB-Eire GMT/IST 1968 Oct 27
# From Paul Eggert (2018-01-18):
# The next line should look like this:
# 1:00 Eire IST/GMT
# However, in January 2018 we discovered that the Eire rules cause
# problems with tests for ICU:
# https://mm.icann.org/pipermail/tz/2018-January/025825.html
# and with tests for OpenJDK:
# https://mm.icann.org/pipermail/tz/2018-January/025822.html
# To work around this problem, use a traditional approximation for
# time stamps after 1971-10-31 02:00 UTC, to give ICU and OpenJDK
# developers breathing room to fix bugs. This approximation has
# correct UTC offsets, but results in tm_isdst flags are the reverse
# of what they should be. This workaround is temporary and should be
# removed reasonably soon.
1:00 - IST 1971 Oct 31 2:00u
0:00 GB-Eire GMT/IST 1996
0:00 EU GMT/IST
# End of workaround for ICU and OpenJDK bugs.
###############################################################################
# Europe
# EU rules are for the European Union, previously known as the EC, EEC,
# Common Market, etc.
# The following rules are for the European Union and for its
# predecessor organization, the European Communities.
# For brevity they are called "EU rules" elsewhere in this file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
......@@ -952,7 +1015,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850
# The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL
# confirms this, and states that the law was put forth 1893-03-29.
#
# The EU treaty with effect from 1973:
# The EU [actually, EEC and Euratom] treaty with effect from 1973:
# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL
#
# This provoked a new law from 1974 to make possible summer time changes
......@@ -1008,9 +1071,10 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
# East Greenland and Franz Josef Land, but we don't know their time zones.
# My source for this is Wilhelm Dege's book mentioned under Svalbard.
#
# From Paul Eggert (2006-03-22):
# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01,
# and left the EU on 1985-02-01. It therefore should have been using EU
# From Paul Eggert (2017-12-10):
# Greenland joined the European Communities as part of Denmark,
# obtained home rule on 1979-05-01, and left the European Communities
# on 1985-02-01. It therefore should have been using EU
# rules at least through 1984. Shanks & Pottenger say Scoresbysund and Godthåb
# used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU
# rules since at least 1991. Assume EU rules since 1980.
......@@ -1324,7 +1388,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
# From Markus Kuhn (1998-09-29):
# The German time zone web site by the Physikalisch-Technische
# Bundesanstalt contains DST information back to 1916.
# [See tz-link.htm for the URL.]
# [See tz-link.html for the URL.]
# From Jörg Schilling (2002-10-23):
# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
......@@ -1421,7 +1485,7 @@ Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
1:00 Greece CE%sT 1944 Apr 4
2:00 Greece EE%sT 1981
# Shanks & Pottenger say it switched to C-Eur in 1981;
# go with EU instead, since Greece joined it on Jan 1.
# go with EU rules instead, since Greece joined Jan 1.
2:00 EU EE%sT
# Hungary
......@@ -2120,7 +2184,7 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880
# IATA SSIM (1991/1992) reports that the Azores were at -1:00.
# IATA SSIM (1993-02) says +0:00; later issues (through 1996-09) say -1:00.
# Guess that the Azores changed to EU rules in 1992 (since that's when Portugal
# harmonized with the EU), and that they stayed +0:00 that winter.
# harmonized with EU rules), and that they stayed +0:00 that winter.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# DSH writes that despite Decree 1,469 (1915), the change to the clocks was not
......@@ -2795,9 +2859,9 @@ Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14
#
# https://regnum.ru/news/society/1957270.html
# has some historical data for Altai Krai:
# before 1957: west part on UTC+6, east on UTC+7
# after 1957: UTC+7
# since 1995: UTC+6
# before 1957: west part on UT+6, east on UT+7
# after 1957: UT+7
# since 1995: UT+6
# http://barnaul.rusplt.ru/index/pochemu_altajskij_kraj_okazalsja_v_neprivychnom_chasovom_pojase-17648.html
# confirms that and provides more details including 1995-05-28 transition date.
......@@ -3605,6 +3669,17 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# The change is permanent, so this is the new standard time in Turkey.
# It takes effect today, which is not much notice.
# From Kıvanç Yazan (2017-10-28):
# Turkey will go back to Daylight Saving Time starting 2018-10.
# http://www.resmigazete.gov.tr/eskiler/2017/10/20171028-5.pdf
#
# From Even Scharning (2017-11-08):
# ... today it was announced that the DST will become "continuous":
# http://www.hurriyet.com.tr/son-dakika-yaz-saati-uygulamasi-surekli-hale-geldi-40637482
# From Paul Eggert (2017-11-08):
# Although Google Translate misfires on that source, it looks like
# Turkey reversed last month's decision, and so will stay at +03.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
Rule Turkey 1916 only - Oct 1 0:00 0 -
......
......@@ -80,5 +80,5 @@ Leap 2012 Jun 30 23:59:60 + S
Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
# Updated through IERS Bulletin C54
# File expires on: 28 June 2018
# Updated through IERS Bulletin C55
# File expires on: 28 December 2018
......@@ -371,6 +371,18 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# Nebraska, eastern North Dakota, Oklahoma, eastern South Dakota,
# western Tennessee, most of Texas, Wisconsin
# From Paul Eggert (2018-01-07):
# In 1869 the Chicago Astronomical Society contracted with the city to keep
# time. Though delayed by the Great Fire, by 1880 a wire ran from the
# Dearborn Observatory (on the University of Chicago campus) to City Hall,
# which then sent signals to police and fire stations. However, railroads got
# their time signals from the Allegheny Observatory, the Madison Observatory,
# the Ann Arbor Observatory, etc., so their clocks did not agree with each
# other or with the city's official time. The confusion took some years to
# clear up. See:
# Moser M. How Chicago gave America its time zones. Chicago. 2018-01-04.
# http://www.chicagomag.com/city-life/January-2018/How-Chicago-Gave-America-Its-Time-Zones/
# From Larry M. Smith (2006-04-26) re Wisconsin:
# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
# is currently enforced at the 01:00 time of change. Because the local
......@@ -1919,7 +1931,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
# manager of the Creston & District Museum. The article was written in May 2009.
# http://www.ilovecreston.com/?p=articles&t=spec&ar=260
# According to the article, Creston has not changed its clocks since June 1918.
# i.e. Creston has been stuck on UTC-7 for 93 years.
# i.e. Creston has been stuck on UT-7 for 93 years.
# Dawson Creek, on the other hand, changed its clocks as recently as April 1972.
# Unfortunately the exact date for the time change in June 1918 remains
......
......@@ -48,7 +48,7 @@
# https://www.jstor.org/stable/1774359
#
# These tables use numeric abbreviations like -03 and -0330 for
# integer hour and minute UTC offsets. Although earlier editions used
# integer hour and minute UT offsets. Although earlier editions used
# alphabetic time zone abbreviations, these abbreviations were
# invented and did not reflect common practice.
......@@ -602,7 +602,7 @@ Link America/Curacao America/Aruba
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/La_Paz -4:32:36 - LMT 1890
-4:32:36 - CMT 1931 Oct 15 # Calamarca MT
-4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST
-4:32:36 1:00 BST 1932 Mar 21 # Bolivia ST
-4:00 - -04
# Brazil
......@@ -931,12 +931,25 @@ Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
# [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the
# 3rd Feb Sunday. There is an exception on the return date when this is
# the Carnival Sunday then the return date will be the next Sunday...
Rule Brazil 2008 max - Oct Sun>=15 0:00 1:00 S
Rule Brazil 2008 2017 - Oct Sun>=15 0:00 1:00 S
Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 -
# Decree 7,584 <http://pcdsh01.on.br/HVdecreto7584_20111013.jpg> (2011-10-13)
# added Bahia.
Rule Brazil 2012 only - Feb Sun>=22 0:00 0 -
# Decree 7,826 <http://pcdsh01.on.br/HVdecreto7826_20121015.jpg> (2012-10-15)
# removed Bahia and added Tocantins.
# Decree 8,112 <http://pcdsh01.on.br/HVdecreto8112_20130930.JPG> (2013-09-30)
# removed Tocantins.
Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 -
Rule Brazil 2015 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 -
# From Steffen Thorsen (2017-12-18):
# According to many media sources, next year's DST start in Brazil will move to
# the first Sunday of November, and it will stay like that for the years after.
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
# From Steffen Thorsen (2017-12-20):
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 S
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
Rule Brazil 2026 only - Feb Sun>=22 0:00 0 -
......@@ -1091,7 +1104,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# From Paul Eggert (2015-04-03):
# Shanks & Pottenger says America/Santiago introduced standard time in
# 1890 and rounds its UTC offset to 70W40; guess that in practice this
# 1890 and rounds its UT offset to 70W40; guess that in practice this
# was the same offset as in 1916-1919. It also says Pacific/Easter
# standardized on 109W22 in 1890; assume this didn't change the clocks.
#
......
......@@ -395,7 +395,7 @@ SM +4355+01228 Europe/San_Marino
SN +1440-01726 Africa/Dakar
SO +0204+04522 Africa/Mogadishu
SR +0550-05510 America/Paramaribo
SS +0451+03136 Africa/Juba
SS +0451+03137 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
SV +1342-08912 America/El_Salvador
SX +180305-0630250 America/Lower_Princes
......
#
# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -59,6 +59,7 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_FileChannelImpl_position0;
Java_sun_nio_ch_FileChannelImpl_transferTo0;
Java_sun_nio_ch_FileChannelImpl_unmap0;
Java_sun_nio_ch_FileDispatcherImpl_allocate0;
Java_sun_nio_ch_FileDispatcherImpl_close0;
Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
Java_sun_nio_ch_FileDispatcherImpl_force0;
......
#
# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -42,6 +42,7 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_FileChannelImpl_position0;
Java_sun_nio_ch_FileChannelImpl_transferTo0;
Java_sun_nio_ch_FileChannelImpl_unmap0;
Java_sun_nio_ch_FileDispatcherImpl_allocate0;
Java_sun_nio_ch_FileDispatcherImpl_close0;
Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
Java_sun_nio_ch_FileDispatcherImpl_force0;
......
#
# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -47,6 +47,7 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_FileChannelImpl_position0;
Java_sun_nio_ch_FileChannelImpl_transferTo0;
Java_sun_nio_ch_FileChannelImpl_unmap0;
Java_sun_nio_ch_FileDispatcherImpl_allocate0;
Java_sun_nio_ch_FileDispatcherImpl_close0;
Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
Java_sun_nio_ch_FileDispatcherImpl_force0;
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -34,10 +34,11 @@ import java.awt.dnd.DropTarget;
import sun.awt.CausedFocusEvent;
import sun.awt.LightweightFrame;
import sun.awt.OverrideNativeWindowHandle;
import sun.swing.JLightweightFrame;
import sun.swing.SwingAccessor;
public class LWLightweightFramePeer extends LWWindowPeer {
public class LWLightweightFramePeer extends LWWindowPeer implements OverrideNativeWindowHandle {
public LWLightweightFramePeer(LightweightFrame target,
PlatformComponent platformComponent,
......@@ -116,4 +117,16 @@ public class LWLightweightFramePeer extends LWWindowPeer {
public void updateCursorImmediately() {
SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
}
// SwingNode
private volatile long overriddenWindowHandle = 0L;
@Override
public void overrideWindowHandle(final long handle) {
this.overriddenWindowHandle = handle;
}
public long getOverriddenWindowHandle() {
return overriddenWindowHandle;
}
}
......@@ -46,6 +46,7 @@ import sun.awt.AWTAccessor.ComponentAccessor;
import sun.awt.AWTAccessor.WindowAccessor;
import sun.java2d.SurfaceData;
import sun.java2d.opengl.CGLSurfaceData;
import sun.lwawt.LWLightweightFramePeer;
import sun.lwawt.*;
import sun.util.logging.PlatformLogger;
......@@ -584,6 +585,20 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
if (!isKeyWindow) {
CWrapper.NSWindow.makeKeyWindow(ptr);
}
if (owner != null
&& owner.getPeer() instanceof LWLightweightFramePeer) {
LWLightweightFramePeer peer =
(LWLightweightFramePeer) owner.getPeer();
long ownerWindowPtr = peer.getOverriddenWindowHandle();
if (ownerWindowPtr != 0) {
//Place window above JavaFX stage
CWrapper.NSWindow.addChildWindow(
ownerWindowPtr, ptr,
CWrapper.NSWindow.NSWindowAbove);
}
}
});
} else {
execute(ptr->{
......
/*
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -660,15 +660,24 @@ SetJvmEnvironment(int argc, char **argv) {
* arguments are for the application (i.e. the main class name, or
* the -jar argument).
*/
if ((i > 0 && *arg != '-')
|| JLI_StrCmp(arg, "-version") == 0
|| JLI_StrCmp(arg, "-fullversion") == 0
|| JLI_StrCmp(arg, "-help") == 0
|| JLI_StrCmp(arg, "-?") == 0
|| JLI_StrCmp(arg, "-jar") == 0
|| JLI_StrCmp(arg, "-X") == 0
) {
return;
if (i > 0) {
char *prev = argv[i - 1];
// skip non-dash arg preceded by class path specifiers
if (*arg != '-' &&
((JLI_StrCmp(prev, "-cp") == 0
|| JLI_StrCmp(prev, "-classpath") == 0))) {
continue;
}
if (*arg != '-'
|| JLI_StrCmp(arg, "-version") == 0
|| JLI_StrCmp(arg, "-fullversion") == 0
|| JLI_StrCmp(arg, "-help") == 0
|| JLI_StrCmp(arg, "-?") == 0
|| JLI_StrCmp(arg, "-jar") == 0
|| JLI_StrCmp(arg, "-X") == 0) {
return;
}
}
/*
* The following case checks for "-XX:NativeMemoryTracking=value".
......
......@@ -39,6 +39,7 @@ import java.security.PrivilegedAction;
import com.sun.jndi.ldap.pool.PoolCleaner;
import com.sun.jndi.ldap.pool.Pool;
import sun.misc.InnocuousThread;
/**
* Contains utilities for managing connection pools of LdapClient.
......@@ -163,7 +164,17 @@ public final class LdapPoolManager {
if (idleTimeout > 0) {
// Create cleaner to expire idle connections
new PoolCleaner(idleTimeout, pools).start();
PrivilegedAction<Void> pa = new PrivilegedAction<Void>() {
public Void run() {
Thread t = InnocuousThread.newSystemThread(
"LDAP PoolCleaner",
new PoolCleaner(idleTimeout, pools));
assert t.getContextClassLoader() == null;
t.setDaemon(true);
t.start();
return null;
}};
AccessController.doPrivileged(pa);
}
if (debug) {
......
......@@ -30,7 +30,7 @@ package com.sun.jndi.ldap.pool;
*
* @author Rosanna Lee
*/
final public class PoolCleaner extends Thread {
final public class PoolCleaner implements Runnable {
final private Pool[] pools;
final private long period;
......@@ -42,9 +42,9 @@ final public class PoolCleaner extends Thread {
super();
this.period = period;
this.pools = pools.clone();
setDaemon(true);
}
@Override
public void run() {
long threshold;
while (true) {
......
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.tracing;
......
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -411,7 +411,7 @@ class ZoneName {
"Pacific/Wake", "Wake", "Pacific/Wake",
"Pacific/Pago_Pago", "Samoa", "Pacific/Apia",
"America/Moncton", "Atlantic", "America/Halifax",
"Africa/Sao_Tome", "GMT", "Atlantic/Reykjavik",
"Africa/Sao_Tome", "Africa_Western", "Africa/Lagos",
"America/Glace_Bay", "Atlantic", "America/Halifax",
"Asia/Jakarta", "Indonesia_Western", "Asia/Jakarta",
"Africa/Asmera", "Africa_Eastern", "Africa/Nairobi",
......@@ -494,7 +494,6 @@ class ZoneName {
"America/Kralendijk", "Atlantic", "America/Halifax",
};
private static final String[] mzoneMap = new String[] {
"GMT", "ST", "Africa/Sao_Tome",
"GMT", "ML", "Africa/Bamako",
"GMT", "IE", "Europe/Dublin",
"GMT", "SN", "Africa/Dakar",
......@@ -509,6 +508,7 @@ class ZoneName {
"GMT", "GB", "Europe/London",
"GMT", "LR", "Africa/Monrovia",
"GMT", "TG", "Africa/Lome",
"Africa_Western", "ST", "Africa/Sao_Tome",
"Africa_Western", "CF", "Africa/Bangui",
"Africa_Western", "NE", "Africa/Niamey",
"Africa_Western", "CM", "Africa/Douala",
......
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -692,9 +692,8 @@ public final class IsoFields {
return (R) temporal.with(WEEK_BASED_YEAR,
Math.addExact(temporal.get(WEEK_BASED_YEAR), amount));
case QUARTER_YEARS:
// no overflow (256 is multiple of 4)
return (R) temporal.plus(amount / 256, YEARS)
.plus((amount % 256) * 3, MONTHS);
return (R) temporal.plus(amount / 4, YEARS)
.plus((amount % 4) * 3, MONTHS);
default:
throw new IllegalStateException("Unreachable");
}
......
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
import java.util.Collections;
......
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.awt;
/**
* Used for replacing window owner with another non-Swing window.
* It is useful in case of JavaFX-Swing interop:
* it helps to keep Swing dialogs above its owner(JavaFX stage).
*/
public interface OverrideNativeWindowHandle {
/**
* Replaces an owner window with a window with provided handle.
* @param handle native window handle
*/
void overrideWindowHandle(final long handle);
}
......@@ -26,7 +26,10 @@
package sun.misc;
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.ProtectionDomain;
import java.security.PrivilegedAction;
import java.util.concurrent.atomic.AtomicInteger;
/**
* A thread that has no permissions, is not a member of any user-defined
......@@ -36,15 +39,44 @@ import java.security.ProtectionDomain;
*/
public final class InnocuousThread extends Thread {
private static final Unsafe UNSAFE;
private static final ThreadGroup THREADGROUP;
private static final long THREAD_LOCALS;
private static final long INHERITABLE_THREAD_LOCALS;
private static final ThreadGroup INNOCUOUSTHREADGROUP;
private static final AccessControlContext ACC;
private static final long THREADLOCALS;
private static final long INHERITABLETHREADLOCALS;
private static final long INHERITEDACCESSCONTROLCONTEXT;
private static final long CONTEXTCLASSLOADER;
private static final AtomicInteger threadNumber = new AtomicInteger(1);
private static String newName() {
return "InnocuousThread-" + threadNumber.getAndIncrement();
}
/**
* Returns a new InnocuousThread with an auto-generated thread name.
* Its context class loader is set to null.
*/
public static Thread newSystemThread(Runnable target) {
return newSystemThread(newName(), target);
}
/**
* Returns a new InnocuousThread with null context class loader.
*/
public static Thread newSystemThread(String name, Runnable target) {
return new InnocuousThread(INNOCUOUSTHREADGROUP,
target, name, null);
}
public InnocuousThread(Runnable target) {
super(THREADGROUP, target, "anInnocuousThread");
super(INNOCUOUSTHREADGROUP, target, newName());
UNSAFE.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, ACC);
eraseThreadLocals();
}
private InnocuousThread(ThreadGroup group, Runnable target, String name, ClassLoader tccl) {
super(group, target, name, 0L);
UNSAFE.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, ACC);
UNSAFE.putOrderedObject(this, CONTEXTCLASSLOADER, tccl);
eraseThreadLocals();
}
......@@ -79,8 +111,8 @@ public final class InnocuousThread extends Thread {
* Drops all thread locals (and inherited thread locals).
*/
public void eraseThreadLocals() {
UNSAFE.putObject(this, THREADLOCALS, null);
UNSAFE.putObject(this, INHERITABLETHREADLOCALS, null);
UNSAFE.putObject(this, THREAD_LOCALS, null);
UNSAFE.putObject(this, INHERITABLE_THREAD_LOCALS, null);
}
// Use Unsafe to access Thread group and ThreadGroup parent fields
......@@ -95,12 +127,14 @@ public final class InnocuousThread extends Thread {
Class<?> tk = Thread.class;
Class<?> gk = ThreadGroup.class;
THREADLOCALS = UNSAFE.objectFieldOffset
THREAD_LOCALS = UNSAFE.objectFieldOffset
(tk.getDeclaredField("threadLocals"));
INHERITABLETHREADLOCALS = UNSAFE.objectFieldOffset
INHERITABLE_THREAD_LOCALS = UNSAFE.objectFieldOffset
(tk.getDeclaredField("inheritableThreadLocals"));
INHERITEDACCESSCONTROLCONTEXT = UNSAFE.objectFieldOffset
(tk.getDeclaredField("inheritedAccessControlContext"));
CONTEXTCLASSLOADER = UNSAFE.objectFieldOffset
(tk.getDeclaredField("contextClassLoader"));
long tg = UNSAFE.objectFieldOffset(tk.getDeclaredField("group"));
long gp = UNSAFE.objectFieldOffset(gk.getDeclaredField("parent"));
......@@ -113,7 +147,14 @@ public final class InnocuousThread extends Thread {
break;
group = parent;
}
THREADGROUP = new ThreadGroup(group, "InnocuousThreadGroup");
final ThreadGroup root = group;
INNOCUOUSTHREADGROUP = AccessController.doPrivileged(
new PrivilegedAction<ThreadGroup>() {
@Override
public ThreadGroup run() {
return new ThreadGroup(root, "InnocuousThreadGroup");
}
});
} catch (Exception e) {
throw new Error(e);
}
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -889,57 +889,62 @@ public class FileChannelImpl
if (!isOpen())
return null;
long filesize;
do {
filesize = nd.size(fd);
} while ((filesize == IOStatus.INTERRUPTED) && isOpen());
if (!isOpen())
return null;
if (filesize < position + size) { // Extend file size
if (!writable) {
throw new IOException("Channel not open for writing " +
"- cannot extend file to required size");
}
int rv;
long mapSize;
int pagePosition;
synchronized (positionLock) {
long filesize;
do {
rv = nd.truncate(fd, position + size);
} while ((rv == IOStatus.INTERRUPTED) && isOpen());
filesize = nd.size(fd);
} while ((filesize == IOStatus.INTERRUPTED) && isOpen());
if (!isOpen())
return null;
}
if (size == 0) {
addr = 0;
// a valid file descriptor is not required
FileDescriptor dummy = new FileDescriptor();
if ((!writable) || (imode == MAP_RO))
return Util.newMappedByteBufferR(0, 0, dummy, null);
else
return Util.newMappedByteBuffer(0, 0, dummy, null);
}
int pagePosition = (int)(position % allocationGranularity);
long mapPosition = position - pagePosition;
long mapSize = size + pagePosition;
try {
// If no exception was thrown from map0, the address is valid
addr = map0(imode, mapPosition, mapSize);
} catch (OutOfMemoryError x) {
// An OutOfMemoryError may indicate that we've exhausted memory
// so force gc and re-attempt map
System.gc();
try {
Thread.sleep(100);
} catch (InterruptedException y) {
Thread.currentThread().interrupt();
if (filesize < position + size) { // Extend file size
if (!writable) {
throw new IOException("Channel not open for writing " +
"- cannot extend file to required size");
}
int rv;
do {
rv = nd.allocate(fd, position + size);
} while ((rv == IOStatus.INTERRUPTED) && isOpen());
if (!isOpen())
return null;
}
if (size == 0) {
addr = 0;
// a valid file descriptor is not required
FileDescriptor dummy = new FileDescriptor();
if ((!writable) || (imode == MAP_RO))
return Util.newMappedByteBufferR(0, 0, dummy, null);
else
return Util.newMappedByteBuffer(0, 0, dummy, null);
}
pagePosition = (int)(position % allocationGranularity);
long mapPosition = position - pagePosition;
mapSize = size + pagePosition;
try {
// If map0 did not throw an exception, the address is valid
addr = map0(imode, mapPosition, mapSize);
} catch (OutOfMemoryError y) {
// After a second OOME, fail
throw new IOException("Map failed", y);
} catch (OutOfMemoryError x) {
// An OutOfMemoryError may indicate that we've exhausted
// memory so force gc and re-attempt map
System.gc();
try {
Thread.sleep(100);
} catch (InterruptedException y) {
Thread.currentThread().interrupt();
}
try {
addr = map0(imode, mapPosition, mapSize);
} catch (OutOfMemoryError y) {
// After a second OOME, fail
throw new IOException("Map failed", y);
}
}
}
} // synchronized
// On Windows, and potentially other platforms, we need an open
// file descriptor for some mapping operations.
......
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -40,6 +40,8 @@ abstract class FileDispatcher extends NativeDispatcher {
abstract int truncate(FileDescriptor fd, long size) throws IOException;
abstract int allocate(FileDescriptor fd, long size) throws IOException;
abstract long size(FileDescriptor fd) throws IOException;
abstract int lock(FileDescriptor fd, boolean blocking, long pos, long size,
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -61,8 +61,10 @@ import javax.swing.RepaintManager;
import javax.swing.RootPaneContainer;
import javax.swing.SwingUtilities;
import sun.awt.AWTAccessor;
import sun.awt.DisplayChangedListener;
import sun.awt.LightweightFrame;
import sun.awt.OverrideNativeWindowHandle;
import sun.security.action.GetPropertyAction;
import sun.swing.SwingUtilities2.RepaintListener;
......@@ -478,6 +480,17 @@ public final class JLightweightFrame extends LightweightFrame implements RootPan
}
}
//Called by reflection by SwingNode
public void overrideNativeWindowHandle(long handle, Runnable closeWindow) {
final Object peer = AWTAccessor.getComponentAccessor().getPeer(this);
if (peer instanceof OverrideNativeWindowHandle) {
((OverrideNativeWindowHandle) peer).overrideWindowHandle(handle);
}
if (closeWindow != null) {
closeWindow.run();
}
}
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
Class<T> abstractRecognizerClass,
DragSource ds, Component c, int srcActions,
......
/*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -370,7 +370,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -371,7 +371,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"Africa/Nouakchott", GMT},
{"Africa/Ouagadougou", GMT},
{"Africa/Porto-Novo", WAT},
{"Africa/Sao_Tome", GMT},
{"Africa/Sao_Tome", WAT},
{"Africa/Timbuktu", GMT},
{"Africa/Tripoli", EET},
{"Africa/Tunis", CET},
......
......@@ -4,7 +4,9 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -29,10 +29,11 @@ import java.awt.Graphics;
import java.awt.dnd.DropTarget;
import sun.awt.LightweightFrame;
import sun.awt.OverrideNativeWindowHandle;
import sun.swing.JLightweightFrame;
import sun.swing.SwingAccessor;
public class XLightweightFramePeer extends XFramePeer {
public class XLightweightFramePeer extends XFramePeer implements OverrideNativeWindowHandle {
XLightweightFramePeer(LightweightFrame target) {
super(target);
......@@ -80,4 +81,15 @@ public class XLightweightFramePeer extends XFramePeer {
public void removeDropTarget(DropTarget dt) {
getLwTarget().removeDropTarget(dt);
}
private volatile long overriddenWindowHandle = 0L;
@Override
public void overrideWindowHandle(final long handle) {
overriddenWindowHandle = handle;
}
public long getOverriddenWindowHandle() {
return overriddenWindowHandle;
}
}
......@@ -1648,6 +1648,16 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
while (!XlibUtil.isToplevelWindow(tpw) && !XlibUtil.isXAWTToplevelWindow(tpw)) {
tpw = XlibUtil.getParentWindow(tpw);
}
XBaseWindow parent = transientForWindow;
if (parent instanceof XLightweightFramePeer) {
XLightweightFramePeer peer = (XLightweightFramePeer) parent;
long ownerWindowPtr = peer.getOverriddenWindowHandle();
if (ownerWindowPtr != 0) {
tpw = ownerWindowPtr;
}
}
XlibWrapper.XSetTransientFor(XToolkit.getDisplay(), bpw, tpw);
window.curRealTransientFor = transientForWindow;
}
......
/*
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package sun.java2d.x11;
import java.awt.image.*;
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -80,6 +80,10 @@ class FileDispatcherImpl extends FileDispatcher {
return truncate0(fd, size);
}
int allocate(FileDescriptor fd, long size) throws IOException {
return allocate0(fd, size);
}
long size(FileDescriptor fd) throws IOException {
return size0(fd);
}
......@@ -142,6 +146,9 @@ class FileDispatcherImpl extends FileDispatcher {
static native int truncate0(FileDescriptor fd, long size)
throws IOException;
static native int allocate0(FileDescriptor fd, long size)
throws IOException;
static native long size0(FileDescriptor fd) throws IOException;
static native int lock0(FileDescriptor fd, boolean blocking, long pos,
......
/*
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,6 +23,10 @@
* questions.
*/
#if defined(__linux__)
#define _FILE_OFFSET_BITS 64
#endif
#include "jni.h"
#include "jni_util.h"
#include "jvm.h"
......@@ -208,6 +212,25 @@ jint
handleSetLength(FD fd, jlong length)
{
int result;
#if defined(__linux__)
/*
* On Linux, if the file size is being increased, then ftruncate64()
* will modify the metadata value of the size without actually allocating
* any blocks which can cause a SIGBUS error if the file is subsequently
* memory-mapped.
*/
struct stat64 sb;
if (fstat64(fd, &sb) == 0 && length > sb.st_blocks*512) {
RESTARTABLE(posix_fallocate(fd, 0, length), result);
// Return on success or if errno is neither EOPNOTSUPP nor ENOSYS
if (result == 0) {
return 0;
} else if (errno != EOPNOTSUPP && errno != ENOSYS) {
return result;
}
}
#endif
RESTARTABLE(ftruncate64(fd, length), result);
return result;
}
......
/*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,6 +23,10 @@
* questions.
*/
#if defined(__linux__)
#define _FILE_OFFSET_BITS 64
#endif
#include "jni.h"
#include "jni_util.h"
#include "jvm.h"
......@@ -178,6 +182,30 @@ Java_sun_nio_ch_FileDispatcherImpl_truncate0(JNIEnv *env, jobject this,
"Truncation failed");
}
JNIEXPORT jint JNICALL
Java_sun_nio_ch_FileDispatcherImpl_allocate0(JNIEnv *env, jobject this,
jobject fdo, jlong size)
{
#if defined(__linux__)
/*
* On Linux, if the file size is being increased, then ftruncate64()
* will modify the metadata value of the size without actually allocating
* any blocks which can cause a SIGBUS error if the file is subsequently
* memory-mapped.
*/
// Return on success or if errno is neither EOPNOTSUPP nor ENOSYS
int result = posix_fallocate(fdval(env, fdo), 0, size);
if (result == 0) {
return 0;
} else if (errno != EOPNOTSUPP && errno != ENOSYS) {
return handle(env, result, "Allocation failed");
}
#endif
return handle(env,
ftruncate64(fdval(env, fdo), size),
"Truncation failed");
}
JNIEXPORT jlong JNICALL
Java_sun_nio_ch_FileDispatcherImpl_size0(JNIEnv *env, jobject this, jobject fdo)
{
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -32,10 +32,11 @@ import java.awt.event.ComponentEvent;
import java.awt.event.MouseEvent;
import sun.awt.LightweightFrame;
import sun.awt.OverrideNativeWindowHandle;
import sun.swing.JLightweightFrame;
import sun.swing.SwingAccessor;
public class WLightweightFramePeer extends WFramePeer {
public class WLightweightFramePeer extends WFramePeer implements OverrideNativeWindowHandle {
public WLightweightFramePeer(LightweightFrame target) {
super(target);
......@@ -50,6 +51,13 @@ public class WLightweightFramePeer extends WFramePeer {
return getLwTarget().getGraphics();
}
private native void overrideNativeHandle(long hwnd);
@Override
public void overrideWindowHandle(final long handle) {
overrideNativeHandle(handle);
}
@Override
public void show() {
super.show();
......
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -93,6 +93,11 @@ class FileDispatcherImpl extends FileDispatcher {
return truncate0(fd, size);
}
int allocate(FileDescriptor fd, long size) throws IOException {
// truncate0() works for extending and truncating file size
return truncate0(fd, size);
}
long size(FileDescriptor fd) throws IOException {
return size0(fd);
}
......
/*
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -119,7 +119,8 @@ AwtDialog* AwtDialog::Create(jobject peer, jobject parent)
if (parent != NULL) {
JNI_CHECK_PEER_GOTO(parent, done);
awtParent = (AwtWindow *)pData;
hwndParent = awtParent->GetHWnd();
HWND oHWnd = awtParent->GetOverriddenHWnd();
hwndParent = oHWnd ? oHWnd : awtParent->GetHWnd();
} else {
// There is no way to prevent a parentless dialog from showing on
// the taskbar other than to specify an invisible parent and set
......
/*
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -251,13 +251,7 @@ AwtFileDialog::Show(void *p)
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
/*
* There's a situation (see bug 4906972) when InvokeFunction (by which this method is called)
* returnes earlier than this method returnes. Probably it's caused due to ReplyMessage system call.
* So for the avoidance of this mistiming we need to make new global reference here
* (not local as it's used by the hook) and then manage it independently of the calling thread.
*/
peer = env->NewGlobalRef((jobject)p);
peer = (jobject)p;
try {
DASSERT(peer);
......
......@@ -169,7 +169,8 @@ AwtFrame* AwtFrame::Create(jobject self, jobject parent)
JNI_CHECK_PEER_GOTO(parent, done);
{
AwtFrame* parent = (AwtFrame *)pData;
hwndParent = parent->GetHWnd();
HWND oHWnd = parent->GetOverriddenHWnd();
hwndParent = oHWnd ? oHWnd : parent->GetHWnd();
}
}
......
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -148,6 +148,10 @@ struct SetFullScreenExclusiveModeStateStruct {
jboolean isFSEMState;
};
struct OverrideHandle {
jobject frame;
HWND handle;
};
/************************************************************************
* AwtWindow fields
......@@ -223,6 +227,7 @@ AwtWindow::AwtWindow() {
m_alwaysOnTop = false;
fullScreenExclusiveModeState = FALSE;
m_overriddenHwnd = NULL;
}
AwtWindow::~AwtWindow()
......@@ -2471,6 +2476,24 @@ ret:
delete rfs;
}
void AwtWindow::_OverrideHandle(void *param)
{
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
OverrideHandle* oh = (OverrideHandle *)param;
jobject self = oh->frame;
AwtWindow *f = NULL;
PDATA pData;
JNI_CHECK_PEER_GOTO(self, ret);
f = (AwtWindow *)pData;
f->OverrideHWnd(oh->handle);
ret:
env->DeleteGlobalRef(self);
delete oh;
}
/*
* This is AwtWindow-specific function that is not intended for reusing
*/
......@@ -3108,7 +3131,29 @@ Java_java_awt_Window_initIDs(JNIEnv *env, jclass cls)
CATCH_BAD_ALLOC;
}
} /* extern "C" */
/*
* Class: sun_awt_windows_WLightweightFramePeer
* Method: overrideNativeHandle
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_sun_awt_windows_WLightweightFramePeer_overrideNativeHandle
(JNIEnv *env, jobject self, jlong hwnd)
{
TRY;
OverrideHandle *oh = new OverrideHandle;
oh->frame = env->NewGlobalRef(self);
oh->handle = (HWND)hwnd;
AwtToolkit::GetInstance().SyncCall(AwtFrame::_OverrideHandle, oh);
// global ref and oh are deleted in _OverrideHandle()
CATCH_BAD_ALLOC;
}
}/* extern "C" */
/************************************************************************
......
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -241,6 +241,7 @@ public:
static void _UpdateWindow(void* param);
static void _RepositionSecurityWarning(void* param);
static void _SetFullScreenExclusiveModeState(void* param);
static void _OverrideHandle(void *param);
inline static BOOL IsResizing() {
return sm_resizing;
......@@ -256,6 +257,9 @@ public:
static void FocusedWindowChanged(HWND from, HWND to);
inline HWND GetOverriddenHWnd() { return m_overriddenHwnd; }
inline void OverrideHWnd(HWND hwnd) { m_overriddenHwnd = hwnd; }
private:
static int ms_instanceCounter;
static HHOOK ms_hCBTFilter;
......@@ -307,6 +311,9 @@ private:
// The tooltip that appears when hovering the icon
HWND securityTooltipWindow;
//Allows substitute parent window with JavaFX stage to make it below a dialog
HWND m_overriddenHwnd;
UINT warningWindowWidth;
UINT warningWindowHeight;
void InitSecurityWarningSize(JNIEnv *env);
......
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
* @test
* @bug 8177758
* @requires os.family == "windows"
* @summary Regression in java.awt.FileDialog
* @run main FileDialogLeakTest
*/
public class FileDialogLeakTest {
static CountDownLatch latch = new CountDownLatch(3);
static boolean passed;
public static void main(String[] args) throws Exception {
test();
System.gc();
System.runFinalization();
latch.await(1, TimeUnit.SECONDS);
if (!passed) {
throw new RuntimeException("Test failed.");
}
}
private static void test() throws Exception {
FileDialog fd = new FileDialog((Frame) null) {
@Override
protected void finalize() throws Throwable {
System.out.println("Finalize");
super.finalize();
passed = true;
latch.countDown();
}
};
new Thread(() -> {
latch.countDown();
fd.setVisible(true);
latch.countDown();
}).start();
latch.await(1, TimeUnit.SECONDS);
fd.dispose();
latch.await(1, TimeUnit.SECONDS);
}
}
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @ignore This test has huge disk space requirements
* @bug 8168628
* @summary Test extending files to very large sizes without hitting a SIGBUS
* @requires (os.family == "linux")
* @run main/othervm/timeout=600 -Xms4g -Xmx4g FileExtensionAndMap
* @run main/othervm/timeout=600 -Xms4g -Xmx4g FileExtensionAndMap true
*/
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileChannel.MapMode;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Semaphore;
import java.util.stream.IntStream;
public class FileExtensionAndMap {
private static final ExecutorService CACHED_EXECUTORSERVICE =
Executors.newCachedThreadPool();
private static final String TMPDIR = System.getProperty("test.dir", ".");
private static boolean useRaf = false;
public static void main(String args[]) throws Exception {
if (args.length > 2) {
throw new IllegalArgumentException
("Arguments: [true|false [targetFolder]]");
}
String defaultFolder = TMPDIR + File.separator + "target";
if (args.length > 0) {
useRaf = Boolean.valueOf(args[0]);
if (args.length > 1) {
defaultFolder = args[1];
}
}
final String targetFolder = defaultFolder;
Path p = Paths.get(targetFolder);
boolean targetExists = Files.exists(p);
if (!targetExists) {
Files.createDirectory(p);
}
System.out.printf("Using RandomAccessFile: %s; target folder: %s%n",
useRaf, targetFolder);
ForkJoinPool fjPool = new ForkJoinPool(3);
fjPool.submit(() -> {
IntStream.range(0, 20).parallel().forEach((index) -> {
String fileName = "testBigFile_" + index + ".dat";
Path source = null;
Path target = null;
try {
source = Paths.get(TMPDIR, fileName);
testCreateBigFile(source);
target = Paths.get(targetFolder, fileName);
testFileCopy(source, target);
} catch (Throwable th) {
System.err.println("Error copying file with fileName: "
+ fileName + " : " + th.getMessage());
th.printStackTrace(System.err);
} finally {
try {
if (source != null) {
Files.deleteIfExists(source);
}
} catch (Throwable ignored) {
}
try {
if (target != null) {
Files.deleteIfExists(target);
}
} catch (Throwable ignored) {
}
}
});
}).join();
if (!targetExists) {
Files.delete(p);
}
}
private static void testFileCopy(Path source, Path target)
throws IOException {
Files.copy(source, target, StandardCopyOption.REPLACE_EXISTING);
System.out.println("Finished copying file with fileName: "
+ source.getFileName());
}
private static void testCreateBigFile(Path segmentFile)
throws IOException {
final Semaphore concurrencySemaphore = new Semaphore(5);
long fileSize = 3L * 1024L * 1024L * 1024L;
int blockSize = 10 * 1024 * 1024;
int loopCount = (int) Math.floorDiv(fileSize, blockSize);
String fileName = segmentFile.getFileName().toString();
if (useRaf) {
try (RandomAccessFile raf
= new RandomAccessFile(segmentFile.toFile(), "rw")) {
raf.setLength(fileSize);
try (FileChannel fc = raf.getChannel()) {
for (int i = 0; i < loopCount; i++) {
final long startPosition = 1L * blockSize * i;
concurrencySemaphore.acquireUninterruptibly();
CACHED_EXECUTORSERVICE.submit(() -> {
writeTemplateData(fileName, fc, startPosition,
blockSize, concurrencySemaphore);
});
}
} finally {
concurrencySemaphore.acquireUninterruptibly(5);
}
}
} else {
Path file = Files.createFile(segmentFile);
try (FileChannel fc = FileChannel.open(file,
StandardOpenOption.READ, StandardOpenOption.WRITE)) {
for (int i = 0; i < loopCount; i++) {
final long startPosition = 1L * blockSize * i;
concurrencySemaphore.acquireUninterruptibly();
CACHED_EXECUTORSERVICE.submit(() -> {
writeTemplateData(fileName, fc, startPosition,
blockSize, concurrencySemaphore);
});
}
}
}
}
private static void writeTemplateData(String fileName,
FileChannel fc, long startPosition, int blockSize,
Semaphore concurrencySemaphore) {
try {
byte[] EMPTY_RECORD = new byte[blockSize / 256];
MappedByteBuffer mappedByteBuffer = fc.map(MapMode.READ_WRITE,
startPosition, blockSize);
IntStream.range(0, 256).forEach((recordIndex) -> {
try {
mappedByteBuffer.position((int) (recordIndex *
EMPTY_RECORD.length));
mappedByteBuffer.put(EMPTY_RECORD, 0, EMPTY_RECORD.length);
} catch (Throwable th) {
System.err.println
("Error in FileExtensionAndMap.writeTemplateData empty record for fileName: "
+ fileName + ", startPosition: " + startPosition + ", recordIndex: "
+ recordIndex + " : " + th.getMessage());
th.printStackTrace(System.err);
}
});
mappedByteBuffer.force();
} catch (Throwable th) {
if (!(th instanceof ClosedChannelException)) {
System.err.println
("Error in FileExtensionAndMap.writeTemplateData empty record for fileName: "
+ fileName + ", startPosition: " + startPosition + " : "
+ th.getMessage());
th.printStackTrace(System.err);
}
} finally {
concurrencySemaphore.release();
}
}
}
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -67,6 +67,7 @@ import static org.testng.Assert.assertTrue;
import java.time.LocalDate;
import java.time.Month;
import java.time.temporal.ChronoUnit;
import java.time.temporal.IsoFields;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
......@@ -444,4 +445,40 @@ public class TestLocalDate extends AbstractTest {
}
}
@DataProvider(name="quarterYearsToAdd")
Object[][] provider_quarterYearsToAdd() {
return new Object[][] {
{Long.valueOf(-1000000000)},
{Long.valueOf(-256)},
{Long.valueOf(-255)},
{Long.valueOf(-1)},
{Long.valueOf(0)},
{Long.valueOf(1)},
{Long.valueOf(255)},
{Long.valueOf(256)},
{Long.valueOf(1000000000)},
};
}
@Test(dataProvider="quarterYearsToAdd")
public void test_plus_QuarterYears(long quarterYears) {
LocalDate t0 = TEST_2007_07_15
.plus(quarterYears, IsoFields.QUARTER_YEARS);
LocalDate t1 = TEST_2007_07_15
.plus(quarterYears, ChronoUnit.MONTHS)
.plus(quarterYears, ChronoUnit.MONTHS)
.plus(quarterYears, ChronoUnit.MONTHS);
assertEquals(t0, t1);
}
@Test(dataProvider="quarterYearsToAdd")
public void test_minus_QuarterYears(long quarterYears) {
LocalDate t0 = TEST_2007_07_15
.minus(quarterYears, IsoFields.QUARTER_YEARS);
LocalDate t1 = TEST_2007_07_15
.minus(quarterYears, ChronoUnit.MONTHS)
.minus(quarterYears, ChronoUnit.MONTHS)
.minus(quarterYears, ChronoUnit.MONTHS);
assertEquals(t0, t1);
}
}
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -194,7 +194,7 @@ class ZoneName {
"Pacific/Rarotonga", "Cook", "Pacific/Rarotonga",
"America/Louisville", "America_Eastern", "America/New_York",
"Africa/El_Aaiun", "Europe_Western", "Atlantic/Canary",
"Africa/Sao_Tome", "GMT", "Atlantic/Reykjavik",
"Africa/Sao_Tome", "Africa_Western", "Africa/Lagos",
"Pacific/Fiji", "Fiji", "Pacific/Fiji",
"Asia/Damascus", "Europe_Eastern", "Europe/Bucharest",
"Asia/Ulaanbaatar", "Mongolia", "Asia/Ulaanbaatar",
......@@ -508,6 +508,7 @@ class ZoneName {
"Africa_Central", "CD", "Africa/Lubumbashi",
"Africa_Central", "BI", "Africa/Bujumbura",
"Africa_Central", "RW", "Africa/Kigali",
"Africa_Western", "ST", "Africa/Sao_Tome",
"Africa_Western", "CF", "Africa/Bangui",
"Africa_Western", "AO", "Africa/Luanda",
"Africa_Western", "NE", "Africa/Niamey",
......@@ -549,7 +550,6 @@ class ZoneName {
"GMT", "GN", "Africa/Conakry",
"GMT", "SL", "Africa/Freetown",
"GMT", "BF", "Africa/Ouagadougou",
"GMT", "ST", "Africa/Sao_Tome",
"GMT", "SN", "Africa/Dakar",
"GMT", "CI", "Africa/Abidjan",
"GMT", "IE", "Europe/Dublin",
......
......@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2017c
tzdata2018c
......@@ -181,7 +181,6 @@ Link Africa/Abidjan Africa/Freetown # Sierra Leone
Link Africa/Abidjan Africa/Lome # Togo
Link Africa/Abidjan Africa/Nouakchott # Mauritania
Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso
Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe
Link Africa/Abidjan Atlantic/St_Helena # St Helena
# Djibouti
......@@ -448,7 +447,7 @@ Link Africa/Nairobi Indian/Mayotte
#
# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30.
#
# In 1972 Liberia was the last country to switch from a UTC offset
# In 1972 Liberia was the last country to switch from a UT offset
# that was not a multiple of 15 or 20 minutes. The 1972 change was on
# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of:
# Presidential Papers: First year of the administration of
......@@ -1060,6 +1059,19 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
# Inaccessible, Nightingale: uninhabited
# São Tomé and Príncipe
# From Steffen Thorsen (2018-01-08):
# Multiple sources tell that São Tomé changed from UTC to UTC+1 as
# they entered the year 2018.
# From Michael Deckers (2018-01-08):
# the switch is from 01:00 to 02:00 ... [Decree No. 25/2017]
# http://www.mnec.gov.st/index.php/publicacoes/documentos/file/90-decreto-lei-n-25-2017
Zone Africa/Sao_Tome 0:26:56 - LMT 1884
-0:36:45 - LMT 1912 # Lisbon Mean Time
0:00 - GMT 2018 Jan 1 01:00
1:00 - WAT
# Senegal
# See Africa/Abidjan.
......
......@@ -73,7 +73,7 @@
# 9:00 KST KDT Korea when at +09
# 9:30 ACST Australian Central Standard Time
# Otherwise, these tables typically use numeric abbreviations like +03
# and +0330 for integer hour and minute UTC offsets. Although earlier
# and +0330 for integer hour and minute UT offsets. Although earlier
# editions invented alphabetic time zone abbreviations for every
# offset, this did not reflect common practice.
#
......@@ -670,17 +670,17 @@ Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30
# time", in which abolished the adoption of Western Standard Time in
# western islands (listed above), which means the whole Japan
# territory, including later occupations, adopt Japan Central Time
# (UTC+9). The adoption began on Oct 1, 1937. The original text can
# (UT+9). The adoption began on Oct 1, 1937. The original text can
# be found on Wikisource:
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
#
# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937.
# That is, the time zone of Taipei switched to UT+9 on Oct 1, 1937.
# From Yu-Cheng Chuang (2014-07-02):
# I've found more evidence about when the time zone was switched from UTC+9
# back to UTC+8 after WW2. I believe it was on Sep 21, 1945. In a document
# I've found more evidence about when the time zone was switched from UT+9
# back to UT+8 after WW2. I believe it was on Sep 21, 1945. In a document
# during Japanese era [1] in which the officer told the staff to change time
# zone back to Western Standard Time (UTC+8) on Sep 21. And in another
# zone back to Western Standard Time (UT+8) on Sep 21. And in another
# history page of National Cheng Kung University [2], on Sep 21 there is a
# note "from today, switch back to Western Standard Time". From these two
# materials, I believe that the time zone change happened on Sep 21. And
......@@ -1487,17 +1487,17 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880
# of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who
# wanted to keep it.)
# From Paul Eggert (2006-03-22):
# Shanks & Pottenger write that DST in Japan during those years was as follows:
# From Takayuki Nikai (2018-01-19):
# The source of information is Japanese law.
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00219480428029.htm
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
# ... In summary, it is written as follows. From 24:00 on the first Saturday
# in May, until 0:00 on the day after the second Saturday in September.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Japan 1948 only - May Sun>=1 2:00 1:00 D
Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S
Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D
Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
# but the only locations using it (for birth certificates, presumably, since
# their audience is astrologers) were US military bases. For now, assume
# that for most purposes daylight-saving time was observed; otherwise, what
# would have been the point of the 1951 poll?
Rule Japan 1948 only - May Sat>=1 24:00 1:00 D
Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S
Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D
Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
# From Hideyuki Suzuki (1998-11-09):
# 'Tokyo' usually stands for the former location of Tokyo Astronomical
......@@ -1528,7 +1528,7 @@ Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
#
# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which
# means the whole Japan territory, including later occupations, adopt Japan
# Central Time (UTC+9). The adoption began on Oct 1, 1937.
# Central Time (UT+9). The adoption began on Oct 1, 1937.
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
......@@ -2089,8 +2089,8 @@ Zone Asia/Kuching 7:21:20 - LMT 1926 Mar
# Maldives
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
4:54:00 - MMT 1960 # Male Mean Time
Zone Indian/Maldives 4:54:00 - LMT 1880 # Malé
4:54:00 - MMT 1960 # Malé Mean Time
5:00 - +05
# Mongolia
......
......@@ -706,8 +706,8 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
# From Steffen Thorsen (2012-07-25)
# ... we double checked by calling hotels and offices based in Tokelau asking
# about the time there, and they all told a time that agrees with UTC+13....
# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change
# actually was to UTC-11 back then.
# Shanks says UT-10 from 1901 [but] ... there is a good chance the change
# actually was to UT-11 back then.
#
# From Paul Eggert (2012-07-25)
# A Google Books snippet of Appendix to the Journals of the House of
......@@ -1473,7 +1473,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
#
# From Paul Eggert (2006-03-22):
# The Department of Internal Affairs (DIA) maintains a brief history,
# as does Carol Squires; see tz-link.htm for the full references.
# as does Carol Squires; see tz-link.html for the full references.
# Use these sources in preference to Shanks & Pottenger.
#
# For Chatham, IATA SSIM (1991/1999) gives the NZ rules but with
......
......@@ -91,14 +91,15 @@
# 0:00 WET WEST WEMT Western Europe
# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937)
# 1:00 BST British Standard (1968-1971)
# 1:00 IST GMT Irish Standard (1968-) with winter DST
# 1:00 CET CEST CEMT Central Europe
# 1:00:14 SET Swedish (1879-1899)
# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)*
# 2:00 EET EEST Eastern Europe
# 3:00 MSK MSD MDST* Moscow
# From Peter Ilieve (1994-12-04),
# The original six [EU members]: Belgium, France, (West) Germany, Italy,
# From Peter Ilieve (1994-12-04), re EEC/EC/EU members:
# The original six: Belgium, France, (West) Germany, Italy,
# Luxembourg, the Netherlands.
# Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom.
# Plus, from 1 Jan 81: Greece.
......@@ -301,16 +302,31 @@
# The following claim by Shanks & Pottenger is possible though doubtful;
# we'll ignore it for now.
# * Dublin's 1971-10-31 switch was at 02:00, even though London's was 03:00.
# From Paul Eggert (2017-12-04):
#
#
# Whitman says Dublin Mean Time was -0:25:21, which is more precise than
# Shanks & Pottenger.
# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory
# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was
# to London. For example:
# Dunsink Observatory (8 km NW of Dublin's center) was to Dublin as
# Greenwich was to London. For example:
#
# "Timeball on the ballast office is down. Dunsink time."
# -- James Joyce, Ulysses
#
# The abbreviation DMT stood for "Dublin Mean Time" or "Dunsink Mean Time";
# this being Ireland, opinions differed.
#
# Whitman says Dublin/Dunsink Mean Time was UT-00:25:21, which agrees
# with measurements of recent visitors to the Meridian Room of Dunsink
# Observatory; see Malone D. Dunsink and timekeeping. 2016-01-24.
# <https://www.maths.tcd.ie/~dwmalone/time/dunsink.html>. Malone
# writes that the Nautical Almanac listed UT-00:25:22 until 1896, when
# it moved to UT-00:25:21.1 (I confirmed that the 1893 edition used
# the former and the 1896 edition used the latter). Evidently the
# news of this change propagated slowly, as Milne 1899 still lists
# UT-00:25:22 and cites the International Telegraph Bureau. As it is
# not clear that there was any practical significance to the change
# from UT-00:25:22 to UT-00:25:21.1 in civil timekeeping, omit this
# transition for now and just use the latter value, omitting its
# fraction since our format cannot represent fractions.
# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time
# was among various actions undertaken by the 'English' government that
......@@ -370,12 +386,28 @@
# regulations. I spoke this morning with the Secretary of the Department of
# Justice (tel +353 1 678 9711) who confirmed to me that the correct name is
# "Irish Summer Time", abbreviated to "IST".
#
# From Paul Eggert (2017-12-07):
# The 1996 anonymous contributor's goal was to determine the correct
# abbreviation for summer time in Dublin and so the contributor
# focused on the "IST", not on the "Irish Summer Time". Though the
# "IST" was correct, the "Irish Summer Time" appears to have been an
# error, as Ireland's Standard Time (Amendment) Act, 1971 states that
# standard time in Ireland remains at UT +01 and is observed in
# summer, and that Greenwich mean time is observed in winter. (Thanks
# to Derick Rethans for pointing out the error.) That is, when
# Ireland amended the 1968 act that established UT +01 as Irish
# Standard Time, it left standard time unchanged and established GMT
# as a negative daylight saving time in winter. So, in this database
# IST stands for Irish Summer Time for timestamps before 1968, and for
# Irish Standard Time after that. See:
# http://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print
# Michael Deckers (2017-06-01) gave the following URLs for Ireland's
# Summer Time Act, 1925 and Summer Time Orders, 1926 and 1947:
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print.html
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print.html
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print.html
# http://www.irishstatutebook.ie/eli/1925/act/8/enacted/en/print
# http://www.irishstatutebook.ie/eli/1926/sro/919/made/en/print
# http://www.irishstatutebook.ie/eli/1947/sro/71/made/en/print
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Summer Time Act, 1916
......@@ -499,9 +531,23 @@ Link Europe/London Europe/Jersey
Link Europe/London Europe/Guernsey
Link Europe/London Europe/Isle_of_Man
# From Paul Eggert (2018-01-19):
# The following is like GB-Eire and EU, except with standard time in
# summer and negative daylight saving time in winter.
# Although currently commented out, this will need to become uncommented
# once the ICU/OpenJDK workaround is removed; see below.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
#Rule Eire 1971 only - Oct 31 2:00u -1:00 GMT
#Rule Eire 1972 1980 - Mar Sun>=16 2:00u 0 IST
#Rule Eire 1972 1980 - Oct Sun>=23 2:00u -1:00 GMT
#Rule Eire 1981 max - Mar lastSun 1:00u 0 IST
#Rule Eire 1981 1989 - Oct Sun>=23 1:00u -1:00 GMT
#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 GMT
#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 GMT
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00s # Dublin MT
-0:25:21 - DMT 1916 May 21 2:00s
-0:25:21 1:00 IST 1916 Oct 1 2:00s
0:00 GB-Eire %s 1921 Dec 6 # independence
0:00 GB-Eire GMT/IST 1940 Feb 25 2:00s
......@@ -510,16 +556,33 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
0:00 1:00 IST 1947 Nov 2 2:00s
0:00 - GMT 1948 Apr 18 2:00s
0:00 GB-Eire GMT/IST 1968 Oct 27
# From Paul Eggert (2018-01-18):
# The next line should look like this:
# 1:00 Eire IST/GMT
# However, in January 2018 we discovered that the Eire rules cause
# problems with tests for ICU:
# https://mm.icann.org/pipermail/tz/2018-January/025825.html
# and with tests for OpenJDK:
# https://mm.icann.org/pipermail/tz/2018-January/025822.html
# To work around this problem, use a traditional approximation for
# time stamps after 1971-10-31 02:00 UTC, to give ICU and OpenJDK
# developers breathing room to fix bugs. This approximation has
# correct UTC offsets, but results in tm_isdst flags are the reverse
# of what they should be. This workaround is temporary and should be
# removed reasonably soon.
1:00 - IST 1971 Oct 31 2:00u
0:00 GB-Eire GMT/IST 1996
0:00 EU GMT/IST
# End of workaround for ICU and OpenJDK bugs.
###############################################################################
# Europe
# EU rules are for the European Union, previously known as the EC, EEC,
# Common Market, etc.
# The following rules are for the European Union and for its
# predecessor organization, the European Communities.
# For brevity they are called "EU rules" elsewhere in this file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S
......@@ -952,7 +1015,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850
# The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL
# confirms this, and states that the law was put forth 1893-03-29.
#
# The EU treaty with effect from 1973:
# The EU [actually, EEC and Euratom] treaty with effect from 1973:
# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL
#
# This provoked a new law from 1974 to make possible summer time changes
......@@ -1008,9 +1071,10 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
# East Greenland and Franz Josef Land, but we don't know their time zones.
# My source for this is Wilhelm Dege's book mentioned under Svalbard.
#
# From Paul Eggert (2006-03-22):
# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01,
# and left the EU on 1985-02-01. It therefore should have been using EU
# From Paul Eggert (2017-12-10):
# Greenland joined the European Communities as part of Denmark,
# obtained home rule on 1979-05-01, and left the European Communities
# on 1985-02-01. It therefore should have been using EU
# rules at least through 1984. Shanks & Pottenger say Scoresbysund and Godthåb
# used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU
# rules since at least 1991. Assume EU rules since 1980.
......@@ -1324,7 +1388,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
# From Markus Kuhn (1998-09-29):
# The German time zone web site by the Physikalisch-Technische
# Bundesanstalt contains DST information back to 1916.
# [See tz-link.htm for the URL.]
# [See tz-link.html for the URL.]
# From Jörg Schilling (2002-10-23):
# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by
......@@ -1421,7 +1485,7 @@ Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
1:00 Greece CE%sT 1944 Apr 4
2:00 Greece EE%sT 1981
# Shanks & Pottenger say it switched to C-Eur in 1981;
# go with EU instead, since Greece joined it on Jan 1.
# go with EU rules instead, since Greece joined Jan 1.
2:00 EU EE%sT
# Hungary
......@@ -2120,7 +2184,7 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880
# IATA SSIM (1991/1992) reports that the Azores were at -1:00.
# IATA SSIM (1993-02) says +0:00; later issues (through 1996-09) say -1:00.
# Guess that the Azores changed to EU rules in 1992 (since that's when Portugal
# harmonized with the EU), and that they stayed +0:00 that winter.
# harmonized with EU rules), and that they stayed +0:00 that winter.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# DSH writes that despite Decree 1,469 (1915), the change to the clocks was not
......@@ -2795,9 +2859,9 @@ Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14
#
# https://regnum.ru/news/society/1957270.html
# has some historical data for Altai Krai:
# before 1957: west part on UTC+6, east on UTC+7
# after 1957: UTC+7
# since 1995: UTC+6
# before 1957: west part on UT+6, east on UT+7
# after 1957: UT+7
# since 1995: UT+6
# http://barnaul.rusplt.ru/index/pochemu_altajskij_kraj_okazalsja_v_neprivychnom_chasovom_pojase-17648.html
# confirms that and provides more details including 1995-05-28 transition date.
......@@ -3605,6 +3669,17 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# The change is permanent, so this is the new standard time in Turkey.
# It takes effect today, which is not much notice.
# From Kıvanç Yazan (2017-10-28):
# Turkey will go back to Daylight Saving Time starting 2018-10.
# http://www.resmigazete.gov.tr/eskiler/2017/10/20171028-5.pdf
#
# From Even Scharning (2017-11-08):
# ... today it was announced that the DST will become "continuous":
# http://www.hurriyet.com.tr/son-dakika-yaz-saati-uygulamasi-surekli-hale-geldi-40637482
# From Paul Eggert (2017-11-08):
# Although Google Translate misfires on that source, it looks like
# Turkey reversed last month's decision, and so will stay at +03.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
Rule Turkey 1916 only - Oct 1 0:00 0 -
......
......@@ -80,5 +80,5 @@ Leap 2012 Jun 30 23:59:60 + S
Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
# Updated through IERS Bulletin C54
# File expires on: 28 June 2018
# Updated through IERS Bulletin C55
# File expires on: 28 December 2018
......@@ -371,6 +371,18 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# Nebraska, eastern North Dakota, Oklahoma, eastern South Dakota,
# western Tennessee, most of Texas, Wisconsin
# From Paul Eggert (2018-01-07):
# In 1869 the Chicago Astronomical Society contracted with the city to keep
# time. Though delayed by the Great Fire, by 1880 a wire ran from the
# Dearborn Observatory (on the University of Chicago campus) to City Hall,
# which then sent signals to police and fire stations. However, railroads got
# their time signals from the Allegheny Observatory, the Madison Observatory,
# the Ann Arbor Observatory, etc., so their clocks did not agree with each
# other or with the city's official time. The confusion took some years to
# clear up. See:
# Moser M. How Chicago gave America its time zones. Chicago. 2018-01-04.
# http://www.chicagomag.com/city-life/January-2018/How-Chicago-Gave-America-Its-Time-Zones/
# From Larry M. Smith (2006-04-26) re Wisconsin:
# https://docs.legis.wisconsin.gov/statutes/statutes/175.pdf
# is currently enforced at the 01:00 time of change. Because the local
......@@ -1919,7 +1931,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
# manager of the Creston & District Museum. The article was written in May 2009.
# http://www.ilovecreston.com/?p=articles&t=spec&ar=260
# According to the article, Creston has not changed its clocks since June 1918.
# i.e. Creston has been stuck on UTC-7 for 93 years.
# i.e. Creston has been stuck on UT-7 for 93 years.
# Dawson Creek, on the other hand, changed its clocks as recently as April 1972.
# Unfortunately the exact date for the time change in June 1918 remains
......
......@@ -48,7 +48,7 @@
# https://www.jstor.org/stable/1774359
#
# These tables use numeric abbreviations like -03 and -0330 for
# integer hour and minute UTC offsets. Although earlier editions used
# integer hour and minute UT offsets. Although earlier editions used
# alphabetic time zone abbreviations, these abbreviations were
# invented and did not reflect common practice.
......@@ -602,7 +602,7 @@ Link America/Curacao America/Aruba
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/La_Paz -4:32:36 - LMT 1890
-4:32:36 - CMT 1931 Oct 15 # Calamarca MT
-4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST
-4:32:36 1:00 BST 1932 Mar 21 # Bolivia ST
-4:00 - -04
# Brazil
......@@ -931,12 +931,25 @@ Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
# [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the
# 3rd Feb Sunday. There is an exception on the return date when this is
# the Carnival Sunday then the return date will be the next Sunday...
Rule Brazil 2008 max - Oct Sun>=15 0:00 1:00 S
Rule Brazil 2008 2017 - Oct Sun>=15 0:00 1:00 S
Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 -
# Decree 7,584 <http://pcdsh01.on.br/HVdecreto7584_20111013.jpg> (2011-10-13)
# added Bahia.
Rule Brazil 2012 only - Feb Sun>=22 0:00 0 -
# Decree 7,826 <http://pcdsh01.on.br/HVdecreto7826_20121015.jpg> (2012-10-15)
# removed Bahia and added Tocantins.
# Decree 8,112 <http://pcdsh01.on.br/HVdecreto8112_20130930.JPG> (2013-09-30)
# removed Tocantins.
Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 -
Rule Brazil 2015 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 -
# From Steffen Thorsen (2017-12-18):
# According to many media sources, next year's DST start in Brazil will move to
# the first Sunday of November, and it will stay like that for the years after.
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
# From Steffen Thorsen (2017-12-20):
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 S
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
Rule Brazil 2026 only - Feb Sun>=22 0:00 0 -
......@@ -1091,7 +1104,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# From Paul Eggert (2015-04-03):
# Shanks & Pottenger says America/Santiago introduced standard time in
# 1890 and rounds its UTC offset to 70W40; guess that in practice this
# 1890 and rounds its UT offset to 70W40; guess that in practice this
# was the same offset as in 1916-1919. It also says Pacific/Easter
# standardized on 109W22 in 1890; assume this didn't change the clocks.
#
......
......@@ -395,7 +395,7 @@ SM +4355+01228 Europe/San_Marino
SN +1440-01726 Africa/Dakar
SO +0204+04522 Africa/Mogadishu
SR +0550-05510 America/Paramaribo
SS +0451+03136 Africa/Juba
SS +0451+03137 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
SV +1342-08912 America/El_Salvador
SX +180305-0630250 America/Lower_Princes
......
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 7124089 7131021 8042469 8066185
* @bug 7124089 7131021 8042469 8066185 8074373
* @summary Checks for Launcher special flags, such as MacOSX specific flags,
* and JVM NativeMemoryTracking flags.
* @compile -XDignore.symbol.file TestSpecialArgs.java EnvironmentVariables.java
......@@ -270,6 +270,16 @@ public class TestSpecialArgs extends TestHelper {
tr = doExec(envMap, javaCmd, "Foo", "-XX:NativeMemoryTracking=summary");
checkTestResult(tr);
// should accept with no warnings
tr = doExec(javaCmd, "-cp", jarFile.getName(),
"-XX:NativeMemoryTracking=summary", "Foo");
ensureNoWarnings(tr);
// should accept with no warnings
tr = doExec(javaCmd, "-classpath", jarFile.getName(),
"-XX:NativeMemoryTracking=summary", "Foo");
ensureNoWarnings(tr);
// make sure a missing class is handled correctly, because the class
// resolution is performed by the JVM.
tr = doExec(javaCmd, "AbsentClass", "-XX:NativeMemoryTracking=summary");
......@@ -278,6 +288,14 @@ public class TestSpecialArgs extends TestHelper {
}
}
void ensureNoWarnings(TestResult tr) {
checkTestResult(tr);
if (tr.contains("warning: Native Memory Tracking")) {
System.err.println(tr.toString());
throw new RuntimeException("Test Fails");
}
}
void checkTestResult(TestResult tr) {
if (!tr.isOK()) {
System.err.println(tr.toString());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册