This commit is contained in:
Vinnie Ryan 2010-12-13 15:07:20 +00:00
commit 7d90fc05af
187 changed files with 9491 additions and 2703 deletions

View File

@ -94,3 +94,5 @@ a4e6aa1f45ad23a6f083ed98d970b5006ea4d292 jdk7-b116
228e73f288c543a8c34e2a54227103ae5649e6af jdk7-b117
2e876e59938a853934aa738c811b26c452bd9fe8 jdk7-b118
4951967a61b4dbbf514828879f57bd1a0d4b420b jdk7-b119
8c840d3ab24f8d0f422b991638acb44b6ab1d98c jdk7-b120
0ce0a2c3a6926677dc507839a820ab6625541e5a jdk7-b121

View File

@ -94,3 +94,5 @@ e8ebdf41b9c01a26642848f4134f5504e8fb3233 jdk7-b115
7220e60b097fa027e922f1aeecdd330f3e37409f jdk7-b117
a12a9e78df8a9d534da0b4a244ed68f0de0bd58e jdk7-b118
661360bef6ccad6c119f067f5829b207de80c936 jdk7-b119
366ff0b6d2151595629806b033e2e1497e3a55d4 jdk7-b120
2c2d4f88637b488014c37e1a2eb401f68bca8838 jdk7-b121

View File

@ -93,3 +93,6 @@ da7561d479e0ddaa4650d8023ac0fc7294e014e3 jdk7-b115
98c028de4301106f2285ac0e128a1bb9b4c24f5c jdk7-b116
fa502e4834dac2176499cc1f44794d5dc32a11b9 jdk7-b117
42e77836fded7c2a3080d27316b96634ea9e33c6 jdk7-b118
39829414ae31a0080578a49b751899edd518cd7d jdk7-b119
cff5a173ec1e89013359e804a3e31736ef6fb462 jdk7-b120
2cc9f32992101732b23730b737740e64ebc5fa89 jdk7-b121

View File

@ -131,3 +131,6 @@ bdbc48857210a509b3c50a3291ecb9dd6a72e016 jdk7-b115
806d0c037e6bbb88dac0699673f4ba55ee8c02da jdk7-b117
698b7b727e12de44139d8cca6ab9a494ead13253 jdk7-b118
3ef7426b4deac5dcfd4afb35cabe9ab3d666df91 hs20-b02
5484e7c53fa7da5e869902437ee08a9ae10c1c69 jdk7-b119
f5603a6e50422046ebc0d2f1671d55cb8f1bf1e9 jdk7-b120
3f3653ab7af8dc1ddb9fa75dad56bf94f89e81a8 jdk7-b121

View File

@ -94,3 +94,5 @@ f8d4e6c6cfce1cda23fcbd144628a9791a9e1a63 jdk7-b116
9ee4d96e893436a48607924227dadd2d93b9b00d jdk7-b117
b2f6d9c4f12ffd307a5de40455b2b61b31a5cb79 jdk7-b118
9ee900f01c5872551c06f33ae909662ffd8463ac jdk7-b119
4821de0908defe647fcdaab4485f98873e24dea0 jdk7-b120
63dae40fa19fd3bf4689ea2f3c1d9d690e1abcee jdk7-b121

View File

@ -28,10 +28,10 @@ drops.master.copy.base=${drops.dir}
jaxp_src.bundle.name=jaxp-1_4_4.zip
jaxp_src.bundle.md5.checksum=2c40a758392c4abf2d59f355240df46a
jaxp_src.master.bundle.dir=${drops.master.copy.base}
jaxp_src.master.bundle.url.base=https://jaxp.dev.java.net/files/documents/913/152561
jaxp_src.master.bundle.url.base=https://java.net/downloads/jaxp/jdk7
#jaxp_tests.bundle.name=jaxp-unittests-1_4_4.zip
#jaxp_tests.bundle.md5.checksum=51845e38b02920cf5374d0331ab3a4ee
#jaxp_tests.master.bundle.dir=${drops.master.copy.base}
#jaxp_tests.master.bundle.url.base=https://jaxp.dev.java.net/files/documents/913/152562
#jaxp_tests.master.bundle.url.base=https://java.net/downloads/jaxp/jdk7

View File

@ -94,3 +94,5 @@ d35c94fd22362f478f75b4bfcd2bef6a83cb9b3f jdk7-b113
1320fb3bb588298c79716bd2d10b5b4afacb9370 jdk7-b117
19a2fab3f91a275f90791c15d1c21a24e820ff2d jdk7-b118
41fa02b3663795ddf529690df7aa6714210093ec jdk7-b119
a4f2e1ca67163ef79555082809d7cd719893c338 jdk7-b120
0fa950117faac7bdbc94e6c46b88f6f892031c17 jdk7-b121

View File

@ -28,14 +28,14 @@ drops.master.copy.base=${drops.dir}
jaxws_src.bundle.name= jdk7-jaxws2_2-2010_08_19.zip
jaxws_src.bundle.md5.checksum=8775ccefd3b4fa2dde5155ec4b7e4ceb
jaxws_src.master.bundle.dir=${drops.master.copy.base}
jaxws_src.master.bundle.url.base=https://jax-ws.dev.java.net/files/documents/4202/152532
jaxws_src.master.bundle.url.base=https://java.net/downloads/jax-ws/JDK7
jaf_src.bundle.name=jdk7-jaf-2010_08_19.zip
jaf_src.bundle.md5.checksum=18d15dfd71117daadb332af003d08212
jaf_src.master.bundle.dir=${drops.master.copy.base}
jaf_src.master.bundle.url.base=https://jax-ws.dev.java.net/files/documents/4202/152336
jaf_src.master.bundle.url.base=https://java.net/downloads/jax-ws/JDK7
#jaxws_tests.bundle.name=jdk7-jaxws-tests-2009_08_28.zip
#jaxws_tests.master.bundle.dir=${drops.master.copy.base}
#jaxws_tests.master.bundle.url.base=http://kenai.com/projects/jdk7-drops/downloads/download
#jaxws_tests.master.bundle.url.base=https://java.net/downloads/jax-ws/JDK7

View File

@ -95,3 +95,4 @@ e250cef36ea05e627e7e6f7d75e5e19f529e2ba3 jdk7-b114
b357910aa04aead2a16b6d6ff395a8df4b51d1dd jdk7-b118
ecab7eefb8f2326fd90fb632f47f1b6f81e928f8 jdk7-b119
37d74e29687cf07c2bf9411af58c7e42440855c3 jdk7-b120
a661d8587b5d8986aacae086f5df66af9e1a96b1 jdk7-b121

View File

@ -83,14 +83,19 @@ ifndef CLOSED_SRC
CLOSED_SRC = $(BUILDDIR)/../src/closed
endif
# If we have no closed directory, force it to an openjdk build
CLOSED_SRC_DIR_EXISTS := $(shell \
if [ -d $(CLOSED_SRC) ] ; then \
echo true; \
else \
echo false; \
fi)
ifeq ($(CLOSED_SRC_DIR_EXISTS), false)
# If CLOSE_SRC_INCLUDED isn't set to true, check if there's any
# closed directory.
ifneq ($(CLOSED_SRC_INCLUDED), true)
CLOSED_SRC_INCLUDED := $(shell \
if [ -d $(CLOSED_SRC) ] ; then \
echo true; \
else \
echo false; \
fi)
endif
# Set OPENJDK based on CLOSED_SRC_INCLUDED
ifeq ($(CLOSED_SRC_INCLUDED), false)
OPENJDK = true
endif

View File

@ -123,7 +123,7 @@ LIBM=-lm
# GCC29_COMPILER_PATH: is the path to where the gcc 2.9 compiler is installed
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifneq "$(origin ALT_GCC29_COMPILER_PATH)" "undefined"
ifdef ALT_GCC29_COMPILER_PATH
GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH))
else
GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/

View File

@ -65,7 +65,7 @@
# If we are using freetype, the freetype version expected.
#
# REQUIRED_GCC_VER
# Solaris and Linux only. The required version of gcc/g++ for the plugin.
# Solaris and Linux only. The required version of gcc/g++ for the legacy OJI plugin.
#
# REQUIRED_LINK_VER
# Windows only: The version of link.exe expected.

View File

@ -99,12 +99,16 @@ ifeq ($(PLATFORM), linux)
echo "RedHat"; \
elif [ -f /etc/SuSE-release ] ; then \
echo "SuSE"; \
elif [ -f /etc/lsb-release ] ; then \
$(EGREP) DISTRIB_ID /etc/lsb-release | $(SED) -e 's@.*DISTRIB_ID=\(.*\)@\1@'; \
else \
echo "Unknown"; \
fi)
OS_VARIANT_VERSION := $(shell \
if [ "$(OS_VARIANT_NAME)" = "Fedora" ] ; then \
$(CAT) /etc/fedora-release | $(HEAD) -1 | $(NAWK) '{ print $$3; }' ; \
elif [ -f /etc/lsb-release ] ; then \
$(EGREP) DISTRIB_RELEASE /etc/lsb-release | $(SED) -e 's@.*DISTRIB_RELEASE=\(.*\)@\1@'; \
fi)
ALSA_INCLUDE=/usr/include/alsa/version.h
ALSA_LIBRARY=/usr/lib/libasound.so
@ -279,7 +283,7 @@ sane-arch_data_model:
fi
######################################################
# Check the OS version (windows and linus have release name checks)
# Check the OS version (windows and linux have release name checks)
# NOTE: OPENJDK explicitly does not check for OS release information.
# Unless we know for sure that it will not build somewhere, we cannot
# generate a fatal sanity error, and a warning about the official
@ -1476,20 +1480,20 @@ ifeq ($(PLATFORM), windows)
endif
######################################################
# Check the Solaris GNU c++ compiler for solaris plugin
# Check the GNU C++ compiler for OJI plugin
######################################################
sane-gcc-compiler:
ifeq ($(PLATFORM), solaris)
ifndef OPENJDK
@if [ -r $(GCC_COMPILER_PATH) ]; then \
if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VERSION) ]; then \
$(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VERSION). \n" \
ifndef OPENJDK
ifeq ($(PLATFORM), solaris)
@if [ -r $(GCC_COMPILER_PATH) ]; then \
if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VER) ]; then \
$(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VER). \n" \
" You are using the following compiler version: $(GCC_VER) \n" \
" The compiler was obtained from the following location: \n" \
" $(GCC_COMPILER_PATH) \n" \
" Please change your compiler. \n" \
"" >> $(ERROR_FILE) ; \
fi \
fi \
else \
$(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
@ -1501,15 +1505,16 @@ ifeq ($(PLATFORM), solaris)
endif
ifeq ($(PLATFORM), linux)
ifeq ($(ARCH_DATA_MODEL), 32)
ifdef ALT_GCC29_COMPILER_PATH
@if [ ! -x $(ALT_GCC29_COMPILER_PATH)/bin/gcc ]; then \
$(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
$(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
" $(ALT_GCC29_COMPILER_PATH)/bin/gcc \n" \
" This will affect you if you build the plugin target. \n" \
"" >> $(ERROR_FILE) ; \
fi
endif
else
ifdef ALT_GCC29_PLUGIN_LIB_PATH
@if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \
$(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \
@ -1523,13 +1528,15 @@ ifeq ($(PLATFORM), solaris)
$(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
" $(GCC29_COMPILER_PATH) \n" \
" and/or check your value of ALT_GCC29_COMPILER_PATH. \n" \
" and/or check your value of ALT_GCC29_COMPILER_PATH or ALT_GCC29_PLUGIN_LIB_PATH \n" \
" This will affect you if you build the plugin target. \n" \
"" >> $(ERROR_FILE) ; \
fi
endif
endif
endif
endif # ALT_GCC29_PLUGIN_LIB_PATH
endif # ALT_GCC29_COMPILER_PATH
endif # ARCH_DATA_MODEL, 32
endif # LINUX
endif # OPEN_JDK
######################################################

View File

@ -33,8 +33,8 @@ DEMONAME = zipfs
include $(BUILDDIR)/common/Defs.gmk
DEMO_ROOT = $(SHARE_SRC)/demo/nio/$(DEMONAME)
DEMO_TOPFILES = ./README.txt
DEMO_SRCDIR = $(DEMO_ROOT)
DEMO_TOPFILES = README.txt Demo.java
DEMO_SRCDIR = $(DEMO_ROOT)/src
DEMO_DESTDIR = $(DEMODIR)/nio/$(DEMONAME)
#
@ -42,10 +42,10 @@ DEMO_DESTDIR = $(DEMODIR)/nio/$(DEMONAME)
#
include $(BUILDDIR)/common/Demo.gmk
#EXTJAR = $(EXTDIR)/$(DEMONAME).jar
#
#all : build $(EXTJAR)
#
#$(EXTJAR) : $(DEMO_JAR)
# $(prep-target)
# $(CP) $(DEMO_JAR) $(EXTJAR)
EXTJAR = $(EXTDIR)/$(DEMONAME).jar
all : build $(EXTJAR)
$(EXTJAR) : $(DEMO_JAR)
$(prep-target)
$(CP) $(DEMO_JAR) $(EXTJAR)

View File

@ -432,6 +432,7 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_GtkFileDialogPeer_initIDs;
Java_sun_awt_X11_GtkFileDialogPeer_run;
Java_sun_awt_X11_GtkFileDialogPeer_quit;
Java_sun_awt_X11_GtkFileDialogPeer_toFront;
Java_sun_print_CUPSPrinter_initIDs;
Java_sun_print_CUPSPrinter_getCupsServer;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, 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
@ -111,7 +111,7 @@ class CharacterData00 extends CharacterData {
if ((val & $$maskCaseOffset) == $$maskCaseOffset) {
switch(ch) {
// map the offset overflow chars
case 0x0130 : mapChar = 0x0069; break;
case 0x0130 : mapChar = 0x0069; break;
case 0x2126 : mapChar = 0x03C9; break;
case 0x212A : mapChar = 0x006B; break;
case 0x212B : mapChar = 0x00E5; break;
@ -192,7 +192,11 @@ class CharacterData00 extends CharacterData {
case 0x2C6D : mapChar = 0x0251; break;
case 0x2C6E : mapChar = 0x0271; break;
case 0x2C6F : mapChar = 0x0250; break;
case 0x2C70 : mapChar = 0x0252; break;
case 0x2C7E : mapChar = 0x023F; break;
case 0x2C7F : mapChar = 0x0240; break;
case 0xA77D : mapChar = 0x1D79; break;
case 0xA78D : mapChar = 0x0265; break;
// default mapChar is already set, so no
// need to redo it here.
// default : mapChar = ch;
@ -246,8 +250,12 @@ class CharacterData00 extends CharacterData {
case 0x1FC3 : mapChar = 0x1FCC; break;
case 0x1FF3 : mapChar = 0x1FFC; break;
case 0x023F : mapChar = 0x2C7E; break;
case 0x0240 : mapChar = 0x2C7F; break;
case 0x0250 : mapChar = 0x2C6F; break;
case 0x0251 : mapChar = 0x2C6D; break;
case 0x0252 : mapChar = 0x2C70; break;
case 0x0265 : mapChar = 0xA78D; break;
case 0x026B : mapChar = 0x2C62; break;
case 0x0271 : mapChar = 0x2C6E; break;
case 0x027D : mapChar = 0x2C64; break;
@ -487,8 +495,12 @@ class CharacterData00 extends CharacterData {
case 0x017F : mapChar = 0x0053; break;
case 0x1FBE : mapChar = 0x0399; break;
case 0x023F : mapChar = 0x2C7E; break;
case 0x0240 : mapChar = 0x2C7F; break;
case 0x0250 : mapChar = 0x2C6F; break;
case 0x0251 : mapChar = 0x2C6D; break;
case 0x0252 : mapChar = 0x2C70; break;
case 0x0265 : mapChar = 0xA78D; break;
case 0x026B : mapChar = 0x2C62; break;
case 0x0271 : mapChar = 0x2C6E; break;
case 0x027D : mapChar = 0x2C64; break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -251,9 +251,40 @@ class CharacterData01 extends CharacterData {
case 0x010341: retval = 90; break; // GOTHIC LETTER NINETY
case 0x01034A: retval = 900; break; // GOTHIC LETTER NINE HUNDRED
case 0x0103D5: retval = 100; break; // OLD PERSIAN NUMBER HUNDRED
case 0x01085D: retval = 100; break; // IMPERIAL ARAMAIC NUMBER ONE HUNDRED
case 0x01085E: retval = 1000; break; // IMPERIAL ARAMAIC NUMBER ONE THOUSAND
case 0x01085F: retval = 10000; break; // IMPERIAL ARAMAIC NUMBER TEN THOUSAND
case 0x010919: retval = 100; break; // PHOENICIAN NUMBER ONE HUNDRED
case 0x010A46: retval = 100; break; // KHAROSHTHI NUMBER ONE HUNDRED
case 0x010A47: retval = 1000; break; // KHAROSHTHI NUMBER ONE THOUSAND
case 0x010A7E: retval = 50; break; // OLD SOUTH ARABIAN NUMBER FIFTY
case 0x010B5E: retval = 100; break; // INSCRIPTIONAL PARTHIAN NUMBER ONE HUNDRED
case 0x010B5F: retval = 1000; break; // INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND
case 0x010B7E: retval = 100; break; // INSCRIPTIONAL PAHLAVI NUMBER ONE HUNDRED
case 0x010B7F: retval = 1000; break; // INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND
case 0x010E6C: retval = 40; break; // RUMI NUMBER FORTY
case 0x010E6D: retval = 50; break; // RUMI NUMBER FIFTY
case 0x010E6E: retval = 60; break; // RUMI NUMBER SIXTY
case 0x010E6F: retval = 70; break; // RUMI NUMBER SEVENTY
case 0x010E70: retval = 80; break; // RUMI NUMBER EIGHTY
case 0x010E71: retval = 90; break; // RUMI NUMBER NINETY
case 0x010E72: retval = 100; break; // RUMI NUMBER ONE HUNDRED
case 0x010E73: retval = 200; break; // RUMI NUMBER TWO HUNDRED
case 0x010E74: retval = 300; break; // RUMI NUMBER THREE HUNDRED
case 0x010E75: retval = 400; break; // RUMI NUMBER FOUR HUNDRED
case 0x010E76: retval = 500; break; // RUMI NUMBER FIVE HUNDRED
case 0x010E77: retval = 600; break; // RUMI NUMBER SIX HUNDRED
case 0x010E78: retval = 700; break; // RUMI NUMBER SEVEN HUNDRED
case 0x010E79: retval = 800; break; // RUMI NUMBER EIGHT HUNDRED
case 0x010E7A: retval = 900; break; // RUMI NUMBER NINE HUNDRED
case 0x01105E: retval = 40; break; // BRAHMI NUMBER FORTY
case 0x01105F: retval = 50; break; // BRAHMI NUMBER FIFTY
case 0x011060: retval = 60; break; // BRAHMI NUMBER SIXTY
case 0x011061: retval = 70; break; // BRAHMI NUMBER SEVENTY
case 0x011062: retval = 80; break; // BRAHMI NUMBER EIGHTY
case 0x011063: retval = 90; break; // BRAHMI NUMBER NINETY
case 0x011064: retval = 100; break; // BRAHMI NUMBER ONE HUNDRED
case 0x011065: retval = 1000; break; // BRAHMI NUMBER ONE THOUSAND
case 0x01D36C: retval = 40; break; // COUNTING ROD TENS DIGIT FOUR
case 0x01D36D: retval = 50; break; // COUNTING ROD TENS DIGIT FIVE
case 0x01D36E: retval = 60; break; // COUNTING ROD TENS DIGIT SIX

View File

@ -1,8 +1,8 @@
# Scripts-5.2.0.txt
# Date: 2009-08-22, 04:58:43 GMT [MD]
# Scripts-6.0.0.txt
# Date: 2010-08-19, 00:48:47 GMT [MD]
#
# Unicode Character Database
# Copyright (c) 1991-2009 Unicode, Inc.
# Copyright (c) 1991-2010 Unicode, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
# For documentation, see http://www.unicode.org/reports/tr44/
@ -73,7 +73,7 @@
02C2..02C5 ; Common # Sk [4] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD
02C6..02D1 ; Common # Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON
02D2..02DF ; Common # Sk [14] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER CROSS ACCENT
02E5..02EB ; Common # Sk [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK
02E5..02E9 ; Common # Sk [5] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER EXTRA-LOW TONE BAR
02EC ; Common # Lm MODIFIER LETTER VOICING
02ED ; Common # Sk MODIFIER LETTER UNASPIRATED
02EE ; Common # Lm MODIFIER LETTER DOUBLE APOSTROPHE
@ -83,7 +83,6 @@
0385 ; Common # Sk GREEK DIALYTIKA TONOS
0387 ; Common # Po GREEK ANO TELEIA
0589 ; Common # Po ARMENIAN FULL STOP
0600..0603 ; Common # Cf [4] ARABIC NUMBER SIGN..ARABIC SIGN SAFHA
060C ; Common # Po ARABIC COMMA
061B ; Common # Po ARABIC SEMICOLON
061F ; Common # Po ARABIC QUESTION MARK
@ -92,7 +91,6 @@
06DD ; Common # Cf ARABIC END OF AYAH
0964..0965 ; Common # Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
0970 ; Common # Po DEVANAGARI ABBREVIATION SIGN
0CF1..0CF2 ; Common # So [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA
0E3F ; Common # Sc THAI CURRENCY SYMBOL BAHT
0FD5..0FD8 ; Common # So [4] RIGHT-FACING SVASTI SIGN..LEFT-FACING SVASTI SIGN WITH DOTS
10FB ; Common # Po GEORGIAN PARAGRAPH SEPARATOR
@ -148,7 +146,7 @@
208A..208C ; Common # Sm [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
208D ; Common # Ps SUBSCRIPT LEFT PARENTHESIS
208E ; Common # Pe SUBSCRIPT RIGHT PARENTHESIS
20A0..20B8 ; Common # Sc [25] EURO-CURRENCY SIGN..TENGE SIGN
20A0..20B9 ; Common # Sc [26] EURO-CURRENCY SIGN..INDIAN RUPEE SIGN
2100..2101 ; Common # So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
2102 ; Common # L& DOUBLE-STRUCK CAPITAL C
2103..2106 ; Common # So [4] DEGREE CELSIUS..CADA UNA
@ -157,7 +155,8 @@
210A..2113 ; Common # L& [10] SCRIPT SMALL G..SCRIPT SMALL L
2114 ; Common # So L B BAR SYMBOL
2115 ; Common # L& DOUBLE-STRUCK CAPITAL N
2116..2118 ; Common # So [3] NUMERO SIGN..SCRIPT CAPITAL P
2116..2117 ; Common # So [2] NUMERO SIGN..SOUND RECORDING COPYRIGHT
2118 ; Common # Sm SCRIPT CAPITAL P
2119..211D ; Common # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
211E..2123 ; Common # So [6] PRESCRIPTION TAKE..VERSICLE
2124 ; Common # L& DOUBLE-STRUCK CAPITAL Z
@ -213,7 +212,7 @@
239B..23B3 ; Common # Sm [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM
23B4..23DB ; Common # So [40] TOP SQUARE BRACKET..FUSE
23DC..23E1 ; Common # Sm [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET
23E2..23E8 ; Common # So [7] WHITE TRAPEZIUM..DECIMAL EXPONENT SYMBOL
23E2..23F3 ; Common # So [18] WHITE TRAPEZIUM..HOURGLASS WITH FLOWING SAND
2400..2426 ; Common # So [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO
2440..244A ; Common # So [11] OCR HOOK..OCR DOUBLE BACKSLASH
2460..249B ; Common # No [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP
@ -227,18 +226,8 @@
25F8..25FF ; Common # Sm [8] UPPER LEFT TRIANGLE..LOWER RIGHT TRIANGLE
2600..266E ; Common # So [111] BLACK SUN WITH RAYS..MUSIC NATURAL SIGN
266F ; Common # Sm MUSIC SHARP SIGN
2670..26CD ; Common # So [94] WEST SYRIAC CROSS..DISABLED CAR
26CF..26E1 ; Common # So [19] PICK..RESTRICTED LEFT ENTRY-2
26E3 ; Common # So HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE
26E8..26FF ; Common # So [24] BLACK CROSS ON SHIELD..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE
2701..2704 ; Common # So [4] UPPER BLADE SCISSORS..WHITE SCISSORS
2706..2709 ; Common # So [4] TELEPHONE LOCATION SIGN..ENVELOPE
270C..2727 ; Common # So [28] VICTORY HAND..WHITE FOUR POINTED STAR
2729..274B ; Common # So [35] STRESS OUTLINED WHITE STAR..HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK
274D ; Common # So SHADOWED WHITE CIRCLE
274F..2752 ; Common # So [4] LOWER RIGHT DROP-SHADOWED WHITE SQUARE..UPPER RIGHT SHADOWED WHITE SQUARE
2756..275E ; Common # So [9] BLACK DIAMOND MINUS WHITE X..HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT
2761..2767 ; Common # So [7] CURVED STEM PARAGRAPH SIGN ORNAMENT..ROTATED FLORAL HEART BULLET
2670..26FF ; Common # So [144] WEST SYRIAC CROSS..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE
2701..2767 ; Common # So [103] UPPER BLADE SCISSORS..ROTATED FLORAL HEART BULLET
2768 ; Common # Ps MEDIUM LEFT PARENTHESIS ORNAMENT
2769 ; Common # Pe MEDIUM RIGHT PARENTHESIS ORNAMENT
276A ; Common # Ps MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT
@ -254,15 +243,13 @@
2774 ; Common # Ps MEDIUM LEFT CURLY BRACKET ORNAMENT
2775 ; Common # Pe MEDIUM RIGHT CURLY BRACKET ORNAMENT
2776..2793 ; Common # No [30] DINGBAT NEGATIVE CIRCLED DIGIT ONE..DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN
2794 ; Common # So HEAVY WIDE-HEADED RIGHTWARDS ARROW
2798..27AF ; Common # So [24] HEAVY SOUTH EAST ARROW..NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW
27B1..27BE ; Common # So [14] NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW..OPEN-OUTLINED RIGHTWARDS ARROW
2794..27BF ; Common # So [44] HEAVY WIDE-HEADED RIGHTWARDS ARROW..DOUBLE CURLY LOOP
27C0..27C4 ; Common # Sm [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET
27C5 ; Common # Ps LEFT S-SHAPED BAG DELIMITER
27C6 ; Common # Pe RIGHT S-SHAPED BAG DELIMITER
27C7..27CA ; Common # Sm [4] OR WITH DOT INSIDE..VERTICAL BAR WITH HORIZONTAL STROKE
27CC ; Common # Sm LONG DIVISION
27D0..27E5 ; Common # Sm [22] WHITE DIAMOND WITH CENTRED DOT..WHITE SQUARE WITH RIGHTWARDS TICK
27CE..27E5 ; Common # Sm [24] SQUARED LOGICAL AND..WHITE SQUARE WITH RIGHTWARDS TICK
27E6 ; Common # Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET
27E7 ; Common # Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET
27E8 ; Common # Ps MATHEMATICAL LEFT ANGLE BRACKET
@ -555,27 +542,51 @@ FFFC..FFFD ; Common # So [2] OBJECT REPLACEMENT CHARACTER..REPLACEMENT CHAR
1D7CE..1D7FF ; Common # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
1F000..1F02B ; Common # So [44] MAHJONG TILE EAST WIND..MAHJONG TILE BACK
1F030..1F093 ; Common # So [100] DOMINO TILE HORIZONTAL BACK..DOMINO TILE VERTICAL-06-06
1F0A0..1F0AE ; Common # So [15] PLAYING CARD BACK..PLAYING CARD KING OF SPADES
1F0B1..1F0BE ; Common # So [14] PLAYING CARD ACE OF HEARTS..PLAYING CARD KING OF HEARTS
1F0C1..1F0CF ; Common # So [15] PLAYING CARD ACE OF DIAMONDS..PLAYING CARD BLACK JOKER
1F0D1..1F0DF ; Common # So [15] PLAYING CARD ACE OF CLUBS..PLAYING CARD WHITE JOKER
1F100..1F10A ; Common # No [11] DIGIT ZERO FULL STOP..DIGIT NINE COMMA
1F110..1F12E ; Common # So [31] PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLED WZ
1F131 ; Common # So SQUARED LATIN CAPITAL LETTER B
1F13D ; Common # So SQUARED LATIN CAPITAL LETTER N
1F13F ; Common # So SQUARED LATIN CAPITAL LETTER P
1F142 ; Common # So SQUARED LATIN CAPITAL LETTER S
1F146 ; Common # So SQUARED LATIN CAPITAL LETTER W
1F14A..1F14E ; Common # So [5] SQUARED HV..SQUARED PPV
1F157 ; Common # So NEGATIVE CIRCLED LATIN CAPITAL LETTER H
1F15F ; Common # So NEGATIVE CIRCLED LATIN CAPITAL LETTER P
1F179 ; Common # So NEGATIVE SQUARED LATIN CAPITAL LETTER J
1F17B..1F17C ; Common # So [2] NEGATIVE SQUARED LATIN CAPITAL LETTER L..NEGATIVE SQUARED LATIN CAPITAL LETTER M
1F17F ; Common # So NEGATIVE SQUARED LATIN CAPITAL LETTER P
1F18A..1F18D ; Common # So [4] CROSSED NEGATIVE SQUARED LATIN CAPITAL LETTER P..NEGATIVE SQUARED SA
1F190 ; Common # So SQUARE DJ
1F210..1F231 ; Common # So [34] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-6253
1F130..1F169 ; Common # So [58] SQUARED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z
1F170..1F19A ; Common # So [43] NEGATIVE SQUARED LATIN CAPITAL LETTER A..SQUARED VS
1F1E6..1F1FF ; Common # So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z
1F201..1F202 ; Common # So [2] SQUARED KATAKANA KOKO..SQUARED KATAKANA SA
1F210..1F23A ; Common # So [43] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-55B6
1F240..1F248 ; Common # So [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557
1F250..1F251 ; Common # So [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT
1F300..1F320 ; Common # So [33] CYCLONE..SHOOTING STAR
1F330..1F335 ; Common # So [6] CHESTNUT..CACTUS
1F337..1F37C ; Common # So [70] TULIP..BABY BOTTLE
1F380..1F393 ; Common # So [20] RIBBON..GRADUATION CAP
1F3A0..1F3C4 ; Common # So [37] CAROUSEL HORSE..SURFER
1F3C6..1F3CA ; Common # So [5] TROPHY..SWIMMER
1F3E0..1F3F0 ; Common # So [17] HOUSE BUILDING..EUROPEAN CASTLE
1F400..1F43E ; Common # So [63] RAT..PAW PRINTS
1F440 ; Common # So EYES
1F442..1F4F7 ; Common # So [182] EAR..CAMERA
1F4F9..1F4FC ; Common # So [4] VIDEO CAMERA..VIDEOCASSETTE
1F500..1F53D ; Common # So [62] TWISTED RIGHTWARDS ARROWS..DOWN-POINTING SMALL RED TRIANGLE
1F550..1F567 ; Common # So [24] CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY
1F5FB..1F5FF ; Common # So [5] MOUNT FUJI..MOYAI
1F601..1F610 ; Common # So [16] GRINNING FACE WITH SMILING EYES..NEUTRAL FACE
1F612..1F614 ; Common # So [3] UNAMUSED FACE..PENSIVE FACE
1F616 ; Common # So CONFOUNDED FACE
1F618 ; Common # So FACE THROWING A KISS
1F61A ; Common # So KISSING FACE WITH CLOSED EYES
1F61C..1F61E ; Common # So [3] FACE WITH STUCK-OUT TONGUE AND WINKING EYE..DISAPPOINTED FACE
1F620..1F625 ; Common # So [6] ANGRY FACE..DISAPPOINTED BUT RELIEVED FACE
1F628..1F62B ; Common # So [4] FEARFUL FACE..TIRED FACE
1F62D ; Common # So LOUDLY CRYING FACE
1F630..1F633 ; Common # So [4] FACE WITH OPEN MOUTH AND COLD SWEAT..FLUSHED FACE
1F635..1F640 ; Common # So [12] DIZZY FACE..WEARY CAT FACE
1F645..1F64F ; Common # So [11] FACE WITH NO GOOD GESTURE..PERSON WITH FOLDED HANDS
1F680..1F6C5 ; Common # So [70] ROCKET..LEFT LUGGAGE
1F700..1F773 ; Common # So [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE
E0001 ; Common # Cf LANGUAGE TAG
E0020..E007F ; Common # Cf [96] TAG SPACE..CANCEL TAG
# Total code points: 5395
# Total code points: 6379
# ================================================
@ -603,7 +614,7 @@ E0020..E007F ; Common # Cf [96] TAG SPACE..CANCEL TAG
1E00..1EFF ; Latin # L& [256] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH LOOP
2071 ; Latin # Lm SUPERSCRIPT LATIN SMALL LETTER I
207F ; Latin # Lm SUPERSCRIPT LATIN SMALL LETTER N
2090..2094 ; Latin # Lm [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
2090..209C ; Latin # Lm [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T
212A..212B ; Latin # L& [2] KELVIN SIGN..ANGSTROM SIGN
2132 ; Latin # L& TURNED CAPITAL F
214E ; Latin # L& TURNED SMALL F
@ -616,13 +627,16 @@ E0020..E007F ; Common # Cf [96] TAG SPACE..CANCEL TAG
A722..A76F ; Latin # L& [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON
A770 ; Latin # Lm MODIFIER LETTER US
A771..A787 ; Latin # L& [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T
A78B..A78C ; Latin # L& [2] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER SALTILLO
A78B..A78E ; Latin # L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT
A790..A791 ; Latin # L& [2] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER N WITH DESCENDER
A7A0..A7A9 ; Latin # L& [10] LATIN CAPITAL LETTER G WITH OBLIQUE STROKE..LATIN SMALL LETTER S WITH OBLIQUE STROKE
A7FA ; Latin # L& LATIN LETTER SMALL CAPITAL TURNED M
A7FB..A7FF ; Latin # Lo [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M
FB00..FB06 ; Latin # L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
FF21..FF3A ; Latin # L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
FF41..FF5A ; Latin # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
# Total code points: 1244
# Total code points: 1267
# ================================================
@ -687,12 +701,11 @@ FF41..FF5A ; Latin # L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN
0483..0484 ; Cyrillic # Mn [2] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC PALATALIZATION
0487 ; Cyrillic # Mn COMBINING CYRILLIC POKRYTIE
0488..0489 ; Cyrillic # Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN
048A..0525 ; Cyrillic # L& [156] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER PE WITH DESCENDER
048A..0527 ; Cyrillic # L& [158] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER SHHA WITH DESCENDER
1D2B ; Cyrillic # L& CYRILLIC LETTER SMALL CAPITAL EL
1D78 ; Cyrillic # Lm MODIFIER LETTER CYRILLIC EN
2DE0..2DFF ; Cyrillic # Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
A640..A65F ; Cyrillic # L& [32] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER YN
A662..A66D ; Cyrillic # L& [12] CYRILLIC CAPITAL LETTER SOFT DE..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O
A640..A66D ; Cyrillic # L& [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O
A66E ; Cyrillic # Lo CYRILLIC LETTER MULTIOCULAR O
A66F ; Cyrillic # Mn COMBINING CYRILLIC VZMET
A670..A672 ; Cyrillic # Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN
@ -702,7 +715,7 @@ A67E ; Cyrillic # Po CYRILLIC KAVYKA
A67F ; Cyrillic # Lm CYRILLIC PAYEROK
A680..A697 ; Cyrillic # L& [24] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER SHWE
# Total code points: 404
# Total code points: 408
# ================================================
@ -744,6 +757,7 @@ FB46..FB4F ; Hebrew # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATU
# ================================================
0600..0603 ; Arabic # Cf [4] ARABIC NUMBER SIGN..ARABIC SIGN SAFHA
0606..0608 ; Arabic # Sm [3] ARABIC-INDIC CUBE ROOT..ARABIC RAY
0609..060A ; Arabic # Po [2] ARABIC-INDIC PER MILLE SIGN..ARABIC-INDIC PER TEN THOUSAND SIGN
060B ; Arabic # Sc AFGHANI SIGN
@ -751,7 +765,7 @@ FB46..FB4F ; Hebrew # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATU
060E..060F ; Arabic # So [2] ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA
0610..061A ; Arabic # Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA
061E ; Arabic # Po ARABIC TRIPLE DOT PUNCTUATION MARK
0621..063F ; Arabic # Lo [31] ARABIC LETTER HAMZA..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
0620..063F ; Arabic # Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
0641..064A ; Arabic # Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH
0656..065E ; Arabic # Mn [9] ARABIC SUBSCRIPT ALEF..ARABIC FATHA WITH TWO DOTS
066A..066D ; Arabic # Po [4] ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR
@ -760,7 +774,7 @@ FB46..FB4F ; Hebrew # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATU
06D4 ; Arabic # Po ARABIC FULL STOP
06D5 ; Arabic # Lo ARABIC LETTER AE
06D6..06DC ; Arabic # Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
06DE ; Arabic # Me ARABIC START OF RUB EL HIZB
06DE ; Arabic # So ARABIC START OF RUB EL HIZB
06DF..06E4 ; Arabic # Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA
06E5..06E6 ; Arabic # Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH
06E7..06E8 ; Arabic # Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
@ -773,6 +787,7 @@ FB46..FB4F ; Hebrew # Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATU
06FF ; Arabic # Lo ARABIC LETTER HEH WITH INVERTED V
0750..077F ; Arabic # Lo [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE
FB50..FBB1 ; Arabic # Lo [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
FBB2..FBC1 ; Arabic # Sk [16] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL SMALL TAH BELOW
FBD3..FD3D ; Arabic # Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
FD50..FD8F ; Arabic # Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
FD92..FDC7 ; Arabic # Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
@ -782,7 +797,7 @@ FE70..FE74 ; Arabic # Lo [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN
FE76..FEFC ; Arabic # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
10E60..10E7E ; Arabic # No [31] RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS
# Total code points: 1030
# Total code points: 1051
# ================================================
@ -809,27 +824,29 @@ FE76..FEFC ; Arabic # Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LA
0900..0902 ; Devanagari # Mn [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA
0903 ; Devanagari # Mc DEVANAGARI SIGN VISARGA
0904..0939 ; Devanagari # Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA
093A ; Devanagari # Mn DEVANAGARI VOWEL SIGN OE
093B ; Devanagari # Mc DEVANAGARI VOWEL SIGN OOE
093C ; Devanagari # Mn DEVANAGARI SIGN NUKTA
093D ; Devanagari # Lo DEVANAGARI SIGN AVAGRAHA
093E..0940 ; Devanagari # Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II
0941..0948 ; Devanagari # Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI
0949..094C ; Devanagari # Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU
094D ; Devanagari # Mn DEVANAGARI SIGN VIRAMA
094E ; Devanagari # Mc DEVANAGARI VOWEL SIGN PRISHTHAMATRA E
094E..094F ; Devanagari # Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW
0950 ; Devanagari # Lo DEVANAGARI OM
0953..0955 ; Devanagari # Mn [3] DEVANAGARI GRAVE ACCENT..DEVANAGARI VOWEL SIGN CANDRA LONG E
0953..0957 ; Devanagari # Mn [5] DEVANAGARI GRAVE ACCENT..DEVANAGARI VOWEL SIGN UUE
0958..0961 ; Devanagari # Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL
0962..0963 ; Devanagari # Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
0966..096F ; Devanagari # Nd [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE
0971 ; Devanagari # Lm DEVANAGARI SIGN HIGH SPACING DOT
0972 ; Devanagari # Lo DEVANAGARI LETTER CANDRA A
0972..0977 ; Devanagari # Lo [6] DEVANAGARI LETTER CANDRA A..DEVANAGARI LETTER UUE
0979..097F ; Devanagari # Lo [7] DEVANAGARI LETTER ZHA..DEVANAGARI LETTER BBA
A8E0..A8F1 ; Devanagari # Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA
A8F2..A8F7 ; Devanagari # Lo [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA
A8F8..A8FA ; Devanagari # Po [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET
A8FB ; Devanagari # Lo DEVANAGARI HEADSTROKE
# Total code points: 140
# Total code points: 150
# ================================================
@ -941,8 +958,9 @@ A8FB ; Devanagari # Lo DEVANAGARI HEADSTROKE
0B66..0B6F ; Oriya # Nd [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE
0B70 ; Oriya # So ORIYA ISSHAR
0B71 ; Oriya # Lo ORIYA LETTER WA
0B72..0B77 ; Oriya # No [6] ORIYA FRACTION ONE QUARTER..ORIYA FRACTION THREE SIXTEENTHS
# Total code points: 84
# Total code points: 90
# ================================================
@ -1018,22 +1036,23 @@ A8FB ; Devanagari # Lo DEVANAGARI HEADSTROKE
0CE0..0CE1 ; Kannada # Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL
0CE2..0CE3 ; Kannada # Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL
0CE6..0CEF ; Kannada # Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE
0CF1..0CF2 ; Kannada # Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA
# Total code points: 84
# Total code points: 86
# ================================================
0D02..0D03 ; Malayalam # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
0D05..0D0C ; Malayalam # Lo [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L
0D0E..0D10 ; Malayalam # Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI
0D12..0D28 ; Malayalam # Lo [23] MALAYALAM LETTER O..MALAYALAM LETTER NA
0D2A..0D39 ; Malayalam # Lo [16] MALAYALAM LETTER PA..MALAYALAM LETTER HA
0D12..0D3A ; Malayalam # Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA
0D3D ; Malayalam # Lo MALAYALAM SIGN AVAGRAHA
0D3E..0D40 ; Malayalam # Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II
0D41..0D44 ; Malayalam # Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR
0D46..0D48 ; Malayalam # Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
0D4A..0D4C ; Malayalam # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
0D4D ; Malayalam # Mn MALAYALAM SIGN VIRAMA
0D4E ; Malayalam # Lo MALAYALAM LETTER DOT REPH
0D57 ; Malayalam # Mc MALAYALAM AU LENGTH MARK
0D60..0D61 ; Malayalam # Lo [2] MALAYALAM LETTER VOCALIC RR..MALAYALAM LETTER VOCALIC LL
0D62..0D63 ; Malayalam # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
@ -1042,7 +1061,7 @@ A8FB ; Devanagari # Lo DEVANAGARI HEADSTROKE
0D79 ; Malayalam # So MALAYALAM DATE MARK
0D7A..0D7F ; Malayalam # Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K
# Total code points: 95
# Total code points: 98
# ================================================
@ -1132,16 +1151,17 @@ A8FB ; Devanagari # Lo DEVANAGARI HEADSTROKE
0F80..0F84 ; Tibetan # Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA
0F85 ; Tibetan # Po TIBETAN MARK PALUTA
0F86..0F87 ; Tibetan # Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
0F88..0F8B ; Tibetan # Lo [4] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN GRU MED RGYINGS
0F90..0F97 ; Tibetan # Mn [8] TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOINED LETTER JA
0F88..0F8C ; Tibetan # Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN
0F8D..0F97 ; Tibetan # Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA
0F99..0FBC ; Tibetan # Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
0FBE..0FC5 ; Tibetan # So [8] TIBETAN KU RU KHA..TIBETAN SYMBOL RDO RJE
0FC6 ; Tibetan # Mn TIBETAN SYMBOL PADMA GDAN
0FC7..0FCC ; Tibetan # So [6] TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SYMBOL NOR BU BZHI -KHYIL
0FCE..0FCF ; Tibetan # So [2] TIBETAN SIGN RDEL NAG RDEL DKAR..TIBETAN SIGN RDEL NAG GSUM
0FD0..0FD4 ; Tibetan # Po [5] TIBETAN MARK BSKA- SHOG GI MGO RGYAN..TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA
0FD9..0FDA ; Tibetan # Po [2] TIBETAN MARK LEADING MCHAN RTAGS..TIBETAN MARK TRAILING MCHAN RTAGS
# Total code points: 201
# Total code points: 207
# ================================================
@ -1201,6 +1221,7 @@ AA7B ; Myanmar # Mc MYANMAR SIGN PAO KAREN TONE
# ================================================
1100..11FF ; Hangul # Lo [256] HANGUL CHOSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN
302E..302F ; Hangul # Mn [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK
3131..318E ; Hangul # Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
3200..321E ; Hangul # So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
3260..327E ; Hangul # So [31] CIRCLED HANGUL KIYEOK..CIRCLED HANGUL IEUNG U
@ -1214,7 +1235,7 @@ FFCA..FFCF ; Hangul # Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL
FFD2..FFD7 ; Hangul # Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU
FFDA..FFDC ; Hangul # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I
# Total code points: 11737
# Total code points: 11739
# ================================================
@ -1234,7 +1255,7 @@ FFDA..FFDC ; Hangul # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL L
12D8..1310 ; Ethiopic # Lo [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA
1312..1315 ; Ethiopic # Lo [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE
1318..135A ; Ethiopic # Lo [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA
135F ; Ethiopic # Mn ETHIOPIC COMBINING GEMINATION MARK
135D..135F ; Ethiopic # Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK
1360 ; Ethiopic # So ETHIOPIC SECTION MARK
1361..1368 ; Ethiopic # Po [8] ETHIOPIC WORDSPACE..ETHIOPIC PARAGRAPH SEPARATOR
1369..137C ; Ethiopic # No [20] ETHIOPIC DIGIT ONE..ETHIOPIC NUMBER TEN THOUSAND
@ -1249,8 +1270,13 @@ FFDA..FFDC ; Hangul # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL L
2DC8..2DCE ; Ethiopic # Lo [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO
2DD0..2DD6 ; Ethiopic # Lo [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO
2DD8..2DDE ; Ethiopic # Lo [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO
AB01..AB06 ; Ethiopic # Lo [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO
AB09..AB0E ; Ethiopic # Lo [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO
AB11..AB16 ; Ethiopic # Lo [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO
AB20..AB26 ; Ethiopic # Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO
AB28..AB2E ; Ethiopic # Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO
# Total code points: 461
# Total code points: 495
# ================================================
@ -1329,9 +1355,10 @@ FFDA..FFDC ; Hangul # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL L
3041..3096 ; Hiragana # Lo [86] HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE
309D..309E ; Hiragana # Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK
309F ; Hiragana # Lo HIRAGANA DIGRAPH YORI
1B001 ; Hiragana # Lo HIRAGANA LETTER ARCHAIC YE
1F200 ; Hiragana # So SQUARE HIRAGANA HOKA
# Total code points: 90
# Total code points: 91
# ================================================
@ -1343,15 +1370,17 @@ FFDA..FFDC ; Hangul # Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL L
3300..3357 ; Katakana # So [88] SQUARE APAATO..SQUARE WATTO
FF66..FF6F ; Katakana # Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU
FF71..FF9D ; Katakana # Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N
1B000 ; Katakana # Lo KATAKANA LETTER ARCHAIC E
# Total code points: 299
# Total code points: 300
# ================================================
02EA..02EB ; Bopomofo # Sk [2] MODIFIER LETTER YIN DEPARTING TONE MARK..MODIFIER LETTER YANG DEPARTING TONE MARK
3105..312D ; Bopomofo # Lo [41] BOPOMOFO LETTER B..BOPOMOFO LETTER IH
31A0..31B7 ; Bopomofo # Lo [24] BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H
31A0..31BA ; Bopomofo # Lo [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY
# Total code points: 65
# Total code points: 70
# ================================================
@ -1370,9 +1399,10 @@ FA30..FA6D ; Han # Lo [62] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILI
FA70..FAD9 ; Han # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
20000..2A6D6 ; Han # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
2A700..2B734 ; Han # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
2B740..2B81D ; Han # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
2F800..2FA1D ; Han # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
# Total code points: 75738
# Total code points: 75960
# ================================================
@ -1410,6 +1440,7 @@ A490..A4C6 ; Yi # So [55] YI RADICAL QOT..YI RADICAL KE
0300..036F ; Inherited # Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X
0485..0486 ; Inherited # Mn [2] COMBINING CYRILLIC DASIA PNEUMATA..COMBINING CYRILLIC PSILI PNEUMATA
064B..0655 ; Inherited # Mn [11] ARABIC FATHATAN..ARABIC HAMZA BELOW
065F ; Inherited # Mn ARABIC WAVY HAMZA BELOW
0670 ; Inherited # Mn ARABIC LETTER SUPERSCRIPT ALEF
0951..0952 ; Inherited # Mn [2] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI STRESS SIGN ANUDATTA
1CD0..1CD2 ; Inherited # Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA
@ -1417,14 +1448,14 @@ A490..A4C6 ; Yi # So [55] YI RADICAL QOT..YI RADICAL KE
1CE2..1CE8 ; Inherited # Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL
1CED ; Inherited # Mn VEDIC SIGN TIRYAK
1DC0..1DE6 ; Inherited # Mn [39] COMBINING DOTTED GRAVE ACCENT..COMBINING LATIN SMALL LETTER Z
1DFD..1DFF ; Inherited # Mn [3] COMBINING ALMOST EQUAL TO BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
1DFC..1DFF ; Inherited # Mn [4] COMBINING DOUBLE INVERTED BREVE BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
200C..200D ; Inherited # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
20D0..20DC ; Inherited # Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE
20DD..20E0 ; Inherited # Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH
20E1 ; Inherited # Mn COMBINING LEFT RIGHT ARROW ABOVE
20E2..20E4 ; Inherited # Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE
20E5..20F0 ; Inherited # Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE
302A..302F ; Inherited # Mn [6] IDEOGRAPHIC LEVEL TONE MARK..HANGUL DOUBLE DOT TONE MARK
302A..302D ; Inherited # Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK
3099..309A ; Inherited # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
FE00..FE0F ; Inherited # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
FE20..FE26 ; Inherited # Mn [7] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON
@ -1568,8 +1599,9 @@ E0100..E01EF ; Inherited # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-2
19B0..19C0 ; New_Tai_Lue # Mc [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
19C1..19C7 ; New_Tai_Lue # Lo [7] NEW TAI LUE LETTER FINAL V..NEW TAI LUE LETTER FINAL B
19C8..19C9 ; New_Tai_Lue # Mc [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
19D0..19DA ; New_Tai_Lue # Nd [11] NEW TAI LUE DIGIT ZERO..NEW TAI LUE THAM DIGIT ONE
19DE..19DF ; New_Tai_Lue # Po [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV
19D0..19D9 ; New_Tai_Lue # Nd [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE
19DA ; New_Tai_Lue # No NEW TAI LUE THAM DIGIT ONE
19DE..19DF ; New_Tai_Lue # So [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV
# Total code points: 83
@ -1584,8 +1616,10 @@ E0100..E01EF ; Inherited # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-2
2D30..2D65 ; Tifinagh # Lo [54] TIFINAGH LETTER YA..TIFINAGH LETTER YAZZ
2D6F ; Tifinagh # Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK
2D70 ; Tifinagh # Po TIFINAGH SEPARATOR MARK
2D7F ; Tifinagh # Mn TIFINAGH CONSONANT JOINER
# Total code points: 55
# Total code points: 57
# ================================================
@ -1882,8 +1916,9 @@ A6A0..A6E5 ; Bamum # Lo [70] BAMUM LETTER A..BAMUM LETTER KI
A6E6..A6EF ; Bamum # Nl [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM
A6F0..A6F1 ; Bamum # Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS
A6F2..A6F7 ; Bamum # Po [6] BAMUM NJAEMLI..BAMUM QUESTION MARK
16800..16A38 ; Bamum # Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ
# Total code points: 88
# Total code points: 657
# ================================================
@ -1969,4 +2004,40 @@ ABF0..ABF9 ; Meetei_Mayek # Nd [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DI
# Total code points: 66
# ================================================
1BC0..1BE5 ; Batak # Lo [38] BATAK LETTER A..BATAK LETTER U
1BE6 ; Batak # Mn BATAK SIGN TOMPI
1BE7 ; Batak # Mc BATAK VOWEL SIGN E
1BE8..1BE9 ; Batak # Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE
1BEA..1BEC ; Batak # Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O
1BED ; Batak # Mn BATAK VOWEL SIGN KARO O
1BEE ; Batak # Mc BATAK VOWEL SIGN U
1BEF..1BF1 ; Batak # Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H
1BF2..1BF3 ; Batak # Mc [2] BATAK PANGOLAT..BATAK PANONGONAN
1BFC..1BFF ; Batak # Po [4] BATAK SYMBOL BINDU NA METEK..BATAK SYMBOL BINDU PANGOLAT
# Total code points: 56
# ================================================
11000 ; Brahmi # Mc BRAHMI SIGN CANDRABINDU
11001 ; Brahmi # Mn BRAHMI SIGN ANUSVARA
11002 ; Brahmi # Mc BRAHMI SIGN VISARGA
11003..11037 ; Brahmi # Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA
11038..11046 ; Brahmi # Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA
11047..1104D ; Brahmi # Po [7] BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS
11052..11065 ; Brahmi # No [20] BRAHMI NUMBER ONE..BRAHMI NUMBER ONE THOUSAND
11066..1106F ; Brahmi # Nd [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE
# Total code points: 108
# ================================================
0840..0858 ; Mandaic # Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN
0859..085B ; Mandaic # Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK
085E ; Mandaic # Po MANDAIC PUNCTUATION
# Total code points: 29
# EOF

View File

@ -1,10 +1,10 @@
# SpecialCasing-5.1.0.txt
# Date: 2008-03-03, 21:58:10 GMT [MD]
# SpecialCasing-6.0.0.txt
# Date: 2010-05-18, 00:49:39 GMT [MD]
#
# Unicode Character Database
# Copyright (c) 1991-2008 Unicode, Inc.
# Copyright (c) 1991-2010 Unicode, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
# For documentation, see UCD.html
# For documentation, see http://www.unicode.org/reports/tr44/
#
# Special Casing Properties
#
@ -106,11 +106,11 @@ FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
1FE7; 1FE7; 03A5 0308 0342; 03A5 0308 0342; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
1FF6; 1FF6; 03A9 0342; 03A9 0342; # GREEK SMALL LETTER OMEGA WITH PERISPOMENI
# IMPORTANT-when capitalizing iota-subscript (0345)
# It MUST be in normalized form--moved to the end of any sequence of combining marks.
# This is because logically it represents a following base character!
# E.g. <iota_subscript> (<Mn> | <Mc> | <Me>)+ => (<Mn> | <Mc> | <Me>)+ <iota_subscript>
# It should never be the first character in a word, so in titlecasing it can be left as is.
# IMPORTANT-when iota-subscript (0345) is uppercased or titlecased,
# the result will be incorrect unless the iota-subscript is moved to the end
# of any sequence of combining marks. Otherwise, the accents will go on the capital iota.
# This process can be achieved by first transforming the text to NFC before casing.
# E.g. <alpha><iota_subscript><acute> is uppercased to <ALPHA><acute><IOTA>
# The following cases are already in the UnicodeData file, so are only commented here.

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
5.1.0
6.0.0

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2010, 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
@ -113,6 +113,6 @@ public class BasicControl implements Control {
* ASN.1 BER encoded value.
*/
public byte[] getEncodedValue() {
return value;
return value == null ? null : value.clone();
}
}

View File

@ -611,12 +611,15 @@ public class Color implements Paint, java.io.Serializable {
* <p>
* This method applies an arbitrary scale factor to each of the three RGB
* components of this <code>Color</code> to create a brighter version
* of this <code>Color</code>. Although <code>brighter</code> and
* of this <code>Color</code>.
* The {@code alpha} value is preserved.
* Although <code>brighter</code> and
* <code>darker</code> are inverse operations, the results of a
* series of invocations of these two methods might be inconsistent
* because of rounding errors.
* @return a new <code>Color</code> object that is
* a brighter version of this <code>Color</code>.
* a brighter version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#darker
* @since JDK1.0
*/
@ -624,6 +627,7 @@ public class Color implements Paint, java.io.Serializable {
int r = getRed();
int g = getGreen();
int b = getBlue();
int alpha = getAlpha();
/* From 2D group:
* 1. black.brighter() should return grey
@ -632,7 +636,7 @@ public class Color implements Paint, java.io.Serializable {
*/
int i = (int)(1.0/(1.0-FACTOR));
if ( r == 0 && g == 0 && b == 0) {
return new Color(i, i, i);
return new Color(i, i, i, alpha);
}
if ( r > 0 && r < i ) r = i;
if ( g > 0 && g < i ) g = i;
@ -640,7 +644,8 @@ public class Color implements Paint, java.io.Serializable {
return new Color(Math.min((int)(r/FACTOR), 255),
Math.min((int)(g/FACTOR), 255),
Math.min((int)(b/FACTOR), 255));
Math.min((int)(b/FACTOR), 255),
alpha);
}
/**
@ -649,19 +654,23 @@ public class Color implements Paint, java.io.Serializable {
* <p>
* This method applies an arbitrary scale factor to each of the three RGB
* components of this <code>Color</code> to create a darker version of
* this <code>Color</code>. Although <code>brighter</code> and
* this <code>Color</code>.
* The {@code alpha} value is preserved.
* Although <code>brighter</code> and
* <code>darker</code> are inverse operations, the results of a series
* of invocations of these two methods might be inconsistent because
* of rounding errors.
* @return a new <code>Color</code> object that is
* a darker version of this <code>Color</code>.
* a darker version of this <code>Color</code>
* with the same {@code alpha} value.
* @see java.awt.Color#brighter
* @since JDK1.0
*/
public Color darker() {
return new Color(Math.max((int)(getRed() *FACTOR), 0),
Math.max((int)(getGreen()*FACTOR), 0),
Math.max((int)(getBlue() *FACTOR), 0));
Math.max((int)(getBlue() *FACTOR), 0),
getAlpha());
}
/**

View File

@ -51,6 +51,7 @@ import javax.accessibility.*;
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext;
import sun.awt.AWTAccessor;
import sun.awt.CausedFocusEvent;
import sun.awt.PeerEvent;
import sun.awt.SunToolkit;
@ -247,6 +248,13 @@ public class Container extends Component {
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
AWTAccessor.setContainerAccessor(new AWTAccessor.ContainerAccessor() {
@Override
public void validateUnconditionally(Container cont) {
cont.validateUnconditionally();
}
});
}
/**

View File

@ -1248,14 +1248,31 @@ public class Dialog extends Window {
/**
* Disables or enables decorations for this dialog.
* This method can only be called while the dialog is not displayable.
* @param undecorated <code>true</code> if no dialog decorations are
* to be enabled;
* <code>false</code> if dialog decorations are to be enabled.
* @throws <code>IllegalComponentStateException</code> if the dialog
* is displayable.
* <p>
* This method can only be called while the dialog is not displayable. To
* make this dialog decorated, it must be opaque and have the default shape,
* otherwise the {@code IllegalComponentStateException} will be thrown.
* Refer to {@link Window#setShape}, {@link Window#setOpacity} and {@link
* Window#setBackground} for details
*
* @param undecorated {@code true} if no dialog decorations are to be
* enabled; {@code false} if dialog decorations are to be enabled
*
* @throws IllegalComponentStateException if the dialog is displayable
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and this dialog does not have the default shape
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and this dialog opacity is less than {@code 1.0f}
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and the alpha value of this dialog background
* color is less than {@code 1.0f}
*
* @see #isUndecorated
* @see Component#isDisplayable
* @see Window#getShape
* @see Window#getOpacity
* @see Window#getBackground
*
* @since 1.4
*/
public void setUndecorated(boolean undecorated) {
@ -1264,6 +1281,18 @@ public class Dialog extends Window {
if (isDisplayable()) {
throw new IllegalComponentStateException("The dialog is displayable.");
}
if (!undecorated) {
if (getOpacity() < 1.0f) {
throw new IllegalComponentStateException("The dialog is not opaque");
}
if (getShape() != null) {
throw new IllegalComponentStateException("The dialog does not have a default shape");
}
Color bg = getBackground();
if ((bg != null) && (bg.getAlpha() < 255)) {
throw new IllegalComponentStateException("The dialog background color is not opaque");
}
}
this.undecorated = undecorated;
}
}
@ -1280,6 +1309,45 @@ public class Dialog extends Window {
return undecorated;
}
/**
* {@inheritDoc}
*/
@Override
public void setOpacity(float opacity) {
synchronized (getTreeLock()) {
if ((opacity < 1.0f) && !isUndecorated()) {
throw new IllegalComponentStateException("The dialog is decorated");
}
super.setOpacity(opacity);
}
}
/**
* {@inheritDoc}
*/
@Override
public void setShape(Shape shape) {
synchronized (getTreeLock()) {
if ((shape != null) && !isUndecorated()) {
throw new IllegalComponentStateException("The dialog is decorated");
}
super.setShape(shape);
}
}
/**
* {@inheritDoc}
*/
@Override
public void setBackground(Color bgColor) {
synchronized (getTreeLock()) {
if ((bgColor != null) && (bgColor.getAlpha() < 255) && !isUndecorated()) {
throw new IllegalComponentStateException("The dialog is decorated");
}
super.setBackground(bgColor);
}
}
/**
* Returns a string representing the state of this dialog. This
* method is intended to be used only for debugging purposes, and the

View File

@ -99,7 +99,7 @@ public class FileDialog extends Dialog {
* Contains the File instances for all the files that the user selects.
*
* @serial
* @see getFiles
* @see #getFiles
* @since 1.7
*/
private File[] files;

View File

@ -828,6 +828,11 @@ public class Frame extends Window implements MenuContainer {
return frame.state;
}
}
public Rectangle getMaximizedBounds(Frame frame) {
synchronized(frame.getObjectLock()) {
return frame.maximizedBounds;
}
}
}
);
}
@ -855,8 +860,10 @@ public class Frame extends Window implements MenuContainer {
* @see #getMaximizedBounds()
* @since 1.4
*/
public synchronized void setMaximizedBounds(Rectangle bounds) {
this.maximizedBounds = bounds;
public void setMaximizedBounds(Rectangle bounds) {
synchronized(getObjectLock()) {
this.maximizedBounds = bounds;
}
FramePeer peer = (FramePeer)this.peer;
if (peer != null) {
peer.setMaximizedBounds(bounds);
@ -873,21 +880,40 @@ public class Frame extends Window implements MenuContainer {
* @since 1.4
*/
public Rectangle getMaximizedBounds() {
return maximizedBounds;
synchronized(getObjectLock()) {
return maximizedBounds;
}
}
/**
* Disables or enables decorations for this frame.
* This method can only be called while the frame is not displayable.
* @param undecorated <code>true</code> if no frame decorations are
* to be enabled;
* <code>false</code> if frame decorations are to be enabled.
* @throws <code>IllegalComponentStateException</code> if the frame
* is displayable.
* <p>
* This method can only be called while the frame is not displayable. To
* make this frame decorated, it must be opaque and have the default shape,
* otherwise the {@code IllegalComponentStateException} will be thrown.
* Refer to {@link Window#setShape}, {@link Window#setOpacity} and {@link
* Window#setBackground} for details
*
* @param undecorated {@code true} if no frame decorations are to be
* enabled; {@code false} if frame decorations are to be enabled
*
* @throws IllegalComponentStateException if the frame is displayable
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and this frame does not have the default shape
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and this frame opacity is less than {@code 1.0f}
* @throws IllegalComponentStateException if {@code undecorated} is
* {@code false}, and the alpha value of this frame background
* color is less than {@code 1.0f}
*
* @see #isUndecorated
* @see Component#isDisplayable
* @see Window#getShape
* @see Window#getOpacity
* @see Window#getBackground
* @see javax.swing.JFrame#setDefaultLookAndFeelDecorated(boolean)
*
* @since 1.4
*/
public void setUndecorated(boolean undecorated) {
@ -896,6 +922,18 @@ public class Frame extends Window implements MenuContainer {
if (isDisplayable()) {
throw new IllegalComponentStateException("The frame is displayable.");
}
if (!undecorated) {
if (getOpacity() < 1.0f) {
throw new IllegalComponentStateException("The frame is not opaque");
}
if (getShape() != null) {
throw new IllegalComponentStateException("The frame does not have a default shape");
}
Color bg = getBackground();
if ((bg != null) && (bg.getAlpha() < 255)) {
throw new IllegalComponentStateException("The frame background color is not opaque");
}
}
this.undecorated = undecorated;
}
}
@ -912,6 +950,45 @@ public class Frame extends Window implements MenuContainer {
return undecorated;
}
/**
* {@inheritDoc}
*/
@Override
public void setOpacity(float opacity) {
synchronized (getTreeLock()) {
if ((opacity < 1.0f) && !isUndecorated()) {
throw new IllegalComponentStateException("The frame is decorated");
}
super.setOpacity(opacity);
}
}
/**
* {@inheritDoc}
*/
@Override
public void setShape(Shape shape) {
synchronized (getTreeLock()) {
if ((shape != null) && !isUndecorated()) {
throw new IllegalComponentStateException("The frame is decorated");
}
super.setShape(shape);
}
}
/**
* {@inheritDoc}
*/
@Override
public void setBackground(Color bgColor) {
synchronized (getTreeLock()) {
if ((bgColor != null) && (bgColor.getAlpha() < 255) && !isUndecorated()) {
throw new IllegalComponentStateException("The frame is decorated");
}
super.setBackground(bgColor);
}
}
/**
* Removes the specified menu bar from this frame.
* @param m the menu component to remove.

View File

@ -3474,14 +3474,20 @@ public class Window extends Container implements Accessible {
* level of 0 may or may not disable the mouse event handling on this
* window. This is a platform-dependent behavior.
* <p>
* In order for this method to enable the translucency effect, the {@link
* GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)} method must indicate that
* the {@link GraphicsDevice.WindowTranslucency#TRANSLUCENT TRANSLUCENT}
* translucency is supported.
* The following conditions must be met in order to set the opacity value
* less than {@code 1.0f}:
* <ul>
* <li>The {@link GraphicsDevice.WindowTranslucency#TRANSLUCENT TRANSLUCENT}
* translucency must be supported by the underlying system
* <li>The window must be undecorated (see {@link Frame#setUndecorated}
* and {@link Dialog#setUndecorated})
* <li>The window must not be in full-screen mode (see {@link
* GraphicsDevice#setFullScreenWindow(Window)})
* </ul>
* <p>
* Also note that the window must not be in the full-screen mode when
* setting the opacity value &lt; 1.0f. Otherwise the {@code
* IllegalComponentStateException} is thrown.
* If the requested opacity value is less than {@code 1.0f}, and any of the
* above conditions are not met, the window opacity will not change,
* and the {@code IllegalComponentStateException} will be thrown.
* <p>
* The translucency levels of individual pixels may also be effected by the
* alpha component of their color (see {@link Window#setBackground(Color)}) and the
@ -3491,15 +3497,20 @@ public class Window extends Container implements Accessible {
*
* @throws IllegalArgumentException if the opacity is out of the range
* [0..1]
* @throws IllegalComponentStateException if the window is decorated and
* the opacity is less than {@code 1.0f}
* @throws IllegalComponentStateException if the window is in full screen
* mode, and the opacity is less than 1.0f
* mode, and the opacity is less than {@code 1.0f}
* @throws UnsupportedOperationException if the {@code
* GraphicsDevice.WindowTranslucency#TRANSLUCENT TRANSLUCENT}
* translucency kind is not supported and the opacity is less than 1.0f
* translucency is not supported and the opacity is less than
* {@code 1.0f}
*
* @see Window#getOpacity
* @see Window#setBackground(Color)
* @see Window#setShape(Shape)
* @see Frame#isUndecorated
* @see Dialog#isUndecorated
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
*
@ -3557,24 +3568,26 @@ public class Window extends Container implements Accessible {
/**
* Sets the shape of the window.
* <p>
* Setting a shape enables cutting off some parts of the window, leaving
* visible and clickable only those parts belonging to the given shape
* (see {@link Shape}). If the shape argument is null, this methods
* restores the default shape (making the window rectangular on most
* platforms.)
* Setting a shape cuts off some parts of the window. Only the parts that
* belong to the given {@link Shape} remain visible and clickable. If
* the shape argument is {@code null}, this method restores the default
* shape, making the window rectangular on most platforms.
* <p>
* The following conditions must be met in order to set a non-null shape:
* The following conditions must be met to set a non-null shape:
* <ul>
* <li>The {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSPARENT
* PERPIXEL_TRANSPARENT} translucency kind must be supported by the
* PERPIXEL_TRANSPARENT} translucency must be supported by the
* underlying system
* <i>and</i>
* <li>The window must not be in the full-screen mode (see
* {@link GraphicsDevice#setFullScreenWindow(Window)})
* <li>The window must be undecorated (see {@link Frame#setUndecorated}
* and {@link Dialog#setUndecorated})
* <li>The window must not be in full-screen mode (see {@link
* GraphicsDevice#setFullScreenWindow(Window)})
* </ul>
* If a certain condition is not met, either the {@code
* UnsupportedOperationException} or {@code IllegalComponentStateException}
* is thrown.
* <p>
* If the requested shape is not {@code null}, and any of the above
* conditions are not met, the shape of this window will not change,
* and either the {@code UnsupportedOperationException} or {@code
* IllegalComponentStateException} will be thrown.
* <p>
* The tranlucency levels of individual pixels may also be effected by the
* alpha component of their color (see {@link Window#setBackground(Color)}) and the
@ -3584,6 +3597,8 @@ public class Window extends Container implements Accessible {
* @param shape the shape to set to the window
*
* @throws IllegalComponentStateException if the shape is not {@code
* null} and the window is decorated
* @throws IllegalComponentStateException if the shape is not {@code
* null} and the window is in full-screen mode
* @throws UnsupportedOperationException if the shape is not {@code
* null} and {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSPARENT
@ -3592,6 +3607,8 @@ public class Window extends Container implements Accessible {
* @see Window#getShape()
* @see Window#setBackground(Color)
* @see Window#setOpacity(float)
* @see Frame#isUndecorated
* @see Dialog#isUndecorated
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
*
@ -3645,37 +3662,46 @@ public class Window extends Container implements Accessible {
* GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT PERPIXEL_TRANSLUCENT}
* tranclucency, the alpha component of the given background color
* may effect the mode of operation for this window: it indicates whether
* this window must be opaque (alpha == 1.0f) or per-pixel translucent
* (alpha &lt; 1.0f). All the following conditions must be met in order
* to be able to enable the per-pixel transparency mode for this window:
* this window must be opaque (alpha equals {@code 1.0f}) or per-pixel translucent
* (alpha is less than {@code 1.0f}). If the given background color is
* {@code null}, the window is considered completely opaque.
* <p>
* All the following conditions must be met to enable the per-pixel
* transparency mode for this window:
* <ul>
* <li>The {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT
* PERPIXEL_TRANSLUCENT} translucency must be supported
* by the graphics device where this window is located <i>and</i>
* <li>The window must not be in the full-screen mode (see {@link
* PERPIXEL_TRANSLUCENT} translucency must be supported by the graphics
* device where this window is located
* <li>The window must be undecorated (see {@link Frame#setUndecorated}
* and {@link Dialog#setUndecorated})
* <li>The window must not be in full-screen mode (see {@link
* GraphicsDevice#setFullScreenWindow(Window)})
* </ul>
* If a certain condition is not met at the time of calling this method,
* the alpha component of the given background color will not effect the
* mode of operation for this window.
* <p>
* If the alpha component of the requested background color is less than
* {@code 1.0f}, and any of the above conditions are not met, the background
* color of this window will not change, the alpha component of the given
* background color will not affect the mode of operation for this window,
* and either the {@code UnsupportedOperationException} or {@code
* IllegalComponentStateException} will be thrown.
* <p>
* When the window is per-pixel translucent, the drawing sub-system
* respects the alpha value of each individual pixel. If a pixel gets
* painted with the alpha color component equal to zero, it becomes
* visually transparent, if the alpha of the pixel is equal to 1.0f, the
* visually transparent. If the alpha of the pixel is equal to 1.0f, the
* pixel is fully opaque. Interim values of the alpha color component make
* the pixel semi-transparent. In this mode the background of the window
* gets painted with the alpha value of the given background color (meaning
* that it is not painted at all if the alpha value of the argument of this
* method is equal to zero.)
* the pixel semi-transparent. In this mode, the background of the window
* gets painted with the alpha value of the given background color. If the
* alpha value of the argument of this method is equal to {@code 0}, the
* background is not painted at all.
* <p>
* The actual level of translucency of a given pixel also depends on window
* opacity (see {@link #setOpacity(float)}), as well as the current shape of
* this window (see {@link #setShape(Shape)}).
* <p>
* Note that painting a pixel with the alpha value of 0 may or may not
* disable the mouse event handling on this pixel. This is a
* platform-dependent behavior. To make sure the mouse clicks do not get
* Note that painting a pixel with the alpha value of {@code 0} may or may
* not disable the mouse event handling on this pixel. This is a
* platform-dependent behavior. To make sure the mouse events do not get
* dispatched to a particular pixel, the pixel must be excluded from the
* shape of the window.
* <p>
@ -3685,17 +3711,21 @@ public class Window extends Container implements Accessible {
* @param bgColor the color to become this window's background color.
*
* @throws IllegalComponentStateException if the alpha value of the given
* background color is less than 1.0f and the window is in
* background color is less than {@code 1.0f} and the window is decorated
* @throws IllegalComponentStateException if the alpha value of the given
* background color is less than {@code 1.0f} and the window is in
* full-screen mode
* @throws UnsupportedOperationException if the alpha value of the given
* background color is less than 1.0f and
* {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT
* background color is less than {@code 1.0f} and {@link
* GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT
* PERPIXEL_TRANSLUCENT} translucency is not supported
*
* @see Window#getBackground
* @see Window#isOpaque
* @see Window#setOpacity(float)
* @see Window#setShape(Shape)
* @see Frame#isUndecorated
* @see Dialog#isUndecorated
* @see GraphicsDevice.WindowTranslucency
* @see GraphicsDevice#isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
* @see GraphicsConfiguration#isTranslucencyCapable()
@ -3739,7 +3769,7 @@ public class Window extends Container implements Accessible {
* <p>
* The method returns {@code false} if the background color of the window
* is not {@code null} and the alpha component of the color is less than
* 1.0f. The method returns {@code true} otherwise.
* {@code 1.0f}. The method returns {@code true} otherwise.
*
* @return {@code true} if the window is opaque, {@code false} otherwise
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2010, 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
@ -262,7 +262,23 @@ public final class NumericShaper implements java.io.Serializable {
/**
* The Cham range with the Cham digits.
*/
CHAM ('\uaa50', '\uaa00', '\uaa60');
CHAM ('\uaa50', '\uaa00', '\uaa60'),
/**
* The Tai Tham Hora range with the Tai Tham Hora digits.
*/
TAI_THAM_HORA ('\u1a80', '\u1a20', '\u1ab0'),
/**
* The Tai Tham Tham range with the Tai Tham Tham digits.
*/
TAI_THAM_THAM ('\u1a90', '\u1a20', '\u1ab0'),
/**
* The Javanese range with the Javanese digits.
*/
JAVANESE ('\ua9d0', '\ua980', '\ua9e0'),
/**
* The Meetei Mayek range with the Meetei Mayek digits.
*/
MEETEI_MAYEK ('\uabf0', '\uabc0', '\uac00');
private static int toRangeIndex(Range script) {
int index = script.ordinal();
@ -592,10 +608,16 @@ public final class NumericShaper implements java.io.Serializable {
0x07a6, 0x07b1,
0x07eb, 0x07f4,
0x07f6, 0x07fa,
0x0901, 0x0903,
0x0816, 0x081a,
0x081b, 0x0824,
0x0825, 0x0828,
0x0829, 0x0830,
0x0859, 0x085e,
0x0900, 0x0903,
0x093a, 0x093b,
0x093c, 0x093d,
0x0941, 0x0949,
0x094d, 0x0950,
0x094d, 0x094e,
0x0951, 0x0958,
0x0962, 0x0964,
0x0981, 0x0982,
@ -604,7 +626,7 @@ public final class NumericShaper implements java.io.Serializable {
0x09cd, 0x09ce,
0x09e2, 0x09e6,
0x09f2, 0x09f4,
0x0a01, 0x0a03,
0x09fb, 0x0a03,
0x0a3c, 0x0a3e,
0x0a41, 0x0a59,
0x0a70, 0x0a72,
@ -630,9 +652,8 @@ public final class NumericShaper implements java.io.Serializable {
0x0cbc, 0x0cbd,
0x0ccc, 0x0cd5,
0x0ce2, 0x0ce6,
0x0cf1, 0x0d02,
0x0d41, 0x0d46,
0x0d4d, 0x0d57,
0x0d4d, 0x0d4e,
0x0d62, 0x0d66,
0x0dca, 0x0dcf,
0x0dd2, 0x0dd8,
@ -649,7 +670,7 @@ public final class NumericShaper implements java.io.Serializable {
0x0f71, 0x0f7f,
0x0f80, 0x0f85,
0x0f86, 0x0f88,
0x0f90, 0x0fbe,
0x0f8d, 0x0fbe,
0x0fc6, 0x0fc7,
0x102d, 0x1031,
0x1032, 0x1038,
@ -661,8 +682,10 @@ public final class NumericShaper implements java.io.Serializable {
0x1082, 0x1083,
0x1085, 0x1087,
0x108d, 0x108e,
0x135f, 0x1360,
0x109d, 0x109e,
0x135d, 0x1360,
0x1390, 0x13a0,
0x1400, 0x1401,
0x1680, 0x1681,
0x169b, 0x16a0,
0x1712, 0x1720,
@ -682,6 +705,11 @@ public final class NumericShaper implements java.io.Serializable {
0x1939, 0x1946,
0x19de, 0x1a00,
0x1a17, 0x1a19,
0x1a56, 0x1a57,
0x1a58, 0x1a61,
0x1a62, 0x1a63,
0x1a65, 0x1a6d,
0x1a73, 0x1a80,
0x1b00, 0x1b04,
0x1b34, 0x1b35,
0x1b36, 0x1b3b,
@ -691,8 +719,16 @@ public final class NumericShaper implements java.io.Serializable {
0x1b80, 0x1b82,
0x1ba2, 0x1ba6,
0x1ba8, 0x1baa,
0x1be6, 0x1be7,
0x1be8, 0x1bea,
0x1bed, 0x1bee,
0x1bef, 0x1bf2,
0x1c2c, 0x1c34,
0x1c36, 0x1c3b,
0x1cd0, 0x1cd3,
0x1cd4, 0x1ce1,
0x1ce2, 0x1ce9,
0x1ced, 0x1cee,
0x1dc0, 0x1e00,
0x1fbd, 0x1fbe,
0x1fbf, 0x1fc2,
@ -716,14 +752,16 @@ public final class NumericShaper implements java.io.Serializable {
0x213a, 0x213c,
0x2140, 0x2145,
0x214a, 0x214e,
0x2153, 0x2160,
0x2190, 0x2336,
0x2150, 0x2160,
0x2189, 0x2336,
0x237b, 0x2395,
0x2396, 0x249c,
0x24ea, 0x26ac,
0x26ad, 0x2800,
0x2900, 0x2c00,
0x2ce5, 0x2d00,
0x2ce5, 0x2ceb,
0x2cef, 0x2d00,
0x2d7f, 0x2d80,
0x2de0, 0x3005,
0x3008, 0x3021,
0x302a, 0x3031,
@ -742,25 +780,40 @@ public final class NumericShaper implements java.io.Serializable {
0x33de, 0x33e0,
0x33ff, 0x3400,
0x4dc0, 0x4e00,
0xa490, 0xa500,
0xa490, 0xa4d0,
0xa60d, 0xa610,
0xa66f, 0xa680,
0xa6f0, 0xa6f2,
0xa700, 0xa722,
0xa788, 0xa789,
0xa802, 0xa803,
0xa806, 0xa807,
0xa80b, 0xa80c,
0xa825, 0xa827,
0xa828, 0xa840,
0xa828, 0xa830,
0xa838, 0xa840,
0xa874, 0xa880,
0xa8c4, 0xa8ce,
0xa8e0, 0xa8f2,
0xa926, 0xa92e,
0xa947, 0xa952,
0xa980, 0xa983,
0xa9b3, 0xa9b4,
0xa9b6, 0xa9ba,
0xa9bc, 0xa9bd,
0xaa29, 0xaa2f,
0xaa31, 0xaa33,
0xaa35, 0xaa40,
0xaa43, 0xaa44,
0xaa4c, 0xaa4d,
0xaab0, 0xaab1,
0xaab2, 0xaab5,
0xaab7, 0xaab9,
0xaabe, 0xaac0,
0xaac1, 0xaac2,
0xabe5, 0xabe6,
0xabe8, 0xabe9,
0xabed, 0xabf0,
0xfb1e, 0xfb1f,
0xfb29, 0xfb2a,
0xfd3e, 0xfd50,
@ -775,12 +828,28 @@ public final class NumericShaper implements java.io.Serializable {
0x1091f, 0x10920,
0x10a01, 0x10a10,
0x10a38, 0x10a40,
0x10b39, 0x10b40,
0x10e60, 0x11000,
0x11001, 0x11002,
0x11038, 0x11047,
0x11052, 0x11066,
0x11080, 0x11082,
0x110b3, 0x110b7,
0x110b9, 0x110bb,
0x1d167, 0x1d16a,
0x1d173, 0x1d183,
0x1d185, 0x1d18c,
0x1d1aa, 0x1d1ae,
0x1d200, 0x1d360,
0x1d7ce, 0x20000,
0x1d6db, 0x1d6dc,
0x1d715, 0x1d716,
0x1d74f, 0x1d750,
0x1d789, 0x1d78a,
0x1d7c3, 0x1d7c4,
0x1d7ce, 0x1f110,
0x1f300, 0x1f48c,
0x1f48d, 0x1f524,
0x1f525, 0x20000,
0xe0001, 0xf0000,
0x10fffe, 0x10ffff // sentinel
};
@ -947,6 +1016,14 @@ public final class NumericShaper implements java.io.Serializable {
&& rangeSet.contains(Range.ARABIC)) {
rangeSet.remove(Range.ARABIC);
}
// As well as the above case, give precedance to TAI_THAM_THAM if both
// TAI_THAM_HORA and TAI_THAM_THAM are specified.
if (rangeSet.contains(Range.TAI_THAM_THAM)
&& rangeSet.contains(Range.TAI_THAM_HORA)) {
rangeSet.remove(Range.TAI_THAM_HORA);
}
rangeArray = rangeSet.toArray(new Range[rangeSet.size()]);
if (rangeArray.length > BSEARCH_THRESHOLD) {
// sort rangeArray for binary search

View File

@ -29,6 +29,8 @@ import com.sun.beans.WeakCache;
import com.sun.beans.finder.BeanInfoFinder;
import com.sun.beans.finder.ClassFinder;
import java.awt.Component;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.lang.reflect.Method;
@ -39,6 +41,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.EventListener;
import java.util.EventObject;
import java.util.List;
import java.util.TreeMap;
import java.util.WeakHashMap;
@ -1234,7 +1237,23 @@ public class Introspector {
}
}
// OK, fabricate a default BeanDescriptor.
return (new BeanDescriptor(beanClass));
return new BeanDescriptor(this.beanClass, findCustomizerClass(this.beanClass));
}
private static Class<?> findCustomizerClass(Class<?> type) {
String name = type.getName() + "Customizer";
try {
type = ClassFinder.findClass(name, type.getClassLoader());
// Each customizer should inherit java.awt.Component and implement java.beans.Customizer
// according to the section 9.3 of JavaBeans specification
if (Component.class.isAssignableFrom(type) && Customizer.class.isAssignableFrom(type)) {
return type;
}
}
catch (Exception exception) {
// ignore any exceptions
}
return null;
}
private boolean isEventHandler(Method m) {
@ -1244,10 +1263,7 @@ public class Introspector {
if (argTypes.length != 1) {
return false;
}
if (isSubclass(argTypes[0], java.util.EventObject.class)) {
return true;
}
return false;
return isSubclass(argTypes[0], EventObject.class);
}
/*

View File

@ -3498,8 +3498,8 @@ public class ObjectInputStream
return ((int[]) array).clone();
} else if (array instanceof long[]) {
return ((long[]) array).clone();
} else if (array instanceof double[]) {
return ((double[]) array).clone();
} else if (array instanceof short[]) {
return ((short[]) array).clone();
} else {
throw new AssertionError();
}

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,7 @@ class Thread implements Runnable {
* initialized to indicate thread 'not yet started'
*/
private int threadStatus = 0;
private volatile int threadStatus = 0;
private static synchronized long nextThreadID() {

View File

@ -275,18 +275,17 @@ public abstract class Charset
/* -- Static methods -- */
private static String bugLevel = null;
private static volatile String bugLevel = null;
static boolean atBugLevel(String bl) { // package-private
if (bugLevel == null) {
String level = bugLevel;
if (level == null) {
if (!sun.misc.VM.isBooted())
return false;
bugLevel = AccessController.doPrivileged(
new GetPropertyAction("sun.nio.cs.bugLevel"));
if (bugLevel == null)
bugLevel = "";
bugLevel = level = AccessController.doPrivileged(
new GetPropertyAction("sun.nio.cs.bugLevel", ""));
}
return (bugLevel != null) && bugLevel.equals(bl);
return level.equals(bl);
}
/**

View File

@ -59,10 +59,10 @@ public class FormattableFlags {
* <pre>
* out.toUpperCase() </pre>
*
* <p> This flag corresponds to <tt>'^'</tt> (<tt>'&#92;u005e'</tt>) in
* <p> This flag corresponds to <tt>'S'</tt> (<tt>'&#92;u0053'</tt>) in
* the format specifier.
*/
public static final int UPPERCASE = 1<<1; // '^'
public static final int UPPERCASE = 1<<1; // 'S'
/**
* Requires the output to use an alternate form. The definition of the

View File

@ -25,7 +25,9 @@
package java.util.spi;
import java.util.Arrays;
import java.util.Currency;
import java.util.List;
import java.util.Locale;
/**
@ -95,6 +97,23 @@ public abstract class CurrencyNameProvider extends LocaleServiceProvider {
throw new NullPointerException();
}
// Check whether the currencyCode is valid
char[] charray = currencyCode.toCharArray();
if (charray.length != 3) {
throw new IllegalArgumentException("The currencyCode is not in the form of three upper-case letters.");
}
for (char c : charray) {
if (c < 'A' || c > 'Z') {
throw new IllegalArgumentException("The currencyCode is not in the form of three upper-case letters.");
}
}
// Check whether the locale is valid
List<Locale> avail = Arrays.asList(getAvailableLocales());
if (!avail.contains(locale)) {
throw new IllegalArgumentException("The locale is not available");
}
return null;
}
}

View File

@ -94,7 +94,9 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* @see java.util.Locale#getDisplayScript(java.util.Locale)
* @since 1.7
*/
public abstract String getDisplayScript(String scriptCode, Locale locale);
public String getDisplayScript(String scriptCode, Locale locale) {
return null;
}
/**
* Returns a localized name for the given <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2010, 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
@ -166,8 +166,9 @@ public class SerialBlob implements Blob, Serializable, Cloneable {
length = (int)len;
}
if (pos < 1 || length - pos < 0 ) {
throw new SerialException("Invalid arguments: position cannot be less that 1");
if (pos < 1 || len - pos < 0 ) {
throw new SerialException("Invalid arguments: position cannot be "
+ "less than 1 or greater than the length of the SerialBlob");
}
pos--; // correct pos to array index

View File

@ -1379,6 +1379,10 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
* If <code>true</code> and the button has a border,
* the border is painted. The default value for the
* <code>borderPainted</code> property is <code>true</code>.
* <p/>
* Some look and feels might not support
* the <code>borderPainted</code> property,
* in which case they ignore this.
*
* @param b if true and border property is not <code>null</code>,
* the border is painted

View File

@ -273,7 +273,7 @@ public class BorderFactory
* @since 1.7
*/
public static Border createSoftBevelBorder(int type, Color highlight, Color shadow) {
return new BevelBorder(type, highlight, shadow);
return new SoftBevelBorder(type, highlight, shadow);
}
/**
@ -295,7 +295,7 @@ public class BorderFactory
* @since 1.7
*/
public static Border createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) {
return new BevelBorder(type, highlightOuter, highlightInner, shadowOuter, shadowInner);
return new SoftBevelBorder(type, highlightOuter, highlightInner, shadowOuter, shadowInner);
}
//// EtchedBorder ///////////////////////////////////////////////////////////

View File

@ -322,7 +322,7 @@ public final class JLayer<V extends Component>
}
/**
* A non-{@code null] border, or non-zero insets, isn't supported, to prevent the geometry
* A non-{@code null} border, or non-zero insets, isn't supported, to prevent the geometry
* of this component from becoming complex enough to inhibit
* subclassing of {@code LayerUI} class. To create a {@code JLayer} with a border,
* add it to a {@code JPanel} that has a border.
@ -373,8 +373,12 @@ public final class JLayer<V extends Component>
* {@inheritDoc}
*/
public void removeAll() {
setView(null);
setGlassPane(null);
if (view != null) {
setView(null);
}
if (glassPane != null) {
setGlassPane(null);
}
}
/**

View File

@ -1443,6 +1443,10 @@ public class JTabbedPane extends JComponent
* which can be <code>null</code>, in which case the tab's background color
* will default to the background color of the <code>tabbedpane</code>.
* An internal exception is raised if there is no tab at that index.
* <p/>
* It is up to the look and feel to honor this property, some may
* choose to ignore it.
*
* @param index the tab index where the background should be set
* @param background the color to be displayed in the tab's background
* @exception IndexOutOfBoundsException if index is out of range
@ -1472,6 +1476,9 @@ public class JTabbedPane extends JComponent
* <code>null</code>, in which case the tab's foreground color
* will default to the foreground color of this <code>tabbedpane</code>.
* An internal exception is raised if there is no tab at that index.
* <p/>
* It is up to the look and feel to honor this property, some may
* choose to ignore it.
*
* @param index the tab index where the foreground should be set
* @param foreground the color to be displayed as the tab's foreground

View File

@ -165,11 +165,11 @@ public class TitledBorder extends AbstractBorder
* @param titlePosition the position for the title
*/
public TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition) {
String title,
int titleJustification,
int titlePosition) {
this(border, title, titleJustification,
titlePosition, null, null);
titlePosition, null, null);
}
/**
@ -183,12 +183,12 @@ public class TitledBorder extends AbstractBorder
* @param titleFont the font for rendering the title
*/
public TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont) {
String title,
int titleJustification,
int titlePosition,
Font titleFont) {
this(border, title, titleJustification,
titlePosition, titleFont, null);
titlePosition, titleFont, null);
}
/**
@ -205,11 +205,11 @@ public class TitledBorder extends AbstractBorder
*/
@ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
public TitledBorder(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor) {
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor) {
this.title = title;
this.border = border;
this.titleFont = titleFont;
@ -234,7 +234,7 @@ public class TitledBorder extends AbstractBorder
* @param height the height of the painted border
*/
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
Border border = getBorderUI();
Border border = getBorder();
String title = getTitle();
if ((title != null) && !title.isEmpty()) {
int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
@ -347,7 +347,7 @@ public class TitledBorder extends AbstractBorder
* @param insets the object to be reinitialized
*/
public Insets getBorderInsets(Component c, Insets insets) {
Border border = getBorderUI();
Border border = getBorder();
if (border == null) {
insets.set(0, 0, 0, 0);
}
@ -402,22 +402,34 @@ public class TitledBorder extends AbstractBorder
/**
* Returns whether or not the border is opaque.
*/
public boolean isBorderOpaque() { return false; }
public boolean isBorderOpaque() {
return false;
}
/**
* Returns the title of the titled border.
*
* @return the title of the titled border
*/
public String getTitle() { return title; }
public String getTitle() {
return title;
}
/**
* Returns the border of the titled border.
*
* @return the border of the titled border
*/
public Border getBorder() {
return border;
return border != null
? border
: UIManager.getBorder("TitledBorder.border");
}
/**
* Returns the title-position of the titled border.
*
* @return the title-position of the titled border
*/
public int getTitlePosition() {
return titlePosition;
@ -425,20 +437,28 @@ public class TitledBorder extends AbstractBorder
/**
* Returns the title-justification of the titled border.
*
* @return the title-justification of the titled border
*/
public int getTitleJustification() { return titleJustification; }
public int getTitleJustification() {
return titleJustification;
}
/**
* Returns the title-font of the titled border.
*
* @return the title-font of the titled border
*/
public Font getTitleFont() {
public Font getTitleFont() {
return titleFont;
}
/**
* Returns the title-color of the titled border.
*
* @return the title-color of the titled border
*/
public Color getTitleColor() {
public Color getTitleColor() {
return titleColor;
}
@ -447,15 +467,19 @@ public class TitledBorder extends AbstractBorder
/**
* Sets the title of the titled border.
* param title the title for the border
* @param title the title for the border
*/
public void setTitle(String title) { this.title = title; }
public void setTitle(String title) {
this.title = title;
}
/**
* Sets the border of the titled border.
* @param border the border
*/
public void setBorder(Border border) { this.border = border; }
public void setBorder(Border border) {
this.border = border;
}
/**
* Sets the title-position of the titled border.
@ -482,19 +506,19 @@ public class TitledBorder extends AbstractBorder
* Sets the title-justification of the titled border.
* @param titleJustification the justification for the border
*/
public void setTitleJustification(int titleJustification) {
public void setTitleJustification(int titleJustification) {
switch (titleJustification) {
case DEFAULT_JUSTIFICATION:
case LEFT:
case CENTER:
case RIGHT:
case LEADING:
case TRAILING:
this.titleJustification = titleJustification;
break;
default:
throw new IllegalArgumentException(titleJustification +
" is not a valid title justification.");
case DEFAULT_JUSTIFICATION:
case LEFT:
case CENTER:
case RIGHT:
case LEADING:
case TRAILING:
this.titleJustification = titleJustification;
break;
default:
throw new IllegalArgumentException(titleJustification +
" is not a valid title justification.");
}
}
@ -518,6 +542,7 @@ public class TitledBorder extends AbstractBorder
* Returns the minimum dimensions this border requires
* in order to fully display the border and title.
* @param c the component where this border will be drawn
* @return the {@code Dimension} object
*/
public Dimension getMinimumSize(Component c) {
Insets insets = getBorderInsets(c);
@ -557,7 +582,7 @@ public class TitledBorder extends AbstractBorder
if (height < 0) {
throw new IllegalArgumentException("Height must be >= 0");
}
Border border = getBorderUI();
Border border = getBorder();
String title = getTitle();
if ((title != null) && !title.isEmpty()) {
int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
@ -616,13 +641,6 @@ public class TitledBorder extends AbstractBorder
return Component.BaselineResizeBehavior.OTHER;
}
private Border getBorderUI() {
Border border = getBorder();
return border != null
? border
: UIManager.getBorder("TitledBorder.border");
}
private int getPosition() {
int position = getTitlePosition();
if (position != DEFAULT_POSITION) {

View File

@ -449,8 +449,8 @@ public class LayerUI<V extends Component>
/**
* Configures the {@code JLayer} this {@code LayerUI} is set to.
* The default implementation registers the {@code LayerUI}
* as a property change listener for the passed {@code JLayer} component.
* The default implementation registers the passed {@code JLayer} component
* as a {@code PropertyChangeListener} for the property changes of this {@code LayerUI}.
*
* @param c the {@code JLayer} component where this UI delegate is being installed
*/
@ -461,8 +461,8 @@ public class LayerUI<V extends Component>
/**
* Reverses the configuration which was previously set
* in the {@link #installUI(JComponent)} method.
* The default implementation unregisters the property change listener
* for the passed JLayer component.
* The default implementation unregisters the passed {@code JLayer} component
* as a {@code PropertyChangeListener} for the property changes of this {@code LayerUI}.
*
* @param c the component from which this UI delegate is being removed.
*/

View File

@ -196,6 +196,10 @@ public class BasicMenuUI extends BasicMenuItemUI
return getHandler();
}
protected MenuKeyListener createMenuKeyListener(JComponent c) {
return (MenuKeyListener)getHandler();
}
public Dimension getMaximumSize(JComponent c) {
if (((JMenu)menuItem).isTopLevelMenu() == true) {
Dimension d = c.getPreferredSize();
@ -397,7 +401,7 @@ public class BasicMenuUI extends BasicMenuItemUI
public void stateChanged(ChangeEvent e) { }
}
private class Handler extends BasicMenuItemUI.Handler {
private class Handler extends BasicMenuItemUI.Handler implements MenuKeyListener {
//
// PropertyChangeListener
//
@ -580,5 +584,48 @@ public class BasicMenuUI extends BasicMenuItemUI
}
public void menuDragMouseExited(MenuDragMouseEvent e) {}
public void menuDragMouseReleased(MenuDragMouseEvent e) {}
//
// MenuKeyListener
//
/**
* Open the Menu
*/
public void menuKeyTyped(MenuKeyEvent e) {
if (!crossMenuMnemonic && BasicPopupMenuUI.getLastPopup() != null) {
// when crossMenuMnemonic is not set, we don't open a toplevel
// menu if another toplevel menu is already open
return;
}
if (BasicPopupMenuUI.getPopups().size() != 0) {
//Fix 6939261: to return in case not on the main menu
//and has a pop-up.
//after return code will be handled in BasicPopupMenuUI.java
return;
}
char key = Character.toLowerCase((char)menuItem.getMnemonic());
MenuElement path[] = e.getPath();
if (key == Character.toLowerCase(e.getKeyChar())) {
JPopupMenu popupMenu = ((JMenu)menuItem).getPopupMenu();
ArrayList newList = new ArrayList(Arrays.asList(path));
newList.add(popupMenu);
MenuElement subs[] = popupMenu.getSubElements();
MenuElement sub =
BasicPopupMenuUI.findEnabledChild(subs, -1, true);
if(sub != null) {
newList.add(sub);
}
MenuSelectionManager manager = e.getMenuSelectionManager();
MenuElement newPath[] = new MenuElement[0];;
newPath = (MenuElement[]) newList.toArray(newPath);
manager.setSelectedPath(newPath);
e.consume();
}
}
public void menuKeyPressed(MenuKeyEvent e) {}
public void menuKeyReleased(MenuKeyEvent e) {}
}
}

View File

@ -81,17 +81,26 @@ public class MetalScrollPaneUI extends BasicScrollPaneUI
}
}
public void installListeners(JScrollPane scrollPane) {
super.installListeners(scrollPane);
scrollBarSwapListener = createScrollBarSwapListener();
scrollPane.addPropertyChangeListener(scrollBarSwapListener);
}
/**
* {@inheritDoc}
*/
protected void uninstallListeners(JComponent c) {
super.uninstallListeners(c);
c.removePropertyChangeListener(scrollBarSwapListener);
}
/**
* @deprecated - Replaced by {@link #uninstallListeners(JComponent)}
*/
@Deprecated
public void uninstallListeners(JScrollPane scrollPane) {
super.uninstallListeners(scrollPane);
scrollPane.removePropertyChangeListener(scrollBarSwapListener);
}

View File

@ -223,6 +223,16 @@ public final class AWTAccessor {
void processEvent(Component comp, AWTEvent e);
}
/*
* An interface of accessor for the java.awt.Container class.
*/
public interface ContainerAccessor {
/**
* Validates the container unconditionally.
*/
void validateUnconditionally(Container cont);
}
/*
* An interface of accessor for java.awt.Window class.
*/
@ -334,6 +344,10 @@ public final class AWTAccessor {
* Gets the state of this frame.
*/
int getExtendedState(Frame frame);
/*
* Gets the maximized bounds of this frame.
*/
Rectangle getMaximizedBounds(Frame frame);
}
/*
@ -440,53 +454,19 @@ public final class AWTAccessor {
}
/*
* The java.awt.Component class accessor object.
* Accessor instances are initialized in the static initializers of
* corresponding AWT classes by using setters defined below.
*/
private static ComponentAccessor componentAccessor;
/*
* The java.awt.Window class accessor object.
*/
private static ContainerAccessor containerAccessor;
private static WindowAccessor windowAccessor;
/*
* The java.awt.AWTEvent class accessor object.
*/
private static AWTEventAccessor awtEventAccessor;
/*
* The java.awt.event.InputEvent class accessor object.
*/
private static InputEventAccessor inputEventAccessor;
/*
* The java.awt.Frame class accessor object.
*/
private static FrameAccessor frameAccessor;
/*
* The java.awt.KeyboardFocusManager class accessor object.
*/
private static KeyboardFocusManagerAccessor kfmAccessor;
/*
* The java.awt.MenuComponent class accessor object.
*/
private static MenuComponentAccessor menuComponentAccessor;
/*
* The java.awt.EventQueue class accessor object.
*/
private static EventQueueAccessor eventQueueAccessor;
/*
* The java.awt.PopupMenu class accessor object.
*/
private static PopupMenuAccessor popupMenuAccessor;
/*
* The java.awt.FileDialog class accessor object.
*/
private static FileDialogAccessor fileDialogAccessor;
/*
@ -497,7 +477,7 @@ public final class AWTAccessor {
}
/*
* Retrieve the accessor object for the java.awt.Window class.
* Retrieve the accessor object for the java.awt.Component class.
*/
public static ComponentAccessor getComponentAccessor() {
if (componentAccessor == null) {
@ -507,6 +487,24 @@ public final class AWTAccessor {
return componentAccessor;
}
/*
* Set an accessor object for the java.awt.Container class.
*/
public static void setContainerAccessor(ContainerAccessor ca) {
containerAccessor = ca;
}
/*
* Retrieve the accessor object for the java.awt.Container class.
*/
public static ContainerAccessor getContainerAccessor() {
if (containerAccessor == null) {
unsafe.ensureClassInitialized(Container.class);
}
return containerAccessor;
}
/*
* Set an accessor object for the java.awt.Window class.
*/

View File

@ -25,6 +25,7 @@
package sun.misc;
import static java.lang.Thread.State.*;
import java.util.Properties;
import java.util.HashMap;
import java.util.Map;
@ -332,69 +333,37 @@ public class VM {
}
}
/**
* Returns Thread.State for the given threadStatus
*/
public static Thread.State toThreadState(int threadStatus) {
// Initialize the threadStateMap
initThreadStateMap();
Thread.State s = threadStateMap.get(threadStatus);
if (s == null) {
// default to RUNNABLE if the threadStatus value is unknown
s = Thread.State.RUNNABLE;
}
return s;
}
// a map of threadStatus values to the corresponding Thread.State
private static Map<Integer, Thread.State> threadStateMap = null;
private static Map<Integer, String> threadStateNames = null;
private synchronized static void initThreadStateMap() {
if (threadStateMap != null) {
return;
}
final Thread.State[] ts = Thread.State.values();
final int[][] vmThreadStateValues = new int[ts.length][];
final String[][] vmThreadStateNames = new String[ts.length][];
getThreadStateValues(vmThreadStateValues, vmThreadStateNames);
threadStateMap = new HashMap<Integer, Thread.State>();
threadStateNames = new HashMap<Integer, String>();
for (int i = 0; i < ts.length; i++) {
String state = ts[i].name();
int[] values = null;
String[] names = null;
for (int j = 0; j < ts.length; j++) {
if (vmThreadStateNames[j][0].startsWith(state)) {
values = vmThreadStateValues[j];
names = vmThreadStateNames[j];
}
}
if (values == null) {
throw new InternalError("No VM thread state mapped to " +
state);
}
if (values.length != names.length) {
throw new InternalError("VM thread state values and names " +
" mapped to " + state + ": length not matched" );
}
for (int k = 0; k < values.length; k++) {
threadStateMap.put(values[k], ts[i]);
threadStateNames.put(values[k], names[k]);
}
if ((threadStatus & JVMTI_THREAD_STATE_RUNNABLE) != 0) {
return RUNNABLE;
} else if ((threadStatus & JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER) != 0) {
return BLOCKED;
} else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_INDEFINITELY) != 0) {
return WAITING;
} else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT) != 0) {
return TIMED_WAITING;
} else if ((threadStatus & JVMTI_THREAD_STATE_TERMINATED) != 0) {
return TERMINATED;
} else if ((threadStatus & JVMTI_THREAD_STATE_ALIVE) == 0) {
return NEW;
} else {
return RUNNABLE;
}
}
// Fill in vmThreadStateValues with int arrays, each of which contains
// the threadStatus values mapping to the Thread.State enum constant.
// Fill in vmThreadStateNames with String arrays, each of which contains
// the name of each threadStatus value of the format:
// <Thread.State.name()>[.<Substate name>]
// e.g. WAITING.OBJECT_WAIT
//
private native static void getThreadStateValues(int[][] vmThreadStateValues,
String[][] vmThreadStateNames);
/* The threadStatus field is set by the VM at state transition
* in the hotspot implementation. Its value is set according to
* the JVM TI specification GetThreadState function.
*/
private final static int JVMTI_THREAD_STATE_ALIVE = 0x0001;
private final static int JVMTI_THREAD_STATE_TERMINATED = 0x0002;
private final static int JVMTI_THREAD_STATE_RUNNABLE = 0x0004;
private final static int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400;
private final static int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010;
private final static int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020;
static {
initialize();

View File

@ -129,9 +129,22 @@ class Request {
hdrs = new Headers();
char s[] = new char[10];
int len = 0;
int firstc = is.read();
// check for empty headers
if (firstc == CR || firstc == LF) {
int c = is.read();
if (c == CR || c == LF) {
return hdrs;
}
s[0] = (char)firstc;
len = 1;
firstc = c;
}
while (firstc != LF && firstc != CR && firstc >= 0) {
int len = 0;
int keyend = -1;
int c;
boolean inKey = firstc > ' ';
@ -191,6 +204,7 @@ class Request {
else
v = String.copyValueOf(s, keyend, len - keyend);
hdrs.add (k,v);
len = 0;
}
return hdrs;
}

View File

@ -74,8 +74,8 @@ class SSLStreams {
private void configureEngine(HttpsConfigurator cfg, InetSocketAddress addr){
if (cfg != null) {
Parameters params = new Parameters (cfg, addr);
cfg.configure (params);
//BEGIN_TIGER_EXCLUDE
cfg.configure (params);
SSLParameters sslParams = params.getSSLParameters();
if (sslParams != null) {
engine.setSSLParameters (sslParams);

View File

@ -42,7 +42,7 @@ class ServerConfig {
static final int DEFAULT_CLOCK_TICK = 10000 ; // 10 sec.
/* These values must be a reasonable multiple of clockTick */
static final long DEFAULT_IDLE_INTERVAL = 300 ; // 5 min
static final long DEFAULT_IDLE_INTERVAL = 30 ; // 5 min
static final int DEFAULT_MAX_IDLE_CONNECTIONS = 200 ;
static final long DEFAULT_MAX_REQ_TIME = -1; // default: forever

View File

@ -144,7 +144,7 @@ class UTF_32Coder {
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
int mark = src.position();
if (!doneBOM) {
if (!doneBOM && src.hasRemaining()) {
if (dst.remaining() < 4)
return CoderResult.OVERFLOW;
put(BOM_BIG, dst);

View File

@ -70,13 +70,12 @@ public abstract class UnicodeEncoder extends CharsetEncoder {
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
int mark = src.position();
if (needsMark) {
if (needsMark && src.hasRemaining()) {
if (dst.remaining() < 2)
return CoderResult.OVERFLOW;
put(BYTE_ORDER_MARK, dst);
needsMark = false;
}
try {
while (src.hasRemaining()) {
char c = src.get();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2010, 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
@ -138,13 +138,7 @@ abstract class SeedGenerator {
instance.getSeedBytes(result);
}
void getSeedBytes(byte[] result) {
for (int i = 0; i < result.length; i++) {
result[i] = getSeedByte();
}
}
abstract byte getSeedByte();
abstract void getSeedBytes(byte[] result);
/**
* Retrieve some system information, hashed.
@ -369,6 +363,13 @@ abstract class SeedGenerator {
}
}
@Override
void getSeedBytes(byte[] result) {
for (int i = 0; i < result.length; i++) {
result[i] = getSeedByte();
}
}
byte getSeedByte() {
byte b = 0;
@ -455,8 +456,7 @@ abstract class SeedGenerator {
static class URLSeedGenerator extends SeedGenerator {
private String deviceName;
private BufferedInputStream devRandom;
private InputStream devRandom;
/**
* The constructor is only called once to construct the one
@ -465,7 +465,7 @@ abstract class SeedGenerator {
*/
URLSeedGenerator(String egdurl) throws IOException {
if (egdurl == null) {
if (egdurl == null) {
throw new IOException("No random source specified");
}
deviceName = egdurl;
@ -478,41 +478,78 @@ abstract class SeedGenerator {
private void init() throws IOException {
final URL device = new URL(deviceName);
devRandom = java.security.AccessController.doPrivileged
(new java.security.PrivilegedAction<BufferedInputStream>() {
public BufferedInputStream run() {
try {
return new BufferedInputStream(device.openStream());
} catch (IOException ioe) {
return null;
try {
devRandom = java.security.AccessController.doPrivileged
(new java.security.PrivilegedExceptionAction<InputStream>() {
public InputStream run() throws IOException {
/*
* return a FileInputStream for file URLs and
* avoid buffering. The openStream() call wraps
* InputStream in a BufferedInputStream which
* can buffer up to 8K bytes. This read is a
* performance issue for entropy sources which
* can be slow to replenish.
*/
if (device.getProtocol().equalsIgnoreCase("file")) {
File deviceFile = getDeviceFile(device);
return new FileInputStream(deviceFile);
} else {
return device.openStream();
}
}
});
if (devRandom == null) {
throw new IOException("failed to open " + device);
} catch (Exception e) {
throw new IOException("Failed to open " + deviceName, e.getCause());
}
}
byte getSeedByte() {
byte b[] = new byte[1];
int stat;
/*
* Use a URI to access this File. Previous code used a URL
* which is less strict on syntax. If we encounter a
* URISyntaxException we make best efforts for backwards
* compatibility. e.g. space character in deviceName string.
*
* Method called within PrivilegedExceptionAction block.
*/
private File getDeviceFile(URL device) throws IOException {
try {
stat = devRandom.read(b, 0, b.length);
URI deviceURI = device.toURI();
if(deviceURI.isOpaque()) {
// File constructor does not accept opaque URI
URI localDir = new File(System.getProperty("user.dir")).toURI();
String uriPath = localDir.toString() +
deviceURI.toString().substring(5);
return new File(URI.create(uriPath));
} else {
return new File(deviceURI);
}
} catch (URISyntaxException use) {
/*
* Make best effort to access this File.
* We can try using the URL path.
*/
return new File(device.getPath());
}
}
@Override
void getSeedBytes(byte[] result) {
int len = result.length;
int read = 0;
try {
while (read < len) {
int count = devRandom.read(result, read, len - read);
// /dev/random blocks - should never have EOF
if (count < 0)
throw new InternalError("URLSeedGenerator " + deviceName +
" reached end of file");
read += count;
}
} catch (IOException ioe) {
throw new InternalError("URLSeedGenerator " + deviceName +
" generated exception: " +
ioe.getMessage());
}
if (stat == b.length) {
return b[0];
} else if (stat == -1) {
throw new InternalError("URLSeedGenerator " + deviceName +
" reached end of file");
} else {
throw new InternalError("URLSeedGenerator " + deviceName +
" failed read");
}
}
}

View File

@ -49,7 +49,7 @@ import javax.security.auth.x500.X500Principal;
/**
* PolicyTool may be used by users and administrators to configure the
* overall java security policy (currently stored in the policy file).
* Using PolicyTool administators may add and remove policies from
* Using PolicyTool administrators may add and remove policies from
* the policy file. <p>
*
* @see java.security.Policy
@ -1343,11 +1343,6 @@ class ToolDialog extends Dialog {
PolicyTool.rb.getString
("Actions.");
/* gridbag index for display OverWriteFile (OW) components */
public static final int OW_LABEL = 0;
public static final int OW_OK_BUTTON = 1;
public static final int OW_CANCEL_BUTTON = 2;
/* gridbag index for display PolicyEntry (PE) components */
public static final int PE_CODEBASE_LABEL = 0;
public static final int PE_CODEBASE_TEXTFIELD = 1;
@ -1522,44 +1517,6 @@ class ToolDialog extends Dialog {
return null;
}
/**
* ask user if they want to overwrite an existing file
*/
void displayOverWriteFileDialog(String filename, int nextEvent) {
// find where the PolicyTool gui is
Point location = tw.getLocationOnScreen();
setBounds(location.x + 75, location.y + 100, 400, 150);
setLayout(new GridBagLayout());
// ask the user if they want to over write the existing file
MessageFormat form = new MessageFormat(PolicyTool.rb.getString
("OK.to.overwrite.existing.file.filename."));
Object[] source = {filename};
Label label = new Label(form.format(source));
tw.addNewComponent(this, label, OW_LABEL,
0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.BOTH,
tw.TOP_PADDING);
// OK button
Button button = new Button(PolicyTool.rb.getString("OK"));
button.addActionListener(new OverWriteFileOKButtonListener
(tool, tw, this, filename, nextEvent));
tw.addNewComponent(this, button, OW_OK_BUTTON,
0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
tw.TOP_PADDING);
// Cancel button
// -- if the user hits cancel, do NOT go on to the next event
button = new Button(PolicyTool.rb.getString("Cancel"));
button.addActionListener(new CancelButtonListener(this));
tw.addNewComponent(this, button, OW_CANCEL_BUTTON,
1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.VERTICAL,
tw.TOP_PADDING);
setVisible(true);
}
/**
* pop up a dialog so the user can enter info to add a new PolicyEntry
* - if edit is TRUE, then the user is editing an existing entry
@ -2339,47 +2296,39 @@ class ToolDialog extends Dialog {
return;
// get the entered filename
String filename = new String(fd.getDirectory() + fd.getFile());
File saveAsFile = new File(fd.getDirectory(), fd.getFile());
String filename = saveAsFile.getPath();
fd.dispose();
// see if the file already exists
File saveAsFile = new File(filename);
if (saveAsFile.exists()) {
// display a dialog box for the user to enter policy info
ToolDialog td = new ToolDialog
(PolicyTool.rb.getString("Overwrite.File"), tool, tw, true);
td.displayOverWriteFileDialog(filename, nextEvent);
} else {
try {
// save the policy entries to a file
tool.savePolicy(filename);
try {
// save the policy entries to a file
tool.savePolicy(filename);
// display status
MessageFormat form = new MessageFormat(PolicyTool.rb.getString
("Policy.successfully.written.to.filename"));
Object[] source = {filename};
tw.displayStatusDialog(null, form.format(source));
// display status
MessageFormat form = new MessageFormat(PolicyTool.rb.getString
("Policy.successfully.written.to.filename"));
Object[] source = {filename};
tw.displayStatusDialog(null, form.format(source));
// display the new policy filename
TextField newFilename = (TextField)tw.getComponent
(tw.MW_FILENAME_TEXTFIELD);
newFilename.setText(filename);
tw.setVisible(true);
// display the new policy filename
TextField newFilename = (TextField)tw.getComponent
(tw.MW_FILENAME_TEXTFIELD);
newFilename.setText(filename);
tw.setVisible(true);
// now continue with the originally requested command
// (QUIT, NEW, or OPEN)
userSaveContinue(tool, tw, this, nextEvent);
// now continue with the originally requested command
// (QUIT, NEW, or OPEN)
userSaveContinue(tool, tw, this, nextEvent);
} catch (FileNotFoundException fnfe) {
if (filename == null || filename.equals("")) {
tw.displayErrorDialog(null, new FileNotFoundException
(PolicyTool.rb.getString("null.filename")));
} else {
tw.displayErrorDialog(null, fnfe);
}
} catch (Exception ee) {
tw.displayErrorDialog(null, ee);
} catch (FileNotFoundException fnfe) {
if (filename == null || filename.equals("")) {
tw.displayErrorDialog(null, new FileNotFoundException
(PolicyTool.rb.getString("null.filename")));
} else {
tw.displayErrorDialog(null, fnfe);
}
} catch (Exception ee) {
tw.displayErrorDialog(null, ee);
}
}
@ -2494,7 +2443,7 @@ class ToolDialog extends Dialog {
return;
// get the entered filename
String policyFile = new String(fd.getDirectory() + fd.getFile());
String policyFile = new File(fd.getDirectory(), fd.getFile()).getPath();
try {
// open the policy file
@ -2861,67 +2810,6 @@ class MainWindowListener implements ActionListener {
}
}
/**
* Event handler for OverWriteFileOKButton button
*/
class OverWriteFileOKButtonListener implements ActionListener {
private PolicyTool tool;
private ToolWindow tw;
private ToolDialog td;
private String filename;
private int nextEvent;
OverWriteFileOKButtonListener(PolicyTool tool, ToolWindow tw,
ToolDialog td, String filename, int nextEvent) {
this.tool = tool;
this.tw = tw;
this.td = td;
this.filename = filename;
this.nextEvent = nextEvent;
}
public void actionPerformed(ActionEvent e) {
try {
// save the policy entries to a file
tool.savePolicy(filename);
// display status
MessageFormat form = new MessageFormat
(PolicyTool.rb.getString
("Policy.successfully.written.to.filename"));
Object[] source = {filename};
tw.displayStatusDialog(null, form.format(source));
// display the new policy filename
TextField newFilename = (TextField)tw.getComponent
(tw.MW_FILENAME_TEXTFIELD);
newFilename.setText(filename);
tw.setVisible(true);
// now continue with the originally requested command
// (QUIT, NEW, or OPEN)
td.setVisible(false);
td.dispose();
td.userSaveContinue(tool, tw, td, nextEvent);
} catch (FileNotFoundException fnfe) {
if (filename == null || filename.equals("")) {
tw.displayErrorDialog(null, new FileNotFoundException
(PolicyTool.rb.getString("null.filename")));
} else {
tw.displayErrorDialog(null, fnfe);
}
td.setVisible(false);
td.dispose();
} catch (Exception ee) {
tw.displayErrorDialog(null, ee);
td.setVisible(false);
td.dispose();
}
}
}
/**
* Event handler for AddEntryDoneButton button
*

View File

@ -44,6 +44,16 @@ public class ManifestEntryVerifier {
private static final Debug debug = Debug.getInstance("jar");
/**
* Holder class to lazily load Sun provider. NOTE: if
* Providers.getSunProvider returned a cached provider, we could avoid the
* need for caching the provider with this holder class; we should try to
* revisit this in JDK 8.
*/
private static class SunProviderHolder {
private static final Provider instance = Providers.getSunProvider();
}
/** the created digest objects */
HashMap<String, MessageDigest> createdDigests;
@ -125,7 +135,7 @@ public class ManifestEntryVerifier {
try {
digest = MessageDigest.getInstance
(algorithm, Providers.getSunProvider());
(algorithm, SunProviderHolder.instance);
createdDigests.put(algorithm, digest);
} catch (NoSuchAlgorithmException nsae) {
// ignore

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2010, 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
@ -1472,19 +1472,9 @@ public final class NormalizerImpl {
}
--remove;
}
} else if(value2!=0) {
/* the composition is longer than the starter,
* move the intermediate characters back one */
} else if(value2!=0) { // for U+1109A, U+1109C, and U+110AB
starterIsSupplementary=true;
/* temporarily increment for the loop boundary */
++starter;
q=remove;
r=++remove;
while(starter<q) {
args.source[--r]=args.source[--q];
}
args.source[starter]=(char)value2;
--starter; /* undo the temporary increment */
args.source[starter+1]=(char)value2;
/* } else { both are on the BMP, nothing more to do */
}

View File

@ -1,7 +1,7 @@
<title>Nervous Text 1.1</title>
<hr>
<applet code="NervousText.class" width=534 height=50>
<param name=text value="Java^T^M 2 SDK, Standard Edition 6.0">
<param name=text value="Java SE Development Kit (JDK) 7.0">
</applet>
<hr>
<a href="NervousText.java">The source.</a>

View File

@ -75,7 +75,8 @@ public class J2DBench {
static JFrame guiFrame;
static final SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy 'at' HH:mm aaa z");
static final SimpleDateFormat sdf =
new SimpleDateFormat("MM.dd.yyyy 'at' HH:mm aaa z");
public static void init() {
progoptroot = new Group("prog", "Program Options");
@ -176,6 +177,8 @@ public class J2DBench {
public static void main(String argv[]) {
init();
TestEnvironment.init();
Result.init();
Destinations.init();
GraphicsTests.init();
RenderTests.init();
@ -323,7 +326,7 @@ public class J2DBench {
} else if (type.equalsIgnoreCase("m")) {
multiplyWith = 60;
} else {
System.out.println("Invalid \"-loop\" option specified.");
System.err.println("Invalid \"-loop\" option specified.");
usage(1);
}
@ -331,32 +334,20 @@ public class J2DBench {
try {
val = Integer.parseInt(argv[i].substring(0, argv[i].length() - 1));
} catch(Exception e) {
System.out.println("Invalid \"-loop\" option specified.");
System.err.println("Invalid \"-loop\" option specified.");
usage(1);
}
requiredLoopTime = val * multiplyWith * 1000;
}
} else if (arg.length() > 7 &&
arg.substring(0, 7).equalsIgnoreCase("-report"))
{
for (int j = 7; j < arg.length(); j++) {
char c = arg.charAt(j);
switch (c) {
case 'N': Result.unitScale = Result.UNITS_WHOLE; break;
case 'M': Result.unitScale = Result.UNITS_MILLIONS; break;
case 'K': Result.unitScale = Result.UNITS_THOUSANDS; break;
case 'A': Result.unitScale = Result.UNITS_AUTO; break;
case 'U': Result.useUnits = true; break;
case 'O': Result.useUnits = false; break;
case 's': Result.timeScale = Result.SECONDS_WHOLE; break;
case 'm': Result.timeScale = Result.SECONDS_MILLIS; break;
case 'u': Result.timeScale = Result.SECONDS_MICROS; break;
case 'n': Result.timeScale = Result.SECONDS_NANOS; break;
case 'a': Result.timeScale = Result.SECONDS_AUTO; break;
case '/': Result.invertRate = !Result.invertRate; break;
}
} else if (arg.length() > 8 &&
arg.substring(0, 8).equalsIgnoreCase("-report:"))
{
String error = Result.parseRateOpt(arg.substring(8));
if (error != null) {
System.err.println("Invalid rate: "+error);
usage(1);
}
} else {
String reason = Group.root.setOption(arg);
@ -411,7 +402,7 @@ public class J2DBench {
writer.flush();
} catch(IOException ioe) {
ioe.printStackTrace();
System.out.println("\nERROR : Could not create Loop-Report. Exit");
System.err.println("\nERROR : Could not create Loop-Report. Exit");
System.exit(1);
}
}
@ -466,7 +457,7 @@ public class J2DBench {
} while(J2DBench.looping);
if(J2DBench.looping) {
if (J2DBench.looping) {
writer.println("</html>");
writer.flush();
writer.close();

View File

@ -170,7 +170,7 @@ public abstract class Option extends Node implements Modifier {
updateGUI();
jcb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == e.SELECTED) {
if (e.getStateChange() == ItemEvent.SELECTED) {
JComboBox jcb = (JComboBox) e.getItemSelectable();
value = jcb.getSelectedIndex();
if (J2DBench.verbose.isEnabled()) {
@ -261,7 +261,7 @@ public abstract class Option extends Node implements Modifier {
updateGUI();
jcb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
value = (e.getStateChange() == e.SELECTED);
value = (e.getStateChange() == ItemEvent.SELECTED);
if (J2DBench.verbose.isEnabled()) {
System.out.println(getOptionString());
}
@ -569,8 +569,6 @@ public abstract class Option extends Node implements Modifier {
}
public String setValueFromString(String value) {
int prev = 0;
int next = 0;
int enabled = 0;
StringTokenizer st = new StringTokenizer(value, ",");
while (st.hasMoreTokens()) {
@ -588,7 +586,6 @@ public abstract class Option extends Node implements Modifier {
if (s != null) {
return "Bad value in list ("+s+")";
}
prev = next+1;
}
this.enabled = enabled;
updateGUI();
@ -623,6 +620,175 @@ public abstract class Option extends Node implements Modifier {
}
}
public static class ObjectChoice extends Option {
int size;
String optionnames[];
Object optionvalues[];
String abbrevnames[];
String descnames[];
int defaultselected;
int selected;
JPanel jp;
JComboBox jcombo;
public ObjectChoice(Group parent, String nodeName, String description,
String optionnames[],
Object optionvalues[],
String abbrevnames[],
String descnames[],
int defaultselected)
{
this(parent, nodeName, description,
Math.min(Math.min(optionnames.length,
optionvalues.length),
Math.min(abbrevnames.length,
descnames.length)),
optionnames, optionvalues,
abbrevnames, descnames, defaultselected);
}
public ObjectChoice(Group parent, String nodeName, String description,
int size,
String optionnames[],
Object optionvalues[],
String abbrevnames[],
String descnames[],
int defaultselected)
{
super(parent, nodeName, description);
this.size = size;
this.optionnames = trim(optionnames, size);
this.optionvalues = trim(optionvalues, size);
this.abbrevnames = trim(abbrevnames, size);
this.descnames = trim(descnames, size);
this.selected = this.defaultselected = defaultselected;
}
private static String[] trim(String list[], int size) {
if (list.length == size) {
return list;
}
String newlist[] = new String[size];
System.arraycopy(list, 0, newlist, 0, size);
return newlist;
}
private static Object[] trim(Object list[], int size) {
if (list.length == size) {
return list;
}
Object newlist[] = new Object[size];
System.arraycopy(list, 0, newlist, 0, size);
return newlist;
}
public void restoreDefault() {
if (selected != defaultselected) {
selected = defaultselected;
updateGUI();
}
}
public void updateGUI() {
if (jcombo != null) {
jcombo.setSelectedIndex(this.selected);
}
}
public boolean isDefault() {
return (selected == defaultselected);
}
public Modifier.Iterator getIterator(TestEnvironment env) {
return new SwitchIterator(optionvalues, 1 << selected);
}
public JComponent getJComponent() {
if (jp == null) {
jp = new JPanel();
jp.setLayout(new BorderLayout());
jp.add(new JLabel(getDescription()), BorderLayout.WEST);
jcombo = new JComboBox(descnames);
updateGUI();
jcombo.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
selected = jcombo.getSelectedIndex();
if (J2DBench.verbose.isEnabled()) {
System.out.println(getOptionString());
}
}
}
});
jp.add(jcombo, BorderLayout.EAST);
}
return jp;
}
public Object getValue() {
return optionvalues[selected];
}
public int getIntValue() {
return ((Integer) optionvalues[selected]).intValue();
}
public boolean getBooleanValue() {
return ((Boolean) optionvalues[selected]).booleanValue();
}
public String getValString() {
return optionnames[selected];
}
int findValueIndex(Object value) {
for (int i = 0; i < size; i++) {
if (optionvalues[i] == value) {
return i;
}
}
return -1;
}
public String getValString(Object value) {
return optionnames[findValueIndex(value)];
}
public String getAbbreviatedModifierDescription(Object value) {
return abbrevnames[findValueIndex(value)];
}
public String setValue(int v) {
return setValue(new Integer(v));
}
public String setValue(boolean v) {
return setValue(new Boolean(v));
}
public String setValue(Object value) {
for (int i = 0; i < size; i++) {
if (optionvalues[i].equals(value)) {
this.selected = i;
updateGUI();
return null;
}
}
return "Bad value";
}
public String setValueFromString(String value) {
for (int i = 0; i < size; i++) {
if (optionnames[i].equals(value)) {
this.selected = i;
updateGUI();
return null;
}
}
return "Bad value";
}
}
public static class BooleanIterator implements Modifier.Iterator {
private Boolean list[];
private int index;

View File

@ -35,23 +35,199 @@ import java.util.Vector;
import java.util.Hashtable;
import java.util.Enumeration;
import java.io.PrintWriter;
import java.util.HashMap;
public class Result {
public static final int UNITS_WHOLE = 0;
public static final int UNITS_THOUSANDS = 1;
public static final int UNITS_MILLIONS = 2;
public static final int UNITS_AUTO = 3;
public static final int RATE_UNKNOWN = 0;
public static final int SECONDS_WHOLE = 0;
public static final int SECONDS_MILLIS = 1;
public static final int SECONDS_MICROS = 2;
public static final int SECONDS_NANOS = 3;
public static final int SECONDS_AUTO = 4;
public static final int WORK_OPS = 1;
public static final int WORK_UNITS = 2;
public static final int WORK_THOUSANDS = 4;
public static final int WORK_MILLIONS = 6;
public static final int WORK_AUTO = 8;
public static int unitScale = UNITS_WHOLE;
public static int timeScale = SECONDS_WHOLE;
public static boolean useUnits = true;
public static boolean invertRate = false;
public static final int TIME_SECONDS = 10;
public static final int TIME_MILLIS = 11;
public static final int TIME_MICROS = 12;
public static final int TIME_NANOS = 13;
public static final int TIME_AUTO = 14;
static Group resultoptroot;
static Option.ObjectChoice timeOpt;
static Option.ObjectChoice workOpt;
static Option.ObjectChoice rateOpt;
public static void init() {
resultoptroot = new Group(TestEnvironment.globaloptroot,
"results", "Result Options");
String workStrings[] = {
"units",
"kilounits",
"megaunits",
"autounits",
"ops",
"kiloops",
"megaops",
"autoops",
};
String workDescriptions[] = {
"Test Units",
"Thousands of Test Units",
"Millions of Test Units",
"Auto-scaled Test Units",
"Operations",
"Thousands of Operations",
"Millions of Operations",
"Auto-scaled Operations",
};
Integer workObjects[] = {
new Integer(WORK_UNITS),
new Integer(WORK_THOUSANDS),
new Integer(WORK_MILLIONS),
new Integer(WORK_AUTO),
new Integer(WORK_OPS | WORK_UNITS),
new Integer(WORK_OPS | WORK_THOUSANDS),
new Integer(WORK_OPS | WORK_MILLIONS),
new Integer(WORK_OPS | WORK_AUTO),
};
workOpt = new Option.ObjectChoice(resultoptroot,
"workunits", "Work Units",
workStrings, workObjects,
workStrings, workDescriptions,
0);
String timeStrings[] = {
"sec",
"msec",
"usec",
"nsec",
"autosec",
};
String timeDescriptions[] = {
"Seconds",
"Milliseconds",
"Microseconds",
"Nanoseconds",
"Auto-scaled seconds",
};
Integer timeObjects[] = {
new Integer(TIME_SECONDS),
new Integer(TIME_MILLIS),
new Integer(TIME_MICROS),
new Integer(TIME_NANOS),
new Integer(TIME_AUTO),
};
timeOpt = new Option.ObjectChoice(resultoptroot,
"timeunits", "Time Units",
timeStrings, timeObjects,
timeStrings, timeDescriptions,
0);
String rateStrings[] = {
"unitspersec",
"secsperunit",
};
String rateDescriptions[] = {
"Work units per Time",
"Time units per Work",
};
Boolean rateObjects[] = {
Boolean.FALSE,
Boolean.TRUE,
};
rateOpt = new Option.ObjectChoice(resultoptroot,
"ratio", "Rate Ratio",
rateStrings, rateObjects,
rateStrings, rateDescriptions,
0);
}
public static boolean isTimeUnit(int unit) {
return (unit >= TIME_SECONDS && unit <= TIME_AUTO);
}
public static boolean isWorkUnit(int unit) {
return (unit >= WORK_OPS && unit <= (WORK_AUTO | WORK_OPS));
}
public static String parseRateOpt(String opt) {
int timeScale = timeOpt.getIntValue();
int workScale = workOpt.getIntValue();
boolean invertRate = rateOpt.getBooleanValue();
int divindex = opt.indexOf('/');
if (divindex < 0) {
int unit = parseUnit(opt);
if (isTimeUnit(unit)) {
timeScale = unit;
} else if (isWorkUnit(unit)) {
workScale = unit;
} else {
return "Bad unit: "+opt;
}
} else {
int unit1 = parseUnit(opt.substring(0,divindex));
int unit2 = parseUnit(opt.substring(divindex+1));
if (isTimeUnit(unit1)) {
if (isWorkUnit(unit2)) {
timeScale = unit1;
workScale = unit2;
invertRate = true;
} else if (isTimeUnit(unit2)) {
return "Both time units: "+opt;
} else {
return "Bad denominator: "+opt;
}
} else if (isWorkUnit(unit1)) {
if (isWorkUnit(unit2)) {
return "Both work units: "+opt;
} else if (isTimeUnit(unit2)) {
timeScale = unit2;
workScale = unit1;
invertRate = false;
} else {
return "Bad denominator: "+opt;
}
} else {
return "Bad numerator: "+opt;
}
}
timeOpt.setValue(timeScale);
workOpt.setValue(workScale);
rateOpt.setValue(invertRate);
return null;
}
private static HashMap unitMap;
static {
unitMap = new HashMap();
unitMap.put("U", new Integer(WORK_UNITS));
unitMap.put("M", new Integer(WORK_MILLIONS));
unitMap.put("K", new Integer(WORK_THOUSANDS));
unitMap.put("A", new Integer(WORK_AUTO));
unitMap.put("MU", new Integer(WORK_MILLIONS));
unitMap.put("KU", new Integer(WORK_THOUSANDS));
unitMap.put("AU", new Integer(WORK_AUTO));
unitMap.put("O", new Integer(WORK_UNITS | WORK_OPS));
unitMap.put("NO", new Integer(WORK_UNITS | WORK_OPS));
unitMap.put("MO", new Integer(WORK_MILLIONS | WORK_OPS));
unitMap.put("KO", new Integer(WORK_THOUSANDS | WORK_OPS));
unitMap.put("AO", new Integer(WORK_AUTO | WORK_OPS));
unitMap.put("s", new Integer(TIME_SECONDS));
unitMap.put("m", new Integer(TIME_MILLIS));
unitMap.put("u", new Integer(TIME_MICROS));
unitMap.put("n", new Integer(TIME_NANOS));
unitMap.put("a", new Integer(TIME_AUTO));
}
public static int parseUnit(String c) {
Integer u = (Integer) unitMap.get(c);
if (u != null) {
return u.intValue();
}
return RATE_UNKNOWN;
}
String unitname = "unit";
Test test;
@ -157,69 +333,76 @@ public class Result {
}
public String getAverageString() {
double units = (useUnits ? getTotalUnits() : getTotalReps());
int timeScale = timeOpt.getIntValue();
int workScale = workOpt.getIntValue();
boolean invertRate = rateOpt.getBooleanValue();
double time = getTotalTime();
String timeprefix = "";
switch (timeScale) {
case TIME_AUTO:
case TIME_SECONDS:
time /= 1000;
break;
case TIME_MILLIS:
timeprefix = "m";
break;
case TIME_MICROS:
time *= 1000.0;
timeprefix = "u";
break;
case TIME_NANOS:
time *= 1000000.0;
timeprefix = "n";
break;
}
String workprefix = "";
boolean isOps = (workScale & WORK_OPS) != 0;
String workname = isOps ? "op" : unitname;
double work = isOps ? getTotalReps() : getTotalUnits();
switch (workScale & (~WORK_OPS)) {
case WORK_AUTO:
case WORK_UNITS:
break;
case WORK_THOUSANDS:
work /= 1000.0;
workprefix = "K";
break;
case WORK_MILLIONS:
work /= 1000000.0;
workprefix = "M";
break;
}
if (invertRate) {
double rate = time / units;
String prefix = "";
switch (timeScale) {
case SECONDS_WHOLE:
rate /= 1000;
break;
case SECONDS_MILLIS:
prefix = "m";
break;
case SECONDS_MICROS:
rate *= 1000.0;
prefix = "u";
break;
case SECONDS_NANOS:
rate *= 1000000.0;
prefix = "n";
break;
case SECONDS_AUTO:
rate /= 1000.0;
double rate = time / work;
if (timeScale == TIME_AUTO) {
if (rate < 1.0) {
rate *= 1000.0;
prefix = "m";
timeprefix = "m";
if (rate < 1.0) {
rate *= 1000.0;
prefix = "u";
timeprefix = "u";
if (rate < 1.0) {
rate *= 1000.0;
prefix = "n";
timeprefix = "n";
}
}
}
break;
}
return rate+" "+prefix+"secs/"+(useUnits ? unitname : "op");
return rate+" "+timeprefix+"secs/"+workprefix+workname;
} else {
double rate = units / (time / 1000.0);
String prefix = "";
switch (unitScale) {
case UNITS_WHOLE:
break;
case UNITS_THOUSANDS:
rate /= 1000.0;
prefix = "K";
break;
case UNITS_MILLIONS:
rate /= 1000000.0;
prefix = "M";
break;
case UNITS_AUTO:
double rate = work / time;
if (workScale == WORK_AUTO) {
if (rate > 1000.0) {
rate /= 1000.0;
prefix = "K";
workprefix = "K";
if (rate > 1000.0) {
rate /= 1000.0;
prefix = "M";
workprefix = "M";
}
}
break;
}
return rate+" "+prefix+(useUnits ? unitname : "op")+"s/sec";
return rate+" "+workprefix+workname+"s/"+timeprefix+"sec";
}
}

View File

@ -61,6 +61,8 @@ public class J2DAnalyzer {
"the following result sets are combined into a group");
out.println(" -NoGroup "+
"the following result sets stand on their own");
out.println(" -ShowUncontested "+
"show results even when only result set has a result");
out.println(" -Graph "+
"graph the results visually (using lines of *'s)");
out.println(" -Best "+
@ -83,6 +85,7 @@ public class J2DAnalyzer {
public static void main(String argv[]) {
boolean gavehelp = false;
boolean graph = false;
boolean ignoreuncontested = true;
if (argv.length > 0 && argv[0].equalsIgnoreCase("-html")) {
String newargs[] = new String[argv.length-1];
System.arraycopy(argv, 1, newargs, 0, newargs.length);
@ -97,6 +100,8 @@ public class J2DAnalyzer {
results.add(groupHolder);
} else if (arg.equalsIgnoreCase("-NoGroup")) {
groupHolder = null;
} else if (arg.equalsIgnoreCase("-ShowUncontested")) {
ignoreuncontested = false;
} else if (arg.equalsIgnoreCase("-Graph")) {
graph = true;
} else if (arg.equalsIgnoreCase("-Best")) {
@ -171,18 +176,23 @@ public class J2DAnalyzer {
String key = keys[k];
ResultHolder rh = base.getResultByKey(key);
double score = rh.getScore();
System.out.println(rh.getShortKey()+":");
double maxscore = score;
if (graph) {
for (int i = 0; i < numsets; i++) {
ResultSetHolder rsh =
(ResultSetHolder) results.elementAt(i);
ResultHolder rh2 = rsh.getResultByKey(key);
if (rh2 != null) {
int numcontesting = 0;
for (int i = 0; i < numsets; i++) {
ResultSetHolder rsh =
(ResultSetHolder) results.elementAt(i);
ResultHolder rh2 = rsh.getResultByKey(key);
if (rh2 != null) {
if (graph) {
maxscore = Math.max(maxscore, rh2.getBestScore());
}
numcontesting++;
}
}
if (ignoreuncontested && numcontesting < 2) {
continue;
}
System.out.println(rh.getShortKey()+":");
for (int i = 0; i < numsets; i++) {
ResultSetHolder rsh = (ResultSetHolder) results.elementAt(i);
System.out.print(rsh.getTitle()+": ");

View File

@ -38,6 +38,8 @@ import java.awt.RenderingHints;
import java.awt.Polygon;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.geom.Point2D;
import java.awt.geom.AffineTransform;
import java.lang.reflect.Field;
import j2dbench.Destinations;
@ -74,6 +76,7 @@ public abstract class GraphicsTests extends Test {
static Option animList;
static Option sizeList;
static Option compRules;
static Option transforms;
static Option doExtraAlpha;
static Option doXor;
static Option doClipping;
@ -167,6 +170,29 @@ public abstract class GraphicsTests extends Test {
j, rulenames, rules, rulenames,
ruledescs, (1 << defrule));
((Option.ObjectList) compRules).setNumRows(4);
Transform xforms[] = {
Identity.instance,
FTranslate.instance,
Scale2x2.instance,
Rotate15.instance,
ShearX.instance,
ShearY.instance,
};
String xformnames[] = new String[xforms.length];
String xformdescs[] = new String[xforms.length];
for (int i = 0; i < xforms.length; i++) {
xformnames[i] = xforms[i].getShortName();
xformdescs[i] = xforms[i].getDescription();
}
transforms =
new Option.ObjectList(groptroot, "transform",
"Affine Transform",
xforms.length,
xformnames, xforms, xformnames,
xformdescs, 0x1);
((Option.ObjectList) transforms).setNumRows(3);
doExtraAlpha =
new Option.Toggle(groptroot, "extraalpha",
"Render with an \"extra alpha\" of 0.125",
@ -200,6 +226,7 @@ public abstract class GraphicsTests extends Test {
int orgX, orgY;
int initX, initY;
int maxX, maxY;
double pixscale;
}
public GraphicsTests(Group parent, String nodeName, String description) {
@ -211,7 +238,7 @@ public abstract class GraphicsTests extends Test {
public Object initTest(TestEnvironment env, Result result) {
Context ctx = createContext();
initContext(env, ctx);
result.setUnits(pixelsTouched(ctx));
result.setUnits((int) (ctx.pixscale * pixelsTouched(ctx)));
result.setUnitName("pixel");
return ctx;
}
@ -232,6 +259,9 @@ public abstract class GraphicsTests extends Test {
ctx.graphics = env.getGraphics();
int w = env.getWidth();
int h = env.getHeight();
ctx.size = env.getIntValue(sizeList);
ctx.outdim = getOutputSize(ctx.size, ctx.size);
ctx.pixscale = 1.0;
if (hasGraphics2D) {
Graphics2D g2d = (Graphics2D) ctx.graphics;
AlphaComposite ac = (AlphaComposite) env.getModifier(compRules);
@ -251,11 +281,14 @@ public abstract class GraphicsTests extends Test {
p.addPoint(0, 0);
g2d.clip(p);
}
Transform tx = (Transform) env.getModifier(transforms);
Dimension envdim = new Dimension(w, h);
tx.init(g2d, ctx, envdim);
w = envdim.width;
h = envdim.height;
g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
env.getModifier(renderHint));
}
ctx.size = env.getIntValue(sizeList);
ctx.outdim = getOutputSize(ctx.size, ctx.size);
switch (env.getIntValue(animList)) {
case 0:
ctx.animate = false;
@ -290,4 +323,201 @@ public abstract class GraphicsTests extends Test {
graphics.dispose();
((Context) ctx).graphics = null;
}
public abstract static class Transform {
public abstract String getShortName();
public abstract String getDescription();
public abstract void init(Graphics2D g2d, Context ctx, Dimension dim);
public static double scaleForPoint(AffineTransform at,
double xorig, double yorig,
double x, double y,
int w, int h)
{
Point2D.Double ptd = new Point2D.Double(x, y);
at.transform(ptd, ptd);
x = ptd.getX();
y = ptd.getY();
double scale = 1.0;
if (x < 0) {
scale = Math.min(scale, xorig / (xorig - x));
} else if (x > w) {
scale = Math.min(scale, (w - xorig) / (x - xorig));
}
if (y < 0) {
scale = Math.min(scale, yorig / (yorig - y));
} else if (y > h) {
scale = Math.min(scale, (h - yorig) / (y - yorig));
}
return scale;
}
public static Dimension scaleForTransform(AffineTransform at,
Dimension dim)
{
int w = dim.width;
int h = dim.height;
Point2D.Double ptd = new Point2D.Double(0, 0);
at.transform(ptd, ptd);
double ox = ptd.getX();
double oy = ptd.getY();
if (ox < 0 || ox > w || oy < 0 || oy > h) {
throw new InternalError("origin outside destination");
}
double scalex = scaleForPoint(at, ox, oy, w, h, w, h);
double scaley = scalex;
scalex = Math.min(scaleForPoint(at, ox, oy, w, 0, w, h), scalex);
scaley = Math.min(scaleForPoint(at, ox, oy, 0, h, w, h), scaley);
if (scalex < 0 || scaley < 0) {
throw new InternalError("could not fit dims to transform");
}
return new Dimension((int) Math.floor(w * scalex),
(int) Math.floor(h * scaley));
}
}
public static class Identity extends Transform {
public static final Identity instance = new Identity();
private Identity() {}
public String getShortName() {
return "ident";
}
public String getDescription() {
return "Identity";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
}
}
public static class FTranslate extends Transform {
public static final FTranslate instance = new FTranslate();
private FTranslate() {}
public String getShortName() {
return "ftrans";
}
public String getDescription() {
return "FTranslate 1.5";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
int w = dim.width;
int h = dim.height;
AffineTransform at = new AffineTransform();
at.translate(1.5, 1.5);
g2d.transform(at);
dim.setSize(w-3, h-3);
}
}
public static class Scale2x2 extends Transform {
public static final Scale2x2 instance = new Scale2x2();
private Scale2x2() {}
public String getShortName() {
return "scale2x2";
}
public String getDescription() {
return "Scale 2x by 2x";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
int w = dim.width;
int h = dim.height;
AffineTransform at = new AffineTransform();
at.scale(2.0, 2.0);
g2d.transform(at);
dim.setSize(w/2, h/2);
ctx.pixscale = 4;
}
}
public static class Rotate15 extends Transform {
public static final Rotate15 instance = new Rotate15();
private Rotate15() {}
public String getShortName() {
return "rot15";
}
public String getDescription() {
return "Rotate 15 degrees";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
int w = dim.width;
int h = dim.height;
double theta = Math.toRadians(15);
double cos = Math.cos(theta);
double sin = Math.sin(theta);
double xsize = sin * h + cos * w;
double ysize = sin * w + cos * h;
double scale = Math.min(w / xsize, h / ysize);
xsize *= scale;
ysize *= scale;
AffineTransform at = new AffineTransform();
at.translate((w - xsize) / 2.0, (h - ysize) / 2.0);
at.translate(sin * h * scale, 0.0);
at.rotate(theta);
g2d.transform(at);
dim.setSize(scaleForTransform(at, dim));
}
}
public static class ShearX extends Transform {
public static final ShearX instance = new ShearX();
private ShearX() {}
public String getShortName() {
return "shearx";
}
public String getDescription() {
return "Shear X to the right";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
int w = dim.width;
int h = dim.height;
AffineTransform at = new AffineTransform();
at.translate(0.0, (h - (w*h)/(w + h*0.1)) / 2);
at.shear(0.1, 0.0);
g2d.transform(at);
dim.setSize(scaleForTransform(at, dim));
}
}
public static class ShearY extends Transform {
public static final ShearY instance = new ShearY();
private ShearY() {}
public String getShortName() {
return "sheary";
}
public String getDescription() {
return "Shear Y down";
}
public void init(Graphics2D g2d, Context ctx, Dimension dim) {
int w = dim.width;
int h = dim.height;
AffineTransform at = new AffineTransform();
at.translate((w - (w*h)/(h + w*0.1)) / 2, 0.0);
at.shear(0.0, 0.1);
g2d.transform(at);
dim.setSize(scaleForTransform(at, dim));
}
}
}

View File

@ -454,7 +454,7 @@ public abstract class TextTests extends Test {
taaNames, taaHints,
taaNames, taaNames,
0x1);
((Option.ObjectList) taaList).setNumRows(2);
((Option.ObjectList) taaList).setNumRows(6);
// add special TextAAOpt for backwards compatibility with
// older options files
new TextAAOpt();
@ -707,3 +707,4 @@ public abstract class TextTests extends Test {
}
}
}

View File

@ -45,12 +45,7 @@ import static java.nio.file.StandardCopyOption.*;
/*
* ZipFileSystem usage demo
*
* java [-cp .../zipfs.jar:./] Demo action ZipfileName [...]
*
* To deploy the provider, either copy the zipfs.jar into JDK/JRE
* extensions directory or add
* <JDK_HOME>/demo/nio/ZipFileSystem/zipfs.jar
* into your class path as showed above.
* java Demo action ZipfileName [...]
*
* @author Xueming Shen
*/
@ -153,14 +148,11 @@ public class Demo {
Action action = Action.valueOf(args[0]);
Map<String, Object> env = env = new HashMap<>();
if (action == Action.create)
env.put("createNew", true);
env.put("create", "true");
if (action == Action.tlist || action == Action.twalk)
env.put("buildDirTree", true);
FileSystem fs = FileSystems.newFileSystem(Paths.get(args[1]), env, null);
FileSystem fs = FileSystems.newFileSystem(
URI.create("zip" + Paths.get(args[1]).toUri().toString().substring(4)),
env,
null);
try {
FileSystem fs2;
Path path, src, dst;
@ -207,19 +199,13 @@ public class Demo {
src.copyTo(dst, COPY_ATTRIBUTES);
break;
case zzmove:
fs2 = FileSystems.newFileSystem(
URI.create("zip" + Paths.get(args[2]).toUri().toString().substring(4)),
env,
null);
fs2 = FileSystems.newFileSystem(Paths.get(args[2]), env, null);
//sf1.getPath(args[3]).moveTo(fs2.getPath(args[3]));
z2zmove(fs, fs2, args[3]);
fs2.close();
break;
case zzcopy:
fs2 = FileSystems.newFileSystem(
URI.create("zip" + Paths.get(args[2]).toUri().toString().substring(4)),
env,
null);
fs2 = FileSystems.newFileSystem(Paths.get(args[2]), env, null);
//sf1.getPath(args[3]).copyTo(fs2.getPath(args[3]));
z2zcopy(fs, fs2, args[3]);
fs2.close();

View File

@ -1,10 +1,6 @@
ZipFileSystem is a file system provider that treats the contents of a zip or
JAR file as a java.nio.file.FileSystem.
To deploy the provider you must copy zipfs.jar into your extensions
directory or else add <JDK_HOME>/demo/nio/zipfs/zipfs.jar
to your class path.
The factory methods defined by the java.nio.file.FileSystems class can be
used to create a FileSystem, eg:
@ -15,9 +11,9 @@ used to create a FileSystem, eg:
-or
// locate file system by URI
// locate file system by the legacy JAR URL syntax
Map<String,?> env = Collections.emptyMap();
URI uri = URI.create("zip:///mydir/foo.jar");
URI uri = URI.create("jar:file:/mydir/foo.jar");
FileSystem fs = FileSystems.newFileSystem(uri, env);
Once a FileSystem is created then classes in the java.nio.file package
@ -26,4 +22,6 @@ can be used to access files in the zip/JAR file, eg:
Path mf = fs.getPath("/META-INF/MANIFEST.MF");
InputStream in = mf.newInputStream();
See Demo.java for more interesting usages.

View File

@ -91,11 +91,11 @@ public class ZipFileSystem extends FileSystem {
throws IOException
{
// configurable env setup
this.createNew = "true".equals(env.get("create"));
this.nameEncoding = env.containsKey("encoding") ?
(String)env.get("encoding") : "UTF-8";
this.buildDirTree = TRUE.equals(env.get("buildDirTreea"));
this.useTempFile = TRUE.equals(env.get("useTempFile"));
this.createNew = TRUE.equals(env.get("createNew"));
this.nameEncoding = env.containsKey("nameEncoding") ?
(String)env.get("nameEncoding") : "UTF-8";
this.defaultDir = env.containsKey("default.dir") ?
(String)env.get("default.dir") : "/";
if (this.defaultDir.charAt(0) != '/')
@ -1176,7 +1176,9 @@ public class ZipFileSystem extends FileSystem {
} else {
os.write(buf, 0, LOCHDR); // write out the loc header
locoff += LOCHDR;
size += LOCNAM(buf) + LOCEXT(buf) + LOCSIZ(buf);
// use e.csize, LOCSIZ(buf) is zero if FLAG_DATADESCR is on
// size += LOCNAM(buf) + LOCEXT(buf) + LOCSIZ(buf);
size += LOCNAM(buf) + LOCEXT(buf) + e.csize;
written = LOCHDR + size;
}
int n;

View File

@ -63,7 +63,7 @@ public class ZipFileSystemProvider extends FileSystemProvider {
@Override
public String getScheme() {
return "zip";
return "jar";
}
protected Path uriToPath(URI uri) {
@ -72,10 +72,14 @@ public class ZipFileSystemProvider extends FileSystemProvider {
throw new IllegalArgumentException("URI scheme is not '" + getScheme() + "'");
}
try {
return Paths.get(new URI("file", uri.getHost(), uri.getPath(), null))
.toAbsolutePath();
// only support legacy JAR URL syntax jar:{uri}!/{entry} for now
String spec = uri.getSchemeSpecificPart();
int sep = spec.indexOf("!/");
if (sep != -1)
spec = spec.substring(0, sep);
return Paths.get(new URI(spec)).toAbsolutePath();
} catch (URISyntaxException e) {
throw new AssertionError(e); //never thrown
throw new IllegalArgumentException(e.getMessage(), e);
}
}
@ -119,14 +123,14 @@ public class ZipFileSystemProvider extends FileSystemProvider {
@Override
public Path getPath(URI uri) {
FileSystem fs = getFileSystem(uri);
String fragment = uri.getFragment();
if (fragment == null) {
String spec = uri.getSchemeSpecificPart();
int sep = spec.indexOf("!/");
if (sep == -1)
throw new IllegalArgumentException("URI: "
+ uri
+ " does not contain path fragment ex. zip:///c:/foo.zip#/BAR");
}
return fs.getPath(fragment);
+ " does not contain path info ex. jar:file:/c:/foo.zip!/BAR");
return getFileSystem(uri).getPath(spec.substring(sep + 1));
}
@Override

View File

@ -33,9 +33,7 @@ package com.sun.nio.zipfs;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import com.sun.nio.zipfs.ZipFileSystem.Entry;
import static com.sun.nio.zipfs.ZipConstants.*;
import static com.sun.nio.zipfs.ZipUtils.*;
@ -172,7 +170,7 @@ public class ZipInfo {
static void printExtra(byte[] extra, int off, int len) {
int end = off + len;
while (off + 4 < end) {
while (off + 4 <= end) {
int tag = SH(extra, off);
int sz = SH(extra, off + 2);
print(" [tag=0x%04x, sz=%d, data= ", tag, sz);

View File

@ -191,13 +191,12 @@ public class ZipPath extends Path {
@Override
public URI toUri() {
String zfPath = zfs.toString();
if (File.separatorChar == '\\') // replace all separators by '/'
zfPath = "/" + zfPath.replace("\\", "/");
try {
return new URI("zip", "",
zfPath,
zfs.getString(toAbsolutePath().path));
return new URI("jar",
zfs.getZipFile().toUri() +
"!" +
zfs.getString(toAbsolutePath().path),
null);
} catch (Exception ex) {
throw new AssertionError(ex);
}

703
jdk/src/share/demo/zipfs Normal file
View File

@ -0,0 +1,703 @@
/*
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.*;
import java.nio.*;
import java.nio.channels.*;
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.net.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import static java.nio.file.StandardOpenOption.*;
import static java.nio.file.StandardCopyOption.*;
/*
* ZipFileSystem usage demo
*
* java Demo action ZipfileName [...]
*
* @author Xueming Shen
*/
public class Demo {
static enum Action {
rename, // <java Demo rename zipfile src dst>
// rename entry src to dst inside zipfile
movein, // <java Demo movein zipfile src dst>
// move an external src file into zipfile
// as entry dst
moveout, // <java Demo moveout zipfile src dst>
// move a zipfile entry src out to dst
copy, // <java Demo copy zipfile src dst>
// copy entry src to dst inside zipfile
copyin, // <java Demo copyin zipfile src dst>
// copy an external src file into zipfile
// as entry dst
copyin_attrs, // <java Demo copyin_attrs zipfile src dst>
// copy an external src file into zipfile
// as entry dst, with attributes (timestamp)
copyout, // <java Demo copyout zipfile src dst>
// copy zipfile entry src" out to file dst
copyout_attrs, // <java Demo copyout_attrs zipfile src dst>
zzmove, // <java Demo zzmove zfsrc zfdst path>
// move entry path/dir from zfsrc to zfdst
zzcopy, // <java Demo zzcopy zfsrc zfdst path>
// copy path from zipfile zfsrc to zipfile
// zfdst
attrs, // <java Demo attrs zipfile path>
// printout the attributes of entry path
attrsspace, // <java Demo attrsspace zipfile path>
// printout the storespace attrs of entry path
setmtime, // <java Demo setmtime zipfile "MM/dd/yy-HH:mm:ss" path...>
// set the lastModifiedTime of entry path
setatime, // <java Demo setatime zipfile "MM/dd/yy-HH:mm:ss" path...>
setctime, // <java Demo setctime zipfile "MM/dd/yy-HH:mm:ss" path...>
lsdir, // <java Demo lsdir zipfile dir>
// list dir's direct child files/dirs
mkdir, // <java Demo mkdir zipfile dir>
mkdirs, // <java Demo mkdirs zipfile dir>
rmdirs, // <java Demo rmdirs zipfile dir>
list, // <java Demo list zipfile [dir]>
// recursively list all entries of dir
// via DirectoryStream
tlist, // <java Demo tlist zipfile [dir]>
// list with buildDirTree=true
vlist, // <java Demo vlist zipfile [dir]>
// recursively verbose list all entries of
// dir via DirectoryStream
walk, // <java Demo walk zipfile [dir]>
// recursively walk all entries of dir
// via Files.walkFileTree
twalk, // <java Demo twalk zipfile [dir]>
// walk with buildDirTree=true
extract, // <java Demo extract zipfile file [...]>
update, // <java Demo extract zipfile file [...]>
delete, // <java Demo delete zipfile file [...]>
add, // <java Demo add zipfile file [...]>
create, // <java Demo create zipfile file [...]>
// create a new zipfile if it doesn't exit
// and then add the file(s) into it.
attrs2, // <java Demo attrs2 zipfile file [...]>
// test different ways to print attrs
prof,
}
public static void main(String[] args) throws Throwable {
Action action = Action.valueOf(args[0]);
Map<String, Object> env = env = new HashMap<>();
if (action == Action.create)
env.put("create", "true");
if (action == Action.tlist || action == Action.twalk)
env.put("buildDirTree", true);
FileSystem fs = FileSystems.newFileSystem(Paths.get(args[1]), env, null);
try {
FileSystem fs2;
Path path, src, dst;
boolean isRename = false;
switch (action) {
case rename:
src = fs.getPath(args[2]);
dst = fs.getPath(args[3]);
src.moveTo(dst);
break;
case moveout:
src = fs.getPath(args[2]);
dst = Paths.get(args[3]);
src.moveTo(dst);
break;
case movein:
src = Paths.get(args[2]);
dst = fs.getPath(args[3]);
src.moveTo(dst);
break;
case copy:
src = fs.getPath(args[2]);
dst = fs.getPath(args[3]);
src.copyTo(dst);
break;
case copyout:
src = fs.getPath(args[2]);
dst = Paths.get(args[3]);
src.copyTo(dst);
break;
case copyin:
src = Paths.get(args[2]);
dst = fs.getPath(args[3]);
src.copyTo(dst);
break;
case copyin_attrs:
src = Paths.get(args[2]);
dst = fs.getPath(args[3]);
src.copyTo(dst, COPY_ATTRIBUTES);
break;
case copyout_attrs:
src = fs.getPath(args[2]);
dst = Paths.get(args[3]);
src.copyTo(dst, COPY_ATTRIBUTES);
break;
case zzmove:
fs2 = FileSystems.newFileSystem(Paths.get(args[2]), env, null);
//sf1.getPath(args[3]).moveTo(fs2.getPath(args[3]));
z2zmove(fs, fs2, args[3]);
fs2.close();
break;
case zzcopy:
fs2 = FileSystems.newFileSystem(Paths.get(args[2]), env, null);
//sf1.getPath(args[3]).copyTo(fs2.getPath(args[3]));
z2zcopy(fs, fs2, args[3]);
fs2.close();
break;
case attrs:
for (int i = 2; i < args.length; i++) {
path = fs.getPath(args[i]);
System.out.println(path);
System.out.println(
Attributes.readBasicFileAttributes(path).toString());
}
break;
case setmtime:
DateFormat df = new SimpleDateFormat("MM/dd/yyyy-HH:mm:ss");
Date newDatetime = df.parse(args[2]);
for (int i = 3; i < args.length; i++) {
path = fs.getPath(args[i]);
path.setAttribute("lastModifiedTime",
FileTime.fromMillis(newDatetime.getTime()));
System.out.println(
Attributes.readBasicFileAttributes(path).toString());
}
break;
case setctime:
df = new SimpleDateFormat("MM/dd/yyyy-HH:mm:ss");
newDatetime = df.parse(args[2]);
for (int i = 3; i < args.length; i++) {
path = fs.getPath(args[i]);
path.setAttribute("creationTime",
FileTime.fromMillis(newDatetime.getTime()));
System.out.println(
Attributes.readBasicFileAttributes(path).toString());
}
break;
case setatime:
df = new SimpleDateFormat("MM/dd/yyyy-HH:mm:ss");
newDatetime = df.parse(args[2]);
for (int i = 3; i < args.length; i++) {
path = fs.getPath(args[i]);
path.setAttribute("lastAccessTime",
FileTime.fromMillis(newDatetime.getTime()));
System.out.println(
Attributes.readBasicFileAttributes(path).toString());
}
break;
case attrsspace:
path = fs.getPath("/");
FileStore fstore = path.getFileStore();
//System.out.println(fstore.getFileStoreAttributeView(FileStoreSpaceAttributeView.class)
// .readAttributes());
// or
System.out.printf("filestore[%s]%n", fstore.name());
System.out.printf(" totalSpace: %d%n",
(Long)fstore.getAttribute("space:totalSpace"));
System.out.printf(" usableSpace: %d%n",
(Long)fstore.getAttribute("space:usableSpace"));
System.out.printf(" unallocSpace: %d%n",
(Long)fstore.getAttribute("space:unallocatedSpace"));
break;
case list:
case tlist:
if (args.length < 3)
list(fs.getPath("/"), false);
else
list(fs.getPath(args[2]), false);
break;
case vlist:
if (args.length < 3)
list(fs.getPath("/"), true);
else
list(fs.getPath(args[2]), true);
break;
case twalk:
case walk:
walk(fs.getPath((args.length > 2)? args[2] : "/"));
break;
case extract:
if (args.length == 2) {
extract(fs, "/");
} else {
for (int i = 2; i < args.length; i++) {
extract(fs, args[i]);
}
}
break;
case delete:
for (int i = 2; i < args.length; i++)
fs.getPath(args[i]).delete();
break;
case create:
case add:
case update:
for (int i = 2; i < args.length; i++) {
update(fs, args[i]);
}
break;
case lsdir:
path = fs.getPath(args[2]);
final String fStr = (args.length > 3)?args[3]:"";
DirectoryStream<Path> ds = path.newDirectoryStream(
new DirectoryStream.Filter<Path>() {
public boolean accept(Path path) {
return path.toString().contains(fStr);
}
});
for (Path p : ds)
System.out.println(p);
break;
case mkdir:
fs.getPath(args[2]).createDirectory();
break;
case mkdirs:
mkdirs(fs.getPath(args[2]));
break;
case attrs2:
for (int i = 2; i < args.length; i++) {
path = fs.getPath(args[i]);
System.out.printf("%n%s%n", path);
System.out.println("-------(1)---------");
System.out.println(
Attributes.readBasicFileAttributes(path).toString());
System.out.println("-------(2)---------");
Map<String, ?> map = path.readAttributes("zip:*");
for (Map.Entry<String, ?> e : map.entrySet()) {
System.out.printf(" %s : %s%n", e.getKey(), e.getValue());
}
System.out.println("-------(3)---------");
map = path.readAttributes("size,lastModifiedTime,isDirectory");
for (Map.Entry<String, ?> e : map.entrySet()) {
System.out.printf(" %s : %s%n", e.getKey(), e.getValue());
}
}
break;
case prof:
list(fs.getPath("/"), false);
while (true) {
Thread.sleep(10000);
//list(fs.getPath("/"), true);
System.out.println("sleeping...");
}
}
} catch (Exception x) {
x.printStackTrace();
} finally {
if (fs != null)
fs.close();
}
}
private static byte[] getBytes(String name) {
return name.getBytes();
}
private static String getString(byte[] name) {
return new String(name);
}
private static void walk(Path path) throws IOException
{
Files.walkFileTree(
path,
new SimpleFileVisitor<Path>() {
private int indent = 0;
private void indent() {
int n = 0;
while (n++ < indent)
System.out.printf(" ");
}
@Override
public FileVisitResult visitFile(Path file,
BasicFileAttributes attrs)
{
indent();
System.out.printf("%s%n", file.getName().toString());
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult preVisitDirectory(Path dir,
BasicFileAttributes attrs)
{
indent();
System.out.printf("[%s]%n", dir.toString());
indent += 2;
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult postVisitDirectory(Path dir,
IOException ioe)
{
indent -= 2;
return FileVisitResult.CONTINUE;
}
});
}
private static void update(FileSystem fs, String path) throws Throwable{
Path src = FileSystems.getDefault().getPath(path);
if (Boolean.TRUE.equals(src.getAttribute("isDirectory"))) {
DirectoryStream<Path> ds = src.newDirectoryStream();
for (Path child : ds)
update(fs, child.toString());
ds.close();
} else {
Path dst = fs.getPath(path);
Path parent = dst.getParent();
if (parent != null && parent.notExists())
mkdirs(parent);
src.copyTo(dst, REPLACE_EXISTING);
}
}
private static void extract(FileSystem fs, String path) throws Throwable{
Path src = fs.getPath(path);
if (Boolean.TRUE.equals(src.getAttribute("isDirectory"))) {
DirectoryStream<Path> ds = src.newDirectoryStream();
for (Path child : ds)
extract(fs, child.toString());
ds.close();
} else {
if (path.startsWith("/"))
path = path.substring(1);
Path dst = FileSystems.getDefault().getPath(path);
Path parent = dst.getParent();
if (parent.notExists())
mkdirs(parent);
src.copyTo(dst, REPLACE_EXISTING);
}
}
// use DirectoryStream
private static void z2zcopy(FileSystem src, FileSystem dst, String path)
throws IOException
{
Path srcPath = src.getPath(path);
Path dstPath = dst.getPath(path);
if (Boolean.TRUE.equals(srcPath.getAttribute("isDirectory"))) {
if (!dstPath.exists()) {
try {
mkdirs(dstPath);
} catch (FileAlreadyExistsException x) {}
}
DirectoryStream<Path> ds = srcPath.newDirectoryStream();
for (Path child : ds) {
z2zcopy(src, dst,
path + (path.endsWith("/")?"":"/") + child.getName());
}
ds.close();
} else {
//System.out.println("copying..." + path);
srcPath.copyTo(dstPath);
}
}
// use TreeWalk to move
private static void z2zmove(FileSystem src, FileSystem dst, String path)
throws IOException
{
final Path srcPath = src.getPath(path).toAbsolutePath();
final Path dstPath = dst.getPath(path).toAbsolutePath();
Files.walkFileTree(srcPath, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file,
BasicFileAttributes attrs)
{
Path dst = srcPath.relativize(file);
dst = dstPath.resolve(dst);
try {
Path parent = dstPath.getParent();
if (parent != null && parent.notExists())
mkdirs(parent);
file.moveTo(dst);
} catch (IOException x) {
x.printStackTrace();
}
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult preVisitDirectory(Path dir,
BasicFileAttributes attrs)
{
Path dst = srcPath.relativize(dir);
dst = dstPath.resolve(dst);
try {
if (dst.notExists())
mkdirs(dst);
} catch (IOException x) {
x.printStackTrace();
}
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult postVisitDirectory(Path dir,
IOException ioe)
throws IOException
{
try {
dir.delete();
} catch (IOException x) {
//x.printStackTrace();
}
return FileVisitResult.CONTINUE;
}
});
}
private static void mkdirs(Path path) throws IOException {
path = path.toAbsolutePath();
Path parent = path.getParent();
if (parent != null) {
if (parent.notExists())
mkdirs(parent);
}
path.createDirectory();
}
private static void rmdirs(Path path) throws IOException {
while (path != null && path.getNameCount() != 0) {
path.delete();
path = path.getParent();
}
}
private static void list(Path path, boolean verbose ) throws IOException {
if (!"/".equals(path.toString())) {
System.out.printf(" %s%n", path.toString());
if (verbose)
System.out.println(Attributes.readBasicFileAttributes(path).toString());
}
if (path.notExists())
return;
if (Attributes.readBasicFileAttributes(path).isDirectory()) {
DirectoryStream<Path> ds = path.newDirectoryStream();
for (Path child : ds)
list(child, verbose);
ds.close();
}
}
// check the content of two paths are equal
private static void checkEqual(Path src, Path dst) throws IOException
{
//System.out.printf("checking <%s> vs <%s>...%n",
// src.toString(), dst.toString());
//streams
InputStream isSrc = src.newInputStream();
InputStream isDst = dst.newInputStream();
byte[] bufSrc = new byte[8192];
byte[] bufDst = new byte[8192];
try {
int nSrc = 0;
while ((nSrc = isSrc.read(bufSrc)) != -1) {
int nDst = 0;
while (nDst < nSrc) {
int n = isDst.read(bufDst, nDst, nSrc - nDst);
if (n == -1) {
System.out.printf("checking <%s> vs <%s>...%n",
src.toString(), dst.toString());
throw new RuntimeException("CHECK FAILED!");
}
nDst += n;
}
while (--nSrc >= 0) {
if (bufSrc[nSrc] != bufDst[nSrc]) {
System.out.printf("checking <%s> vs <%s>...%n",
src.toString(), dst.toString());
throw new RuntimeException("CHECK FAILED!");
}
nSrc--;
}
}
} finally {
isSrc.close();
isDst.close();
}
// channels
SeekableByteChannel chSrc = src.newByteChannel();
SeekableByteChannel chDst = dst.newByteChannel();
if (chSrc.size() != chDst.size()) {
System.out.printf("src[%s].size=%d, dst[%s].size=%d%n",
chSrc.toString(), chSrc.size(),
chDst.toString(), chDst.size());
throw new RuntimeException("CHECK FAILED!");
}
ByteBuffer bbSrc = ByteBuffer.allocate(8192);
ByteBuffer bbDst = ByteBuffer.allocate(8192);
try {
int nSrc = 0;
while ((nSrc = chSrc.read(bbSrc)) != -1) {
int nDst = chDst.read(bbDst);
if (nSrc != nDst) {
System.out.printf("checking <%s> vs <%s>...%n",
src.toString(), dst.toString());
throw new RuntimeException("CHECK FAILED!");
}
while (--nSrc >= 0) {
if (bbSrc.get(nSrc) != bbDst.get(nSrc)) {
System.out.printf("checking <%s> vs <%s>...%n",
src.toString(), dst.toString());
throw new RuntimeException("CHECK FAILED!");
}
nSrc--;
}
bbSrc.flip();
bbDst.flip();
}
} catch (IOException x) {
x.printStackTrace();
} finally {
chSrc.close();
chDst.close();
}
}
private static void fchCopy(Path src, Path dst) throws IOException
{
Set<OpenOption> read = new HashSet<>();
read.add(READ);
Set<OpenOption> openwrite = new HashSet<>();
openwrite.add(CREATE_NEW);
openwrite.add(WRITE);
FileChannel srcFc = src.getFileSystem()
.provider()
.newFileChannel(src, read);
FileChannel dstFc = dst.getFileSystem()
.provider()
.newFileChannel(dst, openwrite);
try {
ByteBuffer bb = ByteBuffer.allocate(8192);
while (srcFc.read(bb) >= 0) {
bb.flip();
dstFc.write(bb);
bb.clear();
}
} finally {
srcFc.close();
dstFc.close();
}
}
private static void chCopy(Path src, Path dst) throws IOException
{
Set<OpenOption> read = new HashSet<>();
read.add(READ);
Set<OpenOption> openwrite = new HashSet<>();
openwrite.add(CREATE_NEW);
openwrite.add(WRITE);
SeekableByteChannel srcCh = src.newByteChannel(read);
SeekableByteChannel dstCh = dst.newByteChannel(openwrite);
try {
ByteBuffer bb = ByteBuffer.allocate(8192);
while (srcCh.read(bb) >= 0) {
bb.flip();
dstCh.write(bb);
bb.clear();
}
} finally {
srcCh.close();
dstCh.close();
}
}
private static void streamCopy(Path src, Path dst) throws IOException
{
InputStream isSrc = src.newInputStream();
OutputStream osDst = dst.newOutputStream();
byte[] buf = new byte[8192];
try {
int n = 0;
while ((n = isSrc.read(buf)) != -1) {
osDst.write(buf, 0, n);
}
} finally {
isSrc.close();
osDst.close();
}
}
}

View File

@ -57,9 +57,12 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
private native void run(String title, int mode, String dir, String file,
FilenameFilter filter, boolean isMultipleMode);
private native void quit();
@Override
public native void toFront();
/**
* Called exclusively by the native C code.
*/

View File

@ -150,6 +150,8 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
void updateChildrenSizes() {
super.updateChildrenSizes();
int height = getMenuBarHeight();
// XWindow.reshape calls XBaseWindow.xSetBounds, which acquires
// the AWT lock, so we have to acquire the AWT lock here
// before getStateLock() to avoid a deadlock with the Toolkit thread
@ -159,7 +161,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
synchronized(getStateLock()) {
int width = dimensions.getClientSize().width;
if (menubarPeer != null) {
menubarPeer.reshape(0, 0, width, getMenuBarHeight());
menubarPeer.reshape(0, 0, width, height);
}
}
} finally {

View File

@ -43,7 +43,7 @@ public class SctpNet {
/* -- Miscellaneous SCTP utilities -- */
static boolean bindxIPv4MappedAddresses() {
private static boolean IPv4MappedAddresses() {
if ("SunOS".equals(osName)) {
/* Solaris supports IPv4Mapped Addresses with bindx */
return true;
@ -87,7 +87,7 @@ public class SctpNet {
static void bindx(int fd, InetAddress[] addrs, int port, boolean add)
throws IOException {
bindx(fd, addrs, port, addrs.length, add,
bindxIPv4MappedAddresses());
IPv4MappedAddresses());
}
static Set<SocketAddress> getLocalAddresses(int fd)
@ -145,11 +145,16 @@ public class SctpNet {
InetSocketAddress netAddr = (InetSocketAddress)addr;
if (name.equals(SCTP_PRIMARY_ADDR)) {
setPrimAddrOption0(fd, assocId,
netAddr.getAddress(), netAddr.getPort());
setPrimAddrOption0(fd,
assocId,
netAddr.getAddress(),
netAddr.getPort());
} else {
setPeerPrimAddrOption0(fd, assocId,
netAddr.getAddress(), netAddr.getPort());
setPeerPrimAddrOption0(fd,
assocId,
netAddr.getAddress(),
netAddr.getPort(),
IPv4MappedAddresses());
}
} else if (name.equals(SCTP_DISABLE_FRAGMENTS) ||
name.equals(SCTP_EXPLICIT_COMPLETE) ||
@ -290,7 +295,7 @@ public class SctpNet {
int port) throws IOException;
static native void setPeerPrimAddrOption0(int fd, int assocId,
InetAddress ia, int port) throws IOException;
InetAddress ia, int port, boolean preferIPv6) throws IOException;
static native SocketAddress getPrimAddrOption0(int fd, int assocId)
throws IOException;

View File

@ -217,15 +217,18 @@ static int ParseLocale(int cat, char ** std_language, char ** std_script,
/* Normalize the language name */
if (std_language != NULL) {
*std_language = "en";
if (language != NULL) {
mapLookup(language_names, language, std_language);
if (language != NULL && mapLookup(language_names, language, std_language) == 0) {
*std_language = malloc(strlen(language)+1);
strcpy(*std_language, language);
}
}
/* Normalize the country name */
if (std_country != NULL && country != NULL) {
*std_country = country;
mapLookup(country_names, country, std_country);
if (mapLookup(country_names, country, std_country) == 0) {
*std_country = malloc(strlen(country)+1);
strcpy(*std_country, country);
}
}
/* Normalize the script and variant name. Note that we only use

View File

@ -87,7 +87,7 @@
"zh", "zh_CN",
#ifdef __linux__
"bokmal", "nb_NO",
"bokm\u00e5l", "nb_NO",
"bokm\xE5l", "nb_NO",
"catalan", "ca_ES",
"croatian", "hr_HR",
"czech", "cs_CZ",
@ -144,203 +144,16 @@
static char *language_names[] = {
"C", "en",
"POSIX", "en",
"aa", "aa",
"ab", "ab",
"ae", "ae",
"af", "af",
"ak", "ak",
"am", "am",
"an", "an",
"ar", "ar",
"as", "as",
"av", "av",
"ay", "ay",
"az", "az",
"ba", "ba",
"be", "be",
"bg", "bg",
"bh", "bh",
"bi", "bi",
"bm", "bm",
"bn", "bn",
"bo", "bo",
"br", "br",
"bs", "bs",
"ca", "ca",
"ce", "ce",
"ch", "ch",
"co", "co",
"cr", "cr",
"cs", "cs",
"cz", "cs",
"cu", "cu",
"cv", "cv",
"cy", "cy",
"da", "da",
"de", "de",
"dv", "dv",
"dz", "dz",
"ee", "ee",
"el", "el",
"en", "en",
"eo", "eo",
"es", "es",
"et", "et",
"eu", "eu",
"fa", "fa",
"ff", "ff",
"fi", "fi",
"fj", "fj",
"fo", "fo",
"fr", "fr",
"fy", "fy",
"ga", "ga",
"gd", "gd",
"gl", "gl",
"gn", "gn",
"gu", "gu",
"gv", "gv",
"ha", "ha",
"he", "iw",
"hi", "hi",
"ho", "ho",
"hr", "hr",
#ifdef __linux__
"hs", "en", // used on Linux, not clear what it stands for
#endif
"ht", "ht",
"hu", "hu",
"hy", "hy",
"hz", "hz",
"ia", "ia",
"id", "in",
"ie", "ie",
"ig", "ig",
"ii", "ii",
"ik", "ik",
"in", "in",
"io", "io",
"is", "is",
"it", "it",
"iu", "iu",
"iw", "iw",
"ja", "ja",
"ji", "yi",
"jv", "jv",
"ka", "ka",
"kg", "kg",
"ki", "ki",
"kj", "kj",
"kk", "kk",
"kl", "kl",
"km", "km",
"kn", "kn",
"ko", "ko",
"kr", "kr",
"ks", "ks",
"ku", "ku",
"kv", "kv",
"kw", "kw",
"ky", "ky",
"la", "la",
"lb", "lb",
"lg", "lg",
"li", "li",
"ln", "ln",
"lo", "lo",
"lt", "lt",
"lu", "lu",
"lv", "lv",
"mg", "mg",
"mh", "mh",
"mi", "mi",
"mk", "mk",
"ml", "ml",
"mn", "mn",
"mo", "mo",
"mr", "mr",
"ms", "ms",
"mt", "mt",
"my", "my",
"na", "na",
"nb", "nb",
"nd", "nd",
"ne", "ne",
"ng", "ng",
"nl", "nl",
"nn", "nn",
"no", "no",
"nr", "nr",
"nv", "nv",
"ny", "ny",
"oc", "oc",
"oj", "oj",
"om", "om",
"or", "or",
"os", "os",
"pa", "pa",
"pi", "pi",
"pl", "pl",
"ps", "ps",
"pt", "pt",
"qu", "qu",
"rm", "rm",
"rn", "rn",
"ro", "ro",
"ru", "ru",
"rw", "rw",
"sa", "sa",
"sc", "sc",
"sd", "sd",
"se", "se",
"sg", "sg",
"sh", "sr", // sh is deprecated
"si", "si",
"sk", "sk",
"sl", "sl",
"sm", "sm",
"sn", "sn",
"so", "so",
"sq", "sq",
"sr", "sr",
"ss", "ss",
"st", "st",
"su", "fi",
"sv", "sv",
"sw", "sw",
"ta", "ta",
"te", "te",
"tg", "tg",
"th", "th",
"ti", "ti",
"tk", "tk",
"tl", "tl",
"tn", "tn",
"to", "to",
"tr", "tr",
"ts", "ts",
"tt", "tt",
"tw", "tw",
"ty", "ty",
#ifdef __linux__
"ua", "en", // used on Linux, not clear what it stands for
#endif
"ug", "ug",
"uk", "uk",
"ur", "ur",
"uz", "uz",
"ve", "ve",
"vi", "vi",
"vo", "vo",
"wa", "wa",
"wo", "wo",
"xh", "xh",
"yi", "yi",
"yo", "yo",
"za", "za",
"zh", "zh",
"zu", "zu",
#ifdef __linux__
"catalan", "ca",
"croatian", "hr",
"czech", "cs",
@ -375,493 +188,6 @@ static char *language_names[] = {
"japanese", "ja",
"korean", "ko",
#endif
/* ISO 639.2 codes */
"aar", "aar",
"abk", "abk",
"ace", "ace",
"ach", "ach",
"ada", "ada",
"ady", "ady",
"afa", "afa",
"afh", "afh",
"afr", "afr",
"ain", "ain",
"aka", "aka",
"akk", "akk",
"alb", "alb",
"ale", "ale",
"alg", "alg",
"alt", "alt",
"amh", "amh",
"ang", "ang",
"anp", "anp",
"apa", "apa",
"ara", "ara",
"arc", "arc",
"arg", "arg",
"arm", "arm",
"arn", "arn",
"arp", "arp",
"art", "art",
"arw", "arw",
"asm", "asm",
"ast", "ast",
"ath", "ath",
"aus", "aus",
"ava", "ava",
"ave", "ave",
"awa", "awa",
"aym", "aym",
"aze", "aze",
"bad", "bad",
"bai", "bai",
"bak", "bak",
"bal", "bal",
"bam", "bam",
"ban", "ban",
"baq", "baq",
"bas", "bas",
"bat", "bat",
"bej", "bej",
"bel", "bel",
"bem", "bem",
"ben", "ben",
"ber", "ber",
"bho", "bho",
"bih", "bih",
"bik", "bik",
"bin", "bin",
"bis", "bis",
"bla", "bla",
"bnt", "bnt",
"bos", "bos",
"bra", "bra",
"bre", "bre",
"btk", "btk",
"bua", "bua",
"bug", "bug",
"bul", "bul",
"bur", "bur",
"byn", "byn",
"cad", "cad",
"cai", "cai",
"car", "car",
"cat", "cat",
"cau", "cau",
"ceb", "ceb",
"cel", "cel",
"cha", "cha",
"chb", "chb",
"che", "che",
"chg", "chg",
"chi", "chi",
"chk", "chk",
"chm", "chm",
"chn", "chn",
"cho", "cho",
"chp", "chp",
"chr", "chr",
"chu", "chu",
"chv", "chv",
"chy", "chy",
"cmc", "cmc",
"cop", "cop",
"cor", "cor",
"cos", "cos",
"cpe", "cpe",
"cpf", "cpf",
"cpp", "cpp",
"cre", "cre",
"crh", "crh",
"crp", "crp",
"csb", "csb",
"cus", "cus",
"cze", "cze",
"dak", "dak",
"dan", "dan",
"dar", "dar",
"day", "day",
"del", "del",
"den", "den",
"dgr", "dgr",
"din", "din",
"div", "div",
"doi", "doi",
"dra", "dra",
"dsb", "dsb",
"dua", "dua",
"dum", "dum",
"dut", "dut",
"dyu", "dyu",
"dzo", "dzo",
"efi", "efi",
"egy", "egy",
"eka", "eka",
"elx", "elx",
"eng", "eng",
"enm", "enm",
"epo", "epo",
"est", "est",
"ewe", "ewe",
"ewo", "ewo",
"fan", "fan",
"fao", "fao",
"fat", "fat",
"fij", "fij",
"fil", "fil",
"fin", "fin",
"fiu", "fiu",
"fon", "fon",
"fre", "fre",
"frm", "frm",
"fro", "fro",
"frr", "frr",
"frs", "frs",
"fry", "fry",
"ful", "ful",
"fur", "fur",
"gaa", "gaa",
"gay", "gay",
"gba", "gba",
"gem", "gem",
"geo", "geo",
"ger", "ger",
"gez", "gez",
"gil", "gil",
"gla", "gla",
"gle", "gle",
"glg", "glg",
"glv", "glv",
"gmh", "gmh",
"goh", "goh",
"gon", "gon",
"gor", "gor",
"got", "got",
"grb", "grb",
"grc", "grc",
"gre", "gre",
"grn", "grn",
"gsw", "gsw",
"guj", "guj",
"gwi", "gwi",
"hai", "hai",
"hat", "hat",
"hau", "hau",
"haw", "haw",
"heb", "heb",
"her", "her",
"hil", "hil",
"him", "him",
"hin", "hin",
"hit", "hit",
"hmn", "hmn",
"hmo", "hmo",
"hrv", "hrv",
"hsb", "hsb",
"hun", "hun",
"hup", "hup",
"iba", "iba",
"ibo", "ibo",
"ice", "ice",
"ido", "ido",
"iii", "iii",
"ijo", "ijo",
"iku", "iku",
"ile", "ile",
"ilo", "ilo",
"ina", "ina",
"inc", "inc",
"ind", "ind",
"ine", "ine",
"inh", "inh",
"ipk", "ipk",
"ira", "ira",
"iro", "iro",
"ita", "ita",
"jav", "jav",
"jbo", "jbo",
"jpn", "jpn",
"jpr", "jpr",
"jrb", "jrb",
"kaa", "kaa",
"kab", "kab",
"kac", "kac",
"kal", "kal",
"kam", "kam",
"kan", "kan",
"kar", "kar",
"kas", "kas",
"kau", "kau",
"kaw", "kaw",
"kaz", "kaz",
"kbd", "kbd",
"kha", "kha",
"khi", "khi",
"khm", "khm",
"kho", "kho",
"kik", "kik",
"kin", "kin",
"kir", "kir",
"kmb", "kmb",
"kok", "kok",
"kom", "kom",
"kon", "kon",
"kor", "kor",
"kos", "kos",
"kpe", "kpe",
"krc", "krc",
"krl", "krl",
"kro", "kro",
"kru", "kru",
"kua", "kua",
"kum", "kum",
"kur", "kur",
"kut", "kut",
"lad", "lad",
"lah", "lah",
"lam", "lam",
"lao", "lao",
"lat", "lat",
"lav", "lav",
"lez", "lez",
"lim", "lim",
"lin", "lin",
"lit", "lit",
"lol", "lol",
"loz", "loz",
"ltz", "ltz",
"lua", "lua",
"lub", "lub",
"lug", "lug",
"lui", "lui",
"lun", "lun",
"luo", "luo",
"lus", "lus",
"mac", "mac",
"mad", "mad",
"mag", "mag",
"mah", "mah",
"mai", "mai",
"mak", "mak",
"mal", "mal",
"man", "man",
"mao", "mao",
"map", "map",
"mar", "mar",
"mas", "mas",
"may", "may",
"mdf", "mdf",
"mdr", "mdr",
"men", "men",
"mga", "mga",
"mic", "mic",
"min", "min",
"mis", "mis",
"mkh", "mkh",
"mlg", "mlg",
"mlt", "mlt",
"mnc", "mnc",
"mni", "mni",
"mno", "mno",
"moh", "moh",
"mon", "mon",
"mos", "mos",
"mul", "mul",
"mun", "mun",
"mus", "mus",
"mwl", "mwl",
"mwr", "mwr",
"myn", "myn",
"myv", "myv",
"nah", "nah",
"nai", "nai",
"nap", "nap",
"nau", "nau",
"nav", "nav",
"nbl", "nbl",
"nde", "nde",
"ndo", "ndo",
"nds", "nds",
"nep", "nep",
"new", "new",
"nia", "nia",
"nic", "nic",
"niu", "niu",
"nno", "nno",
"nob", "nob",
"nog", "nog",
"non", "non",
"nor", "nor",
"nqo", "nqo",
"nso", "nso",
"nub", "nub",
"nwc", "nwc",
"nya", "nya",
"nym", "nym",
"nyn", "nyn",
"nyo", "nyo",
"nzi", "nzi",
"oci", "oci",
"oji", "oji",
"ori", "ori",
"orm", "orm",
"osa", "osa",
"oss", "oss",
"ota", "ota",
"oto", "oto",
"paa", "paa",
"pag", "pag",
"pal", "pal",
"pam", "pam",
"pan", "pan",
"pap", "pap",
"pau", "pau",
"peo", "peo",
"per", "per",
"phi", "phi",
"phn", "phn",
"pli", "pli",
"pol", "pol",
"pon", "pon",
"por", "por",
"pra", "pra",
"pro", "pro",
"pus", "pus",
"que", "que",
"raj", "raj",
"rap", "rap",
"rar", "rar",
"roa", "roa",
"roh", "roh",
"rom", "rom",
"rum", "rum",
"run", "run",
"rup", "rup",
"rus", "rus",
"sad", "sad",
"sag", "sag",
"sah", "sah",
"sai", "sai",
"sal", "sal",
"sam", "sam",
"san", "san",
"sas", "sas",
"sat", "sat",
"scn", "scn",
"sco", "sco",
"sel", "sel",
"sem", "sem",
"sga", "sga",
"sgn", "sgn",
"shn", "shn",
"sid", "sid",
"sin", "sin",
"sio", "sio",
"sit", "sit",
"sla", "sla",
"slo", "slo",
"slv", "slv",
"sma", "sma",
"sme", "sme",
"smi", "smi",
"smj", "smj",
"smn", "smn",
"smo", "smo",
"sms", "sms",
"sna", "sna",
"snd", "snd",
"snk", "snk",
"sog", "sog",
"som", "som",
"son", "son",
"sot", "sot",
"spa", "spa",
"srd", "srd",
"srn", "srn",
"srp", "srp",
"srr", "srr",
"ssa", "ssa",
"ssw", "ssw",
"suk", "suk",
"sun", "sun",
"sus", "sus",
"sux", "sux",
"swa", "swa",
"swe", "swe",
"syc", "syc",
"syr", "syr",
"tah", "tah",
"tai", "tai",
"tam", "tam",
"tat", "tat",
"tel", "tel",
"tem", "tem",
"ter", "ter",
"tet", "tet",
"tgk", "tgk",
"tgl", "tgl",
"tha", "tha",
"tib", "tib",
"tig", "tig",
"tir", "tir",
"tiv", "tiv",
"tkl", "tkl",
"tlh", "tlh",
"tli", "tli",
"tmh", "tmh",
"tog", "tog",
"ton", "ton",
"tpi", "tpi",
"tsi", "tsi",
"tsn", "tsn",
"tso", "tso",
"tuk", "tuk",
"tum", "tum",
"tup", "tup",
"tur", "tur",
"tut", "tut",
"tvl", "tvl",
"twi", "twi",
"tyv", "tyv",
"udm", "udm",
"uga", "uga",
"uig", "uig",
"ukr", "ukr",
"umb", "umb",
"und", "und",
"urd", "urd",
"uzb", "uzb",
"vai", "vai",
"ven", "ven",
"vie", "vie",
"vol", "vol",
"vot", "vot",
"wak", "wak",
"wal", "wal",
"war", "war",
"was", "was",
"wel", "wel",
"wen", "wen",
"wln", "wln",
"wol", "wol",
"xal", "xal",
"xho", "xho",
"yao", "yao",
"yap", "yap",
"yid", "yid",
"yor", "yor",
"ypk", "ypk",
"zap", "zap",
"zbl", "zbl",
"zen", "zen",
"zha", "zha",
"znd", "znd",
"zul", "zul",
"zun", "zun",
"zxx", "zxx",
"zza", "zza",
"",
};
@ -882,253 +208,10 @@ static char *script_names[] = {
* Linux/Solaris country string to ISO3166 string mapping table.
*/
static char *country_names[] = {
"AD", "AD",
"AE", "AE",
"AF", "AF",
"AG", "AG",
"AI", "AI",
"AL", "AL",
"AM", "AM",
"AN", "AN",
"AO", "AO",
"AQ", "AQ",
"AR", "AR",
"AS", "AS",
"AT", "AT",
"AU", "AU",
"AW", "AW",
"AX", "AX",
"AZ", "AZ",
"BA", "BA",
"BB", "BB",
"BD", "BD",
"BE", "BE",
"BF", "BF",
"BG", "BG",
"BH", "BH",
"BI", "BI",
"BJ", "BJ",
"BM", "BM",
"BN", "BN",
"BO", "BO",
"BR", "BR",
"BS", "BS",
"BT", "BT",
"BV", "BV",
"BW", "BW",
"BY", "BY",
"BZ", "BZ",
"CA", "CA",
"CC", "CC",
"CD", "CD",
"CF", "CF",
"CG", "CG",
"CH", "CH",
"CI", "CI",
"CK", "CK",
"CL", "CL",
"CM", "CM",
"CN", "CN",
"CO", "CO",
"CR", "CR",
"CS", "CS",
"CU", "CU",
"CV", "CV",
"CX", "CX",
"CY", "CY",
"CZ", "CZ",
"DE", "DE",
"DJ", "DJ",
"DK", "DK",
"DM", "DM",
"DO", "DO",
"DZ", "DZ",
"EC", "EC",
"EE", "EE",
"EG", "EG",
"EH", "EH",
"ER", "ER",
"ES", "ES",
"ET", "ET",
"FI", "FI",
"FJ", "FJ",
"FK", "FK",
"FM", "FM",
"FO", "FO",
"FR", "FR",
"GA", "GA",
"GB", "GB",
"GD", "GD",
"GE", "GE",
"GF", "GF",
"GH", "GH",
"GI", "GI",
"GL", "GL",
"GM", "GM",
"GN", "GN",
"GP", "GP",
"GQ", "GQ",
"GR", "GR",
"GS", "GS",
"GT", "GT",
"GU", "GU",
"GW", "GW",
"GY", "GY",
"HK", "HK",
"HM", "HM",
"HN", "HN",
"HR", "HR",
"HT", "HT",
"HU", "HU",
"ID", "ID",
"IE", "IE",
"IL", "IL",
"IN", "IN",
"IO", "IO",
"IQ", "IQ",
"IR", "IR",
"IS", "IS",
"IT", "IT",
"JM", "JM",
"JO", "JO",
"JP", "JP",
"KE", "KE",
"KG", "KG",
"KH", "KH",
"KI", "KI",
"KM", "KM",
"KN", "KN",
"KP", "KP",
"KR", "KR",
"KW", "KW",
"KY", "KY",
"KZ", "KZ",
"LA", "LA",
"LB", "LB",
"LC", "LC",
"LI", "LI",
"LK", "LK",
"LR", "LR",
"LS", "LS",
"LT", "LT",
"LU", "LU",
"LV", "LV",
"LY", "LY",
"MA", "MA",
"MC", "MC",
"MD", "MD",
"ME", "ME",
"MG", "MG",
"MH", "MH",
"MK", "MK",
"ML", "ML",
"MM", "MM",
"MN", "MN",
"MO", "MO",
"MP", "MP",
"MQ", "MQ",
"MR", "MR",
"MS", "MS",
"MT", "MT",
"MU", "MU",
"MV", "MV",
"MW", "MW",
"MX", "MX",
"MY", "MY",
"MZ", "MZ",
"NA", "NA",
"NC", "NC",
"NE", "NE",
"NF", "NF",
"NG", "NG",
"NI", "NI",
"NL", "NL",
"NO", "NO",
"NP", "NP",
"NR", "NR",
"NU", "NU",
"NZ", "NZ",
"OM", "OM",
"PA", "PA",
"PE", "PE",
"PF", "PF",
"PG", "PG",
"PH", "PH",
"PK", "PK",
"PL", "PL",
"PM", "PM",
"PN", "PN",
"PR", "PR",
"PS", "PS",
"PT", "PT",
"PW", "PW",
"PY", "PY",
"QA", "QA",
"RE", "RE",
#ifdef __linux__
"RN", "US", // used on Linux, not clear what it stands for
#endif
"RO", "RO",
"RS", "RS",
"RU", "RU",
"RW", "RW",
"SA", "SA",
"SB", "SB",
"SC", "SC",
"SD", "SD",
"SE", "SE",
"SG", "SG",
"SH", "SH",
"SI", "SI",
"SJ", "SJ",
"SK", "SK",
"SL", "SL",
"SM", "SM",
"SN", "SN",
"SO", "SO",
"SR", "SR",
"ST", "ST",
"SV", "SV",
"SY", "SY",
"SZ", "SZ",
"TC", "TC",
"TD", "TD",
"TF", "TF",
"TG", "TG",
"TH", "TH",
"TJ", "TJ",
"TK", "TK",
"TL", "TL",
"TM", "TM",
"TN", "TN",
"TO", "TO",
"TR", "TR",
"TT", "TT",
"TV", "TV",
"TW", "TW",
"TZ", "TZ",
"UA", "UA",
"UG", "UG",
"UK", "GB",
"UM", "UM",
"US", "US",
"UY", "UY",
"UZ", "UZ",
"VA", "VA",
"VC", "VC",
"VE", "VE",
"VG", "VG",
"VI", "VI",
"VN", "VN",
"VU", "VU",
"WF", "WF",
"WS", "WS",
"YE", "YE",
"YT", "YT",
"YU", "CS", // YU has been removed from ISO 3166
"ZA", "ZA",
"ZM", "ZM",
"ZW", "ZW",
"",
};

View File

@ -607,6 +607,7 @@ gboolean gtk2_load()
fp_gtk_tree_view_new = dl_symbol("gtk_tree_view_new");
fp_gtk_viewport_new = dl_symbol("gtk_viewport_new");
fp_gtk_window_new = dl_symbol("gtk_window_new");
fp_gtk_window_present = dl_symbol("gtk_window_present");
fp_gtk_dialog_new = dl_symbol("gtk_dialog_new");
fp_gtk_frame_new = dl_symbol("gtk_frame_new");

View File

@ -749,6 +749,7 @@ int (*fp_gdk_pixbuf_get_rowstride)(const GdkPixbuf *pixbuf);
int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
GdkPixbuf *(*fp_gdk_pixbuf_new_from_file)(const char *filename, GError **error);
void (*fp_gtk_widget_destroy)(GtkWidget *widget);
void (*fp_gtk_window_present)(GtkWindow *window);
/**

View File

@ -80,6 +80,28 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
quit(env, jpeer, FALSE);
}
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: toFront
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
(JNIEnv * env, jobject jpeer)
{
GtkWidget * dialog;
fp_gdk_threads_enter();
dialog = (GtkWidget*)jlong_to_ptr(
(*env)->GetLongField(env, jpeer, widgetFieldID));
if (dialog != NULL) {
fp_gtk_window_present((GtkWindow*)dialog);
}
fp_gdk_threads_leave();
}
/**
* Convert a GSList to an array of filenames (without the parent folder)
*/

View File

@ -33,6 +33,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_run
JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
(JNIEnv *, jobject);
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: toFront
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif

View File

@ -617,18 +617,18 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setPrimAddrOption0
* Signature: (IILjava/net/InetAddress;I)V
*/
JNIEXPORT void JNICALL Java_sun_nio_ch_SctpNet_setPeerPrimAddrOption0
(JNIEnv *env, jclass klass, jint fd, jint assocId, jobject iaObj, jint port) {
(JNIEnv *env, jclass klass, jint fd, jint assocId,
jobject iaObj, jint port, jboolean preferIPv6) {
struct sctp_setpeerprim prim;
struct sockaddr_storage ss;
int ss_len = sizeof(ss);
struct sockaddr* sap = (struct sockaddr*)&prim.sspp_addr;
int sap_len;
if (NET_InetAddressToSockaddr(env, iaObj, port, (struct sockaddr *)&ss,
&ss_len, JNI_TRUE) != 0) {
if (NET_InetAddressToSockaddr(env, iaObj, port, sap,
&sap_len, preferIPv6) != 0) {
return;
}
prim.sspp_assoc_id = assocId;
prim.sspp_addr = ss;
if (setsockopt(fd, IPPROTO_SCTP, SCTP_SET_PEER_PRIMARY_ADDR, &prim,
sizeof(prim)) < 0) {

View File

@ -70,7 +70,11 @@ static void EnsureJreInstallation(const char *jrepath);
*/
#undef ENABLE_AWT_PRELOAD
#ifndef JAVA_ARGS /* turn off AWT preloading for javac, jar, etc */
#define ENABLE_AWT_PRELOAD
/* CR6999872: fastdebug crashes if awt library is loaded before JVM is
* initialized*/
#if !defined(DEBUG)
#define ENABLE_AWT_PRELOAD
#endif
#endif
#ifdef ENABLE_AWT_PRELOAD

View File

@ -79,10 +79,50 @@ class WFramePeer extends WWindowPeer implements FramePeer {
if (b == null) {
clearMaximizedBounds();
} else {
setMaximizedBounds(b.x, b.y, b.width, b.height);
Rectangle adjBounds = (Rectangle)b.clone();
adjustMaximizedBounds(adjBounds);
setMaximizedBounds(adjBounds.x, adjBounds.y, adjBounds.width, adjBounds.height);
}
}
/**
* The incoming bounds describe the maximized size and position of the
* window on the monitor that displays the window. But the window manager
* expects that the bounds are based on the size and position of the
* primary monitor, even if the window ultimately maximizes onto a
* secondary monitor. And the window manager adjusts these values to
* compensate for differences between the primary monitor and the monitor
* that displays the window.
* The method translates the incoming bounds to the values acceptable
* by the window manager. For more details, please refer to 6699851.
*/
private void adjustMaximizedBounds(Rectangle b) {
GraphicsConfiguration currentDevGC = getGraphicsConfiguration();
GraphicsDevice primaryDev = GraphicsEnvironment
.getLocalGraphicsEnvironment().getDefaultScreenDevice();
GraphicsConfiguration primaryDevGC = primaryDev.getDefaultConfiguration();
if (currentDevGC != null && currentDevGC != primaryDevGC) {
Rectangle currentDevBounds = currentDevGC.getBounds();
Rectangle primaryDevBounds = primaryDevGC.getBounds();
b.width -= (currentDevBounds.width - primaryDevBounds.width);
b.height -= (currentDevBounds.height - primaryDevBounds.height);
}
}
@Override
public boolean updateGraphicsData(GraphicsConfiguration gc) {
boolean result = super.updateGraphicsData(gc);
Rectangle bounds = AWTAccessor.getFrameAccessor().
getMaximizedBounds((Frame)target);
if (bounds != null) {
setMaximizedBounds(bounds);
}
return result;
}
@Override
boolean isTargetUndecorated() {
return ((Frame)target).isUndecorated();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2010, 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
@ -53,6 +53,7 @@ class NativeSeedGenerator extends SeedGenerator {
*/
private static native boolean nativeGenerateSeed(byte[] result);
@Override
void getSeedBytes(byte[] result) {
// fill array as a side effect
if (nativeGenerateSeed(result) == false) {
@ -62,9 +63,4 @@ class NativeSeedGenerator extends SeedGenerator {
}
}
byte getSeedByte() {
byte[] b = new byte[1];
getSeedBytes(b);
return b[0];
}
}

View File

@ -969,12 +969,15 @@ void D3DInitializer::InitImpl()
}
D3DPipelineManager *pMgr = D3DPipelineManager::CreateInstance();
if (pMgr != NULL) {
UINT adapterCount = pMgr->adapterCount;
// init adapters if we are preloading
if (AwtToolkit::GetInstance().GetPreloadThread().OnPreloadThread()) {
UINT adapterCount = pMgr->adapterCount;
pAdapterIniters = new D3DAdapterInitializer[adapterCount];
for (UINT i=0; i<adapterCount; i++) {
pAdapterIniters[i].setAdapter(i);
AwtToolkit::GetInstance().GetPreloadThread().AddAction(&pAdapterIniters[i]);
pAdapterIniters = new D3DAdapterInitializer[adapterCount];
for (UINT i=0; i<adapterCount; i++) {
pAdapterIniters[i].setAdapter(i);
AwtToolkit::GetInstance().GetPreloadThread().AddAction(&pAdapterIniters[i]);
}
}
}
}

View File

@ -86,6 +86,7 @@ static const UINT MINIMUM_NUMBER_OF_VISIBLE_ITEMS = 8;
AwtChoice::AwtChoice() {
m_hList = NULL;
m_listDefWindowProc = NULL;
m_selectedItem = -1;
}
LPCTSTR AwtChoice::GetClassName() {
@ -437,9 +438,10 @@ LRESULT CALLBACK AwtChoice::ListWindowProc(HWND hwnd, UINT message,
MsgRouting AwtChoice::WmNotify(UINT notifyCode)
{
if (notifyCode == CBN_SELCHANGE) {
int itemSelect = (int)SendMessage(CB_GETCURSEL);
if (itemSelect != CB_ERR){
DoCallback("handleAction", "(I)V", itemSelect);
int selectedItem = (int)SendMessage(CB_GETCURSEL);
if (selectedItem != CB_ERR && m_selectedItem != selectedItem){
m_selectedItem = selectedItem;
DoCallback("handleAction", "(I)V", selectedItem);
}
} else if (notifyCode == CBN_DROPDOWN) {

View File

@ -94,6 +94,7 @@ private:
static BOOL sm_isMouseMoveInList;
HWND m_hList;
WNDPROC m_listDefWindowProc;
int m_selectedItem;
static LRESULT CALLBACK ListWindowProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam);
};

View File

@ -1904,6 +1904,11 @@ bool AwtToolkit::PreloadThread::InvokeAndTerminate(void(_cdecl *fn)(void *), voi
return true;
}
bool AwtToolkit::PreloadThread::OnPreloadThread()
{
return GetThreadId() == ::GetCurrentThreadId();
}
/*static*/
unsigned WINAPI AwtToolkit::PreloadThread::StaticThreadProc(void *param)
{

Some files were not shown because too many files have changed in this diff Show More