Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
42ee0a91
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
42ee0a91
编写于
10月 31, 2014
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
2a467a0b
432c97c8
变更
48
显示空白变更内容
内联
并排
Showing
48 changed file
with
509 addition
and
345 deletion
+509
-345
make/CompileJavaClasses.gmk
make/CompileJavaClasses.gmk
+6
-1
make/data/tzdata/VERSION
make/data/tzdata/VERSION
+1
-1
make/data/tzdata/africa
make/data/tzdata/africa
+19
-38
make/data/tzdata/asia
make/data/tzdata/asia
+62
-20
make/data/tzdata/australasia
make/data/tzdata/australasia
+38
-6
make/data/tzdata/europe
make/data/tzdata/europe
+12
-3
make/data/tzdata/northamerica
make/data/tzdata/northamerica
+28
-13
make/data/tzdata/zone.tab
make/data/tzdata/zone.tab
+2
-1
src/share/classes/com/sun/media/sound/JDK13Services.java
src/share/classes/com/sun/media/sound/JDK13Services.java
+7
-5
src/share/classes/com/sun/media/sound/JSSecurityManager.java
src/share/classes/com/sun/media/sound/JSSecurityManager.java
+1
-28
src/share/classes/com/sun/media/sound/Platform.java
src/share/classes/com/sun/media/sound/Platform.java
+11
-55
src/share/classes/com/sun/media/sound/RIFFReader.java
src/share/classes/com/sun/media/sound/RIFFReader.java
+31
-17
src/share/classes/com/sun/media/sound/SF2Soundbank.java
src/share/classes/com/sun/media/sound/SF2Soundbank.java
+17
-1
src/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java
.../classes/com/sun/media/sound/SoftMidiAudioFileReader.java
+7
-3
src/share/classes/com/sun/media/sound/SoftSynthesizer.java
src/share/classes/com/sun/media/sound/SoftSynthesizer.java
+36
-48
src/share/classes/com/sun/media/sound/StandardMidiFileReader.java
...e/classes/com/sun/media/sound/StandardMidiFileReader.java
+25
-15
src/share/classes/java/lang/String.java
src/share/classes/java/lang/String.java
+3
-2
src/share/classes/java/lang/invoke/MethodHandleImpl.java
src/share/classes/java/lang/invoke/MethodHandleImpl.java
+15
-8
src/share/classes/javax/swing/JFrame.java
src/share/classes/javax/swing/JFrame.java
+31
-28
src/share/classes/sun/java2d/pipe/DrawImage.java
src/share/classes/sun/java2d/pipe/DrawImage.java
+24
-8
src/share/classes/sun/util/resources/TimeZoneNames.java
src/share/classes/sun/util/resources/TimeZoneNames.java
+4
-1
src/share/classes/sun/util/resources/de/TimeZoneNames_de.java
...share/classes/sun/util/resources/de/TimeZoneNames_de.java
+4
-1
src/share/classes/sun/util/resources/es/TimeZoneNames_es.java
...share/classes/sun/util/resources/es/TimeZoneNames_es.java
+4
-1
src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
...share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
+4
-1
src/share/classes/sun/util/resources/it/TimeZoneNames_it.java
...share/classes/sun/util/resources/it/TimeZoneNames_it.java
+4
-1
src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
...share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
+4
-1
src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
...share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
+4
-1
src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
...re/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
+4
-1
src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
...share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
+4
-1
src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
...re/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
+4
-1
src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
...re/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
+4
-1
src/share/demo/jfc/Font2DTest/resources/TextResources.properties
...re/demo/jfc/Font2DTest/resources/TextResources.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_de.properties
...demo/jfc/Font2DTest/resources/TextResources_de.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_en.properties
...demo/jfc/Font2DTest/resources/TextResources_en.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_en_GB.properties
...o/jfc/Font2DTest/resources/TextResources_en_GB.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_ja.properties
...demo/jfc/Font2DTest/resources/TextResources_ja.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_ko.properties
...demo/jfc/Font2DTest/resources/TextResources_ko.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/TextResources_zh_CN.properties
...o/jfc/Font2DTest/resources/TextResources_zh_CN.properties
+0
-1
src/share/demo/jfc/Font2DTest/resources/resource.data
src/share/demo/jfc/Font2DTest/resources/resource.data
+0
-5
src/solaris/classes/sun/awt/X11/XToolkit.java
src/solaris/classes/sun/awt/X11/XToolkit.java
+1
-1
src/solaris/classes/sun/awt/X11/XWindow.java
src/solaris/classes/sun/awt/X11/XWindow.java
+5
-3
src/solaris/classes/sun/awt/X11/XlibWrapper.java
src/solaris/classes/sun/awt/X11/XlibWrapper.java
+8
-8
test/ProblemList.txt
test/ProblemList.txt
+3
-0
test/java/awt/image/DrawImage/DrawImageCoordsTest.java
test/java/awt/image/DrawImage/DrawImageCoordsTest.java
+68
-0
test/javax/management/MBeanServer/MBeanFallbackTest.java
test/javax/management/MBeanServer/MBeanFallbackTest.java
+1
-2
test/javax/management/ObjectName/SerialCompatTest.java
test/javax/management/ObjectName/SerialCompatTest.java
+1
-3
test/javax/management/mxbean/MXBeanFallbackTest.java
test/javax/management/mxbean/MXBeanFallbackTest.java
+1
-2
test/javax/management/proxy/JMXProxyFallbackTest.java
test/javax/management/proxy/JMXProxyFallbackTest.java
+1
-2
未找到文件。
make/CompileJavaClasses.gmk
浏览文件 @
42ee0a91
...
@@ -36,6 +36,11 @@ JARS :=
...
@@ -36,6 +36,11 @@ JARS :=
EXFILES :=
EXFILES :=
EXCLUDES :=
EXCLUDES :=
##########################################################################################
# Include the corresponding custom file, if present.
-include $(CUSTOM_MAKE_DIR)/CompileJavaClasses.gmk
##########################################################################################
##########################################################################################
EXCLUDES += com/sun/pept \
EXCLUDES += com/sun/pept \
...
@@ -53,7 +58,7 @@ endif
...
@@ -53,7 +58,7 @@ endif
ifndef OPENJDK
ifndef OPENJDK
# There exists two versions of these files...
# There exists two versions of these files...
EXFILES
:
= $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
EXFILES
+
= $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
EXFILES += $(JDK_TOPDIR)/src/share/classes/sun/management/ExtendedPlatformComponent.java
EXFILES += $(JDK_TOPDIR)/src/share/classes/sun/management/ExtendedPlatformComponent.java
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
...
...
make/data/tzdata/VERSION
浏览文件 @
42ee0a91
...
@@ -21,4 +21,4 @@
...
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# or visit www.oracle.com if you need additional information or have any
# questions.
# questions.
#
#
tzdata2014
g
tzdata2014
i
make/data/tzdata/africa
浏览文件 @
42ee0a91
...
@@ -133,23 +133,13 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01
...
@@ -133,23 +133,13 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01
# See Africa/Lagos.
# See Africa/Lagos.
# Botswana
# Botswana
# From Paul Eggert (2013-02-21):
# See Africa/Maputo.
# Milne says they were regulated by the Cape Town Signal in 1899;
# assume they switched to 2:00 when Cape Town did.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Gaborone 1:43:40 - LMT 1885
1:30 - SAST 1903 Mar
2:00 - CAT 1943 Sep 19 2:00
2:00 1:00 CAST 1944 Mar 19 2:00
2:00 - CAT
# Burkina Faso
# Burkina Faso
# See Africa/Abidjan.
# See Africa/Abidjan.
# Burundi
# Burundi
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Maputo.
Zone Africa/Bujumbura 1:57:28 - LMT 1890
2:00 - CAT
# Cameroon
# Cameroon
# See Africa/Lagos.
# See Africa/Lagos.
...
@@ -184,10 +174,7 @@ Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro
...
@@ -184,10 +174,7 @@ Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro
3:00 - EAT
3:00 - EAT
# Democratic Republic of the Congo
# Democratic Republic of the Congo
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Lagos for the western part and Africa/Maputo for the eastern.
Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9
2:00 - CAT
# The above is for the eastern part; see Africa/Lagos for the western part.
# Republic of the Congo
# Republic of the Congo
# See Africa/Lagos.
# See Africa/Lagos.
...
@@ -339,7 +326,7 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
...
@@ -339,7 +326,7 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# Egypt is to change back to Daylight system on May 15
# Egypt is to change back to Daylight system on May 15
# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
# From Gunther Vermier (201
5
-05-13):
# From Gunther Vermier (201
4
-05-13):
# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
# From Imed Chihi (2014-06-04):
# From Imed Chihi (2014-06-04):
...
@@ -489,11 +476,7 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul
...
@@ -489,11 +476,7 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul
3:00 - EAT
3:00 - EAT
# Lesotho
# Lesotho
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Johannesburg.
Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
2:00 - SAST 1943 Sep 19 2:00
2:00 1:00 SAST 1944 Mar 19 2:00
2:00 - SAST
# Liberia
# Liberia
# From Paul Eggert (2006-03-22):
# From Paul Eggert (2006-03-22):
...
@@ -575,9 +558,7 @@ Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul
...
@@ -575,9 +558,7 @@ Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul
3:00 - EAT
3:00 - EAT
# Malawi
# Malawi
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Maputo.
Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar
2:00 - CAT
# Mali
# Mali
# Mauritania
# Mauritania
...
@@ -987,6 +968,13 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
...
@@ -987,6 +968,13 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
2:00 - CAT
2:00 - CAT
Link Africa/Maputo Africa/Blantyre # Malawi
Link Africa/Maputo Africa/Bujumbura # Burundi
Link Africa/Maputo Africa/Gaborone # Botswana
Link Africa/Maputo Africa/Harare # Zimbabwe
Link Africa/Maputo Africa/Kigali # Rwanda
Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo
Link Africa/Maputo Africa/Lusaka # Zambia
# Namibia
# Namibia
# The 1994-04-03 transition is from Shanks & Pottenger.
# The 1994-04-03 transition is from Shanks & Pottenger.
...
@@ -1054,9 +1042,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
...
@@ -1054,9 +1042,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
# Tromelin - inhabited until at least 1958
# Tromelin - inhabited until at least 1958
# Rwanda
# Rwanda
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Maputo.
Zone Africa/Kigali 2:00:16 - LMT 1935 Jun
2:00 - CAT
# St Helena
# St Helena
# See Africa/Abidjan.
# See Africa/Abidjan.
...
@@ -1100,6 +1086,9 @@ Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
...
@@ -1100,6 +1086,9 @@ Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
1:30 - SAST 1903 Mar
1:30 - SAST 1903 Mar
2:00 SA SAST
2:00 SA SAST
Link Africa/Johannesburg Africa/Maseru # Lesotho
Link Africa/Johannesburg Africa/Mbabane # Swaziland
#
# Marion and Prince Edward Is
# Marion and Prince Edward Is
# scientific station since 1947
# scientific station since 1947
# no information
# no information
...
@@ -1127,9 +1116,7 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
...
@@ -1127,9 +1116,7 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
Link Africa/Khartoum Africa/Juba
Link Africa/Khartoum Africa/Juba
# Swaziland
# Swaziland
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Johannesburg.
Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
2:00 - SAST
# Tanzania
# Tanzania
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
...
@@ -1250,11 +1237,5 @@ Zone Africa/Kampala 2:09:40 - LMT 1928 Jul
...
@@ -1250,11 +1237,5 @@ Zone Africa/Kampala 2:09:40 - LMT 1928 Jul
3:00 - EAT
3:00 - EAT
# Zambia
# Zambia
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar
2:00 - CAT
# Zimbabwe
# Zimbabwe
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Africa/Maputo.
Zone Africa/Harare 2:04:12 - LMT 1903 Mar
2:00 - CAT
make/data/tzdata/asia
浏览文件 @
42ee0a91
...
@@ -70,10 +70,11 @@
...
@@ -70,10 +70,11 @@
# 3:30 IRST IRDT Iran
# 3:30 IRST IRDT Iran
# 4:00 GST Gulf*
# 4:00 GST Gulf*
# 5:30 IST India
# 5:30 IST India
# 7:00 ICT Indochina*
# 7:00 ICT Indochina
, most times and locations
*
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 CST China
# 8:00 CST China
# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)*
# 8:00 JWST Western Standard Time (Japan, 1896/1937)*
# 8:00 JWST Western Standard Time (Japan, 1896/1937)*
# 9:00 JCST Central Standard Time (Japan, 1896/1937)
# 9:00 JCST Central Standard Time (Japan, 1896/1937)
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
...
@@ -294,12 +295,8 @@ Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon
...
@@ -294,12 +295,8 @@ Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon
6:30 - MMT # Myanmar Time
6:30 - MMT # Myanmar Time
# Cambodia
# Cambodia
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Asia/Bangkok.
Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9
7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
7:00 - ICT 1912 May
8:00 - ICT 1931 May
7:00 - ICT
# China
# China
...
@@ -916,6 +913,10 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
...
@@ -916,6 +913,10 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
# Indonesia
# Indonesia
#
#
# From Paul Eggert (2014-09-06):
# The 1876 Report of the Secretary of the [US] Navy, p 306 says that Batavia
# civil time was 7:07:12.5; round to even for Jakarta.
#
# From Gwillim Law (2001-05-28), overriding Shanks & Pottenger:
# From Gwillim Law (2001-05-28), overriding Shanks & Pottenger:
# http://www.sumatera-inc.com/go_to_invest/about_indonesia.asp#standtime
# http://www.sumatera-inc.com/go_to_invest/about_indonesia.asp#standtime
# says that Indonesia's time zones changed on 1988-01-01. Looking at some
# says that Indonesia's time zones changed on 1988-01-01. Looking at some
...
@@ -1733,12 +1734,8 @@ Zone Asia/Kuwait 3:11:56 - LMT 1950
...
@@ -1733,12 +1734,8 @@ Zone Asia/Kuwait 3:11:56 - LMT 1950
3:00 - AST
3:00 - AST
# Laos
# Laos
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# See Asia/Bangkok.
Zone Asia/Vientiane 6:50:24 - LMT 1906 Jun 9 # or Viangchan
7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
7:00 - ICT 1912 May
8:00 - ICT 1931 May
7:00 - ICT
# Lebanon
# Lebanon
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
...
@@ -2751,6 +2748,8 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
...
@@ -2751,6 +2748,8 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
Zone Asia/Bangkok 6:42:04 - LMT 1880
Zone Asia/Bangkok 6:42:04 - LMT 1880
6:42:04 - BMT 1920 Apr # Bangkok Mean Time
6:42:04 - BMT 1920 Apr # Bangkok Mean Time
7:00 - ICT
7:00 - ICT
Link Asia/Bangkok Asia/Phnom_Penh # Cambodia
Link Asia/Bangkok Asia/Vientiane # Laos
# Turkmenistan
# Turkmenistan
# From Shanks & Pottenger.
# From Shanks & Pottenger.
...
@@ -2788,22 +2787,65 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
...
@@ -2788,22 +2787,65 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# Vietnam
# Vietnam
# From Paul Eggert (201
3-02-21
):
# From Paul Eggert (201
4-10-04
):
# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being
# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being
# used in Lower Laos, Cambodia, and Annam. But this is quite a ways
# used in Lower Laos, Cambodia, and Annam. But this is quite a ways
# from Saigon's location. For now, ignore this and stick with Shanks
# from Saigon's location. For now, ignore this and stick with Shanks
# and Pottenger.
# and Pottenger
for LMT before 1906
.
# From Arthur David Olson (2008-03-18):
# From Arthur David Olson (2008-03-18):
# The English-language name of Vietnam's most populous city is "Ho Chi Minh
# The English-language name of Vietnam's most populous city is "Ho Chi Minh
# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters.
# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters.
# From Shanks & Pottenger:
# From Paul Eggert (2014-10-21) after a heads-up from Trần Ngọc Quân:
# Trần Tiến Bình's authoritative book "Lịch Việt Nam: thế kỷ XX-XXI (1901-2100)"
# (Nhà xuất bản Văn Hoá - Thông Tin, Hanoi, 2005), pp 49-50,
# is quoted verbatim in:
# http://www.thoigian.com.vn/?mPage=P80D01
# is translated by Brian Inglis in:
# http://mm.icann.org/pipermail/tz/2014-October/021654.html
# and is the basis for the information below.
#
# The 1906 transition was effective July 1 and standardized Indochina to
# Phù Liễn Observatory, legally 104 deg. 17'17" east of Paris.
# It's unclear whether this meant legal Paris Mean Time (00:09:21) or
# the Paris Meridian (2 deg. 20'14.03" E); the former yields 07:06:30.1333...
# and the latter 07:06:29.333... so either way it rounds to 07:06:30,
# which is used below even though the modern-day Phù Liễn Observatory
# is closer to 07:06:31. Abbreviate Phù Liễn Mean Time as PLMT.
#
# The following transitions occurred in Indochina in general (before 1954)
# and in South Vietnam in particular (after 1954):
# To 07:00 on 1911-05-01.
# To 08:00 on 1942-12-31 at 23:00.
# To 09:00 in 1945-03-14 at 23:00.
# To 07:00 on 1945-09-02 in Vietnam.
# To 08:00 on 1947-04-01 in French-controlled Indochina.
# To 07:00 on 1955-07-01 in South Vietnam.
# To 08:00 on 1959-12-31 at 23:00 in South Vietnam.
# To 07:00 on 1975-06-13 in South Vietnam.
#
# Trần cites the following sources; it's unclear which supplied the info above.
#
# Hoàng Xuân Hãn: "Lịch và lịch Việt Nam". Tập san Khoa học Xã hội,
# No. 9, Paris, February 1982.
#
# Lê Thành Lân: "Lịch và niên biểu lịch sử hai mươi thế kỷ (0001-2010)",
# NXB Thống kê, Hanoi, 2000.
#
# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu",
# NXB Thuận Hoá, Huế, 1995.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jun 9
Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
7:06:30 - PLMT 1911 May 1
7:00 - ICT 1912 May
7:00 - ICT 1942 Dec 31 23:00
8:00 - ICT 1931 May
8:00 - IDT 1945 Mar 14 23:00
9:00 - JST 1945 Sep 2
7:00 - ICT 1947 Apr 1
8:00 - IDT 1955 Jul 1
7:00 - ICT 1959 Dec 31 23:00
8:00 - IDT 1975 Jun 13
7:00 - ICT
7:00 - ICT
# Yemen
# Yemen
...
...
make/data/tzdata/australasia
浏览文件 @
42ee0a91
...
@@ -354,20 +354,27 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
...
@@ -354,20 +354,27 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# Fiji will end DST on 2014-01-19 02:00:
# Fiji will end DST on 2014-01-19 02:00:
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
# From Paul Eggert (2014-01-10):
# From Ken Rylander (2014-10-20):
# For now, guess that Fiji springs forward the Sunday before the fourth
# DST will start Nov. 2 this year.
# Monday in October, and springs back the penultimate Sunday in January.
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
# This is ad hoc, but matches recent practice.
# From Paul Eggert (2014-10-20):
# For now, guess DST from 02:00 the first Sunday in November to
# 03:00 the first Sunday on or after January 18. Although ad hoc, it
# matches this year's plan and seems more likely to match future
# practice than guessing no DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
Rule Fiji 2009 only - Nov 29 2:00 1:00 S
Rule Fiji 2009 only - Nov 29 2:00 1:00 S
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
Rule Fiji 2010
max
- Oct Sun>=21 2:00 1:00 S
Rule Fiji 2010
2013
- Oct Sun>=21 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 max - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S
Rule Fiji 2015 max - Jan Sun>=18 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
12:00 Fiji FJ%sT # Fiji Time
...
@@ -542,6 +549,30 @@ Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror
...
@@ -542,6 +549,30 @@ Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror
Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
9:48:32 - PMMT 1895 # Port Moresby Mean Time
9:48:32 - PMMT 1895 # Port Moresby Mean Time
10:00 - PGT # Papua New Guinea Time
10:00 - PGT # Papua New Guinea Time
#
# From Paul Eggert (2014-10-13):
# Base the Bougainville entry on the Arawa-Kieta region, which appears to have
# the most people even though it was devastated in the Bougainville Civil War.
#
# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates
# are apparently rough guesswork from the starts of military campaigns.
# The World War II entries below are instead based on Arawa-Kieta.
# The Japanese occupied Kieta in July 1942,
# according to the Pacific War Online Encyclopedia
# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
# and seem to have controlled it until their 1945-08-21 surrender.
#
# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11
# on 2014-12-28 at 02:00. They call UTC+11 "Bougainville Standard Time";
# abbreviate this as BST. See:
# http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/
#
Zone Pacific/Bougainville 10:22:16 - LMT 1880
9:48:32 - PMMT 1895
10:00 - PGT 1942 Jul
9:00 - JST 1945 Aug 21
10:00 - PGT 2014 Dec 28 2:00
11:00 - BST
# Pitcairn
# Pitcairn
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
...
@@ -826,6 +857,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
...
@@ -826,6 +857,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# 10:00 AEST AEDT Eastern Australia
# 10:00 AEST AEDT Eastern Australia
# 10:00 ChST Chamorro
# 10:00 ChST Chamorro
# 10:30 LHST LHDT Lord Howe*
# 10:30 LHST LHDT Lord Howe*
# 11:00 BST Bougainville*
# 11:30 NZMT NZST New Zealand through 1945
# 11:30 NZMT NZST New Zealand through 1945
# 12:00 NZST NZDT New Zealand 1946-present
# 12:00 NZST NZDT New Zealand 1946-present
# 12:15 CHAST Chatham through 1945*
# 12:15 CHAST Chatham through 1945*
...
...
make/data/tzdata/europe
浏览文件 @
42ee0a91
...
@@ -91,10 +91,11 @@
...
@@ -91,10 +91,11 @@
# 0:00 WET WEST WEMT Western Europe
# 0:00 WET WEST WEMT Western Europe
# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)*
# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)*
# 0:20 NET NEST Netherlands (1937-1940)*
# 0:20 NET NEST Netherlands (1937-1940)*
# 1:00 BST British Standard (1968-1971)
# 1:00 CET CEST CEMT Central Europe
# 1:00 CET CEST CEMT Central Europe
# 1:00:14 SET Swedish (1879-1899)*
# 1:00:14 SET Swedish (1879-1899)*
# 2:00 EET EEST Eastern Europe
# 2:00 EET EEST Eastern Europe
# 3:00 FET Further-eastern Europe*
# 3:00 FET Further-eastern Europe
(2011-2014)
*
# 3:00 MSK MSD MSM* Moscow
# 3:00 MSK MSD MSM* Moscow
# From Peter Ilieve (1994-12-04),
# From Peter Ilieve (1994-12-04),
...
@@ -746,6 +747,13 @@ Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
...
@@ -746,6 +747,13 @@ Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
# http://news.tut.by/society/250578.html
# http://news.tut.by/society/250578.html
#
# From Alexander Bokovoy (2014-10-09):
# Belarussian government decided against changing to winter time....
# http://eng.belta.by/all_news/society/Belarus-decides-against-adjusting-time-in-Russias-wake_i_76335.html
# From Paul Eggert (2014-10-08):
# Hence Belarus can share time zone abbreviations with Moscow again.
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Minsk 1:50:16 - LMT 1880
Zone Europe/Minsk 1:50:16 - LMT 1880
1:50 - MMT 1924 May 2 # Minsk Mean Time
1:50 - MMT 1924 May 2 # Minsk Mean Time
...
@@ -758,7 +766,8 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
...
@@ -758,7 +766,8 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
2:00 - EET 1992 Mar 29 0:00s
2:00 - EET 1992 Mar 29 0:00s
2:00 1:00 EEST 1992 Sep 27 0:00s
2:00 1:00 EEST 1992 Sep 27 0:00s
2:00 Russia EE%sT 2011 Mar 27 2:00s
2:00 Russia EE%sT 2011 Mar 27 2:00s
3:00 - FET
3:00 - FET 2014 Oct 26 1:00s
3:00 - MSK
# Belgium
# Belgium
#
#
...
@@ -2524,7 +2533,7 @@ Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00
...
@@ -2524,7 +2533,7 @@ Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00
# The Kemerovo region will remain at UTC+7 through the 2014-10-26 change, thus
# The Kemerovo region will remain at UTC+7 through the 2014-10-26 change, thus
# realigning itself with KRAT.
# realigning itself with KRAT.
Zone Asia/Novokuznetsk 5:48:48 -
NMT 1920 Jan 6
Zone Asia/Novokuznetsk 5:48:48 -
LMT 1924 May 1
6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time
6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time
7:00 Russia KRA%sT 1991 Mar 31 2:00s
7:00 Russia KRA%sT 1991 Mar 31 2:00s
6:00 Russia KRA%sT 1992 Jan 19 2:00s
6:00 Russia KRA%sT 1992 Jan 19 2:00s
...
...
make/data/tzdata/northamerica
浏览文件 @
42ee0a91
...
@@ -300,6 +300,12 @@ Zone PST8PDT -8:00 US P%sT
...
@@ -300,6 +300,12 @@ Zone PST8PDT -8:00 US P%sT
# time zone, but we do go by the Eastern time zone because so many people work
# time zone, but we do go by the Eastern time zone because so many people work
# in Columbus."
# in Columbus."
# From Paul Eggert (2014-09-06):
# Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208
# says that New York City Hall time was 3 minutes 58.4 seconds fast of
# Eastern time (i.e., -4:56:01.6) just before the 1883 switch. Round to the
# nearest second.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule NYC 1920 only - Mar lastSun 2:00 1:00 D
Rule NYC 1920 only - Mar lastSun 2:00 1:00 D
Rule NYC 1920 only - Oct lastSun 2:00 0 S
Rule NYC 1920 only - Oct lastSun 2:00 0 S
...
@@ -1118,17 +1124,16 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
...
@@ -1118,17 +1124,16 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# An amendment to the Interpretation Act was registered on February 19/2007....
# An amendment to the Interpretation Act was registered on February 19/2007....
# http://action.attavik.ca/home/justice-gn/attach/2007/gaz02part2.pdf
# http://action.attavik.ca/home/justice-gn/attach/2007/gaz02part2.pdf
# From Paul Eggert (20
06-04-25
):
# From Paul Eggert (20
14-10-18
):
# H. David Matthews and Mary Vincent's map
# H. David Matthews and Mary Vincent's map
# "It's about TIME", _Canadian Geographic_ (September-October 1998)
# "It's about TIME", _Canadian Geographic_ (September-October 1998)
# http://www.canadiangeographic.ca/Magazine/SO98/
geomap
.asp
# http://www.canadiangeographic.ca/Magazine/SO98/
alacarte
.asp
# contains detailed boundaries for regions observing nonstandard
# contains detailed boundaries for regions observing nonstandard
# time and daylight saving time arrangements in Canada circa 1998.
# time and daylight saving time arrangements in Canada circa 1998.
#
#
# INMS, the Institute for National Measurement Standards in Ottawa, has
# National Research Council Canada maintains info about time zones and DST.
# information about standard and daylight saving time zones in Canada.
# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
# http://inms-ienm.nrc-cnrc.gc.ca/en/time_services/daylight_saving_e.php
# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
# (updated periodically).
# Its unofficial information is often taken from Matthews and Vincent.
# Its unofficial information is often taken from Matthews and Vincent.
# From Paul Eggert (2006-06-27):
# From Paul Eggert (2006-06-27):
...
@@ -1993,10 +1998,7 @@ Zone America/Creston -7:46:04 - LMT 1884
...
@@ -1993,10 +1998,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# [Also see <http://www.nunatsiaq.com/nunavut/nvt10309_06.html> (2001-03-09).]
# [Also see <http://www.nunatsiaq.com/nunavut/nvt10309_06.html> (2001-03-09).]
# From Gwillim Law (2005-05-21):
# From Gwillim Law (2005-05-21):
# According to maps at
# According to ...
# http://inms-ienm.nrc-cnrc.gc.ca/images/time_services/TZ01SWE.jpg
# http://inms-ienm.nrc-cnrc.gc.ca/images/time_services/TZ01SSE.jpg
# (both dated 2003), and
# http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp
# http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp
# (from a 1998 Canadian Geographic article), the de facto and de jure time
# (from a 1998 Canadian Geographic article), the de facto and de jure time
# for Southampton Island (at the north end of Hudson Bay) is UTC-5 all year
# for Southampton Island (at the north end of Hudson Bay) is UTC-5 all year
...
@@ -2005,9 +2007,11 @@ Zone America/Creston -7:46:04 - LMT 1884
...
@@ -2005,9 +2007,11 @@ Zone America/Creston -7:46:04 - LMT 1884
# predates the creation of Nunavut, it probably goes back many years....
# predates the creation of Nunavut, it probably goes back many years....
# The Inuktitut name of Coral Harbour is Sallit, but it's rarely used.
# The Inuktitut name of Coral Harbour is Sallit, but it's rarely used.
#
#
# From Paul Eggert (20
05-07-26
):
# From Paul Eggert (20
14-10-17
):
# For lack of better information, assume that Southampton Island observed
# For lack of better information, assume that Southampton Island observed
# daylight saving only during wartime.
# daylight saving only during wartime. Gwillim Law's email also
# mentioned maps now maintained by National Research Council Canada;
# see above for an up-to-date link.
# From Chris Walton (2007-03-01):
# From Chris Walton (2007-03-01):
# ... the community of Resolute (located on Cornwallis Island in
# ... the community of Resolute (located on Cornwallis Island in
...
@@ -3008,10 +3012,21 @@ Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
...
@@ -3008,10 +3012,21 @@ Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
# unspecified official document, and says "This time is used throughout the
# unspecified official document, and says "This time is used throughout the
# island". Go with Milne. Round to the nearest second as required by zic.
# island". Go with Milne. Round to the nearest second as required by zic.
#
# Shanks & Pottenger give April 28 for the 1974 spring-forward transition, but
# Lance Neita writes that Prime Minister Michael Manley decreed it January 5.
# Assume Neita meant Jan 6 02:00, the same as the US. Neita also writes that
# Manley's supporters associated this act with Manley's nickname "Joshua"
# (recall that in the Bible the sun stood still at Joshua's request),
# and with the Rod of Correction which Manley said he had received from
# Haile Selassie, Emperor of Ethiopia. See:
# Neita L. The politician in all of us. Jamaica Observer 2014-09-20
# http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston
Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1974
Apr 28 2:00
-5:00 - EST 1974
-5:00 US E%sT 1984
-5:00 US E%sT 1984
-5:00 - EST
-5:00 - EST
...
...
make/data/tzdata/zone.tab
浏览文件 @
42ee0a91
...
@@ -330,7 +330,8 @@ PE -1203-07703 America/Lima
...
@@ -330,7 +330,8 @@ PE -1203-07703 America/Lima
PF -1732-14934 Pacific/Tahiti Society Islands
PF -1732-14934 Pacific/Tahiti Society Islands
PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
PG -0930+14710 Pacific/Port_Moresby
PG -0930+14710 Pacific/Port_Moresby most locations
PG -0613+15534 Pacific/Bougainville Bougainville
PH +1435+12100 Asia/Manila
PH +1435+12100 Asia/Manila
PK +2452+06703 Asia/Karachi
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
PL +5215+02100 Europe/Warsaw
...
...
src/share/classes/com/sun/media/sound/JDK13Services.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
package
com.sun.media.sound
;
package
com.sun.media.sound
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -176,11 +178,11 @@ public final class JDK13Services {
...
@@ -176,11 +178,11 @@ public final class JDK13Services {
&&
!
Sequencer
.
class
.
equals
(
typeClass
))
{
&&
!
Sequencer
.
class
.
equals
(
typeClass
))
{
return
null
;
return
null
;
}
}
String
value
;
String
name
=
typeClass
.
getName
()
;
String
propertyName
=
typeClass
.
getName
();
String
value
=
AccessController
.
doPrivileged
(
value
=
JSSecurityManager
.
getProperty
(
propertyName
);
(
PrivilegedAction
<
String
>)
()
->
System
.
getProperty
(
name
)
);
if
(
value
==
null
)
{
if
(
value
==
null
)
{
value
=
getProperties
().
getProperty
(
propertyN
ame
);
value
=
getProperties
().
getProperty
(
n
ame
);
}
}
if
(
""
.
equals
(
value
))
{
if
(
""
.
equals
(
value
))
{
value
=
null
;
value
=
null
;
...
...
src/share/classes/com/sun/media/sound/JSSecurityManager.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -73,33 +73,6 @@ final class JSSecurityManager {
...
@@ -73,33 +73,6 @@ final class JSSecurityManager {
}
}
}
}
static
String
getProperty
(
final
String
propertyName
)
{
String
propertyValue
;
if
(
hasSecurityManager
())
{
if
(
Printer
.
debug
)
Printer
.
debug
(
"using JDK 1.2 security to get property"
);
try
{
PrivilegedAction
<
String
>
action
=
new
PrivilegedAction
<
String
>()
{
public
String
run
()
{
try
{
return
System
.
getProperty
(
propertyName
);
}
catch
(
Throwable
t
)
{
return
null
;
}
}
};
propertyValue
=
AccessController
.
doPrivileged
(
action
);
}
catch
(
Exception
e
)
{
if
(
Printer
.
debug
)
Printer
.
debug
(
"not using JDK 1.2 security to get properties"
);
propertyValue
=
System
.
getProperty
(
propertyName
);
}
}
else
{
if
(
Printer
.
debug
)
Printer
.
debug
(
"not using JDK 1.2 security to get properties"
);
propertyValue
=
System
.
getProperty
(
propertyName
);
}
return
propertyValue
;
}
/** Load properties from a file.
/** Load properties from a file.
This method tries to load properties from the filename give into
This method tries to load properties from the filename give into
the passed properties object.
the passed properties object.
...
...
src/share/classes/com/sun/media/sound/Platform.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -74,17 +74,6 @@ final class Platform {
...
@@ -74,17 +74,6 @@ final class Platform {
// intel is little-endian. sparc is big-endian.
// intel is little-endian. sparc is big-endian.
private
static
boolean
bigEndian
;
private
static
boolean
bigEndian
;
// this is the value of the "java.home" system property. i am looking it up here
// for use when trying to load the soundbank, just so
// that all the privileged code is localized in this file....
private
static
String
javahome
;
// this is the value of the "java.class.path" system property
private
static
String
classpath
;
static
{
static
{
if
(
Printer
.
trace
)
Printer
.
trace
(
">> Platform.java: static"
);
if
(
Printer
.
trace
)
Printer
.
trace
(
">> Platform.java: static"
);
...
@@ -129,26 +118,6 @@ final class Platform {
...
@@ -129,26 +118,6 @@ final class Platform {
return
signed8
;
return
signed8
;
}
}
/**
* Obtain javahome.
* $$kk: 04.16.99: this is *bad*!!
*/
static
String
getJavahome
()
{
return
javahome
;
}
/**
* Obtain classpath.
* $$jb: 04.21.99: this is *bad* too!!
*/
static
String
getClasspath
()
{
return
classpath
;
}
// PRIVATE METHODS
// PRIVATE METHODS
/**
/**
...
@@ -157,21 +126,13 @@ final class Platform {
...
@@ -157,21 +126,13 @@ final class Platform {
private
static
void
loadLibraries
()
{
private
static
void
loadLibraries
()
{
if
(
Printer
.
trace
)
Printer
.
trace
(
">>Platform.loadLibraries"
);
if
(
Printer
.
trace
)
Printer
.
trace
(
">>Platform.loadLibraries"
);
try
{
// load the main library
// load the main library
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>()
{
AccessController
.
doPrivileged
((
PrivilegedAction
<
Void
>)
()
->
{
@Override
public
Void
run
()
{
System
.
loadLibrary
(
libNameMain
);
System
.
loadLibrary
(
libNameMain
);
return
null
;
return
null
;
}
});
});
// just for the heck of it...
// just for the heck of it...
loadedLibs
|=
LIB_MAIN
;
loadedLibs
|=
LIB_MAIN
;
}
catch
(
SecurityException
e
)
{
if
(
Printer
.
err
)
Printer
.
err
(
"Security exception loading main native library. JavaSound requires access to these resources."
);
throw
(
e
);
}
// now try to load extra libs. They are defined at compile time in the Makefile
// now try to load extra libs. They are defined at compile time in the Makefile
// with the define EXTRA_SOUND_JNI_LIBS
// with the define EXTRA_SOUND_JNI_LIBS
...
@@ -181,12 +142,9 @@ final class Platform {
...
@@ -181,12 +142,9 @@ final class Platform {
while
(
st
.
hasMoreTokens
())
{
while
(
st
.
hasMoreTokens
())
{
final
String
lib
=
st
.
nextToken
();
final
String
lib
=
st
.
nextToken
();
try
{
try
{
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Void
>()
{
AccessController
.
doPrivileged
((
PrivilegedAction
<
Void
>)
()
->
{
@Override
public
Void
run
()
{
System
.
loadLibrary
(
lib
);
System
.
loadLibrary
(
lib
);
return
null
;
return
null
;
}
});
});
if
(
lib
.
equals
(
libNameALSA
))
{
if
(
lib
.
equals
(
libNameALSA
))
{
...
@@ -239,7 +197,5 @@ final class Platform {
...
@@ -239,7 +197,5 @@ final class Platform {
// $$fb 2002-03-06: implement check for endianness in native. Facilitates porting !
// $$fb 2002-03-06: implement check for endianness in native. Facilitates porting !
bigEndian
=
nIsBigEndian
();
bigEndian
=
nIsBigEndian
();
signed8
=
nIsSigned8
();
// Solaris on Sparc: signed, all others unsigned
signed8
=
nIsSigned8
();
// Solaris on Sparc: signed, all others unsigned
javahome
=
JSSecurityManager
.
getProperty
(
"java.home"
);
classpath
=
JSSecurityManager
.
getProperty
(
"java.class.path"
);
}
}
}
}
src/share/classes/com/sun/media/sound/RIFFReader.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 2007, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -39,21 +39,20 @@ public final class RIFFReader extends InputStream {
...
@@ -39,21 +39,20 @@ public final class RIFFReader extends InputStream {
private
long
filepointer
=
0
;
private
long
filepointer
=
0
;
private
final
String
fourcc
;
private
final
String
fourcc
;
private
String
riff_type
=
null
;
private
String
riff_type
=
null
;
private
long
ckSize
=
0
;
private
long
ckSize
=
Integer
.
MAX_VALUE
;
private
InputStream
stream
;
private
InputStream
stream
;
private
long
avail
;
private
long
avail
=
Integer
.
MAX_VALUE
;
private
RIFFReader
lastiterator
=
null
;
private
RIFFReader
lastiterator
=
null
;
public
RIFFReader
(
InputStream
stream
)
throws
IOException
{
public
RIFFReader
(
InputStream
stream
)
throws
IOException
{
if
(
stream
instanceof
RIFFReader
)
if
(
stream
instanceof
RIFFReader
)
{
root
=
((
RIFFReader
)
stream
).
root
;
root
=
((
RIFFReader
)
stream
).
root
;
else
}
else
{
root
=
this
;
root
=
this
;
}
this
.
stream
=
stream
;
this
.
stream
=
stream
;
avail
=
Integer
.
MAX_VALUE
;
ckSize
=
Integer
.
MAX_VALUE
;
// Check for RIFF null paddings,
// Check for RIFF null paddings,
int
b
;
int
b
;
...
@@ -76,10 +75,12 @@ public final class RIFFReader extends InputStream {
...
@@ -76,10 +75,12 @@ public final class RIFFReader extends InputStream {
readFully
(
fourcc
,
1
,
3
);
readFully
(
fourcc
,
1
,
3
);
this
.
fourcc
=
new
String
(
fourcc
,
"ascii"
);
this
.
fourcc
=
new
String
(
fourcc
,
"ascii"
);
ckSize
=
readUnsignedInt
();
ckSize
=
readUnsignedInt
();
avail
=
ckSize
;
avail
=
this
.
ckSize
;
if
(
getFormat
().
equals
(
"RIFF"
)
||
getFormat
().
equals
(
"LIST"
))
{
if
(
getFormat
().
equals
(
"RIFF"
)
||
getFormat
().
equals
(
"LIST"
))
{
if
(
avail
>
Integer
.
MAX_VALUE
)
{
throw
new
RIFFInvalidDataException
(
"Chunk size too big"
);
}
byte
[]
format
=
new
byte
[
4
];
byte
[]
format
=
new
byte
[
4
];
readFully
(
format
);
readFully
(
format
);
this
.
riff_type
=
new
String
(
format
,
"ascii"
);
this
.
riff_type
=
new
String
(
format
,
"ascii"
);
...
@@ -118,19 +119,23 @@ public final class RIFFReader extends InputStream {
...
@@ -118,19 +119,23 @@ public final class RIFFReader extends InputStream {
}
}
public
int
read
()
throws
IOException
{
public
int
read
()
throws
IOException
{
if
(
avail
==
0
)
if
(
avail
==
0
)
{
return
-
1
;
return
-
1
;
}
int
b
=
stream
.
read
();
int
b
=
stream
.
read
();
if
(
b
==
-
1
)
if
(
b
==
-
1
)
{
avail
=
0
;
return
-
1
;
return
-
1
;
}
avail
--;
avail
--;
filepointer
++;
filepointer
++;
return
b
;
return
b
;
}
}
public
int
read
(
byte
[]
b
,
int
offset
,
int
len
)
throws
IOException
{
public
int
read
(
byte
[]
b
,
int
offset
,
int
len
)
throws
IOException
{
if
(
avail
==
0
)
if
(
avail
==
0
)
{
return
-
1
;
return
-
1
;
}
if
(
len
>
avail
)
{
if
(
len
>
avail
)
{
int
rlen
=
stream
.
read
(
b
,
offset
,
(
int
)
avail
);
int
rlen
=
stream
.
read
(
b
,
offset
,
(
int
)
avail
);
if
(
rlen
!=
-
1
)
if
(
rlen
!=
-
1
)
...
@@ -139,8 +144,10 @@ public final class RIFFReader extends InputStream {
...
@@ -139,8 +144,10 @@ public final class RIFFReader extends InputStream {
return
rlen
;
return
rlen
;
}
else
{
}
else
{
int
ret
=
stream
.
read
(
b
,
offset
,
len
);
int
ret
=
stream
.
read
(
b
,
offset
,
len
);
if
(
ret
==
-
1
)
if
(
ret
==
-
1
)
{
avail
=
0
;
return
-
1
;
return
-
1
;
}
avail
-=
ret
;
avail
-=
ret
;
filepointer
+=
ret
;
filepointer
+=
ret
;
return
ret
;
return
ret
;
...
@@ -191,8 +198,10 @@ public final class RIFFReader extends InputStream {
...
@@ -191,8 +198,10 @@ public final class RIFFReader extends InputStream {
return
len
;
return
len
;
}
else
{
}
else
{
long
ret
=
stream
.
skip
(
n
);
long
ret
=
stream
.
skip
(
n
);
if
(
ret
==
-
1
)
if
(
ret
==
-
1
)
{
avail
=
0
;
return
-
1
;
return
-
1
;
}
avail
-=
ret
;
avail
-=
ret
;
filepointer
+=
ret
;
filepointer
+=
ret
;
return
ret
;
return
ret
;
...
@@ -210,8 +219,13 @@ public final class RIFFReader extends InputStream {
...
@@ -210,8 +219,13 @@ public final class RIFFReader extends InputStream {
}
}
// Read ASCII chars from stream
// Read ASCII chars from stream
public
String
readString
(
int
len
)
throws
IOException
{
public
String
readString
(
final
int
len
)
throws
IOException
{
byte
[]
buff
=
new
byte
[
len
];
final
byte
[]
buff
;
try
{
buff
=
new
byte
[
len
];
}
catch
(
final
OutOfMemoryError
oom
)
{
throw
new
IOException
(
"Length too big"
,
oom
);
}
readFully
(
buff
);
readFully
(
buff
);
for
(
int
i
=
0
;
i
<
buff
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
buff
.
length
;
i
++)
{
if
(
buff
[
i
]
==
0
)
{
if
(
buff
[
i
]
==
0
)
{
...
...
src/share/classes/com/sun/media/sound/SF2Soundbank.java
浏览文件 @
42ee0a91
...
@@ -276,6 +276,9 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -276,6 +276,9 @@ public final class SF2Soundbank implements Soundbank {
count
--;
count
--;
}
}
if
(
presets_bagNdx
.
isEmpty
())
{
throw
new
RIFFInvalidDataException
();
}
int
offset
=
presets_bagNdx
.
get
(
0
);
int
offset
=
presets_bagNdx
.
get
(
0
);
// Offset should be 0 (but just case)
// Offset should be 0 (but just case)
for
(
int
i
=
0
;
i
<
offset
;
i
++)
{
for
(
int
i
=
0
;
i
<
offset
;
i
++)
{
...
@@ -360,6 +363,9 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -360,6 +363,9 @@ public final class SF2Soundbank implements Soundbank {
count
--;
count
--;
}
}
if
(
instruments_bagNdx
.
isEmpty
())
{
throw
new
RIFFInvalidDataException
();
}
int
offset
=
instruments_bagNdx
.
get
(
0
);
int
offset
=
instruments_bagNdx
.
get
(
0
);
// Offset should be 0 (but just case)
// Offset should be 0 (but just case)
for
(
int
i
=
0
;
i
<
offset
;
i
++)
{
for
(
int
i
=
0
;
i
<
offset
;
i
++)
{
...
@@ -401,6 +407,9 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -401,6 +407,9 @@ public final class SF2Soundbank implements Soundbank {
modulator
.
amount
=
chunk
.
readShort
();
modulator
.
amount
=
chunk
.
readShort
();
modulator
.
amountSourceOperator
=
chunk
.
readUnsignedShort
();
modulator
.
amountSourceOperator
=
chunk
.
readUnsignedShort
();
modulator
.
transportOperator
=
chunk
.
readUnsignedShort
();
modulator
.
transportOperator
=
chunk
.
readUnsignedShort
();
if
(
i
<
0
||
i
>=
instruments_splits_gen
.
size
())
{
throw
new
RIFFInvalidDataException
();
}
SF2LayerRegion
split
=
instruments_splits_gen
.
get
(
i
);
SF2LayerRegion
split
=
instruments_splits_gen
.
get
(
i
);
if
(
split
!=
null
)
if
(
split
!=
null
)
split
.
modulators
.
add
(
modulator
);
split
.
modulators
.
add
(
modulator
);
...
@@ -424,6 +433,7 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -424,6 +433,7 @@ public final class SF2Soundbank implements Soundbank {
sample
.
name
=
chunk
.
readString
(
20
);
sample
.
name
=
chunk
.
readString
(
20
);
long
start
=
chunk
.
readUnsignedInt
();
long
start
=
chunk
.
readUnsignedInt
();
long
end
=
chunk
.
readUnsignedInt
();
long
end
=
chunk
.
readUnsignedInt
();
if
(
sampleData
!=
null
)
sample
.
data
=
sampleData
.
subbuffer
(
start
*
2
,
end
*
2
,
true
);
sample
.
data
=
sampleData
.
subbuffer
(
start
*
2
,
end
*
2
,
true
);
if
(
sampleData24
!=
null
)
if
(
sampleData24
!=
null
)
sample
.
data24
=
sampleData24
.
subbuffer
(
start
,
end
,
true
);
sample
.
data24
=
sampleData24
.
subbuffer
(
start
,
end
,
true
);
...
@@ -462,6 +472,9 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -462,6 +472,9 @@ public final class SF2Soundbank implements Soundbank {
int
sampleid
=
split
.
generators
.
get
(
int
sampleid
=
split
.
generators
.
get
(
SF2LayerRegion
.
GENERATOR_SAMPLEID
);
SF2LayerRegion
.
GENERATOR_SAMPLEID
);
split
.
generators
.
remove
(
SF2LayerRegion
.
GENERATOR_SAMPLEID
);
split
.
generators
.
remove
(
SF2LayerRegion
.
GENERATOR_SAMPLEID
);
if
(
sampleid
<
0
||
sampleid
>=
samples
.
size
())
{
throw
new
RIFFInvalidDataException
();
}
split
.
sample
=
samples
.
get
(
sampleid
);
split
.
sample
=
samples
.
get
(
sampleid
);
}
else
{
}
else
{
globalsplit
=
split
;
globalsplit
=
split
;
...
@@ -488,6 +501,9 @@ public final class SF2Soundbank implements Soundbank {
...
@@ -488,6 +501,9 @@ public final class SF2Soundbank implements Soundbank {
int
instrumentid
=
split
.
generators
.
get
(
int
instrumentid
=
split
.
generators
.
get
(
SF2InstrumentRegion
.
GENERATOR_INSTRUMENT
);
SF2InstrumentRegion
.
GENERATOR_INSTRUMENT
);
split
.
generators
.
remove
(
SF2LayerRegion
.
GENERATOR_INSTRUMENT
);
split
.
generators
.
remove
(
SF2LayerRegion
.
GENERATOR_INSTRUMENT
);
if
(
instrumentid
<
0
||
instrumentid
>=
layers
.
size
())
{
throw
new
RIFFInvalidDataException
();
}
split
.
layer
=
layers
.
get
(
instrumentid
);
split
.
layer
=
layers
.
get
(
instrumentid
);
}
else
{
}
else
{
globalsplit
=
split
;
globalsplit
=
split
;
...
...
src/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 2007, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* or visit www.oracle.com if you need additional information or have any
* questions.
* questions.
*/
*/
package
com.sun.media.sound
;
package
com.sun.media.sound
;
import
java.io.File
;
import
java.io.File
;
...
@@ -39,14 +40,14 @@ import javax.sound.midi.Receiver;
...
@@ -39,14 +40,14 @@ import javax.sound.midi.Receiver;
import
javax.sound.midi.Sequence
;
import
javax.sound.midi.Sequence
;
import
javax.sound.midi.Track
;
import
javax.sound.midi.Track
;
import
javax.sound.sampled.AudioFileFormat
;
import
javax.sound.sampled.AudioFileFormat
;
import
javax.sound.sampled.AudioFileFormat.Type
;
import
javax.sound.sampled.AudioFormat
;
import
javax.sound.sampled.AudioFormat
;
import
javax.sound.sampled.AudioInputStream
;
import
javax.sound.sampled.AudioInputStream
;
import
javax.sound.sampled.UnsupportedAudioFileException
;
import
javax.sound.sampled.UnsupportedAudioFileException
;
import
javax.sound.sampled.AudioFileFormat.Type
;
import
javax.sound.sampled.spi.AudioFileReader
;
import
javax.sound.sampled.spi.AudioFileReader
;
/**
/**
* MIDI File Audio Renderer/Reader
* MIDI File Audio Renderer/Reader
.
*
*
* @author Karl Helgason
* @author Karl Helgason
*/
*/
...
@@ -109,6 +110,9 @@ public final class SoftMidiAudioFileReader extends AudioFileReader {
...
@@ -109,6 +110,9 @@ public final class SoftMidiAudioFileReader extends AudioFileReader {
if
(
divtype
==
Sequence
.
PPQ
)
{
if
(
divtype
==
Sequence
.
PPQ
)
{
if
(((
MetaMessage
)
msg
).
getType
()
==
0x51
)
{
if
(((
MetaMessage
)
msg
).
getType
()
==
0x51
)
{
byte
[]
data
=
((
MetaMessage
)
msg
).
getData
();
byte
[]
data
=
((
MetaMessage
)
msg
).
getData
();
if
(
data
.
length
<
3
)
{
throw
new
UnsupportedAudioFileException
();
}
mpq
=
((
data
[
0
]
&
0xff
)
<<
16
)
mpq
=
((
data
[
0
]
&
0xff
)
<<
16
)
|
((
data
[
1
]
&
0xff
)
<<
8
)
|
(
data
[
2
]
&
0xff
);
|
((
data
[
1
]
&
0xff
)
<<
8
)
|
(
data
[
2
]
&
0xff
);
}
}
...
...
src/share/classes/com/sun/media/sound/SoftSynthesizer.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 2008, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -28,6 +28,7 @@ package com.sun.media.sound;
...
@@ -28,6 +28,7 @@ package com.sun.media.sound;
import
java.io.BufferedInputStream
;
import
java.io.BufferedInputStream
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
...
@@ -732,31 +733,28 @@ public final class SoftSynthesizer implements AudioSynthesizer,
...
@@ -732,31 +733,28 @@ public final class SoftSynthesizer implements AudioSynthesizer,
* Save generated soundbank to disk for faster future use.
* Save generated soundbank to disk for faster future use.
*/
*/
OutputStream
out
=
AccessController
OutputStream
out
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
OutputStream
>()
{
.
doPrivileged
((
PrivilegedAction
<
OutputStream
>)
()
->
{
public
OutputStream
run
()
{
try
{
try
{
File
userhome
=
new
File
(
System
File
userhome
=
new
File
(
System
.
getProperty
(
"user.home"
),
.
getProperty
(
"user.home"
),
".gervill"
);
".gervill"
);
if
(!
userhome
.
exists
())
{
if
(!
userhome
.
exists
())
userhome
.
mkdirs
();
userhome
.
mkdirs
();
}
File
emg_soundbank_file
=
new
File
(
File
emg_soundbank_file
=
new
File
(
userhome
,
"soundbank-emg.sf2"
);
userhome
,
"soundbank-emg.sf2"
);
if
(
emg_soundbank_file
.
exists
())
if
(
emg_soundbank_file
.
exists
())
{
return
null
;
return
null
;
return
new
FileOutputStream
(
emg_soundbank_file
);
}
catch
(
IOException
e
)
{
}
catch
(
SecurityException
e
)
{
}
}
return
null
;
return
new
FileOutputStream
(
emg_soundbank_file
);
}
catch
(
final
FileNotFoundException
ignored
)
{
}
}
return
null
;
});
});
if
(
out
!=
null
)
{
if
(
out
!=
null
)
{
try
{
try
{
((
SF2Soundbank
)
defaultSoundBank
).
save
(
out
);
((
SF2Soundbank
)
defaultSoundBank
).
save
(
out
);
out
.
close
();
out
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
final
IOException
ignored
)
{
}
}
}
}
}
}
...
@@ -846,8 +844,7 @@ public final class SoftSynthesizer implements AudioSynthesizer,
...
@@ -846,8 +844,7 @@ public final class SoftSynthesizer implements AudioSynthesizer,
private
Properties
getStoredProperties
()
{
private
Properties
getStoredProperties
()
{
return
AccessController
return
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
Properties
>()
{
.
doPrivileged
((
PrivilegedAction
<
Properties
>)
()
->
{
public
Properties
run
()
{
Properties
p
=
new
Properties
();
Properties
p
=
new
Properties
();
String
notePath
=
"/com/sun/media/sound/softsynthesizer"
;
String
notePath
=
"/com/sun/media/sound/softsynthesizer"
;
try
{
try
{
...
@@ -857,15 +854,14 @@ public final class SoftSynthesizer implements AudioSynthesizer,
...
@@ -857,15 +854,14 @@ public final class SoftSynthesizer implements AudioSynthesizer,
String
[]
prefs_keys
=
prefs
.
keys
();
String
[]
prefs_keys
=
prefs
.
keys
();
for
(
String
prefs_key
:
prefs_keys
)
{
for
(
String
prefs_key
:
prefs_keys
)
{
String
val
=
prefs
.
get
(
prefs_key
,
null
);
String
val
=
prefs
.
get
(
prefs_key
,
null
);
if
(
val
!=
null
)
if
(
val
!=
null
)
{
p
.
setProperty
(
prefs_key
,
val
);
p
.
setProperty
(
prefs_key
,
val
);
}
}
}
}
}
catch
(
BackingStoreException
e
)
{
}
catch
(
SecurityException
e
)
{
}
}
return
p
;
}
catch
(
final
BackingStoreException
ignored
)
{
}
}
return
p
;
});
});
}
}
...
@@ -1044,7 +1040,6 @@ public final class SoftSynthesizer implements AudioSynthesizer,
...
@@ -1044,7 +1040,6 @@ public final class SoftSynthesizer implements AudioSynthesizer,
return
;
return
;
}
}
synchronized
(
control_mutex
)
{
synchronized
(
control_mutex
)
{
Throwable
causeException
=
null
;
try
{
try
{
if
(
line
!=
null
)
{
if
(
line
!=
null
)
{
// can throw IllegalArgumentException
// can throw IllegalArgumentException
...
@@ -1117,24 +1112,17 @@ public final class SoftSynthesizer implements AudioSynthesizer,
...
@@ -1117,24 +1112,17 @@ public final class SoftSynthesizer implements AudioSynthesizer,
weakstream
.
sourceDataLine
=
sourceDataLine
;
weakstream
.
sourceDataLine
=
sourceDataLine
;
}
}
}
catch
(
LineUnavailableException
e
)
{
}
catch
(
final
LineUnavailableException
|
SecurityException
causeException
=
e
;
|
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
e
)
{
if
(
isOpen
())
{
causeException
=
e
;
}
catch
(
SecurityException
e
)
{
causeException
=
e
;
}
if
(
causeException
!=
null
)
{
if
(
isOpen
())
close
();
close
();
}
// am: need MidiUnavailableException(Throwable) ctor!
// am: need MidiUnavailableException(Throwable) ctor!
MidiUnavailableException
ex
=
new
MidiUnavailableException
(
MidiUnavailableException
ex
=
new
MidiUnavailableException
(
"Can not open line"
);
"Can not open line"
);
ex
.
initCause
(
causeException
);
ex
.
initCause
(
e
);
throw
ex
;
throw
ex
;
}
}
}
}
}
}
...
...
src/share/classes/com/sun/media/sound/StandardMidiFileReader.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,27 +25,25 @@
...
@@ -25,27 +25,25 @@
package
com.sun.media.sound
;
package
com.sun.media.sound
;
import
java.io.BufferedInputStream
;
import
java.io.DataInputStream
;
import
java.io.DataInputStream
;
import
java.io.EOFException
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.EOFException
;
import
java.io.InputStream
;
import
java.io.BufferedInputStream
;
import
java.net.URL
;
import
java.net.URL
;
import
javax.sound.midi.MidiFileFormat
;
import
javax.sound.midi.InvalidMidiDataException
;
import
javax.sound.midi.InvalidMidiDataException
;
import
javax.sound.midi.MetaMessage
;
import
javax.sound.midi.MetaMessage
;
import
javax.sound.midi.MidiEvent
;
import
javax.sound.midi.MidiEvent
;
import
javax.sound.midi.MidiFileFormat
;
import
javax.sound.midi.MidiMessage
;
import
javax.sound.midi.MidiMessage
;
import
javax.sound.midi.Sequence
;
import
javax.sound.midi.Sequence
;
import
javax.sound.midi.SysexMessage
;
import
javax.sound.midi.SysexMessage
;
import
javax.sound.midi.Track
;
import
javax.sound.midi.Track
;
import
javax.sound.midi.spi.MidiFileReader
;
import
javax.sound.midi.spi.MidiFileReader
;
/**
/**
* MIDI file reader.
* MIDI file reader.
*
*
...
@@ -53,19 +51,23 @@ import javax.sound.midi.spi.MidiFileReader;
...
@@ -53,19 +51,23 @@ import javax.sound.midi.spi.MidiFileReader;
* @author Jan Borgersen
* @author Jan Borgersen
* @author Florian Bomers
* @author Florian Bomers
*/
*/
public
final
class
StandardMidiFileReader
extends
MidiFileReader
{
public
final
class
StandardMidiFileReader
extends
MidiFileReader
{
private
static
final
int
MThd_MAGIC
=
0x4d546864
;
// 'MThd'
private
static
final
int
MThd_MAGIC
=
0x4d546864
;
// 'MThd'
private
static
final
int
bisBufferSize
=
1024
;
// buffer size in buffered input streams
private
static
final
int
bisBufferSize
=
1024
;
// buffer size in buffered input streams
public
MidiFileFormat
getMidiFileFormat
(
InputStream
stream
)
throws
InvalidMidiDataException
,
IOException
{
public
MidiFileFormat
getMidiFileFormat
(
InputStream
stream
)
throws
InvalidMidiDataException
,
IOException
{
return
getMidiFileFormatFromStream
(
stream
,
MidiFileFormat
.
UNKNOWN_LENGTH
,
null
);
return
getMidiFileFormatFromStream
(
stream
,
MidiFileFormat
.
UNKNOWN_LENGTH
,
null
);
}
}
// $$fb 2002-04-17: part of fix for 4635286: MidiSystem.getMidiFileFormat() returns format having invalid length
// $$fb 2002-04-17: part of fix for 4635286: MidiSystem.getMidiFileFormat()
private
MidiFileFormat
getMidiFileFormatFromStream
(
InputStream
stream
,
int
fileLength
,
SMFParser
smfParser
)
throws
InvalidMidiDataException
,
IOException
{
// returns format having invalid length
private
MidiFileFormat
getMidiFileFormatFromStream
(
InputStream
stream
,
int
fileLength
,
SMFParser
smfParser
)
throws
InvalidMidiDataException
,
IOException
{
int
maxReadLength
=
16
;
int
maxReadLength
=
16
;
int
duration
=
MidiFileFormat
.
UNKNOWN_LENGTH
;
int
duration
=
MidiFileFormat
.
UNKNOWN_LENGTH
;
DataInputStream
dis
;
DataInputStream
dis
;
...
@@ -230,7 +232,7 @@ public final class StandardMidiFileReader extends MidiFileReader {
...
@@ -230,7 +232,7 @@ public final class StandardMidiFileReader extends MidiFileReader {
//=============================================================================================================
//=============================================================================================================
/**
/**
* State variables during parsing of a MIDI file
* State variables during parsing of a MIDI file
.
*/
*/
final
class
SMFParser
{
final
class
SMFParser
{
private
static
final
int
MTrk_MAGIC
=
0x4d54726b
;
// 'MTrk'
private
static
final
int
MTrk_MAGIC
=
0x4d54726b
;
// 'MTrk'
...
@@ -297,7 +299,11 @@ final class SMFParser {
...
@@ -297,7 +299,11 @@ final class SMFParser {
}
}
}
}
// now read track in a byte array
// now read track in a byte array
try
{
trackData
=
new
byte
[
trackLength
];
trackData
=
new
byte
[
trackLength
];
}
catch
(
final
OutOfMemoryError
oom
)
{
throw
new
IOException
(
"Track length too big"
,
oom
);
}
try
{
try
{
// $$fb 2003-08-20: fix for 4910986: MIDI file parser breaks up on http connection
// $$fb 2003-08-20: fix for 4910986: MIDI file parser breaks up on http connection
stream
.
readFully
(
trackData
);
stream
.
readFully
(
trackData
);
...
@@ -386,8 +392,13 @@ final class SMFParser {
...
@@ -386,8 +392,13 @@ final class SMFParser {
// meta
// meta
int
metaType
=
readUnsigned
();
int
metaType
=
readUnsigned
();
int
metaLength
=
(
int
)
readVarInt
();
int
metaLength
=
(
int
)
readVarInt
();
final
byte
[]
metaData
;
try
{
metaData
=
new
byte
[
metaLength
];
}
catch
(
final
OutOfMemoryError
oom
)
{
throw
new
IOException
(
"Meta length too big"
,
oom
);
}
byte
[]
metaData
=
new
byte
[
metaLength
];
read
(
metaData
);
read
(
metaData
);
MetaMessage
metaMessage
=
new
MetaMessage
();
MetaMessage
metaMessage
=
new
MetaMessage
();
...
@@ -413,5 +424,4 @@ final class SMFParser {
...
@@ -413,5 +424,4 @@ final class SMFParser {
throw
new
EOFException
(
"invalid MIDI file"
);
throw
new
EOFException
(
"invalid MIDI file"
);
}
}
}
}
}
}
src/share/classes/java/lang/String.java
浏览文件 @
42ee0a91
...
@@ -1045,8 +1045,9 @@ public final class String
...
@@ -1045,8 +1045,9 @@ public final class String
}
}
}
}
// Argument is a String
// Argument is a String
if
(
cs
.
equals
(
this
))
if
(
cs
instanceof
String
)
{
return
true
;
return
equals
(
cs
);
}
// Argument is a generic CharSequence
// Argument is a generic CharSequence
char
v1
[]
=
value
;
char
v1
[]
=
value
;
int
n
=
v1
.
length
;
int
n
=
v1
.
length
;
...
...
src/share/classes/java/lang/invoke/MethodHandleImpl.java
浏览文件 @
42ee0a91
...
@@ -594,6 +594,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -594,6 +594,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
static
class
Lazy
{
static
class
Lazy
{
private
static
final
Class
<?>
MHI
=
MethodHandleImpl
.
class
;
private
static
final
Class
<?>
MHI
=
MethodHandleImpl
.
class
;
private
static
final
MethodHandle
[]
ARRAYS
;
private
static
final
MethodHandle
[]
FILL_ARRAYS
;
static
final
NamedFunction
NF_checkSpreadArgument
;
static
final
NamedFunction
NF_checkSpreadArgument
;
static
final
NamedFunction
NF_guardWithCatch
;
static
final
NamedFunction
NF_guardWithCatch
;
static
final
NamedFunction
NF_throwException
;
static
final
NamedFunction
NF_throwException
;
...
@@ -606,6 +609,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -606,6 +609,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
static
final
MethodHandle
MH_arrayIdentity
;
static
final
MethodHandle
MH_arrayIdentity
;
static
{
static
{
ARRAYS
=
makeArrays
();
FILL_ARRAYS
=
makeFillArrays
();
try
{
try
{
NF_checkSpreadArgument
=
new
NamedFunction
(
MHI
.
getDeclaredMethod
(
"checkSpreadArgument"
,
Object
.
class
,
int
.
class
));
NF_checkSpreadArgument
=
new
NamedFunction
(
MHI
.
getDeclaredMethod
(
"checkSpreadArgument"
,
Object
.
class
,
int
.
class
));
NF_guardWithCatch
=
new
NamedFunction
(
MHI
.
getDeclaredMethod
(
"guardWithCatch"
,
MethodHandle
.
class
,
Class
.
class
,
NF_guardWithCatch
=
new
NamedFunction
(
MHI
.
getDeclaredMethod
(
"guardWithCatch"
,
MethodHandle
.
class
,
Class
.
class
,
...
@@ -1268,7 +1274,6 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1268,7 +1274,6 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
assert
(
mhs
.
size
()
==
11
);
// current number of methods
assert
(
mhs
.
size
()
==
11
);
// current number of methods
return
mhs
.
toArray
(
new
MethodHandle
[
MAX_ARITY
+
1
]);
return
mhs
.
toArray
(
new
MethodHandle
[
MAX_ARITY
+
1
]);
}
}
private
static
final
MethodHandle
[]
ARRAYS
=
makeArrays
();
// filling versions of the above:
// filling versions of the above:
// using Integer len instead of int len and no varargs to avoid bootstrapping problems
// using Integer len instead of int len and no varargs to avoid bootstrapping problems
...
@@ -1315,6 +1320,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1315,6 +1320,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
Object
a4
,
Object
a5
,
Object
a6
,
Object
a7
,
Object
a4
,
Object
a5
,
Object
a6
,
Object
a7
,
Object
a8
,
Object
a9
)
Object
a8
,
Object
a9
)
{
fillWithArguments
(
a
,
pos
,
a0
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
a7
,
a8
,
a9
);
return
a
;
}
{
fillWithArguments
(
a
,
pos
,
a0
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
a7
,
a8
,
a9
);
return
a
;
}
private
static
final
int
FILL_ARRAYS_COUNT
=
11
;
// current number of fillArray methods
private
static
MethodHandle
[]
makeFillArrays
()
{
private
static
MethodHandle
[]
makeFillArrays
()
{
ArrayList
<
MethodHandle
>
mhs
=
new
ArrayList
<>();
ArrayList
<
MethodHandle
>
mhs
=
new
ArrayList
<>();
mhs
.
add
(
null
);
// there is no empty fill; at least a0 is required
mhs
.
add
(
null
);
// there is no empty fill; at least a0 is required
...
@@ -1323,10 +1331,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1323,10 +1331,9 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
if
(
mh
==
null
)
break
;
if
(
mh
==
null
)
break
;
mhs
.
add
(
mh
);
mhs
.
add
(
mh
);
}
}
assert
(
mhs
.
size
()
==
11
);
// current number of methods
assert
(
mhs
.
size
()
==
FILL_ARRAYS_COUNT
);
return
mhs
.
toArray
(
new
MethodHandle
[
0
]);
return
mhs
.
toArray
(
new
MethodHandle
[
0
]);
}
}
private
static
final
MethodHandle
[]
FILL_ARRAYS
=
makeFillArrays
();
private
static
Object
copyAsPrimitiveArray
(
Wrapper
w
,
Object
...
boxes
)
{
private
static
Object
copyAsPrimitiveArray
(
Wrapper
w
,
Object
...
boxes
)
{
Object
a
=
w
.
makeArray
(
boxes
.
length
);
Object
a
=
w
.
makeArray
(
boxes
.
length
);
...
@@ -1338,15 +1345,15 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1338,15 +1345,15 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
* arguments and returns an Object array of them, as if for varargs.
* arguments and returns an Object array of them, as if for varargs.
*/
*/
static
MethodHandle
varargsArray
(
int
nargs
)
{
static
MethodHandle
varargsArray
(
int
nargs
)
{
MethodHandle
mh
=
ARRAYS
[
nargs
];
MethodHandle
mh
=
Lazy
.
ARRAYS
[
nargs
];
if
(
mh
!=
null
)
return
mh
;
if
(
mh
!=
null
)
return
mh
;
mh
=
findCollector
(
"array"
,
nargs
,
Object
[].
class
);
mh
=
findCollector
(
"array"
,
nargs
,
Object
[].
class
);
if
(
mh
!=
null
)
mh
=
makeIntrinsic
(
mh
,
Intrinsic
.
NEW_ARRAY
);
if
(
mh
!=
null
)
mh
=
makeIntrinsic
(
mh
,
Intrinsic
.
NEW_ARRAY
);
if
(
mh
!=
null
)
return
ARRAYS
[
nargs
]
=
mh
;
if
(
mh
!=
null
)
return
Lazy
.
ARRAYS
[
nargs
]
=
mh
;
mh
=
buildVarargsArray
(
Lazy
.
MH_fillNewArray
,
Lazy
.
MH_arrayIdentity
,
nargs
);
mh
=
buildVarargsArray
(
Lazy
.
MH_fillNewArray
,
Lazy
.
MH_arrayIdentity
,
nargs
);
assert
(
assertCorrectArity
(
mh
,
nargs
));
assert
(
assertCorrectArity
(
mh
,
nargs
));
mh
=
makeIntrinsic
(
mh
,
Intrinsic
.
NEW_ARRAY
);
mh
=
makeIntrinsic
(
mh
,
Intrinsic
.
NEW_ARRAY
);
return
ARRAYS
[
nargs
]
=
mh
;
return
Lazy
.
ARRAYS
[
nargs
]
=
mh
;
}
}
private
static
boolean
assertCorrectArity
(
MethodHandle
mh
,
int
arity
)
{
private
static
boolean
assertCorrectArity
(
MethodHandle
mh
,
int
arity
)
{
...
@@ -1382,7 +1389,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1382,7 +1389,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
return
mh
;
return
mh
;
}
}
private
static
final
int
LEFT_ARGS
=
(
FILL_ARRAYS
.
length
-
1
)
;
private
static
final
int
LEFT_ARGS
=
FILL_ARRAYS_COUNT
-
1
;
private
static
final
MethodHandle
[]
FILL_ARRAY_TO_RIGHT
=
new
MethodHandle
[
MAX_ARITY
+
1
];
private
static
final
MethodHandle
[]
FILL_ARRAY_TO_RIGHT
=
new
MethodHandle
[
MAX_ARITY
+
1
];
/** fill_array_to_right(N).invoke(a, argL..arg[N-1])
/** fill_array_to_right(N).invoke(a, argL..arg[N-1])
* fills a[L]..a[N-1] with corresponding arguments,
* fills a[L]..a[N-1] with corresponding arguments,
...
@@ -1413,7 +1420,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
...
@@ -1413,7 +1420,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
if
(
midLen
<
LEFT_ARGS
)
rightLen
=
nargs
-
(
midLen
=
LEFT_ARGS
);
if
(
midLen
<
LEFT_ARGS
)
rightLen
=
nargs
-
(
midLen
=
LEFT_ARGS
);
assert
(
rightLen
>
0
);
assert
(
rightLen
>
0
);
MethodHandle
midFill
=
fillToRight
(
midLen
);
// recursive fill
MethodHandle
midFill
=
fillToRight
(
midLen
);
// recursive fill
MethodHandle
rightFill
=
FILL_ARRAYS
[
rightLen
].
bindTo
(
midLen
);
// [midLen..nargs-1]
MethodHandle
rightFill
=
Lazy
.
FILL_ARRAYS
[
rightLen
].
bindTo
(
midLen
);
// [midLen..nargs-1]
assert
(
midFill
.
type
().
parameterCount
()
==
1
+
midLen
-
LEFT_ARGS
);
assert
(
midFill
.
type
().
parameterCount
()
==
1
+
midLen
-
LEFT_ARGS
);
assert
(
rightFill
.
type
().
parameterCount
()
==
1
+
rightLen
);
assert
(
rightFill
.
type
().
parameterCount
()
==
1
+
rightLen
);
...
...
src/share/classes/javax/swing/JFrame.java
浏览文件 @
42ee0a91
...
@@ -24,14 +24,22 @@
...
@@ -24,14 +24,22 @@
*/
*/
package
javax.swing
;
package
javax.swing
;
import
java.awt.*
;
import
java.awt.AWTEvent
;
import
java.awt.event.*
;
import
java.awt.BorderLayout
;
import
java.beans.PropertyChangeListener
;
import
java.awt.Component
;
import
java.util.Locale
;
import
java.awt.Container
;
import
java.util.Vector
;
import
java.awt.Frame
;
import
java.io.Serializable
;
import
java.awt.Graphics
;
import
java.awt.GraphicsConfiguration
;
import
javax.accessibility.*
;
import
java.awt.HeadlessException
;
import
java.awt.Image
;
import
java.awt.LayoutManager
;
import
java.awt.event.WindowEvent
;
import
javax.accessibility.Accessible
;
import
javax.accessibility.AccessibleContext
;
import
javax.accessibility.AccessibleState
;
import
javax.accessibility.AccessibleStateSet
;
/**
/**
...
@@ -293,33 +301,28 @@ public class JFrame extends Frame implements WindowConstants,
...
@@ -293,33 +301,28 @@ public class JFrame extends Frame implements WindowConstants,
* @see #setDefaultCloseOperation
* @see #setDefaultCloseOperation
* @see java.awt.Window#processWindowEvent
* @see java.awt.Window#processWindowEvent
*/
*/
protected
void
processWindowEvent
(
WindowEvent
e
)
{
protected
void
processWindowEvent
(
final
WindowEvent
e
)
{
super
.
processWindowEvent
(
e
);
super
.
processWindowEvent
(
e
);
if
(
e
.
getID
()
==
WindowEvent
.
WINDOW_CLOSING
)
{
if
(
e
.
getID
()
==
WindowEvent
.
WINDOW_CLOSING
)
{
switch
(
defaultCloseOperation
)
{
switch
(
defaultCloseOperation
)
{
case
HIDE_ON_CLOSE:
case
HIDE_ON_CLOSE:
setVisible
(
false
);
setVisible
(
false
);
break
;
break
;
case
DISPOSE_ON_CLOSE:
case
DISPOSE_ON_CLOSE:
dispose
();
dispose
();
break
;
break
;
case
DO_NOTHING_ON_CLOSE:
default
:
break
;
case
EXIT_ON_CLOSE:
case
EXIT_ON_CLOSE:
// This needs to match the checkExit call in
// This needs to match the checkExit call in
// setDefaultCloseOperation
// setDefaultCloseOperation
System
.
exit
(
0
);
System
.
exit
(
0
);
break
;
break
;
case
DO_NOTHING_ON_CLOSE:
default
:
}
}
}
}
}
}
// public void setMenuBar(MenuBar menu) {
// throw new IllegalComponentStateException("Please use setJMenuBar() with JFrame.");
// }
/**
/**
* Sets the operation that will happen by default when
* Sets the operation that will happen by default when
* the user initiates a "close" on this frame.
* the user initiates a "close" on this frame.
...
...
src/share/classes/sun/java2d/pipe/DrawImage.java
浏览文件 @
42ee0a91
...
@@ -278,18 +278,34 @@ public class DrawImage implements DrawImagePipe
...
@@ -278,18 +278,34 @@ public class DrawImage implements DrawImagePipe
Color
bgColor
,
int
interpType
,
Color
bgColor
,
int
interpType
,
double
coords
[])
double
coords
[])
{
{
double
dx
=
coords
[
0
];
double
dx1
=
coords
[
0
];
double
dy
=
coords
[
1
];
double
dy1
=
coords
[
1
];
double
dw
=
coords
[
2
]
-
dx
;
double
dx2
=
coords
[
2
];
double
dh
=
coords
[
3
]
-
dy
;
double
dy2
=
coords
[
3
];
double
dw
=
dx2
-
dx1
;
double
dh
=
dy2
-
dy1
;
/* If any of the destination coordinates exceed the integer range,
* then the calculations performed in calls made here cannot be
* guaranteed to be correct, or to converge (terminate).
* So return out of here, deferring to code that can handle this.
*/
if
(
dx1
<
Integer
.
MIN_VALUE
||
dx1
>
Integer
.
MAX_VALUE
||
dy1
<
Integer
.
MIN_VALUE
||
dy1
>
Integer
.
MAX_VALUE
||
dx2
<
Integer
.
MIN_VALUE
||
dx2
>
Integer
.
MAX_VALUE
||
dy2
<
Integer
.
MIN_VALUE
||
dy2
>
Integer
.
MAX_VALUE
)
{
return
false
;
}
// First check if width and height are very close to img w&h.
// First check if width and height are very close to img w&h.
if
(
closeToInteger
(
sx2
-
sx1
,
dw
)
&&
closeToInteger
(
sy2
-
sy1
,
dh
))
{
if
(
closeToInteger
(
sx2
-
sx1
,
dw
)
&&
closeToInteger
(
sy2
-
sy1
,
dh
))
{
// Round location to nearest pixel and then test
// Round location to nearest pixel and then test
// if it will cause interpolation anomalies.
// if it will cause interpolation anomalies.
int
idx
=
(
int
)
Math
.
floor
(
dx
+
0.5
);
int
idx
=
(
int
)
Math
.
floor
(
dx
1
+
0.5
);
int
idy
=
(
int
)
Math
.
floor
(
dy
+
0.5
);
int
idy
=
(
int
)
Math
.
floor
(
dy
1
+
0.5
);
if
(
interpType
==
AffineTransformOp
.
TYPE_NEAREST_NEIGHBOR
||
if
(
interpType
==
AffineTransformOp
.
TYPE_NEAREST_NEIGHBOR
||
(
closeToInteger
(
idx
,
dx
)
&&
closeToInteger
(
idy
,
dy
)))
(
closeToInteger
(
idx
,
dx
1
)
&&
closeToInteger
(
idy
,
dy1
)))
{
{
renderImageCopy
(
sg
,
img
,
bgColor
,
renderImageCopy
(
sg
,
img
,
bgColor
,
idx
,
idy
,
idx
,
idy
,
...
@@ -302,7 +318,7 @@ public class DrawImage implements DrawImagePipe
...
@@ -302,7 +318,7 @@ public class DrawImage implements DrawImagePipe
if
(
dw
>
0
&&
dh
>
0
)
{
if
(
dw
>
0
&&
dh
>
0
)
{
if
(
renderImageScale
(
sg
,
img
,
bgColor
,
interpType
,
if
(
renderImageScale
(
sg
,
img
,
bgColor
,
interpType
,
sx1
,
sy1
,
sx2
,
sy2
,
sx1
,
sy1
,
sx2
,
sy2
,
coords
[
0
],
coords
[
1
],
coords
[
2
],
coords
[
3
]
))
dx1
,
dy1
,
dx2
,
dy2
))
{
{
return
true
;
return
true
;
}
}
...
...
src/share/classes/sun/util/resources/TimeZoneNames.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/de/TimeZoneNames_de.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/es/TimeZoneNames_es.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/fr/TimeZoneNames_fr.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/it/TimeZoneNames_it.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/ja/TimeZoneNames_ja.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/ko/TimeZoneNames_ko.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/pt/TimeZoneNames_pt_BR.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
TRUT
},
{
"Pacific/Chuuk"
,
TRUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/sv/TimeZoneNames_sv.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_CN.java
浏览文件 @
42ee0a91
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
...
@@ -829,7 +829,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
...
@@ -917,6 +917,9 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/classes/sun/util/resources/zh/TimeZoneNames_zh_TW.java
浏览文件 @
42ee0a91
...
@@ -831,7 +831,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
...
@@ -831,7 +831,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{
"Europe/Madrid"
,
CET
},
{
"Europe/Madrid"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Malta"
,
CET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Mariehamn"
,
EET
},
{
"Europe/Minsk"
,
FET
},
{
"Europe/Minsk"
,
MSK
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Monaco"
,
CET
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Moscow"
,
MSK
},
{
"Europe/Nicosia"
,
EET
},
{
"Europe/Nicosia"
,
EET
},
...
@@ -919,6 +919,9 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
...
@@ -919,6 +919,9 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{
"PRT"
,
AST
},
{
"PRT"
,
AST
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Apia"
,
WST_SAMOA
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Auckland"
,
NZST
},
{
"Pacific/Bougainville"
,
new
String
[]
{
"Bougainville Standard Time"
,
"BST"
,
"Bougainville Daylight Time"
,
"BST"
,
"Bougainville Time"
,
"BT"
}},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chatham"
,
CHAST
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Chuuk"
,
CHUT
},
{
"Pacific/Easter"
,
EASTER
},
{
"Pacific/Easter"
,
EASTER
},
...
...
src/share/demo/jfc/Font2DTest/resources/TextResources.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
This is Java 2D! (Default)
src/share/demo/jfc/Font2DTest/resources/TextResources_de.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
This is Java 2D! (German)
\u
00f6
\u
00df
\u
00dc
src/share/demo/jfc/Font2DTest/resources/TextResources_en.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
This is Java 2D! (English) A B C
src/share/demo/jfc/Font2DTest/resources/TextResources_en_GB.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
This is Java 2D! (English in Great Britain)
\u0075
\u
006b Z
src/share/demo/jfc/Font2DTest/resources/TextResources_ja.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
Java 2D
\u3067\u3059\u3002
(
\u
30C7
\u
30D5
\u
30A9
\u
30EB
\u
30C8)
src/share/demo/jfc/Font2DTest/resources/TextResources_ko.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
This is Java 2D! (Korean)
src/share/demo/jfc/Font2DTest/resources/TextResources_zh_CN.properties
已删除
100644 → 0
浏览文件 @
2a467a0b
string
=
\u
8FD9
\u
662F Java 2D! (
\u
9ED8
\u
8BA4
\u
503C)
src/share/demo/jfc/Font2DTest/resources/resource.data
已删除
100644 → 0
浏览文件 @
2a467a0b
en US
en GB
ko KO
ab KO
de DE
src/solaris/classes/sun/awt/X11/XToolkit.java
浏览文件 @
42ee0a91
...
@@ -164,7 +164,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
...
@@ -164,7 +164,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
}
}
p
ublic
native
void
nativeLoadSystemColors
(
int
[]
systemColors
);
p
rivate
native
void
nativeLoadSystemColors
(
int
[]
systemColors
);
static
UIDefaults
getUIDefaults
()
{
static
UIDefaults
getUIDefaults
()
{
if
(
uidefaults
==
null
)
{
if
(
uidefaults
==
null
)
{
...
...
src/solaris/classes/sun/awt/X11/XWindow.java
浏览文件 @
42ee0a91
...
@@ -43,7 +43,7 @@ import sun.awt.image.PixelConverter;
...
@@ -43,7 +43,7 @@ import sun.awt.image.PixelConverter;
import
sun.java2d.SunGraphics2D
;
import
sun.java2d.SunGraphics2D
;
import
sun.java2d.SurfaceData
;
import
sun.java2d.SurfaceData
;
public
class
XWindow
extends
XBaseWindow
implements
X11ComponentPeer
{
class
XWindow
extends
XBaseWindow
implements
X11ComponentPeer
{
private
static
PlatformLogger
log
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.XWindow"
);
private
static
PlatformLogger
log
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.XWindow"
);
private
static
PlatformLogger
insLog
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.insets.XWindow"
);
private
static
PlatformLogger
insLog
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.insets.XWindow"
);
private
static
PlatformLogger
eventLog
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.event.XWindow"
);
private
static
PlatformLogger
eventLog
=
PlatformLogger
.
getLogger
(
"sun.awt.X11.event.XWindow"
);
...
@@ -836,8 +836,10 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
...
@@ -836,8 +836,10 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
// REMIND: need to implement looking for disabled events
// REMIND: need to implement looking for disabled events
public
native
boolean
x11inputMethodLookupString
(
long
event
,
long
[]
keysymArray
);
private
native
boolean
x11inputMethodLookupString
(
long
event
,
native
boolean
haveCurrentX11InputMethodInstance
();
long
[]
keysymArray
);
private
native
boolean
haveCurrentX11InputMethodInstance
();
private
boolean
mouseAboveMe
;
private
boolean
mouseAboveMe
;
...
...
src/solaris/classes/sun/awt/X11/XlibWrapper.java
浏览文件 @
42ee0a91
/*
/*
* Copyright (c) 2002, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -26,12 +26,12 @@
...
@@ -26,12 +26,12 @@
package
sun.awt.X11
;
package
sun.awt.X11
;
import
java.security.AccessController
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
sun.misc.Unsafe
;
import
sun.security.action.GetPropertyAction
;
import
sun.security.action.GetPropertyAction
;
import
sun.misc.*
;
final
public
class
XlibWrapper
final
class
XlibWrapper
{
{
static
Unsafe
unsafe
=
Unsafe
.
getUnsafe
();
static
Unsafe
unsafe
=
Unsafe
.
getUnsafe
();
// strange constants
// strange constants
static
final
int
MAXSIZE
=
32767
;
static
final
int
MAXSIZE
=
32767
;
...
@@ -48,7 +48,7 @@ final public class XlibWrapper
...
@@ -48,7 +48,7 @@ final public class XlibWrapper
char *display_name;
char *display_name;
*/
*/
public
final
static
String
eventToString
[]
=
static
final
String
[]
eventToString
=
{
"<none:0>"
,
"<none:1>"
,
"KeyPress"
,
"KeyRelease"
,
"ButtonPress"
,
"ButtonRelease"
,
{
"<none:0>"
,
"<none:1>"
,
"KeyPress"
,
"KeyRelease"
,
"ButtonPress"
,
"ButtonRelease"
,
"MotionNotify"
,
"EnterNotify"
,
"LeaveNotify"
,
"FocusIn"
,
"FocusOut"
,
"MotionNotify"
,
"EnterNotify"
,
"LeaveNotify"
,
"FocusIn"
,
"FocusOut"
,
"KeymapNotify"
,
"Expose"
,
"GraphicsExpose"
,
"NoExpose"
,
"VisibilityNotify"
,
"KeymapNotify"
,
"Expose"
,
"GraphicsExpose"
,
"NoExpose"
,
"VisibilityNotify"
,
...
@@ -66,7 +66,7 @@ final public class XlibWrapper
...
@@ -66,7 +66,7 @@ final public class XlibWrapper
/**
/**
* Gets byte string from str_ptr and copies it into byte array
* Gets byte string from str_ptr and copies it into byte array
* String should be NULL terminated
* String should be NULL terminated
.
*/
*/
static
native
byte
[]
getStringBytes
(
long
str_ptr
);
static
native
byte
[]
getStringBytes
(
long
str_ptr
);
...
@@ -529,7 +529,7 @@ static native String XSetLocaleModifiers(String modifier_list);
...
@@ -529,7 +529,7 @@ static native String XSetLocaleModifiers(String modifier_list);
display Specifies the connection to the X server.
display Specifies the connection to the X server.
onoff Specifies a Boolean value that indicates whether to enable or disable synchronization.
onoff Specifies a Boolean value that indicates whether to enable or disable synchronization.
*/
*/
public
static
native
int
XSynchronize
(
long
display
,
boolean
onoff
);
static
native
int
XSynchronize
(
long
display
,
boolean
onoff
);
/**
/**
* Extracts an X event that can be processed in a secondary loop.
* Extracts an X event that can be processed in a secondary loop.
...
...
test/ProblemList.txt
浏览文件 @
42ee0a91
...
@@ -199,6 +199,9 @@ java/nio/file/WatchService/LotsOfEvents.java solaris-all
...
@@ -199,6 +199,9 @@ java/nio/file/WatchService/LotsOfEvents.java solaris-all
# jdk_rmi
# jdk_rmi
# 7140992
java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java generic-all
# 7146541
# 7146541
java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all
java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all
...
...
test/java/awt/image/DrawImage/DrawImageCoordsTest.java
0 → 100644
浏览文件 @
42ee0a91
/*
* Copyright (c) 2014, 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
* @bug 8028539
* @summary Test that drawing a scaled image terminates.
* @run main/othervm/timeout=60 DrawImageCoordsTest
*/
import
java.awt.Color
;
import
java.awt.Graphics
;
import
java.awt.Graphics2D
;
import
java.awt.geom.AffineTransform
;
import
java.awt.image.BufferedImage
;
public
class
DrawImageCoordsTest
{
public
static
void
main
(
String
[]
args
)
{
/* Create an image to draw, filled in solid red. */
BufferedImage
srcImg
=
new
BufferedImage
(
200
,
200
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics
srcG
=
srcImg
.
createGraphics
();
srcG
.
setColor
(
Color
.
red
);
int
w
=
srcImg
.
getWidth
(
null
);
int
h
=
srcImg
.
getHeight
(
null
);
srcG
.
fillRect
(
0
,
0
,
w
,
h
);
/* Create a destination image */
BufferedImage
dstImage
=
new
BufferedImage
(
200
,
200
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics2D
dstG
=
dstImage
.
createGraphics
();
/* draw image under a scaling transform that overflows int */
AffineTransform
tx
=
new
AffineTransform
(
0.5
,
0
,
0
,
0.5
,
0
,
5.8658460197478485E9
);
dstG
.
setTransform
(
tx
);
dstG
.
drawImage
(
srcImg
,
0
,
0
,
null
);
/* draw image under the same overflowing transform, cancelling
* out the 0.5 scale on the graphics
*/
dstG
.
drawImage
(
srcImg
,
0
,
0
,
2
*
w
,
2
*
h
,
null
);
if
(
Color
.
red
.
getRGB
()
==
dstImage
.
getRGB
(
w
/
2
,
h
/
2
))
{
throw
new
RuntimeException
(
"Unexpected color: clipping failed."
);
}
System
.
out
.
println
(
"Test Thread Completed"
);
}
}
test/javax/management/MBeanServer/MBeanFallbackTest.java
浏览文件 @
42ee0a91
...
@@ -35,7 +35,7 @@ import javax.management.ObjectName;
...
@@ -35,7 +35,7 @@ import javax.management.ObjectName;
* @author Jaroslav Bachorik
* @author Jaroslav Bachorik
* @run clean MBeanFallbackTest
* @run clean MBeanFallbackTest
* @run build MBeanFallbackTest
* @run build MBeanFallbackTest
* @run main MBeanFallbackTest
* @run main
/othervm -Djdk.jmx.mbeans.allowNonPublic=true
MBeanFallbackTest
*/
*/
public
class
MBeanFallbackTest
{
public
class
MBeanFallbackTest
{
private
static
interface
PrivateMBean
{
private
static
interface
PrivateMBean
{
...
@@ -51,7 +51,6 @@ public class MBeanFallbackTest {
...
@@ -51,7 +51,6 @@ public class MBeanFallbackTest {
private
static
int
failures
=
0
;
private
static
int
failures
=
0
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
setProperty
(
"jdk.jmx.mbeans.allowNonPublic"
,
"true"
);
testPrivate
(
PrivateMBean
.
class
,
new
Private
());
testPrivate
(
PrivateMBean
.
class
,
new
Private
());
if
(
failures
==
0
)
if
(
failures
==
0
)
...
...
test/javax/management/ObjectName/SerialCompatTest.java
浏览文件 @
42ee0a91
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
* @author Eamonn McManus, Daniel Fuchs
* @author Eamonn McManus, Daniel Fuchs
* @run clean SerialCompatTest
* @run clean SerialCompatTest
* @run build SerialCompatTest
* @run build SerialCompatTest
* @run main/othervm SerialCompatTest
* @run main/othervm
-Djdk.jmx.mbeans.allowNonPublic=true -Djmx.serial.form=1.0
SerialCompatTest
*/
*/
import
java.io.*
;
import
java.io.*
;
...
@@ -223,8 +223,6 @@ public class SerialCompatTest {
...
@@ -223,8 +223,6 @@ public class SerialCompatTest {
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
setProperty
(
"jmx.serial.form"
,
"1.0"
);
/* Check that we really are in jmx.serial.form=1.0 mode.
/* Check that we really are in jmx.serial.form=1.0 mode.
The property is frozen the first time the ObjectName class
The property is frozen the first time the ObjectName class
is referenced so checking that it is set to the correct
is referenced so checking that it is set to the correct
...
...
test/javax/management/mxbean/MXBeanFallbackTest.java
浏览文件 @
42ee0a91
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
* @author Jaroslav Bachorik
* @author Jaroslav Bachorik
* @run clean MXBeanFallbackTest
* @run clean MXBeanFallbackTest
* @run build MXBeanFallbackTest
* @run build MXBeanFallbackTest
* @run main MXBeanFallbackTest
* @run main
/othervm -Djdk.jmx.mbeans.allowNonPublic=true
MXBeanFallbackTest
*/
*/
import
javax.management.MBeanServer
;
import
javax.management.MBeanServer
;
...
@@ -40,7 +40,6 @@ import javax.management.ObjectName;
...
@@ -40,7 +40,6 @@ import javax.management.ObjectName;
public
class
MXBeanFallbackTest
{
public
class
MXBeanFallbackTest
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
setProperty
(
"jdk.jmx.mbeans.allowNonPublic"
,
"true"
);
testPrivateMXBean
(
"Private"
,
new
Private
());
testPrivateMXBean
(
"Private"
,
new
Private
());
if
(
failures
==
0
)
if
(
failures
==
0
)
...
...
test/javax/management/proxy/JMXProxyFallbackTest.java
浏览文件 @
42ee0a91
...
@@ -36,7 +36,7 @@ import javax.management.ObjectName;
...
@@ -36,7 +36,7 @@ import javax.management.ObjectName;
* @author Jaroslav Bachorik
* @author Jaroslav Bachorik
* @run clean JMXProxyFallbackTest
* @run clean JMXProxyFallbackTest
* @run build JMXProxyFallbackTest
* @run build JMXProxyFallbackTest
* @run main JMXProxyFallbackTest
* @run main
/othervm -Djdk.jmx.mbeans.allowNonPublic=true
JMXProxyFallbackTest
*/
*/
public
class
JMXProxyFallbackTest
{
public
class
JMXProxyFallbackTest
{
private
static
interface
PrivateMBean
{
private
static
interface
PrivateMBean
{
...
@@ -56,7 +56,6 @@ public class JMXProxyFallbackTest {
...
@@ -56,7 +56,6 @@ public class JMXProxyFallbackTest {
private
static
int
failures
=
0
;
private
static
int
failures
=
0
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
setProperty
(
"jdk.jmx.mbeans.allowNonPublic"
,
"true"
);
testPrivate
(
PrivateMBean
.
class
);
testPrivate
(
PrivateMBean
.
class
);
testPrivate
(
PrivateMXBean
.
class
);
testPrivate
(
PrivateMXBean
.
class
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录