--- a/jdk/make/docs/Makefile Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/docs/Makefile Tue May 03 22:16:58 2011 -0700
@@ -51,6 +51,7 @@
DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
+DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
# Url to Java Language Spec
#JLS3_URL = http://java.sun.com/docs/books/jls/
@@ -205,7 +206,13 @@
-use \
-keywords \
$(ADDITIONAL_JAVADOCFLAGS)
-ADDITIONAL_JAVADOCFLAGS =
+
+ifdef OPENJDK
+ ADDITIONAL_JAVADOCFLAGS = \
+ -Xdocrootparent $(DOCS_BASE_URL)
+else
+ ADDITIONAL_JAVADOCFLAGS =
+endif
# Draft used for non-fcs documents
JDK_IS_FCS = false
@@ -1144,56 +1151,6 @@
#############################################################
#
-# tracingdocs
-#
-
-ALL_OTHER_TARGETS += tracingdocs
-
-TRACING_DOCDIR := $(JRE_API_DOCSDIR)/tracing
-TRACING2COREAPI := ../$(JDKJRE2COREAPI)
-TRACING_DOCTITLE := Java$(TRADEMARK) Platform Tracing
-TRACING_WINDOWTITLE := Platform Tracing
-TRACING_HEADER := <strong>Platform Tracing</strong>
-TRACING_BOTTOM := $(call CommonBottom,$(TRACING_FIRST_COPYRIGHT_YEAR))
-# TRACING_PKGS is located in NON_CORE_PKGS.gmk
-
-TRACING_INDEX_HTML = $(TRACING_DOCDIR)/index.html
-TRACING_OPTIONS_FILE = $(DOCSTMPDIR)/tracing.options
-TRACING_PACKAGES_FILE = $(DOCSTMPDIR)/tracing.packages
-
-tracingdocs: $(TRACING_INDEX_HTML)
-
-# Set relative location to core api document root
-$(TRACING_INDEX_HTML): GET2DOCSDIR=$(TRACING2COREAPI)/..
-
-# Run javadoc if the index file is out of date or missing
-$(TRACING_INDEX_HTML): $(TRACING_OPTIONS_FILE) $(TRACING_PACKAGES_FILE)
- $(prep-javadoc)
- $(call JavadocSummary,$(TRACING_OPTIONS_FILE),$(TRACING_PACKAGES_FILE))
- $(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \
- @$(TRACING_OPTIONS_FILE) @$(TRACING_PACKAGES_FILE)
-
-# Create file with javadoc options in it
-$(TRACING_OPTIONS_FILE):
- $(prep-target)
- @($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
- $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
- $(call OptionPair,-encoding,ascii) ; \
- $(call OptionOnly,-nodeprecatedlist) ; \
- $(call OptionPair,-doctitle,$(TRACING_DOCTITLE)) ; \
- $(call OptionPair,-windowtitle,$(TRACING_WINDOWTITLE) $(DRAFT_WINTITLE));\
- $(call OptionPair,-header,$(TRACING_HEADER)$(DRAFT_HEADER)) ; \
- $(call OptionPair,-bottom,$(TRACING_BOTTOM)$(DRAFT_BOTTOM)) ; \
- $(call OptionTrip,-linkoffline,$(TRACING2COREAPI),$(COREAPI_DOCSDIR)/); \
- ) >> $@
-
-# Create a file with the package names in it
-$(TRACING_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TRACING_PKGS))
- $(prep-target)
- $(call PackageFilter,$(TRACING_PKGS))
-
-#############################################################
-#
# Get a cache of all the directories
$(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
--- a/jdk/make/docs/NON_CORE_PKGS.gmk Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/docs/NON_CORE_PKGS.gmk Tue May 03 22:16:58 2011 -0700
@@ -88,9 +88,6 @@
SCTPAPI_PKGS = com.sun.nio.sctp
-TRACING_PKGS = com.sun.tracing \
- com.sun.tracing.dtrace
-
# non-core packages in rt.jar
NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(MGMT_PKGS) \
@@ -100,6 +97,5 @@
$(OLD_JSSE_PKGS) \
$(HTTPSERVER_PKGS) \
$(SMARTCARDIO_PKGS) \
- $(TRACING_PKGS) \
$(SCTPAPI_PKGS)
--- a/jdk/make/java/java/FILES_java.gmk Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/java/java/FILES_java.gmk Tue May 03 22:16:58 2011 -0700
@@ -356,6 +356,7 @@
java/util/regex/Matcher.java \
java/util/regex/MatchResult.java \
java/util/regex/ASCII.java \
+ java/util/regex/UnicodeProp.java \
java/util/regex/PatternSyntaxException.java \
java/util/prefs/Preferences.java \
java/util/prefs/AbstractPreferences.java \
--- a/jdk/make/java/java/Makefile Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/java/java/Makefile Tue May 03 22:16:58 2011 -0700
@@ -345,30 +345,35 @@
-template $(CHARACTERDATA)/CharacterDataLatin1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+ -proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterDataLatin1.java -string \
-usecharforbyte -latin1 8
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 0 \
-template $(CHARACTERDATA)/CharacterData00.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+ -proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData00.java -string \
-usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 1 \
-template $(CHARACTERDATA)/CharacterData01.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+ -proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData01.java -string \
-usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 2 \
-template $(CHARACTERDATA)/CharacterData02.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+ -proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData02.java -string \
-usecharforbyte 11 4 1
$(BOOT_JAVA_CMD) -jar $(GENERATECHARACTER_JARFILE) -plane 14 \
-template $(CHARACTERDATA)/CharacterData0E.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
+ -proplist $(UNICODEDATA)/PropList.txt \
-o $(GENSRCDIR)/java/lang/CharacterData0E.java -string \
-usecharforbyte 11 4 1
--- a/jdk/make/java/nio/FILES_java.gmk Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/java/nio/FILES_java.gmk Tue May 03 22:16:58 2011 -0700
@@ -71,6 +71,7 @@
java/nio/charset/CoderMalfunctionError.java \
java/nio/charset/CodingErrorAction.java \
java/nio/charset/MalformedInputException.java \
+ java/nio/charset/StandardCharset.java \
java/nio/charset/UnmappableCharacterException.java \
\
java/nio/charset/spi/CharsetProvider.java \
--- a/jdk/make/java/nio/mapfile-linux Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/java/nio/mapfile-linux Tue May 03 22:16:58 2011 -0700
@@ -44,7 +44,6 @@
Java_sun_nio_ch_EPollArrayWrapper_interrupt;
Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent;
- Java_sun_nio_ch_EPoll_init;
Java_sun_nio_ch_EPoll_eventSize;
Java_sun_nio_ch_EPoll_eventsOffset;
Java_sun_nio_ch_EPoll_dataOffset;
@@ -129,7 +128,6 @@
Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
- Java_sun_nio_fs_LinuxWatchService_init;
Java_sun_nio_fs_LinuxWatchService_eventSize;
Java_sun_nio_fs_LinuxWatchService_eventOffsets;
Java_sun_nio_fs_LinuxWatchService_inotifyInit;
--- a/jdk/make/java/security/Makefile Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/java/security/Makefile Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1996, 2011 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2011, 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
@@ -44,11 +44,9 @@
else # PLATFORM
-# Register Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
+# Register Microsoft CryptoAPI provider only on Windows platform.
ifeq ($(PLATFORM), windows)
- ifneq ($(ARCH_DATA_MODEL), 64)
- PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
- endif
+ PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
endif
endif # PLATFORM
--- a/jdk/make/jpda/jdwp/jdwp.spec Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/jpda/jdwp/jdwp.spec Tue May 03 22:16:58 2011 -0700
@@ -2190,7 +2190,8 @@
(Out
(byte eventKind "Event kind to request. "
"See <a href=\"#JDWP_EventKind\">JDWP.EventKind</a> "
- "for a complete list of events that can be requested. "
+ "for a complete list of events that can be requested; "
+ "some events may require a capability in order to be requested. "
)
(byte suspendPolicy
"What threads are suspended when this event occurs? "
@@ -2732,6 +2733,8 @@
(Alt MonitorContendedEnter=JDWP.EventKind.MONITOR_CONTENDED_ENTER
"Notification that a thread in the target VM is attempting "
"to enter a monitor that is already acquired by another thread. "
+ "Requires canRequestMonitorEvents capability - see "
+ "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. "
(int requestID
@@ -2743,6 +2746,8 @@
(Alt MonitorContendedEntered=JDWP.EventKind.MONITOR_CONTENDED_ENTERED
"Notification of a thread in the target VM is entering a monitor "
"after waiting for it to be released by another thread. "
+ "Requires canRequestMonitorEvents capability - see "
+ "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. "
(int requestID
@@ -2753,6 +2758,8 @@
)
(Alt MonitorWait=JDWP.EventKind.MONITOR_WAIT
"Notification of a thread about to wait on a monitor object. "
+ "Requires canRequestMonitorEvents capability - see "
+ "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>Since JDWP version 1.6. "
(int requestID
@@ -2764,6 +2771,8 @@
)
(Alt MonitorWaited=JDWP.EventKind.MONITOR_WAITED
"Notification that a thread in the target VM has finished waiting on "
+ "Requires canRequestMonitorEvents capability - see "
+ "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"a monitor object. "
"<p>Since JDWP version 1.6. "
@@ -3050,9 +3059,9 @@
(Constant METHOD_EXIT =41 )
(Constant METHOD_EXIT_WITH_RETURN_VALUE =42 )
(Constant MONITOR_CONTENDED_ENTER =43 )
- (Constant MONITOR_CONTENDED_ENTERED =44 )
- (Constant MONITOR_WAIT =45 )
- (Constant MONITOR_WAITED =46 )
+ (Constant MONITOR_CONTENDED_ENTERED =44 )
+ (Constant MONITOR_WAIT =45 )
+ (Constant MONITOR_WAITED =46 )
(Constant VM_START =90 )
(Constant VM_INIT =90 "obsolete - was used in jvmdi")
(Constant VM_DEATH =99 )
--- a/jdk/make/sun/security/Makefile Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/sun/security/Makefile Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2011, 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
@@ -52,12 +52,10 @@
endif
endif
-# Build Microsoft CryptoAPI provider only on (non-64-bit) Windows platform.
+# Build Microsoft CryptoAPI provider only on Windows platform.
MSCAPI =
ifeq ($(PLATFORM), windows)
- ifneq ($(ARCH_DATA_MODEL), 64)
- MSCAPI = mscapi
- endif
+ MSCAPI = mscapi
endif
# Build in-tree elliptic curve crypto provider only when
--- a/jdk/make/tools/GenerateCharacter/CharacterData00.java.template Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/GenerateCharacter/CharacterData00.java.template Tue May 03 22:16:58 2011 -0700
@@ -73,11 +73,37 @@
return props;
}
+ int getPropertiesEx(int ch) {
+ char offset = (char)ch;
+ int props = $$LookupEx(offset);
+ return props;
+ }
+
int getType(int ch) {
int props = getProperties(ch);
return (props & $$maskType);
}
+ boolean isOtherLowercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherLowercase) != 0;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherUppercase) != 0;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherAlphabetic) != 0;
+ }
+
+ boolean isIdeographic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskIdeographic) != 0;
+ }
+
boolean isJavaIdentifierStart(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) >= $$lowJavaStart);
--- a/jdk/make/tools/GenerateCharacter/CharacterData01.java.template Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/GenerateCharacter/CharacterData01.java.template Tue May 03 22:16:58 2011 -0700
@@ -72,11 +72,37 @@
return props;
}
+ int getPropertiesEx(int ch) {
+ char offset = (char)ch;
+ int props = $$LookupEx(offset);
+ return props;
+ }
+
int getType(int ch) {
int props = getProperties(ch);
return (props & $$maskType);
}
+ boolean isOtherLowercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherLowercase) != 0;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherUppercase) != 0;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherAlphabetic) != 0;
+ }
+
+ boolean isIdeographic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskIdeographic) != 0;
+ }
+
boolean isJavaIdentifierStart(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) >= $$lowJavaStart);
--- a/jdk/make/tools/GenerateCharacter/CharacterData02.java.template Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/GenerateCharacter/CharacterData02.java.template Tue May 03 22:16:58 2011 -0700
@@ -66,11 +66,37 @@
*/
int getProperties(int ch) {
- char offset = (char)ch;
+ char offset = (char)ch;
int props = $$Lookup(offset);
return props;
}
+ int getPropertiesEx(int ch) {
+ char offset = (char)ch;
+ int props = $$LookupEx(offset);
+ return props;
+ }
+
+ boolean isOtherLowercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherLowercase) != 0;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherUppercase) != 0;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherAlphabetic) != 0;
+ }
+
+ boolean isIdeographic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskIdeographic) != 0;
+ }
+
int getType(int ch) {
int props = getProperties(ch);
return (props & $$maskType);
--- a/jdk/make/tools/GenerateCharacter/CharacterData0E.java.template Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/GenerateCharacter/CharacterData0E.java.template Tue May 03 22:16:58 2011 -0700
@@ -66,11 +66,37 @@
*/
int getProperties(int ch) {
- char offset = (char)ch;
+ char offset = (char)ch;
int props = $$Lookup(offset);
return props;
}
+ int getPropertiesEx(int ch) {
+ char offset = (char)ch;
+ int props = $$LookupEx(offset);
+ return props;
+ }
+
+ boolean isOtherLowercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherLowercase) != 0;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherUppercase) != 0;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherAlphabetic) != 0;
+ }
+
+ boolean isIdeographic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskIdeographic) != 0;
+ }
+
int getType(int ch) {
int props = getProperties(ch);
return (props & $$maskType);
--- a/jdk/make/tools/GenerateCharacter/CharacterDataLatin1.java.template Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/GenerateCharacter/CharacterDataLatin1.java.template Tue May 03 22:16:58 2011 -0700
@@ -67,11 +67,37 @@
*/
int getProperties(int ch) {
- char offset = (char)ch;
+ char offset = (char)ch;
int props = $$Lookup(offset);
return props;
}
+ int getPropertiesEx(int ch) {
+ char offset = (char)ch;
+ int props = $$LookupEx(offset);
+ return props;
+ }
+
+ boolean isOtherLowercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherLowercase) != 0;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherUppercase) != 0;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskOtherAlphabetic) != 0;
+ }
+
+ boolean isIdeographic(int ch) {
+ int props = getPropertiesEx(ch);
+ return (props & $$maskIdeographic) != 0;
+ }
+
int getType(int ch) {
int props = getProperties(ch);
return (props & $$maskType);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/UnicodeData/PropList.txt Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,1296 @@
+# PropList-6.0.0.txt
+# Date: 2010-08-19, 00:48:28 GMT [MD]
+#
+# Unicode Character Database
+# 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/
+
+# ================================================
+
+0009..000D ; White_Space # Cc [5] <control-0009>..<control-000D>
+0020 ; White_Space # Zs SPACE
+0085 ; White_Space # Cc <control-0085>
+00A0 ; White_Space # Zs NO-BREAK SPACE
+1680 ; White_Space # Zs OGHAM SPACE MARK
+180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
+2000..200A ; White_Space # Zs [11] EN QUAD..HAIR SPACE
+2028 ; White_Space # Zl LINE SEPARATOR
+2029 ; White_Space # Zp PARAGRAPH SEPARATOR
+202F ; White_Space # Zs NARROW NO-BREAK SPACE
+205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE
+3000 ; White_Space # Zs IDEOGRAPHIC SPACE
+
+# Total code points: 26
+
+# ================================================
+
+200E..200F ; Bidi_Control # Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK
+202A..202E ; Bidi_Control # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE
+
+# Total code points: 7
+
+# ================================================
+
+200C..200D ; Join_Control # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
+
+# Total code points: 2
+
+# ================================================
+
+002D ; Dash # Pd HYPHEN-MINUS
+058A ; Dash # Pd ARMENIAN HYPHEN
+05BE ; Dash # Pd HEBREW PUNCTUATION MAQAF
+1400 ; Dash # Pd CANADIAN SYLLABICS HYPHEN
+1806 ; Dash # Pd MONGOLIAN TODO SOFT HYPHEN
+2010..2015 ; Dash # Pd [6] HYPHEN..HORIZONTAL BAR
+2053 ; Dash # Po SWUNG DASH
+207B ; Dash # Sm SUPERSCRIPT MINUS
+208B ; Dash # Sm SUBSCRIPT MINUS
+2212 ; Dash # Sm MINUS SIGN
+2E17 ; Dash # Pd DOUBLE OBLIQUE HYPHEN
+2E1A ; Dash # Pd HYPHEN WITH DIAERESIS
+301C ; Dash # Pd WAVE DASH
+3030 ; Dash # Pd WAVY DASH
+30A0 ; Dash # Pd KATAKANA-HIRAGANA DOUBLE HYPHEN
+FE31..FE32 ; Dash # Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH
+FE58 ; Dash # Pd SMALL EM DASH
+FE63 ; Dash # Pd SMALL HYPHEN-MINUS
+FF0D ; Dash # Pd FULLWIDTH HYPHEN-MINUS
+
+# Total code points: 25
+
+# ================================================
+
+002D ; Hyphen # Pd HYPHEN-MINUS
+00AD ; Hyphen # Cf SOFT HYPHEN
+058A ; Hyphen # Pd ARMENIAN HYPHEN
+1806 ; Hyphen # Pd MONGOLIAN TODO SOFT HYPHEN
+2010..2011 ; Hyphen # Pd [2] HYPHEN..NON-BREAKING HYPHEN
+2E17 ; Hyphen # Pd DOUBLE OBLIQUE HYPHEN
+30FB ; Hyphen # Po KATAKANA MIDDLE DOT
+FE63 ; Hyphen # Pd SMALL HYPHEN-MINUS
+FF0D ; Hyphen # Pd FULLWIDTH HYPHEN-MINUS
+FF65 ; Hyphen # Po HALFWIDTH KATAKANA MIDDLE DOT
+
+# Total code points: 11
+
+# ================================================
+
+0022 ; Quotation_Mark # Po QUOTATION MARK
+0027 ; Quotation_Mark # Po APOSTROPHE
+00AB ; Quotation_Mark # Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+00BB ; Quotation_Mark # Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+2018 ; Quotation_Mark # Pi LEFT SINGLE QUOTATION MARK
+2019 ; Quotation_Mark # Pf RIGHT SINGLE QUOTATION MARK
+201A ; Quotation_Mark # Ps SINGLE LOW-9 QUOTATION MARK
+201B..201C ; Quotation_Mark # Pi [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK
+201D ; Quotation_Mark # Pf RIGHT DOUBLE QUOTATION MARK
+201E ; Quotation_Mark # Ps DOUBLE LOW-9 QUOTATION MARK
+201F ; Quotation_Mark # Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+2039 ; Quotation_Mark # Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+203A ; Quotation_Mark # Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+300C ; Quotation_Mark # Ps LEFT CORNER BRACKET
+300D ; Quotation_Mark # Pe RIGHT CORNER BRACKET
+300E ; Quotation_Mark # Ps LEFT WHITE CORNER BRACKET
+300F ; Quotation_Mark # Pe RIGHT WHITE CORNER BRACKET
+301D ; Quotation_Mark # Ps REVERSED DOUBLE PRIME QUOTATION MARK
+301E..301F ; Quotation_Mark # Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK
+FE41 ; Quotation_Mark # Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+FE42 ; Quotation_Mark # Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+FE43 ; Quotation_Mark # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+FE44 ; Quotation_Mark # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+FF02 ; Quotation_Mark # Po FULLWIDTH QUOTATION MARK
+FF07 ; Quotation_Mark # Po FULLWIDTH APOSTROPHE
+FF62 ; Quotation_Mark # Ps HALFWIDTH LEFT CORNER BRACKET
+FF63 ; Quotation_Mark # Pe HALFWIDTH RIGHT CORNER BRACKET
+
+# Total code points: 29
+
+# ================================================
+
+0021 ; Terminal_Punctuation # Po EXCLAMATION MARK
+002C ; Terminal_Punctuation # Po COMMA
+002E ; Terminal_Punctuation # Po FULL STOP
+003A..003B ; Terminal_Punctuation # Po [2] COLON..SEMICOLON
+003F ; Terminal_Punctuation # Po QUESTION MARK
+037E ; Terminal_Punctuation # Po GREEK QUESTION MARK
+0387 ; Terminal_Punctuation # Po GREEK ANO TELEIA
+0589 ; Terminal_Punctuation # Po ARMENIAN FULL STOP
+05C3 ; Terminal_Punctuation # Po HEBREW PUNCTUATION SOF PASUQ
+060C ; Terminal_Punctuation # Po ARABIC COMMA
+061B ; Terminal_Punctuation # Po ARABIC SEMICOLON
+061F ; Terminal_Punctuation # Po ARABIC QUESTION MARK
+06D4 ; Terminal_Punctuation # Po ARABIC FULL STOP
+0700..070A ; Terminal_Punctuation # Po [11] SYRIAC END OF PARAGRAPH..SYRIAC CONTRACTION
+070C ; Terminal_Punctuation # Po SYRIAC HARKLEAN METOBELUS
+07F8..07F9 ; Terminal_Punctuation # Po [2] NKO COMMA..NKO EXCLAMATION MARK
+0830..083E ; Terminal_Punctuation # Po [15] SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU
+085E ; Terminal_Punctuation # Po MANDAIC PUNCTUATION
+0964..0965 ; Terminal_Punctuation # Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
+0E5A..0E5B ; Terminal_Punctuation # Po [2] THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT
+0F08 ; Terminal_Punctuation # Po TIBETAN MARK SBRUL SHAD
+0F0D..0F12 ; Terminal_Punctuation # Po [6] TIBETAN MARK SHAD..TIBETAN MARK RGYA GRAM SHAD
+104A..104B ; Terminal_Punctuation # Po [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION
+1361..1368 ; Terminal_Punctuation # Po [8] ETHIOPIC WORDSPACE..ETHIOPIC PARAGRAPH SEPARATOR
+166D..166E ; Terminal_Punctuation # Po [2] CANADIAN SYLLABICS CHI SIGN..CANADIAN SYLLABICS FULL STOP
+16EB..16ED ; Terminal_Punctuation # Po [3] RUNIC SINGLE PUNCTUATION..RUNIC CROSS PUNCTUATION
+17D4..17D6 ; Terminal_Punctuation # Po [3] KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH
+17DA ; Terminal_Punctuation # Po KHMER SIGN KOOMUUT
+1802..1805 ; Terminal_Punctuation # Po [4] MONGOLIAN COMMA..MONGOLIAN FOUR DOTS
+1808..1809 ; Terminal_Punctuation # Po [2] MONGOLIAN MANCHU COMMA..MONGOLIAN MANCHU FULL STOP
+1944..1945 ; Terminal_Punctuation # Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
+1AA8..1AAB ; Terminal_Punctuation # Po [4] TAI THAM SIGN KAAN..TAI THAM SIGN SATKAANKUU
+1B5A..1B5B ; Terminal_Punctuation # Po [2] BALINESE PANTI..BALINESE PAMADA
+1B5D..1B5F ; Terminal_Punctuation # Po [3] BALINESE CARIK PAMUNGKAH..BALINESE CARIK PAREREN
+1C3B..1C3F ; Terminal_Punctuation # Po [5] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK
+1C7E..1C7F ; Terminal_Punctuation # Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD
+203C..203D ; Terminal_Punctuation # Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG
+2047..2049 ; Terminal_Punctuation # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2E2E ; Terminal_Punctuation # Po REVERSED QUESTION MARK
+3001..3002 ; Terminal_Punctuation # Po [2] IDEOGRAPHIC COMMA..IDEOGRAPHIC FULL STOP
+A4FE..A4FF ; Terminal_Punctuation # Po [2] LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP
+A60D..A60F ; Terminal_Punctuation # Po [3] VAI COMMA..VAI QUESTION MARK
+A6F3..A6F7 ; Terminal_Punctuation # Po [5] BAMUM FULL STOP..BAMUM QUESTION MARK
+A876..A877 ; Terminal_Punctuation # Po [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD
+A8CE..A8CF ; Terminal_Punctuation # Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
+A92F ; Terminal_Punctuation # Po KAYAH LI SIGN SHYA
+A9C7..A9C9 ; Terminal_Punctuation # Po [3] JAVANESE PADA PANGKAT..JAVANESE PADA LUNGSI
+AA5D..AA5F ; Terminal_Punctuation # Po [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA
+AADF ; Terminal_Punctuation # Po TAI VIET SYMBOL KOI KOI
+ABEB ; Terminal_Punctuation # Po MEETEI MAYEK CHEIKHEI
+FE50..FE52 ; Terminal_Punctuation # Po [3] SMALL COMMA..SMALL FULL STOP
+FE54..FE57 ; Terminal_Punctuation # Po [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK
+FF01 ; Terminal_Punctuation # Po FULLWIDTH EXCLAMATION MARK
+FF0C ; Terminal_Punctuation # Po FULLWIDTH COMMA
+FF0E ; Terminal_Punctuation # Po FULLWIDTH FULL STOP
+FF1A..FF1B ; Terminal_Punctuation # Po [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON
+FF1F ; Terminal_Punctuation # Po FULLWIDTH QUESTION MARK
+FF61 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+FF64 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC COMMA
+1039F ; Terminal_Punctuation # Po UGARITIC WORD DIVIDER
+103D0 ; Terminal_Punctuation # Po OLD PERSIAN WORD DIVIDER
+10857 ; Terminal_Punctuation # Po IMPERIAL ARAMAIC SECTION SIGN
+1091F ; Terminal_Punctuation # Po PHOENICIAN WORD SEPARATOR
+10B3A..10B3F ; Terminal_Punctuation # Po [6] TINY TWO DOTS OVER ONE DOT PUNCTUATION..LARGE ONE RING OVER TWO RINGS PUNCTUATION
+11047..1104D ; Terminal_Punctuation # Po [7] BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS
+110BE..110C1 ; Terminal_Punctuation # Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA
+12470..12473 ; Terminal_Punctuation # Po [4] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON
+
+# Total code points: 169
+
+# ================================================
+
+005E ; Other_Math # Sk CIRCUMFLEX ACCENT
+03D0..03D2 ; Other_Math # L& [3] GREEK BETA SYMBOL..GREEK UPSILON WITH HOOK SYMBOL
+03D5 ; Other_Math # L& GREEK PHI SYMBOL
+03F0..03F1 ; Other_Math # L& [2] GREEK KAPPA SYMBOL..GREEK RHO SYMBOL
+03F4..03F5 ; Other_Math # L& [2] GREEK CAPITAL THETA SYMBOL..GREEK LUNATE EPSILON SYMBOL
+2016 ; Other_Math # Po DOUBLE VERTICAL LINE
+2032..2034 ; Other_Math # Po [3] PRIME..TRIPLE PRIME
+2040 ; Other_Math # Pc CHARACTER TIE
+2061..2064 ; Other_Math # Cf [4] FUNCTION APPLICATION..INVISIBLE PLUS
+207D ; Other_Math # Ps SUPERSCRIPT LEFT PARENTHESIS
+207E ; Other_Math # Pe SUPERSCRIPT RIGHT PARENTHESIS
+208D ; Other_Math # Ps SUBSCRIPT LEFT PARENTHESIS
+208E ; Other_Math # Pe SUBSCRIPT RIGHT PARENTHESIS
+20D0..20DC ; Other_Math # Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE
+20E1 ; Other_Math # Mn COMBINING LEFT RIGHT ARROW ABOVE
+20E5..20E6 ; Other_Math # Mn [2] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING DOUBLE VERTICAL STROKE OVERLAY
+20EB..20EF ; Other_Math # Mn [5] COMBINING LONG DOUBLE SOLIDUS OVERLAY..COMBINING RIGHT ARROW BELOW
+2102 ; Other_Math # L& DOUBLE-STRUCK CAPITAL C
+2107 ; Other_Math # L& EULER CONSTANT
+210A..2113 ; Other_Math # L& [10] SCRIPT SMALL G..SCRIPT SMALL L
+2115 ; Other_Math # L& DOUBLE-STRUCK CAPITAL N
+2119..211D ; Other_Math # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
+2124 ; Other_Math # L& DOUBLE-STRUCK CAPITAL Z
+2128 ; Other_Math # L& BLACK-LETTER CAPITAL Z
+2129 ; Other_Math # So TURNED GREEK SMALL LETTER IOTA
+212C..212D ; Other_Math # L& [2] SCRIPT CAPITAL B..BLACK-LETTER CAPITAL C
+212F..2131 ; Other_Math # L& [3] SCRIPT SMALL E..SCRIPT CAPITAL F
+2133..2134 ; Other_Math # L& [2] SCRIPT CAPITAL M..SCRIPT SMALL O
+2135..2138 ; Other_Math # Lo [4] ALEF SYMBOL..DALET SYMBOL
+213C..213F ; Other_Math # L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
+2145..2149 ; Other_Math # L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
+2195..2199 ; Other_Math # So [5] UP DOWN ARROW..SOUTH WEST ARROW
+219C..219F ; Other_Math # So [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW
+21A1..21A2 ; Other_Math # So [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL
+21A4..21A5 ; Other_Math # So [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR
+21A7 ; Other_Math # So DOWNWARDS ARROW FROM BAR
+21A9..21AD ; Other_Math # So [5] LEFTWARDS ARROW WITH HOOK..LEFT RIGHT WAVE ARROW
+21B0..21B1 ; Other_Math # So [2] UPWARDS ARROW WITH TIP LEFTWARDS..UPWARDS ARROW WITH TIP RIGHTWARDS
+21B6..21B7 ; Other_Math # So [2] ANTICLOCKWISE TOP SEMICIRCLE ARROW..CLOCKWISE TOP SEMICIRCLE ARROW
+21BC..21CD ; Other_Math # So [18] LEFTWARDS HARPOON WITH BARB UPWARDS..LEFTWARDS DOUBLE ARROW WITH STROKE
+21D0..21D1 ; Other_Math # So [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW
+21D3 ; Other_Math # So DOWNWARDS DOUBLE ARROW
+21D5..21DB ; Other_Math # So [7] UP DOWN DOUBLE ARROW..RIGHTWARDS TRIPLE ARROW
+21DD ; Other_Math # So RIGHTWARDS SQUIGGLE ARROW
+21E4..21E5 ; Other_Math # So [2] LEFTWARDS ARROW TO BAR..RIGHTWARDS ARROW TO BAR
+23B4..23B5 ; Other_Math # So [2] TOP SQUARE BRACKET..BOTTOM SQUARE BRACKET
+23B7 ; Other_Math # So RADICAL SYMBOL BOTTOM
+23D0 ; Other_Math # So VERTICAL LINE EXTENSION
+23E2 ; Other_Math # So WHITE TRAPEZIUM
+25A0..25A1 ; Other_Math # So [2] BLACK SQUARE..WHITE SQUARE
+25AE..25B6 ; Other_Math # So [9] BLACK VERTICAL RECTANGLE..BLACK RIGHT-POINTING TRIANGLE
+25BC..25C0 ; Other_Math # So [5] BLACK DOWN-POINTING TRIANGLE..BLACK LEFT-POINTING TRIANGLE
+25C6..25C7 ; Other_Math # So [2] BLACK DIAMOND..WHITE DIAMOND
+25CA..25CB ; Other_Math # So [2] LOZENGE..WHITE CIRCLE
+25CF..25D3 ; Other_Math # So [5] BLACK CIRCLE..CIRCLE WITH UPPER HALF BLACK
+25E2 ; Other_Math # So BLACK LOWER RIGHT TRIANGLE
+25E4 ; Other_Math # So BLACK UPPER LEFT TRIANGLE
+25E7..25EC ; Other_Math # So [6] SQUARE WITH LEFT HALF BLACK..WHITE UP-POINTING TRIANGLE WITH DOT
+2605..2606 ; Other_Math # So [2] BLACK STAR..WHITE STAR
+2640 ; Other_Math # So FEMALE SIGN
+2642 ; Other_Math # So MALE SIGN
+2660..2663 ; Other_Math # So [4] BLACK SPADE SUIT..BLACK CLUB SUIT
+266D..266E ; Other_Math # So [2] MUSIC FLAT SIGN..MUSIC NATURAL SIGN
+27C5 ; Other_Math # Ps LEFT S-SHAPED BAG DELIMITER
+27C6 ; Other_Math # Pe RIGHT S-SHAPED BAG DELIMITER
+27E6 ; Other_Math # Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET
+27E7 ; Other_Math # Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET
+27E8 ; Other_Math # Ps MATHEMATICAL LEFT ANGLE BRACKET
+27E9 ; Other_Math # Pe MATHEMATICAL RIGHT ANGLE BRACKET
+27EA ; Other_Math # Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
+27EB ; Other_Math # Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
+27EC ; Other_Math # Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
+27ED ; Other_Math # Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
+27EE ; Other_Math # Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS
+27EF ; Other_Math # Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+2983 ; Other_Math # Ps LEFT WHITE CURLY BRACKET
+2984 ; Other_Math # Pe RIGHT WHITE CURLY BRACKET
+2985 ; Other_Math # Ps LEFT WHITE PARENTHESIS
+2986 ; Other_Math # Pe RIGHT WHITE PARENTHESIS
+2987 ; Other_Math # Ps Z NOTATION LEFT IMAGE BRACKET
+2988 ; Other_Math # Pe Z NOTATION RIGHT IMAGE BRACKET
+2989 ; Other_Math # Ps Z NOTATION LEFT BINDING BRACKET
+298A ; Other_Math # Pe Z NOTATION RIGHT BINDING BRACKET
+298B ; Other_Math # Ps LEFT SQUARE BRACKET WITH UNDERBAR
+298C ; Other_Math # Pe RIGHT SQUARE BRACKET WITH UNDERBAR
+298D ; Other_Math # Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
+298E ; Other_Math # Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+298F ; Other_Math # Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+2990 ; Other_Math # Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
+2991 ; Other_Math # Ps LEFT ANGLE BRACKET WITH DOT
+2992 ; Other_Math # Pe RIGHT ANGLE BRACKET WITH DOT
+2993 ; Other_Math # Ps LEFT ARC LESS-THAN BRACKET
+2994 ; Other_Math # Pe RIGHT ARC GREATER-THAN BRACKET
+2995 ; Other_Math # Ps DOUBLE LEFT ARC GREATER-THAN BRACKET
+2996 ; Other_Math # Pe DOUBLE RIGHT ARC LESS-THAN BRACKET
+2997 ; Other_Math # Ps LEFT BLACK TORTOISE SHELL BRACKET
+2998 ; Other_Math # Pe RIGHT BLACK TORTOISE SHELL BRACKET
+29D8 ; Other_Math # Ps LEFT WIGGLY FENCE
+29D9 ; Other_Math # Pe RIGHT WIGGLY FENCE
+29DA ; Other_Math # Ps LEFT DOUBLE WIGGLY FENCE
+29DB ; Other_Math # Pe RIGHT DOUBLE WIGGLY FENCE
+29FC ; Other_Math # Ps LEFT-POINTING CURVED ANGLE BRACKET
+29FD ; Other_Math # Pe RIGHT-POINTING CURVED ANGLE BRACKET
+FE61 ; Other_Math # Po SMALL ASTERISK
+FE63 ; Other_Math # Pd SMALL HYPHEN-MINUS
+FE68 ; Other_Math # Po SMALL REVERSE SOLIDUS
+FF3C ; Other_Math # Po FULLWIDTH REVERSE SOLIDUS
+FF3E ; Other_Math # Sk FULLWIDTH CIRCUMFLEX ACCENT
+1D400..1D454 ; Other_Math # L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
+1D456..1D49C ; Other_Math # L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
+1D49E..1D49F ; Other_Math # L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
+1D4A2 ; Other_Math # L& MATHEMATICAL SCRIPT CAPITAL G
+1D4A5..1D4A6 ; Other_Math # L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
+1D4A9..1D4AC ; Other_Math # L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE..1D4B9 ; Other_Math # L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
+1D4BB ; Other_Math # L& MATHEMATICAL SCRIPT SMALL F
+1D4BD..1D4C3 ; Other_Math # L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
+1D4C5..1D505 ; Other_Math # L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
+1D507..1D50A ; Other_Math # L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
+1D50D..1D514 ; Other_Math # L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
+1D516..1D51C ; Other_Math # L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
+1D51E..1D539 ; Other_Math # L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B..1D53E ; Other_Math # L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540..1D544 ; Other_Math # L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546 ; Other_Math # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A..1D550 ; Other_Math # L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D552..1D6A5 ; Other_Math # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
+1D6A8..1D6C0 ; Other_Math # L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
+1D6C2..1D6DA ; Other_Math # L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
+1D6DC..1D6FA ; Other_Math # L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
+1D6FC..1D714 ; Other_Math # L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
+1D716..1D734 ; Other_Math # L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D736..1D74E ; Other_Math # L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
+1D750..1D76E ; Other_Math # L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D770..1D788 ; Other_Math # L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
+1D78A..1D7A8 ; Other_Math # L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7AA..1D7C2 ; Other_Math # L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
+1D7C4..1D7CB ; Other_Math # L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
+1D7CE..1D7FF ; Other_Math # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
+
+# Total code points: 1217
+
+# ================================================
+
+0030..0039 ; Hex_Digit # Nd [10] DIGIT ZERO..DIGIT NINE
+0041..0046 ; Hex_Digit # L& [6] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER F
+0061..0066 ; Hex_Digit # L& [6] LATIN SMALL LETTER A..LATIN SMALL LETTER F
+FF10..FF19 ; Hex_Digit # Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE
+FF21..FF26 ; Hex_Digit # L& [6] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER F
+FF41..FF46 ; Hex_Digit # L& [6] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER F
+
+# Total code points: 44
+
+# ================================================
+
+0030..0039 ; ASCII_Hex_Digit # Nd [10] DIGIT ZERO..DIGIT NINE
+0041..0046 ; ASCII_Hex_Digit # L& [6] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER F
+0061..0066 ; ASCII_Hex_Digit # L& [6] LATIN SMALL LETTER A..LATIN SMALL LETTER F
+
+# Total code points: 22
+
+# ================================================
+
+0345 ; Other_Alphabetic # Mn COMBINING GREEK YPOGEGRAMMENI
+05B0..05BD ; Other_Alphabetic # Mn [14] HEBREW POINT SHEVA..HEBREW POINT METEG
+05BF ; Other_Alphabetic # Mn HEBREW POINT RAFE
+05C1..05C2 ; Other_Alphabetic # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
+05C4..05C5 ; Other_Alphabetic # Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT
+05C7 ; Other_Alphabetic # Mn HEBREW POINT QAMATS QATAN
+0610..061A ; Other_Alphabetic # Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA
+064B..0657 ; Other_Alphabetic # Mn [13] ARABIC FATHATAN..ARABIC INVERTED DAMMA
+0659..065F ; Other_Alphabetic # Mn [7] ARABIC ZWARAKAY..ARABIC WAVY HAMZA BELOW
+0670 ; Other_Alphabetic # Mn ARABIC LETTER SUPERSCRIPT ALEF
+06D6..06DC ; Other_Alphabetic # Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
+06E1..06E4 ; Other_Alphabetic # Mn [4] ARABIC SMALL HIGH DOTLESS HEAD OF KHAH..ARABIC SMALL HIGH MADDA
+06E7..06E8 ; Other_Alphabetic # Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
+06ED ; Other_Alphabetic # Mn ARABIC SMALL LOW MEEM
+0711 ; Other_Alphabetic # Mn SYRIAC LETTER SUPERSCRIPT ALAPH
+0730..073F ; Other_Alphabetic # Mn [16] SYRIAC PTHAHA ABOVE..SYRIAC RWAHA
+07A6..07B0 ; Other_Alphabetic # Mn [11] THAANA ABAFILI..THAANA SUKUN
+0816..0817 ; Other_Alphabetic # Mn [2] SAMARITAN MARK IN..SAMARITAN MARK IN-ALAF
+081B..0823 ; Other_Alphabetic # Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A
+0825..0827 ; Other_Alphabetic # Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U
+0829..082C ; Other_Alphabetic # Mn [4] SAMARITAN VOWEL SIGN LONG I..SAMARITAN VOWEL SIGN SUKUN
+0900..0902 ; Other_Alphabetic # Mn [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA
+0903 ; Other_Alphabetic # Mc DEVANAGARI SIGN VISARGA
+093A ; Other_Alphabetic # Mn DEVANAGARI VOWEL SIGN OE
+093B ; Other_Alphabetic # Mc DEVANAGARI VOWEL SIGN OOE
+093E..0940 ; Other_Alphabetic # Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II
+0941..0948 ; Other_Alphabetic # Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI
+0949..094C ; Other_Alphabetic # Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU
+094E..094F ; Other_Alphabetic # Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW
+0955..0957 ; Other_Alphabetic # Mn [3] DEVANAGARI VOWEL SIGN CANDRA LONG E..DEVANAGARI VOWEL SIGN UUE
+0962..0963 ; Other_Alphabetic # Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
+0981 ; Other_Alphabetic # Mn BENGALI SIGN CANDRABINDU
+0982..0983 ; Other_Alphabetic # Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA
+09BE..09C0 ; Other_Alphabetic # Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II
+09C1..09C4 ; Other_Alphabetic # Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR
+09C7..09C8 ; Other_Alphabetic # Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
+09CB..09CC ; Other_Alphabetic # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09D7 ; Other_Alphabetic # Mc BENGALI AU LENGTH MARK
+09E2..09E3 ; Other_Alphabetic # Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL
+0A01..0A02 ; Other_Alphabetic # Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI
+0A03 ; Other_Alphabetic # Mc GURMUKHI SIGN VISARGA
+0A3E..0A40 ; Other_Alphabetic # Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II
+0A41..0A42 ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU
+0A47..0A48 ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
+0A4B..0A4C ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN OO..GURMUKHI VOWEL SIGN AU
+0A51 ; Other_Alphabetic # Mn GURMUKHI SIGN UDAAT
+0A70..0A71 ; Other_Alphabetic # Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK
+0A75 ; Other_Alphabetic # Mn GURMUKHI SIGN YAKASH
+0A81..0A82 ; Other_Alphabetic # Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA
+0A83 ; Other_Alphabetic # Mc GUJARATI SIGN VISARGA
+0ABE..0AC0 ; Other_Alphabetic # Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II
+0AC1..0AC5 ; Other_Alphabetic # Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E
+0AC7..0AC8 ; Other_Alphabetic # Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI
+0AC9 ; Other_Alphabetic # Mc GUJARATI VOWEL SIGN CANDRA O
+0ACB..0ACC ; Other_Alphabetic # Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU
+0AE2..0AE3 ; Other_Alphabetic # Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL
+0B01 ; Other_Alphabetic # Mn ORIYA SIGN CANDRABINDU
+0B02..0B03 ; Other_Alphabetic # Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA
+0B3E ; Other_Alphabetic # Mc ORIYA VOWEL SIGN AA
+0B3F ; Other_Alphabetic # Mn ORIYA VOWEL SIGN I
+0B40 ; Other_Alphabetic # Mc ORIYA VOWEL SIGN II
+0B41..0B44 ; Other_Alphabetic # Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR
+0B47..0B48 ; Other_Alphabetic # Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
+0B4B..0B4C ; Other_Alphabetic # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B56 ; Other_Alphabetic # Mn ORIYA AI LENGTH MARK
+0B57 ; Other_Alphabetic # Mc ORIYA AU LENGTH MARK
+0B62..0B63 ; Other_Alphabetic # Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL
+0B82 ; Other_Alphabetic # Mn TAMIL SIGN ANUSVARA
+0BBE..0BBF ; Other_Alphabetic # Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I
+0BC0 ; Other_Alphabetic # Mn TAMIL VOWEL SIGN II
+0BC1..0BC2 ; Other_Alphabetic # Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU
+0BC6..0BC8 ; Other_Alphabetic # Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
+0BCA..0BCC ; Other_Alphabetic # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0BD7 ; Other_Alphabetic # Mc TAMIL AU LENGTH MARK
+0C01..0C03 ; Other_Alphabetic # Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
+0C3E..0C40 ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II
+0C41..0C44 ; Other_Alphabetic # Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR
+0C46..0C48 ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
+0C4A..0C4C ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN O..TELUGU VOWEL SIGN AU
+0C55..0C56 ; Other_Alphabetic # Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
+0C62..0C63 ; Other_Alphabetic # Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
+0C82..0C83 ; Other_Alphabetic # Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
+0CBE ; Other_Alphabetic # Mc KANNADA VOWEL SIGN AA
+0CBF ; Other_Alphabetic # Mn KANNADA VOWEL SIGN I
+0CC0..0CC4 ; Other_Alphabetic # Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR
+0CC6 ; Other_Alphabetic # Mn KANNADA VOWEL SIGN E
+0CC7..0CC8 ; Other_Alphabetic # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; Other_Alphabetic # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0CCC ; Other_Alphabetic # Mn KANNADA VOWEL SIGN AU
+0CD5..0CD6 ; Other_Alphabetic # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0CE2..0CE3 ; Other_Alphabetic # Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL
+0D02..0D03 ; Other_Alphabetic # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
+0D3E..0D40 ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II
+0D41..0D44 ; Other_Alphabetic # Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR
+0D46..0D48 ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
+0D4A..0D4C ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0D57 ; Other_Alphabetic # Mc MALAYALAM AU LENGTH MARK
+0D62..0D63 ; Other_Alphabetic # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
+0D82..0D83 ; Other_Alphabetic # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
+0DCF..0DD1 ; Other_Alphabetic # Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA
+0DD2..0DD4 ; Other_Alphabetic # Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
+0DD6 ; Other_Alphabetic # Mn SINHALA VOWEL SIGN DIGA PAA-PILLA
+0DD8..0DDF ; Other_Alphabetic # Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
+0DF2..0DF3 ; Other_Alphabetic # Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
+0E31 ; Other_Alphabetic # Mn THAI CHARACTER MAI HAN-AKAT
+0E34..0E3A ; Other_Alphabetic # Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
+0E4D ; Other_Alphabetic # Mn THAI CHARACTER NIKHAHIT
+0EB1 ; Other_Alphabetic # Mn LAO VOWEL SIGN MAI KAN
+0EB4..0EB9 ; Other_Alphabetic # Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU
+0EBB..0EBC ; Other_Alphabetic # Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO
+0ECD ; Other_Alphabetic # Mn LAO NIGGAHITA
+0F71..0F7E ; Other_Alphabetic # Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO
+0F7F ; Other_Alphabetic # Mc TIBETAN SIGN RNAM BCAD
+0F80..0F81 ; Other_Alphabetic # Mn [2] TIBETAN VOWEL SIGN REVERSED I..TIBETAN VOWEL SIGN REVERSED II
+0F8D..0F97 ; Other_Alphabetic # Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA
+0F99..0FBC ; Other_Alphabetic # Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
+102B..102C ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA
+102D..1030 ; Other_Alphabetic # Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU
+1031 ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN E
+1032..1036 ; Other_Alphabetic # Mn [5] MYANMAR VOWEL SIGN AI..MYANMAR SIGN ANUSVARA
+1038 ; Other_Alphabetic # Mc MYANMAR SIGN VISARGA
+103B..103C ; Other_Alphabetic # Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA
+103D..103E ; Other_Alphabetic # Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA
+1056..1057 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR
+1058..1059 ; Other_Alphabetic # Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL
+105E..1060 ; Other_Alphabetic # Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA
+1062 ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN SGAW KAREN EU
+1067..1068 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR VOWEL SIGN WESTERN PWO KAREN UE
+1071..1074 ; Other_Alphabetic # Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE
+1082 ; Other_Alphabetic # Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA
+1083..1084 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E
+1085..1086 ; Other_Alphabetic # Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y
+109C ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN AITON A
+109D ; Other_Alphabetic # Mn MYANMAR VOWEL SIGN AITON AI
+135F ; Other_Alphabetic # Mn ETHIOPIC COMBINING GEMINATION MARK
+1712..1713 ; Other_Alphabetic # Mn [2] TAGALOG VOWEL SIGN I..TAGALOG VOWEL SIGN U
+1732..1733 ; Other_Alphabetic # Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U
+1752..1753 ; Other_Alphabetic # Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U
+1772..1773 ; Other_Alphabetic # Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U
+17B6 ; Other_Alphabetic # Mc KHMER VOWEL SIGN AA
+17B7..17BD ; Other_Alphabetic # Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA
+17BE..17C5 ; Other_Alphabetic # Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU
+17C6 ; Other_Alphabetic # Mn KHMER SIGN NIKAHIT
+17C7..17C8 ; Other_Alphabetic # Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU
+18A9 ; Other_Alphabetic # Mn MONGOLIAN LETTER ALI GALI DAGALGA
+1920..1922 ; Other_Alphabetic # Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U
+1923..1926 ; Other_Alphabetic # Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU
+1927..1928 ; Other_Alphabetic # Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O
+1929..192B ; Other_Alphabetic # Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA
+1930..1931 ; Other_Alphabetic # Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
+1932 ; Other_Alphabetic # Mn LIMBU SMALL LETTER ANUSVARA
+1933..1938 ; Other_Alphabetic # Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
+19B0..19C0 ; Other_Alphabetic # Mc [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
+19C8..19C9 ; Other_Alphabetic # Mc [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
+1A17..1A18 ; Other_Alphabetic # Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
+1A19..1A1B ; Other_Alphabetic # Mc [3] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN AE
+1A55 ; Other_Alphabetic # Mc TAI THAM CONSONANT SIGN MEDIAL RA
+1A56 ; Other_Alphabetic # Mn TAI THAM CONSONANT SIGN MEDIAL LA
+1A57 ; Other_Alphabetic # Mc TAI THAM CONSONANT SIGN LA TANG LAI
+1A58..1A5E ; Other_Alphabetic # Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA
+1A61 ; Other_Alphabetic # Mc TAI THAM VOWEL SIGN A
+1A62 ; Other_Alphabetic # Mn TAI THAM VOWEL SIGN MAI SAT
+1A63..1A64 ; Other_Alphabetic # Mc [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA
+1A65..1A6C ; Other_Alphabetic # Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW
+1A6D..1A72 ; Other_Alphabetic # Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI
+1A73..1A74 ; Other_Alphabetic # Mn [2] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN MAI KANG
+1B00..1B03 ; Other_Alphabetic # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG
+1B04 ; Other_Alphabetic # Mc BALINESE SIGN BISAH
+1B35 ; Other_Alphabetic # Mc BALINESE VOWEL SIGN TEDUNG
+1B36..1B3A ; Other_Alphabetic # Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA
+1B3B ; Other_Alphabetic # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3C ; Other_Alphabetic # Mn BALINESE VOWEL SIGN LA LENGA
+1B3D..1B41 ; Other_Alphabetic # Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B42 ; Other_Alphabetic # Mn BALINESE VOWEL SIGN PEPET
+1B43 ; Other_Alphabetic # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1B80..1B81 ; Other_Alphabetic # Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR
+1B82 ; Other_Alphabetic # Mc SUNDANESE SIGN PANGWISAD
+1BA1 ; Other_Alphabetic # Mc SUNDANESE CONSONANT SIGN PAMINGKAL
+1BA2..1BA5 ; Other_Alphabetic # Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU
+1BA6..1BA7 ; Other_Alphabetic # Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG
+1BA8..1BA9 ; Other_Alphabetic # Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG
+1BE7 ; Other_Alphabetic # Mc BATAK VOWEL SIGN E
+1BE8..1BE9 ; Other_Alphabetic # Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE
+1BEA..1BEC ; Other_Alphabetic # Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O
+1BED ; Other_Alphabetic # Mn BATAK VOWEL SIGN KARO O
+1BEE ; Other_Alphabetic # Mc BATAK VOWEL SIGN U
+1BEF..1BF1 ; Other_Alphabetic # Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H
+1C24..1C2B ; Other_Alphabetic # Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU
+1C2C..1C33 ; Other_Alphabetic # Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T
+1C34..1C35 ; Other_Alphabetic # Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG
+1CF2 ; Other_Alphabetic # Mc VEDIC SIGN ARDHAVISARGA
+24B6..24E9 ; Other_Alphabetic # So [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z
+2DE0..2DFF ; Other_Alphabetic # Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
+A823..A824 ; Other_Alphabetic # Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
+A825..A826 ; Other_Alphabetic # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
+A827 ; Other_Alphabetic # Mc SYLOTI NAGRI VOWEL SIGN OO
+A880..A881 ; Other_Alphabetic # Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA
+A8B4..A8C3 ; Other_Alphabetic # Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU
+A926..A92A ; Other_Alphabetic # Mn [5] KAYAH LI VOWEL UE..KAYAH LI VOWEL O
+A947..A951 ; Other_Alphabetic # Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R
+A952 ; Other_Alphabetic # Mc REJANG CONSONANT SIGN H
+A980..A982 ; Other_Alphabetic # Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR
+A983 ; Other_Alphabetic # Mc JAVANESE SIGN WIGNYAN
+A9B4..A9B5 ; Other_Alphabetic # Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG
+A9B6..A9B9 ; Other_Alphabetic # Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT
+A9BA..A9BB ; Other_Alphabetic # Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE
+A9BC ; Other_Alphabetic # Mn JAVANESE VOWEL SIGN PEPET
+A9BD..A9BF ; Other_Alphabetic # Mc [3] JAVANESE CONSONANT SIGN KERET..JAVANESE CONSONANT SIGN CAKRA
+AA29..AA2E ; Other_Alphabetic # Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE
+AA2F..AA30 ; Other_Alphabetic # Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI
+AA31..AA32 ; Other_Alphabetic # Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE
+AA33..AA34 ; Other_Alphabetic # Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA
+AA35..AA36 ; Other_Alphabetic # Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA
+AA43 ; Other_Alphabetic # Mn CHAM CONSONANT SIGN FINAL NG
+AA4C ; Other_Alphabetic # Mn CHAM CONSONANT SIGN FINAL M
+AA4D ; Other_Alphabetic # Mc CHAM CONSONANT SIGN FINAL H
+AAB0 ; Other_Alphabetic # Mn TAI VIET MAI KANG
+AAB2..AAB4 ; Other_Alphabetic # Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U
+AAB7..AAB8 ; Other_Alphabetic # Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA
+AABE ; Other_Alphabetic # Mn TAI VIET VOWEL AM
+ABE3..ABE4 ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP
+ABE5 ; Other_Alphabetic # Mn MEETEI MAYEK VOWEL SIGN ANAP
+ABE6..ABE7 ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP
+ABE8 ; Other_Alphabetic # Mn MEETEI MAYEK VOWEL SIGN UNAP
+ABE9..ABEA ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG
+FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA
+10A01..10A03 ; Other_Alphabetic # Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R
+10A05..10A06 ; Other_Alphabetic # Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O
+10A0C..10A0F ; Other_Alphabetic # Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA
+11000 ; Other_Alphabetic # Mc BRAHMI SIGN CANDRABINDU
+11001 ; Other_Alphabetic # Mn BRAHMI SIGN ANUSVARA
+11002 ; Other_Alphabetic # Mc BRAHMI SIGN VISARGA
+11038..11045 ; Other_Alphabetic # Mn [14] BRAHMI VOWEL SIGN AA..BRAHMI VOWEL SIGN AU
+11082 ; Other_Alphabetic # Mc KAITHI SIGN VISARGA
+110B0..110B2 ; Other_Alphabetic # Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II
+110B3..110B6 ; Other_Alphabetic # Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI
+110B7..110B8 ; Other_Alphabetic # Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU
+
+# Total code points: 795
+
+# ================================================
+
+3006 ; Ideographic # Lo IDEOGRAPHIC CLOSING MARK
+3007 ; Ideographic # Nl IDEOGRAPHIC NUMBER ZERO
+3021..3029 ; Ideographic # Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE
+3038..303A ; Ideographic # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
+3400..4DB5 ; Ideographic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
+4E00..9FCB ; Ideographic # Lo [20940] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCB
+F900..FA2D ; Ideographic # Lo [302] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6D ; Ideographic # Lo [62] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6D
+FA70..FAD9 ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+20000..2A6D6 ; Ideographic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
+2A700..2B734 ; Ideographic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
+2B740..2B81D ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2F800..2FA1D ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 75630
+
+# ================================================
+
+005E ; Diacritic # Sk CIRCUMFLEX ACCENT
+0060 ; Diacritic # Sk GRAVE ACCENT
+00A8 ; Diacritic # Sk DIAERESIS
+00AF ; Diacritic # Sk MACRON
+00B4 ; Diacritic # Sk ACUTE ACCENT
+00B7 ; Diacritic # Po MIDDLE DOT
+00B8 ; Diacritic # Sk CEDILLA
+02B0..02C1 ; Diacritic # Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP
+02C2..02C5 ; Diacritic # Sk [4] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD
+02C6..02D1 ; Diacritic # Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON
+02D2..02DF ; Diacritic # Sk [14] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER CROSS ACCENT
+02E0..02E4 ; Diacritic # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+02E5..02EB ; Diacritic # Sk [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK
+02EC ; Diacritic # Lm MODIFIER LETTER VOICING
+02ED ; Diacritic # Sk MODIFIER LETTER UNASPIRATED
+02EE ; Diacritic # Lm MODIFIER LETTER DOUBLE APOSTROPHE
+02EF..02FF ; Diacritic # Sk [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW
+0300..034E ; Diacritic # Mn [79] COMBINING GRAVE ACCENT..COMBINING UPWARDS ARROW BELOW
+0350..0357 ; Diacritic # Mn [8] COMBINING RIGHT ARROWHEAD ABOVE..COMBINING RIGHT HALF RING ABOVE
+035D..0362 ; Diacritic # Mn [6] COMBINING DOUBLE BREVE..COMBINING DOUBLE RIGHTWARDS ARROW BELOW
+0374 ; Diacritic # Lm GREEK NUMERAL SIGN
+0375 ; Diacritic # Sk GREEK LOWER NUMERAL SIGN
+037A ; Diacritic # Lm GREEK YPOGEGRAMMENI
+0384..0385 ; Diacritic # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0483..0487 ; Diacritic # Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE
+0559 ; Diacritic # Lm ARMENIAN MODIFIER LETTER LEFT HALF RING
+0591..05A1 ; Diacritic # Mn [17] HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER
+05A3..05BD ; Diacritic # Mn [27] HEBREW ACCENT MUNAH..HEBREW POINT METEG
+05BF ; Diacritic # Mn HEBREW POINT RAFE
+05C1..05C2 ; Diacritic # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
+05C4 ; Diacritic # Mn HEBREW MARK UPPER DOT
+064B..0652 ; Diacritic # Mn [8] ARABIC FATHATAN..ARABIC SUKUN
+0657..0658 ; Diacritic # Mn [2] ARABIC INVERTED DAMMA..ARABIC MARK NOON GHUNNA
+06DF..06E0 ; Diacritic # Mn [2] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH UPRIGHT RECTANGULAR ZERO
+06E5..06E6 ; Diacritic # Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH
+06EA..06EC ; Diacritic # Mn [3] ARABIC EMPTY CENTRE LOW STOP..ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE
+0730..074A ; Diacritic # Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH
+07A6..07B0 ; Diacritic # Mn [11] THAANA ABAFILI..THAANA SUKUN
+07EB..07F3 ; Diacritic # Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
+07F4..07F5 ; Diacritic # Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
+0818..0819 ; Diacritic # Mn [2] SAMARITAN MARK OCCLUSION..SAMARITAN MARK DAGESH
+093C ; Diacritic # Mn DEVANAGARI SIGN NUKTA
+094D ; Diacritic # Mn DEVANAGARI SIGN VIRAMA
+0951..0954 ; Diacritic # Mn [4] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
+0971 ; Diacritic # Lm DEVANAGARI SIGN HIGH SPACING DOT
+09BC ; Diacritic # Mn BENGALI SIGN NUKTA
+09CD ; Diacritic # Mn BENGALI SIGN VIRAMA
+0A3C ; Diacritic # Mn GURMUKHI SIGN NUKTA
+0A4D ; Diacritic # Mn GURMUKHI SIGN VIRAMA
+0ABC ; Diacritic # Mn GUJARATI SIGN NUKTA
+0ACD ; Diacritic # Mn GUJARATI SIGN VIRAMA
+0B3C ; Diacritic # Mn ORIYA SIGN NUKTA
+0B4D ; Diacritic # Mn ORIYA SIGN VIRAMA
+0BCD ; Diacritic # Mn TAMIL SIGN VIRAMA
+0C4D ; Diacritic # Mn TELUGU SIGN VIRAMA
+0CBC ; Diacritic # Mn KANNADA SIGN NUKTA
+0CCD ; Diacritic # Mn KANNADA SIGN VIRAMA
+0D4D ; Diacritic # Mn MALAYALAM SIGN VIRAMA
+0DCA ; Diacritic # Mn SINHALA SIGN AL-LAKUNA
+0E47..0E4C ; Diacritic # Mn [6] THAI CHARACTER MAITAIKHU..THAI CHARACTER THANTHAKHAT
+0E4E ; Diacritic # Mn THAI CHARACTER YAMAKKAN
+0EC8..0ECC ; Diacritic # Mn [5] LAO TONE MAI EK..LAO CANCELLATION MARK
+0F18..0F19 ; Diacritic # Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
+0F35 ; Diacritic # Mn TIBETAN MARK NGAS BZUNG NYI ZLA
+0F37 ; Diacritic # Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS
+0F39 ; Diacritic # Mn TIBETAN MARK TSA -PHRU
+0F3E..0F3F ; Diacritic # Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES
+0F82..0F84 ; Diacritic # Mn [3] TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA
+0F86..0F87 ; Diacritic # Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
+0FC6 ; Diacritic # Mn TIBETAN SYMBOL PADMA GDAN
+1037 ; Diacritic # Mn MYANMAR SIGN DOT BELOW
+1039..103A ; Diacritic # Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT
+1087..108C ; Diacritic # Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3
+108D ; Diacritic # Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
+108F ; Diacritic # Mc MYANMAR SIGN RUMAI PALAUNG TONE-5
+109A..109B ; Diacritic # Mc [2] MYANMAR SIGN KHAMTI TONE-1..MYANMAR SIGN KHAMTI TONE-3
+17C9..17D3 ; Diacritic # Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT
+17DD ; Diacritic # Mn KHMER SIGN ATTHACAN
+1939..193B ; Diacritic # Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I
+1A75..1A7C ; Diacritic # Mn [8] TAI THAM SIGN TONE-1..TAI THAM SIGN KHUEN-LUE KARAN
+1A7F ; Diacritic # Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT
+1B34 ; Diacritic # Mn BALINESE SIGN REREKAN
+1B44 ; Diacritic # Mc BALINESE ADEG ADEG
+1B6B..1B73 ; Diacritic # Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG
+1BAA ; Diacritic # Mc SUNDANESE SIGN PAMAAEH
+1C36..1C37 ; Diacritic # Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA
+1C78..1C7D ; Diacritic # Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD
+1CD0..1CD2 ; Diacritic # Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA
+1CD3 ; Diacritic # Po VEDIC SIGN NIHSHVASA
+1CD4..1CE0 ; Diacritic # Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA
+1CE1 ; Diacritic # Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA
+1CE2..1CE8 ; Diacritic # Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL
+1CED ; Diacritic # Mn VEDIC SIGN TIRYAK
+1D2C..1D61 ; Diacritic # Lm [54] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI
+1D62..1D6A ; Diacritic # L& [9] LATIN SUBSCRIPT SMALL LETTER I..GREEK SUBSCRIPT SMALL LETTER CHI
+1DC4..1DCF ; Diacritic # Mn [12] COMBINING MACRON-ACUTE..COMBINING ZIGZAG BELOW
+1DFD..1DFF ; Diacritic # Mn [3] COMBINING ALMOST EQUAL TO BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
+1FBD ; Diacritic # Sk GREEK KORONIS
+1FBF..1FC1 ; Diacritic # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FCD..1FCF ; Diacritic # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FDD..1FDF ; Diacritic # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FED..1FEF ; Diacritic # Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
+1FFD..1FFE ; Diacritic # Sk [2] GREEK OXIA..GREEK DASIA
+2CEF..2CF1 ; Diacritic # Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS
+2E2F ; Diacritic # Lm VERTICAL TILDE
+302A..302F ; Diacritic # Mn [6] IDEOGRAPHIC LEVEL TONE MARK..HANGUL DOUBLE DOT TONE MARK
+3099..309A ; Diacritic # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309B..309C ; Diacritic # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+30FC ; Diacritic # Lm KATAKANA-HIRAGANA PROLONGED SOUND MARK
+A66F ; Diacritic # Mn COMBINING CYRILLIC VZMET
+A67C..A67D ; Diacritic # Mn [2] COMBINING CYRILLIC KAVYKA..COMBINING CYRILLIC PAYEROK
+A67F ; Diacritic # Lm CYRILLIC PAYEROK
+A6F0..A6F1 ; Diacritic # Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS
+A717..A71F ; Diacritic # Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK
+A720..A721 ; Diacritic # Sk [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE
+A788 ; Diacritic # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT
+A8C4 ; Diacritic # Mn SAURASHTRA SIGN VIRAMA
+A8E0..A8F1 ; Diacritic # Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA
+A92B..A92D ; Diacritic # Mn [3] KAYAH LI TONE PLOPHU..KAYAH LI TONE CALYA PLOPHU
+A92E ; Diacritic # Po KAYAH LI SIGN CWI
+A953 ; Diacritic # Mc REJANG VIRAMA
+A9B3 ; Diacritic # Mn JAVANESE SIGN CECAK TELU
+A9C0 ; Diacritic # Mc JAVANESE PANGKON
+AA7B ; Diacritic # Mc MYANMAR SIGN PAO KAREN TONE
+AABF ; Diacritic # Mn TAI VIET TONE MAI EK
+AAC0 ; Diacritic # Lo TAI VIET TONE MAI NUENG
+AAC1 ; Diacritic # Mn TAI VIET TONE MAI THO
+AAC2 ; Diacritic # Lo TAI VIET TONE MAI SONG
+ABEC ; Diacritic # Mc MEETEI MAYEK LUM IYEK
+ABED ; Diacritic # Mn MEETEI MAYEK APUN IYEK
+FB1E ; Diacritic # Mn HEBREW POINT JUDEO-SPANISH VARIKA
+FE20..FE26 ; Diacritic # Mn [7] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON
+FF3E ; Diacritic # Sk FULLWIDTH CIRCUMFLEX ACCENT
+FF40 ; Diacritic # Sk FULLWIDTH GRAVE ACCENT
+FF70 ; Diacritic # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+FF9E..FF9F ; Diacritic # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+FFE3 ; Diacritic # Sk FULLWIDTH MACRON
+110B9..110BA ; Diacritic # Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA
+1D167..1D169 ; Diacritic # Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3
+1D16D..1D172 ; Diacritic # Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5
+1D17B..1D182 ; Diacritic # Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE
+1D185..1D18B ; Diacritic # Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE
+1D1AA..1D1AD ; Diacritic # Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
+
+# Total code points: 639
+
+# ================================================
+
+00B7 ; Extender # Po MIDDLE DOT
+02D0..02D1 ; Extender # Lm [2] MODIFIER LETTER TRIANGULAR COLON..MODIFIER LETTER HALF TRIANGULAR COLON
+0640 ; Extender # Lm ARABIC TATWEEL
+07FA ; Extender # Lm NKO LAJANYALAN
+0E46 ; Extender # Lm THAI CHARACTER MAIYAMOK
+0EC6 ; Extender # Lm LAO KO LA
+1843 ; Extender # Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN
+1AA7 ; Extender # Lm TAI THAM SIGN MAI YAMOK
+1C36 ; Extender # Mn LEPCHA SIGN RAN
+1C7B ; Extender # Lm OL CHIKI RELAA
+3005 ; Extender # Lm IDEOGRAPHIC ITERATION MARK
+3031..3035 ; Extender # Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF
+309D..309E ; Extender # Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK
+30FC..30FE ; Extender # Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK
+A015 ; Extender # Lm YI SYLLABLE WU
+A60C ; Extender # Lm VAI SYLLABLE LENGTHENER
+A9CF ; Extender # Lm JAVANESE PANGRANGKEP
+AA70 ; Extender # Lm MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION
+AADD ; Extender # Lm TAI VIET SYMBOL SAM
+FF70 ; Extender # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+
+# Total code points: 28
+
+# ================================================
+
+02B0..02B8 ; Other_Lowercase # Lm [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y
+02C0..02C1 ; Other_Lowercase # Lm [2] MODIFIER LETTER GLOTTAL STOP..MODIFIER LETTER REVERSED GLOTTAL STOP
+02E0..02E4 ; Other_Lowercase # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+0345 ; Other_Lowercase # Mn COMBINING GREEK YPOGEGRAMMENI
+037A ; Other_Lowercase # Lm GREEK YPOGEGRAMMENI
+1D2C..1D61 ; Other_Lowercase # Lm [54] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI
+1D78 ; Other_Lowercase # Lm MODIFIER LETTER CYRILLIC EN
+1D9B..1DBF ; Other_Lowercase # Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
+2090..2094 ; Other_Lowercase # Lm [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
+2170..217F ; Other_Lowercase # Nl [16] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND
+24D0..24E9 ; Other_Lowercase # So [26] CIRCLED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z
+2C7D ; Other_Lowercase # Lm MODIFIER LETTER CAPITAL V
+A770 ; Other_Lowercase # Lm MODIFIER LETTER US
+
+# Total code points: 159
+
+# ================================================
+
+2160..216F ; Other_Uppercase # Nl [16] ROMAN NUMERAL ONE..ROMAN NUMERAL ONE THOUSAND
+24B6..24CF ; Other_Uppercase # So [26] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN CAPITAL LETTER Z
+
+# Total code points: 42
+
+# ================================================
+
+FDD0..FDEF ; Noncharacter_Code_Point # Cn [32] <noncharacter-FDD0>..<noncharacter-FDEF>
+FFFE..FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-FFFE>..<noncharacter-FFFF>
+1FFFE..1FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-1FFFE>..<noncharacter-1FFFF>
+2FFFE..2FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-2FFFE>..<noncharacter-2FFFF>
+3FFFE..3FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-3FFFE>..<noncharacter-3FFFF>
+4FFFE..4FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-4FFFE>..<noncharacter-4FFFF>
+5FFFE..5FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-5FFFE>..<noncharacter-5FFFF>
+6FFFE..6FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-6FFFE>..<noncharacter-6FFFF>
+7FFFE..7FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-7FFFE>..<noncharacter-7FFFF>
+8FFFE..8FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-8FFFE>..<noncharacter-8FFFF>
+9FFFE..9FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-9FFFE>..<noncharacter-9FFFF>
+AFFFE..AFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-AFFFE>..<noncharacter-AFFFF>
+BFFFE..BFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-BFFFE>..<noncharacter-BFFFF>
+CFFFE..CFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-CFFFE>..<noncharacter-CFFFF>
+DFFFE..DFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-DFFFE>..<noncharacter-DFFFF>
+EFFFE..EFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-EFFFE>..<noncharacter-EFFFF>
+FFFFE..FFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-FFFFE>..<noncharacter-FFFFF>
+10FFFE..10FFFF; Noncharacter_Code_Point # Cn [2] <noncharacter-10FFFE>..<noncharacter-10FFFF>
+
+# Total code points: 66
+
+# ================================================
+
+09BE ; Other_Grapheme_Extend # Mc BENGALI VOWEL SIGN AA
+09D7 ; Other_Grapheme_Extend # Mc BENGALI AU LENGTH MARK
+0B3E ; Other_Grapheme_Extend # Mc ORIYA VOWEL SIGN AA
+0B57 ; Other_Grapheme_Extend # Mc ORIYA AU LENGTH MARK
+0BBE ; Other_Grapheme_Extend # Mc TAMIL VOWEL SIGN AA
+0BD7 ; Other_Grapheme_Extend # Mc TAMIL AU LENGTH MARK
+0CC2 ; Other_Grapheme_Extend # Mc KANNADA VOWEL SIGN UU
+0CD5..0CD6 ; Other_Grapheme_Extend # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0D3E ; Other_Grapheme_Extend # Mc MALAYALAM VOWEL SIGN AA
+0D57 ; Other_Grapheme_Extend # Mc MALAYALAM AU LENGTH MARK
+0DCF ; Other_Grapheme_Extend # Mc SINHALA VOWEL SIGN AELA-PILLA
+0DDF ; Other_Grapheme_Extend # Mc SINHALA VOWEL SIGN GAYANUKITTA
+200C..200D ; Other_Grapheme_Extend # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
+FF9E..FF9F ; Other_Grapheme_Extend # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+1D165 ; Other_Grapheme_Extend # Mc MUSICAL SYMBOL COMBINING STEM
+1D16E..1D172 ; Other_Grapheme_Extend # Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5
+
+# Total code points: 23
+
+# ================================================
+
+2FF0..2FF1 ; IDS_Binary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW
+2FF4..2FFB ; IDS_Binary_Operator # So [8] IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID
+
+# Total code points: 10
+
+# ================================================
+
+2FF2..2FF3 ; IDS_Trinary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO MIDDLE AND RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO MIDDLE AND BELOW
+
+# Total code points: 2
+
+# ================================================
+
+2E80..2E99 ; Radical # So [26] CJK RADICAL REPEAT..CJK RADICAL RAP
+2E9B..2EF3 ; Radical # So [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE
+2F00..2FD5 ; Radical # So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
+
+# Total code points: 329
+
+# ================================================
+
+3400..4DB5 ; Unified_Ideograph # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
+4E00..9FCB ; Unified_Ideograph # Lo [20940] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCB
+FA0E..FA0F ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F
+FA11 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA11
+FA13..FA14 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14
+FA1F ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA1F
+FA21 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA21
+FA23..FA24 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24
+FA27..FA29 ; Unified_Ideograph # Lo [3] CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29
+20000..2A6D6 ; Unified_Ideograph # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
+2A700..2B734 ; Unified_Ideograph # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
+2B740..2B81D ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+
+# Total code points: 74616
+
+# ================================================
+
+034F ; Other_Default_Ignorable_Code_Point # Mn COMBINING GRAPHEME JOINER
+115F..1160 ; Other_Default_Ignorable_Code_Point # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER
+2065..2069 ; Other_Default_Ignorable_Code_Point # Cn [5] <reserved-2065>..<reserved-2069>
+3164 ; Other_Default_Ignorable_Code_Point # Lo HANGUL FILLER
+FFA0 ; Other_Default_Ignorable_Code_Point # Lo HALFWIDTH HANGUL FILLER
+FFF0..FFF8 ; Other_Default_Ignorable_Code_Point # Cn [9] <reserved-FFF0>..<reserved-FFF8>
+E0000 ; Other_Default_Ignorable_Code_Point # Cn <reserved-E0000>
+E0002..E001F ; Other_Default_Ignorable_Code_Point # Cn [30] <reserved-E0002>..<reserved-E001F>
+E0080..E00FF ; Other_Default_Ignorable_Code_Point # Cn [128] <reserved-E0080>..<reserved-E00FF>
+E01F0..E0FFF ; Other_Default_Ignorable_Code_Point # Cn [3600] <reserved-E01F0>..<reserved-E0FFF>
+
+# Total code points: 3778
+
+# ================================================
+
+0149 ; Deprecated # L& LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+0673 ; Deprecated # Lo ARABIC LETTER ALEF WITH WAVY HAMZA BELOW
+0F77 ; Deprecated # Mn TIBETAN VOWEL SIGN VOCALIC RR
+0F79 ; Deprecated # Mn TIBETAN VOWEL SIGN VOCALIC LL
+17A3..17A4 ; Deprecated # Lo [2] KHMER INDEPENDENT VOWEL QAQ..KHMER INDEPENDENT VOWEL QAA
+206A..206F ; Deprecated # Cf [6] INHIBIT SYMMETRIC SWAPPING..NOMINAL DIGIT SHAPES
+2329 ; Deprecated # Ps LEFT-POINTING ANGLE BRACKET
+232A ; Deprecated # Pe RIGHT-POINTING ANGLE BRACKET
+E0001 ; Deprecated # Cf LANGUAGE TAG
+E0020..E007F ; Deprecated # Cf [96] TAG SPACE..CANCEL TAG
+
+# Total code points: 111
+
+# ================================================
+
+0069..006A ; Soft_Dotted # L& [2] LATIN SMALL LETTER I..LATIN SMALL LETTER J
+012F ; Soft_Dotted # L& LATIN SMALL LETTER I WITH OGONEK
+0249 ; Soft_Dotted # L& LATIN SMALL LETTER J WITH STROKE
+0268 ; Soft_Dotted # L& LATIN SMALL LETTER I WITH STROKE
+029D ; Soft_Dotted # L& LATIN SMALL LETTER J WITH CROSSED-TAIL
+02B2 ; Soft_Dotted # Lm MODIFIER LETTER SMALL J
+03F3 ; Soft_Dotted # L& GREEK LETTER YOT
+0456 ; Soft_Dotted # L& CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+0458 ; Soft_Dotted # L& CYRILLIC SMALL LETTER JE
+1D62 ; Soft_Dotted # L& LATIN SUBSCRIPT SMALL LETTER I
+1D96 ; Soft_Dotted # L& LATIN SMALL LETTER I WITH RETROFLEX HOOK
+1DA4 ; Soft_Dotted # Lm MODIFIER LETTER SMALL I WITH STROKE
+1DA8 ; Soft_Dotted # Lm MODIFIER LETTER SMALL J WITH CROSSED-TAIL
+1E2D ; Soft_Dotted # L& LATIN SMALL LETTER I WITH TILDE BELOW
+1ECB ; Soft_Dotted # L& LATIN SMALL LETTER I WITH DOT BELOW
+2071 ; Soft_Dotted # Lm SUPERSCRIPT LATIN SMALL LETTER I
+2148..2149 ; Soft_Dotted # L& [2] DOUBLE-STRUCK ITALIC SMALL I..DOUBLE-STRUCK ITALIC SMALL J
+2C7C ; Soft_Dotted # L& LATIN SUBSCRIPT SMALL LETTER J
+1D422..1D423 ; Soft_Dotted # L& [2] MATHEMATICAL BOLD SMALL I..MATHEMATICAL BOLD SMALL J
+1D456..1D457 ; Soft_Dotted # L& [2] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL ITALIC SMALL J
+1D48A..1D48B ; Soft_Dotted # L& [2] MATHEMATICAL BOLD ITALIC SMALL I..MATHEMATICAL BOLD ITALIC SMALL J
+1D4BE..1D4BF ; Soft_Dotted # L& [2] MATHEMATICAL SCRIPT SMALL I..MATHEMATICAL SCRIPT SMALL J
+1D4F2..1D4F3 ; Soft_Dotted # L& [2] MATHEMATICAL BOLD SCRIPT SMALL I..MATHEMATICAL BOLD SCRIPT SMALL J
+1D526..1D527 ; Soft_Dotted # L& [2] MATHEMATICAL FRAKTUR SMALL I..MATHEMATICAL FRAKTUR SMALL J
+1D55A..1D55B ; Soft_Dotted # L& [2] MATHEMATICAL DOUBLE-STRUCK SMALL I..MATHEMATICAL DOUBLE-STRUCK SMALL J
+1D58E..1D58F ; Soft_Dotted # L& [2] MATHEMATICAL BOLD FRAKTUR SMALL I..MATHEMATICAL BOLD FRAKTUR SMALL J
+1D5C2..1D5C3 ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF SMALL I..MATHEMATICAL SANS-SERIF SMALL J
+1D5F6..1D5F7 ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF BOLD SMALL I..MATHEMATICAL SANS-SERIF BOLD SMALL J
+1D62A..1D62B ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF ITALIC SMALL I..MATHEMATICAL SANS-SERIF ITALIC SMALL J
+1D65E..1D65F ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J
+1D692..1D693 ; Soft_Dotted # L& [2] MATHEMATICAL MONOSPACE SMALL I..MATHEMATICAL MONOSPACE SMALL J
+
+# Total code points: 46
+
+# ================================================
+
+0E40..0E44 ; Logical_Order_Exception # Lo [5] THAI CHARACTER SARA E..THAI CHARACTER SARA AI MAIMALAI
+0EC0..0EC4 ; Logical_Order_Exception # Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI
+AAB5..AAB6 ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL E..TAI VIET VOWEL O
+AAB9 ; Logical_Order_Exception # Lo TAI VIET VOWEL UEA
+AABB..AABC ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL AUE..TAI VIET VOWEL AY
+
+# Total code points: 15
+
+# ================================================
+
+2118 ; Other_ID_Start # Sm SCRIPT CAPITAL P
+212E ; Other_ID_Start # So ESTIMATED SYMBOL
+309B..309C ; Other_ID_Start # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+
+# Total code points: 4
+
+# ================================================
+
+00B7 ; Other_ID_Continue # Po MIDDLE DOT
+0387 ; Other_ID_Continue # Po GREEK ANO TELEIA
+1369..1371 ; Other_ID_Continue # No [9] ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE
+19DA ; Other_ID_Continue # No NEW TAI LUE THAM DIGIT ONE
+
+# Total code points: 12
+
+# ================================================
+
+0021 ; STerm # Po EXCLAMATION MARK
+002E ; STerm # Po FULL STOP
+003F ; STerm # Po QUESTION MARK
+055C ; STerm # Po ARMENIAN EXCLAMATION MARK
+055E ; STerm # Po ARMENIAN QUESTION MARK
+0589 ; STerm # Po ARMENIAN FULL STOP
+061F ; STerm # Po ARABIC QUESTION MARK
+06D4 ; STerm # Po ARABIC FULL STOP
+0700..0702 ; STerm # Po [3] SYRIAC END OF PARAGRAPH..SYRIAC SUBLINEAR FULL STOP
+07F9 ; STerm # Po NKO EXCLAMATION MARK
+0964..0965 ; STerm # Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
+104A..104B ; STerm # Po [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION
+1362 ; STerm # Po ETHIOPIC FULL STOP
+1367..1368 ; STerm # Po [2] ETHIOPIC QUESTION MARK..ETHIOPIC PARAGRAPH SEPARATOR
+166E ; STerm # Po CANADIAN SYLLABICS FULL STOP
+1735..1736 ; STerm # Po [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION
+1803 ; STerm # Po MONGOLIAN FULL STOP
+1809 ; STerm # Po MONGOLIAN MANCHU FULL STOP
+1944..1945 ; STerm # Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
+1AA8..1AAB ; STerm # Po [4] TAI THAM SIGN KAAN..TAI THAM SIGN SATKAANKUU
+1B5A..1B5B ; STerm # Po [2] BALINESE PANTI..BALINESE PAMADA
+1B5E..1B5F ; STerm # Po [2] BALINESE CARIK SIKI..BALINESE CARIK PAREREN
+1C3B..1C3C ; STerm # Po [2] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION NYET THYOOM TA-ROL
+1C7E..1C7F ; STerm # Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD
+203C..203D ; STerm # Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG
+2047..2049 ; STerm # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2E2E ; STerm # Po REVERSED QUESTION MARK
+3002 ; STerm # Po IDEOGRAPHIC FULL STOP
+A4FF ; STerm # Po LISU PUNCTUATION FULL STOP
+A60E..A60F ; STerm # Po [2] VAI FULL STOP..VAI QUESTION MARK
+A6F3 ; STerm # Po BAMUM FULL STOP
+A6F7 ; STerm # Po BAMUM QUESTION MARK
+A876..A877 ; STerm # Po [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD
+A8CE..A8CF ; STerm # Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
+A92F ; STerm # Po KAYAH LI SIGN SHYA
+A9C8..A9C9 ; STerm # Po [2] JAVANESE PADA LINGSA..JAVANESE PADA LUNGSI
+AA5D..AA5F ; STerm # Po [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA
+ABEB ; STerm # Po MEETEI MAYEK CHEIKHEI
+FE52 ; STerm # Po SMALL FULL STOP
+FE56..FE57 ; STerm # Po [2] SMALL QUESTION MARK..SMALL EXCLAMATION MARK
+FF01 ; STerm # Po FULLWIDTH EXCLAMATION MARK
+FF0E ; STerm # Po FULLWIDTH FULL STOP
+FF1F ; STerm # Po FULLWIDTH QUESTION MARK
+FF61 ; STerm # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+10A56..10A57 ; STerm # Po [2] KHAROSHTHI PUNCTUATION DANDA..KHAROSHTHI PUNCTUATION DOUBLE DANDA
+11047..11048 ; STerm # Po [2] BRAHMI DANDA..BRAHMI DOUBLE DANDA
+110BE..110C1 ; STerm # Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA
+
+# Total code points: 76
+
+# ================================================
+
+180B..180D ; Variation_Selector # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE
+FE00..FE0F ; Variation_Selector # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
+E0100..E01EF ; Variation_Selector # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256
+
+# Total code points: 259
+
+# ================================================
+
+0009..000D ; Pattern_White_Space # Cc [5] <control-0009>..<control-000D>
+0020 ; Pattern_White_Space # Zs SPACE
+0085 ; Pattern_White_Space # Cc <control-0085>
+200E..200F ; Pattern_White_Space # Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK
+2028 ; Pattern_White_Space # Zl LINE SEPARATOR
+2029 ; Pattern_White_Space # Zp PARAGRAPH SEPARATOR
+
+# Total code points: 11
+
+# ================================================
+
+0021..0023 ; Pattern_Syntax # Po [3] EXCLAMATION MARK..NUMBER SIGN
+0024 ; Pattern_Syntax # Sc DOLLAR SIGN
+0025..0027 ; Pattern_Syntax # Po [3] PERCENT SIGN..APOSTROPHE
+0028 ; Pattern_Syntax # Ps LEFT PARENTHESIS
+0029 ; Pattern_Syntax # Pe RIGHT PARENTHESIS
+002A ; Pattern_Syntax # Po ASTERISK
+002B ; Pattern_Syntax # Sm PLUS SIGN
+002C ; Pattern_Syntax # Po COMMA
+002D ; Pattern_Syntax # Pd HYPHEN-MINUS
+002E..002F ; Pattern_Syntax # Po [2] FULL STOP..SOLIDUS
+003A..003B ; Pattern_Syntax # Po [2] COLON..SEMICOLON
+003C..003E ; Pattern_Syntax # Sm [3] LESS-THAN SIGN..GREATER-THAN SIGN
+003F..0040 ; Pattern_Syntax # Po [2] QUESTION MARK..COMMERCIAL AT
+005B ; Pattern_Syntax # Ps LEFT SQUARE BRACKET
+005C ; Pattern_Syntax # Po REVERSE SOLIDUS
+005D ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET
+005E ; Pattern_Syntax # Sk CIRCUMFLEX ACCENT
+0060 ; Pattern_Syntax # Sk GRAVE ACCENT
+007B ; Pattern_Syntax # Ps LEFT CURLY BRACKET
+007C ; Pattern_Syntax # Sm VERTICAL LINE
+007D ; Pattern_Syntax # Pe RIGHT CURLY BRACKET
+007E ; Pattern_Syntax # Sm TILDE
+00A1 ; Pattern_Syntax # Po INVERTED EXCLAMATION MARK
+00A2..00A5 ; Pattern_Syntax # Sc [4] CENT SIGN..YEN SIGN
+00A6..00A7 ; Pattern_Syntax # So [2] BROKEN BAR..SECTION SIGN
+00A9 ; Pattern_Syntax # So COPYRIGHT SIGN
+00AB ; Pattern_Syntax # Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+00AC ; Pattern_Syntax # Sm NOT SIGN
+00AE ; Pattern_Syntax # So REGISTERED SIGN
+00B0 ; Pattern_Syntax # So DEGREE SIGN
+00B1 ; Pattern_Syntax # Sm PLUS-MINUS SIGN
+00B6 ; Pattern_Syntax # So PILCROW SIGN
+00BB ; Pattern_Syntax # Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+00BF ; Pattern_Syntax # Po INVERTED QUESTION MARK
+00D7 ; Pattern_Syntax # Sm MULTIPLICATION SIGN
+00F7 ; Pattern_Syntax # Sm DIVISION SIGN
+2010..2015 ; Pattern_Syntax # Pd [6] HYPHEN..HORIZONTAL BAR
+2016..2017 ; Pattern_Syntax # Po [2] DOUBLE VERTICAL LINE..DOUBLE LOW LINE
+2018 ; Pattern_Syntax # Pi LEFT SINGLE QUOTATION MARK
+2019 ; Pattern_Syntax # Pf RIGHT SINGLE QUOTATION MARK
+201A ; Pattern_Syntax # Ps SINGLE LOW-9 QUOTATION MARK
+201B..201C ; Pattern_Syntax # Pi [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK
+201D ; Pattern_Syntax # Pf RIGHT DOUBLE QUOTATION MARK
+201E ; Pattern_Syntax # Ps DOUBLE LOW-9 QUOTATION MARK
+201F ; Pattern_Syntax # Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+2020..2027 ; Pattern_Syntax # Po [8] DAGGER..HYPHENATION POINT
+2030..2038 ; Pattern_Syntax # Po [9] PER MILLE SIGN..CARET
+2039 ; Pattern_Syntax # Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+203A ; Pattern_Syntax # Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+203B..203E ; Pattern_Syntax # Po [4] REFERENCE MARK..OVERLINE
+2041..2043 ; Pattern_Syntax # Po [3] CARET INSERTION POINT..HYPHEN BULLET
+2044 ; Pattern_Syntax # Sm FRACTION SLASH
+2045 ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH QUILL
+2046 ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH QUILL
+2047..2051 ; Pattern_Syntax # Po [11] DOUBLE QUESTION MARK..TWO ASTERISKS ALIGNED VERTICALLY
+2052 ; Pattern_Syntax # Sm COMMERCIAL MINUS SIGN
+2053 ; Pattern_Syntax # Po SWUNG DASH
+2055..205E ; Pattern_Syntax # Po [10] FLOWER PUNCTUATION MARK..VERTICAL FOUR DOTS
+2190..2194 ; Pattern_Syntax # Sm [5] LEFTWARDS ARROW..LEFT RIGHT ARROW
+2195..2199 ; Pattern_Syntax # So [5] UP DOWN ARROW..SOUTH WEST ARROW
+219A..219B ; Pattern_Syntax # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+219C..219F ; Pattern_Syntax # So [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW
+21A0 ; Pattern_Syntax # Sm RIGHTWARDS TWO HEADED ARROW
+21A1..21A2 ; Pattern_Syntax # So [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL
+21A3 ; Pattern_Syntax # Sm RIGHTWARDS ARROW WITH TAIL
+21A4..21A5 ; Pattern_Syntax # So [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR
+21A6 ; Pattern_Syntax # Sm RIGHTWARDS ARROW FROM BAR
+21A7..21AD ; Pattern_Syntax # So [7] DOWNWARDS ARROW FROM BAR..LEFT RIGHT WAVE ARROW
+21AE ; Pattern_Syntax # Sm LEFT RIGHT ARROW WITH STROKE
+21AF..21CD ; Pattern_Syntax # So [31] DOWNWARDS ZIGZAG ARROW..LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; Pattern_Syntax # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+21D0..21D1 ; Pattern_Syntax # So [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW
+21D2 ; Pattern_Syntax # Sm RIGHTWARDS DOUBLE ARROW
+21D3 ; Pattern_Syntax # So DOWNWARDS DOUBLE ARROW
+21D4 ; Pattern_Syntax # Sm LEFT RIGHT DOUBLE ARROW
+21D5..21F3 ; Pattern_Syntax # So [31] UP DOWN DOUBLE ARROW..UP DOWN WHITE ARROW
+21F4..22FF ; Pattern_Syntax # Sm [268] RIGHT ARROW WITH SMALL CIRCLE..Z NOTATION BAG MEMBERSHIP
+2300..2307 ; Pattern_Syntax # So [8] DIAMETER SIGN..WAVY LINE
+2308..230B ; Pattern_Syntax # Sm [4] LEFT CEILING..RIGHT FLOOR
+230C..231F ; Pattern_Syntax # So [20] BOTTOM RIGHT CROP..BOTTOM RIGHT CORNER
+2320..2321 ; Pattern_Syntax # Sm [2] TOP HALF INTEGRAL..BOTTOM HALF INTEGRAL
+2322..2328 ; Pattern_Syntax # So [7] FROWN..KEYBOARD
+2329 ; Pattern_Syntax # Ps LEFT-POINTING ANGLE BRACKET
+232A ; Pattern_Syntax # Pe RIGHT-POINTING ANGLE BRACKET
+232B..237B ; Pattern_Syntax # So [81] ERASE TO THE LEFT..NOT CHECK MARK
+237C ; Pattern_Syntax # Sm RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW
+237D..239A ; Pattern_Syntax # So [30] SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL
+239B..23B3 ; Pattern_Syntax # Sm [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM
+23B4..23DB ; Pattern_Syntax # So [40] TOP SQUARE BRACKET..FUSE
+23DC..23E1 ; Pattern_Syntax # Sm [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET
+23E2..23F3 ; Pattern_Syntax # So [18] WHITE TRAPEZIUM..HOURGLASS WITH FLOWING SAND
+23F4..23FF ; Pattern_Syntax # Cn [12] <reserved-23F4>..<reserved-23FF>
+2400..2426 ; Pattern_Syntax # So [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO
+2427..243F ; Pattern_Syntax # Cn [25] <reserved-2427>..<reserved-243F>
+2440..244A ; Pattern_Syntax # So [11] OCR HOOK..OCR DOUBLE BACKSLASH
+244B..245F ; Pattern_Syntax # Cn [21] <reserved-244B>..<reserved-245F>
+2500..25B6 ; Pattern_Syntax # So [183] BOX DRAWINGS LIGHT HORIZONTAL..BLACK RIGHT-POINTING TRIANGLE
+25B7 ; Pattern_Syntax # Sm WHITE RIGHT-POINTING TRIANGLE
+25B8..25C0 ; Pattern_Syntax # So [9] BLACK RIGHT-POINTING SMALL TRIANGLE..BLACK LEFT-POINTING TRIANGLE
+25C1 ; Pattern_Syntax # Sm WHITE LEFT-POINTING TRIANGLE
+25C2..25F7 ; Pattern_Syntax # So [54] BLACK LEFT-POINTING SMALL TRIANGLE..WHITE CIRCLE WITH UPPER RIGHT QUADRANT
+25F8..25FF ; Pattern_Syntax # Sm [8] UPPER LEFT TRIANGLE..LOWER RIGHT TRIANGLE
+2600..266E ; Pattern_Syntax # So [111] BLACK SUN WITH RAYS..MUSIC NATURAL SIGN
+266F ; Pattern_Syntax # Sm MUSIC SHARP SIGN
+2670..26FF ; Pattern_Syntax # So [144] WEST SYRIAC CROSS..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE
+2700 ; Pattern_Syntax # Cn <reserved-2700>
+2701..2767 ; Pattern_Syntax # So [103] UPPER BLADE SCISSORS..ROTATED FLORAL HEART BULLET
+2768 ; Pattern_Syntax # Ps MEDIUM LEFT PARENTHESIS ORNAMENT
+2769 ; Pattern_Syntax # Pe MEDIUM RIGHT PARENTHESIS ORNAMENT
+276A ; Pattern_Syntax # Ps MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT
+276B ; Pattern_Syntax # Pe MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT
+276C ; Pattern_Syntax # Ps MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
+276D ; Pattern_Syntax # Pe MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
+276E ; Pattern_Syntax # Ps HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT
+276F ; Pattern_Syntax # Pe HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT
+2770 ; Pattern_Syntax # Ps HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT
+2771 ; Pattern_Syntax # Pe HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT
+2772 ; Pattern_Syntax # Ps LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT
+2773 ; Pattern_Syntax # Pe LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT
+2774 ; Pattern_Syntax # Ps MEDIUM LEFT CURLY BRACKET ORNAMENT
+2775 ; Pattern_Syntax # Pe MEDIUM RIGHT CURLY BRACKET ORNAMENT
+2794..27BF ; Pattern_Syntax # So [44] HEAVY WIDE-HEADED RIGHTWARDS ARROW..DOUBLE CURLY LOOP
+27C0..27C4 ; Pattern_Syntax # Sm [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET
+27C5 ; Pattern_Syntax # Ps LEFT S-SHAPED BAG DELIMITER
+27C6 ; Pattern_Syntax # Pe RIGHT S-SHAPED BAG DELIMITER
+27C7..27CA ; Pattern_Syntax # Sm [4] OR WITH DOT INSIDE..VERTICAL BAR WITH HORIZONTAL STROKE
+27CB ; Pattern_Syntax # Cn <reserved-27CB>
+27CC ; Pattern_Syntax # Sm LONG DIVISION
+27CD ; Pattern_Syntax # Cn <reserved-27CD>
+27CE..27E5 ; Pattern_Syntax # Sm [24] SQUARED LOGICAL AND..WHITE SQUARE WITH RIGHTWARDS TICK
+27E6 ; Pattern_Syntax # Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET
+27E7 ; Pattern_Syntax # Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET
+27E8 ; Pattern_Syntax # Ps MATHEMATICAL LEFT ANGLE BRACKET
+27E9 ; Pattern_Syntax # Pe MATHEMATICAL RIGHT ANGLE BRACKET
+27EA ; Pattern_Syntax # Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
+27EB ; Pattern_Syntax # Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
+27EC ; Pattern_Syntax # Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
+27ED ; Pattern_Syntax # Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
+27EE ; Pattern_Syntax # Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS
+27EF ; Pattern_Syntax # Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+27F0..27FF ; Pattern_Syntax # Sm [16] UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW
+2800..28FF ; Pattern_Syntax # So [256] BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678
+2900..2982 ; Pattern_Syntax # Sm [131] RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..Z NOTATION TYPE COLON
+2983 ; Pattern_Syntax # Ps LEFT WHITE CURLY BRACKET
+2984 ; Pattern_Syntax # Pe RIGHT WHITE CURLY BRACKET
+2985 ; Pattern_Syntax # Ps LEFT WHITE PARENTHESIS
+2986 ; Pattern_Syntax # Pe RIGHT WHITE PARENTHESIS
+2987 ; Pattern_Syntax # Ps Z NOTATION LEFT IMAGE BRACKET
+2988 ; Pattern_Syntax # Pe Z NOTATION RIGHT IMAGE BRACKET
+2989 ; Pattern_Syntax # Ps Z NOTATION LEFT BINDING BRACKET
+298A ; Pattern_Syntax # Pe Z NOTATION RIGHT BINDING BRACKET
+298B ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH UNDERBAR
+298C ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH UNDERBAR
+298D ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
+298E ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+298F ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+2990 ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
+2991 ; Pattern_Syntax # Ps LEFT ANGLE BRACKET WITH DOT
+2992 ; Pattern_Syntax # Pe RIGHT ANGLE BRACKET WITH DOT
+2993 ; Pattern_Syntax # Ps LEFT ARC LESS-THAN BRACKET
+2994 ; Pattern_Syntax # Pe RIGHT ARC GREATER-THAN BRACKET
+2995 ; Pattern_Syntax # Ps DOUBLE LEFT ARC GREATER-THAN BRACKET
+2996 ; Pattern_Syntax # Pe DOUBLE RIGHT ARC LESS-THAN BRACKET
+2997 ; Pattern_Syntax # Ps LEFT BLACK TORTOISE SHELL BRACKET
+2998 ; Pattern_Syntax # Pe RIGHT BLACK TORTOISE SHELL BRACKET
+2999..29D7 ; Pattern_Syntax # Sm [63] DOTTED FENCE..BLACK HOURGLASS
+29D8 ; Pattern_Syntax # Ps LEFT WIGGLY FENCE
+29D9 ; Pattern_Syntax # Pe RIGHT WIGGLY FENCE
+29DA ; Pattern_Syntax # Ps LEFT DOUBLE WIGGLY FENCE
+29DB ; Pattern_Syntax # Pe RIGHT DOUBLE WIGGLY FENCE
+29DC..29FB ; Pattern_Syntax # Sm [32] INCOMPLETE INFINITY..TRIPLE PLUS
+29FC ; Pattern_Syntax # Ps LEFT-POINTING CURVED ANGLE BRACKET
+29FD ; Pattern_Syntax # Pe RIGHT-POINTING CURVED ANGLE BRACKET
+29FE..2AFF ; Pattern_Syntax # Sm [258] TINY..N-ARY WHITE VERTICAL BAR
+2B00..2B2F ; Pattern_Syntax # So [48] NORTH EAST WHITE ARROW..WHITE VERTICAL ELLIPSE
+2B30..2B44 ; Pattern_Syntax # Sm [21] LEFT ARROW WITH SMALL CIRCLE..RIGHTWARDS ARROW THROUGH SUPERSET
+2B45..2B46 ; Pattern_Syntax # So [2] LEFTWARDS QUADRUPLE ARROW..RIGHTWARDS QUADRUPLE ARROW
+2B47..2B4C ; Pattern_Syntax # Sm [6] REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR
+2B4D..2B4F ; Pattern_Syntax # Cn [3] <reserved-2B4D>..<reserved-2B4F>
+2B50..2B59 ; Pattern_Syntax # So [10] WHITE MEDIUM STAR..HEAVY CIRCLED SALTIRE
+2B5A..2BFF ; Pattern_Syntax # Cn [166] <reserved-2B5A>..<reserved-2BFF>
+2E00..2E01 ; Pattern_Syntax # Po [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
+2E02 ; Pattern_Syntax # Pi LEFT SUBSTITUTION BRACKET
+2E03 ; Pattern_Syntax # Pf RIGHT SUBSTITUTION BRACKET
+2E04 ; Pattern_Syntax # Pi LEFT DOTTED SUBSTITUTION BRACKET
+2E05 ; Pattern_Syntax # Pf RIGHT DOTTED SUBSTITUTION BRACKET
+2E06..2E08 ; Pattern_Syntax # Po [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER
+2E09 ; Pattern_Syntax # Pi LEFT TRANSPOSITION BRACKET
+2E0A ; Pattern_Syntax # Pf RIGHT TRANSPOSITION BRACKET
+2E0B ; Pattern_Syntax # Po RAISED SQUARE
+2E0C ; Pattern_Syntax # Pi LEFT RAISED OMISSION BRACKET
+2E0D ; Pattern_Syntax # Pf RIGHT RAISED OMISSION BRACKET
+2E0E..2E16 ; Pattern_Syntax # Po [9] EDITORIAL CORONIS..DOTTED RIGHT-POINTING ANGLE
+2E17 ; Pattern_Syntax # Pd DOUBLE OBLIQUE HYPHEN
+2E18..2E19 ; Pattern_Syntax # Po [2] INVERTED INTERROBANG..PALM BRANCH
+2E1A ; Pattern_Syntax # Pd HYPHEN WITH DIAERESIS
+2E1B ; Pattern_Syntax # Po TILDE WITH RING ABOVE
+2E1C ; Pattern_Syntax # Pi LEFT LOW PARAPHRASE BRACKET
+2E1D ; Pattern_Syntax # Pf RIGHT LOW PARAPHRASE BRACKET
+2E1E..2E1F ; Pattern_Syntax # Po [2] TILDE WITH DOT ABOVE..TILDE WITH DOT BELOW
+2E20 ; Pattern_Syntax # Pi LEFT VERTICAL BAR WITH QUILL
+2E21 ; Pattern_Syntax # Pf RIGHT VERTICAL BAR WITH QUILL
+2E22 ; Pattern_Syntax # Ps TOP LEFT HALF BRACKET
+2E23 ; Pattern_Syntax # Pe TOP RIGHT HALF BRACKET
+2E24 ; Pattern_Syntax # Ps BOTTOM LEFT HALF BRACKET
+2E25 ; Pattern_Syntax # Pe BOTTOM RIGHT HALF BRACKET
+2E26 ; Pattern_Syntax # Ps LEFT SIDEWAYS U BRACKET
+2E27 ; Pattern_Syntax # Pe RIGHT SIDEWAYS U BRACKET
+2E28 ; Pattern_Syntax # Ps LEFT DOUBLE PARENTHESIS
+2E29 ; Pattern_Syntax # Pe RIGHT DOUBLE PARENTHESIS
+2E2A..2E2E ; Pattern_Syntax # Po [5] TWO DOTS OVER ONE DOT PUNCTUATION..REVERSED QUESTION MARK
+2E2F ; Pattern_Syntax # Lm VERTICAL TILDE
+2E30..2E31 ; Pattern_Syntax # Po [2] RING POINT..WORD SEPARATOR MIDDLE DOT
+2E32..2E7F ; Pattern_Syntax # Cn [78] <reserved-2E32>..<reserved-2E7F>
+3001..3003 ; Pattern_Syntax # Po [3] IDEOGRAPHIC COMMA..DITTO MARK
+3008 ; Pattern_Syntax # Ps LEFT ANGLE BRACKET
+3009 ; Pattern_Syntax # Pe RIGHT ANGLE BRACKET
+300A ; Pattern_Syntax # Ps LEFT DOUBLE ANGLE BRACKET
+300B ; Pattern_Syntax # Pe RIGHT DOUBLE ANGLE BRACKET
+300C ; Pattern_Syntax # Ps LEFT CORNER BRACKET
+300D ; Pattern_Syntax # Pe RIGHT CORNER BRACKET
+300E ; Pattern_Syntax # Ps LEFT WHITE CORNER BRACKET
+300F ; Pattern_Syntax # Pe RIGHT WHITE CORNER BRACKET
+3010 ; Pattern_Syntax # Ps LEFT BLACK LENTICULAR BRACKET
+3011 ; Pattern_Syntax # Pe RIGHT BLACK LENTICULAR BRACKET
+3012..3013 ; Pattern_Syntax # So [2] POSTAL MARK..GETA MARK
+3014 ; Pattern_Syntax # Ps LEFT TORTOISE SHELL BRACKET
+3015 ; Pattern_Syntax # Pe RIGHT TORTOISE SHELL BRACKET
+3016 ; Pattern_Syntax # Ps LEFT WHITE LENTICULAR BRACKET
+3017 ; Pattern_Syntax # Pe RIGHT WHITE LENTICULAR BRACKET
+3018 ; Pattern_Syntax # Ps LEFT WHITE TORTOISE SHELL BRACKET
+3019 ; Pattern_Syntax # Pe RIGHT WHITE TORTOISE SHELL BRACKET
+301A ; Pattern_Syntax # Ps LEFT WHITE SQUARE BRACKET
+301B ; Pattern_Syntax # Pe RIGHT WHITE SQUARE BRACKET
+301C ; Pattern_Syntax # Pd WAVE DASH
+301D ; Pattern_Syntax # Ps REVERSED DOUBLE PRIME QUOTATION MARK
+301E..301F ; Pattern_Syntax # Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK
+3020 ; Pattern_Syntax # So POSTAL MARK FACE
+3030 ; Pattern_Syntax # Pd WAVY DASH
+FD3E ; Pattern_Syntax # Ps ORNATE LEFT PARENTHESIS
+FD3F ; Pattern_Syntax # Pe ORNATE RIGHT PARENTHESIS
+FE45..FE46 ; Pattern_Syntax # Po [2] SESAME DOT..WHITE SESAME DOT
+
+# Total code points: 2760
+
+# EOF
--- a/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/make/tools/src/build/tools/generatecharacter/GenerateCharacter.java Tue May 03 22:16:58 2011 -0700
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +33,7 @@
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.File;
+import java.util.List;
import build.tools.generatecharacter.CharacterName;
@@ -68,18 +68,17 @@
final static boolean DEBUG = false;
- final static int MAX_UNICODE_VALUE = 0xFFFF;
final static String commandMarker = "$$";
static String ROOT = "";
static String DefaultUnicodeSpecFileName = ROOT + "UnicodeData.txt";
static String DefaultSpecialCasingFileName = ROOT + "SpecialCasing.txt";
+ static String DefaultPropListFileName = ROOT + "PropList.txt";
static String DefaultJavaTemplateFileName = ROOT + "Character.java.template";
static String DefaultJavaOutputFileName = ROOT + "Character.java";
static String DefaultCTemplateFileName = ROOT + "Character.c.template";
static String DefaultCOutputFileName = ROOT + "Character.c";
- static String CharacterDataClassName = "CharacterData";
- static int plane = 0;
+ static int plane = 0;
/* The overall idea is that, in the generated Character class source code,
most character property data is stored in a special multi-level table whose
@@ -105,7 +104,11 @@
entries are short rather than byte).
*/
- /* The character properties are currently encoded into 32 bits in the following manner:
+ /* The character properties are currently encoded into A (32 bits)and B (16 bits)
+ two parts.
+
+ A: the low 32 bits are defined in the following manner:
+
1 bit Mirrored property.
4 bits Bidirectional category (see below) (unused if -nobidi switch specified)
9 bits A signed offset used for converting case .
@@ -148,6 +151,14 @@
will produce the desired numeric value.
5 bits The digit offset (see description of previous field)
5 bits Character type (see below)
+
+ B: the high 16 bits are defined as:
+ 1 bit Other_Lowercase property
+ 1 bit Other_Uppercase property
+ 1 bit Other_Alphabetic property
+ 1 bit Other_Math property
+ 1 bit Ideographic property
+ 1 bit Noncharacter codepoint property
*/
@@ -173,9 +184,22 @@
// case offset are 9 bits
maskCase = 0x01FF,
shiftBidi = 27, maskBidi = 0x78000000,
- shiftMirrored = 31, maskMirrored = 0x80000000,
+ shiftMirrored = 31, //maskMirrored = 0x80000000,
shiftPlane = 16, maskPlane = 0xFF0000;
+ // maskMirrored needs to be long, if up 16-bit
+ private static final long maskMirrored = 0x80000000L;
+
+ // bit masks identify the 16-bit priperty field described above, in B
+ // table
+ private static final long
+ maskOtherLowercase = 0x100000000L,
+ maskOtherUppercase = 0x200000000L,
+ maskOtherAlphabetic = 0x400000000L,
+ maskOtherMath = 0x800000000L,
+ maskIdeographic = 0x1000000000L,
+ maskNoncharacterCP = 0x2000000000L;
+
// Can compare masked values with these to determine
// numeric or lexical types.
public static int
@@ -258,7 +282,7 @@
* The specification file is assumed to contain its data in sorted order by
* character code; as a result, the array passed as an argument to this method
* has its components in the same sorted order, with one entry for each defined
- * Unicode character or character range. (A range is indicated by two consecutive
+ * Unicode character or character range. (A range is indicated by two consecutive
* entries, such that the name of the first entry begins with "<" and ends with
* "First>" and the second entry begins with "<" and ends with "Last>".) This is
* therefore a sparse representation of the character property data.
@@ -282,7 +306,8 @@
* @see GenerateCharacter#buildOne
*/
- static long[] buildMap(UnicodeSpec[] data, SpecialCaseMap[] specialMaps) {
+ static long[] buildMap(UnicodeSpec[] data, SpecialCaseMap[] specialMaps, PropList propList)
+ {
long[] result;
if (bLatin1 == true) {
result = new long[256];
@@ -290,13 +315,13 @@
result = new long[1<<16];
}
int k=0;
- int codePoint = plane<<16;
+ int codePoint = plane<<16;
UnicodeSpec nonCharSpec = new UnicodeSpec();
for (int j = 0; j < data.length && k < result.length; j++) {
if (data[j].codePoint == codePoint) {
result[k] = buildOne(codePoint, data[j], specialMaps);
++k;
- ++codePoint;
+ ++codePoint;
}
else if(data[j].codePoint > codePoint) {
if (data[j].name.endsWith("Last>")) {
@@ -304,7 +329,7 @@
while (codePoint < data[j].codePoint && k < result.length) {
result[k] = buildOne(codePoint, data[j], specialMaps);
++k;
- ++codePoint;
+ ++codePoint;
}
}
else {
@@ -312,15 +337,14 @@
while (codePoint < data[j].codePoint && k < result.length) {
result[k] = buildOne(codePoint, nonCharSpec, specialMaps);
++k;
- ++codePoint;
+ ++codePoint;
}
}
k = data[j].codePoint & 0xFFFF;
- codePoint = data[j].codePoint;
+ codePoint = data[j].codePoint;
result[k] = buildOne(codePoint, data[j], specialMaps);
++k;
- ++codePoint;
-
+ ++codePoint;
}
else {
System.out.println("An error has occured during spec mapping.");
@@ -333,8 +357,17 @@
while (k < result.length) {
result[k] = buildOne(codePoint, nonCharSpec, specialMaps);
++k;
- ++codePoint;
+ ++codePoint;
}
+ // now add all extra supported properties from PropList, to the
+ // upper 16-bit
+ addExProp(result, propList, "Other_Lowercase", maskOtherLowercase);
+ addExProp(result, propList, "Other_Uppercase", maskOtherUppercase);
+ addExProp(result, propList, "Other_Alphabetic", maskOtherAlphabetic);
+ addExProp(result, propList, "Ideographic", maskIdeographic);
+ //addExProp(result, propList, "Other_Math", maskOtherMath);
+ //addExProp(result, propList, "Noncharacter_CodePoint", maskNoncharacterCP);
+
return result;
}
@@ -381,15 +414,15 @@
// record the general category
resultA |= us.generalCategory;
- // record the numeric properties
- NUMERIC: {
+ // record the numeric properties
+ NUMERIC: {
STRANGE: {
int val = 0;
- // c is A-Z
+ // c is A-Z
if ((c >= 0x0041) && (c <= 0x005A)) {
val = c - 0x0041;
resultA |= valueJavaSupradecimal;
- // c is a-z
+ // c is a-z
} else if ((c >= 0x0061) && (c <= 0x007A)) {
val = c - 0x0061;
resultA |= valueJavaSupradecimal;
@@ -428,7 +461,7 @@
resultA |= valueStrangeNumeric;
} // end NUMERIC
- // record case mapping
+ // record case mapping
int offset = 0;
// might have a 1:M mapping
int specialMap = SpecialCaseMap.find(c, specialCaseMaps);
@@ -458,12 +491,12 @@
}
}
if ((us.hasTitleMap() && us.titleMap != us.upperMap) ||
- (bHasUpper && us.hasLowerMap())) {
+ (bHasUpper && us.hasLowerMap())) {
resultA |= maskTitleCase;
}
if (bHasUpper && !us.hasLowerMap() && !us.hasTitleMap() && verbose) {
- System.out.println("Warning: Character " + hex4(c) + " has upper but " +
- "no title case; Java won't know this");
+ System.out.println("Warning: Character " + hex4(c) + " has upper but " +
+ "no title case; Java won't know this");
}
if (offset < minOffsetSeen) minOffsetSeen = offset;
if (offset > maxOffsetSeen) maxOffsetSeen = offset;
@@ -475,8 +508,7 @@
}
resultA |= ((offset & maskCase) << shiftCaseOffset);
-
- // record lexical info about this character
+ // record lexical info about this character
if (us.generalCategory == UnicodeSpec.LOWERCASE_LETTER
|| us.generalCategory == UnicodeSpec.UPPERCASE_LETTER
|| us.generalCategory == UnicodeSpec.TITLECASE_LETTER
@@ -539,6 +571,16 @@
return resultA;
}
+ static void addExProp(long[] map, PropList propList, String prop, long mask) {
+ List<Integer> cps = propList.codepoints(prop);
+ if (cps != null) {
+ for (Integer cp : cps) {
+ if (cp < map.length)
+ map[cp] |= mask;
+ }
+ }
+ }
+
/**
* This is the heart of the table compression strategy. The inputs are a map
* and a number of bits (size). The map is simply an array of long integer values;
@@ -645,8 +687,8 @@
*/
static void generateCharacterClass(String theTemplateFileName,
- String theOutputFileName)
- throws FileNotFoundException, IOException {
+ String theOutputFileName)
+ throws FileNotFoundException, IOException {
BufferedReader in = new BufferedReader(new FileReader(theTemplateFileName));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName)));
out.println(commentStart +
@@ -719,6 +761,9 @@
if (x.length() >= 9 && x.substring(0, 7).equals("Lookup(") &&
x.substring(x.length()-1).equals(")") )
return genAccess("A", x.substring(7, x.length()-1), (identifiers ? 2 : 32));
+ if (x.length() >= 11 && x.substring(0, 9).equals("LookupEx(") &&
+ x.substring(x.length()-1).equals(")") )
+ return genAccess("B", x.substring(9, x.length()-1), 16);
if (x.equals("shiftType")) return Long.toString(shiftType);
if (x.equals("shiftIdentifierInfo")) return Long.toString(shiftIdentifierInfo);
if (x.equals("maskIdentifierInfo")) return "0x" + hex8(maskIdentifierInfo);
@@ -731,6 +776,10 @@
if (x.equals("maskLowerCase")) return "0x" + hex8(maskLowerCase);
if (x.equals("maskUpperCase")) return "0x" + hex8(maskUpperCase);
if (x.equals("maskTitleCase")) return "0x" + hex8(maskTitleCase);
+ if (x.equals("maskOtherLowercase")) return "0x" + hex4(maskOtherLowercase >> 32);
+ if (x.equals("maskOtherUppercase")) return "0x" + hex4(maskOtherUppercase >> 32);
+ if (x.equals("maskOtherAlphabetic")) return "0x" + hex4(maskOtherAlphabetic >> 32);
+ if (x.equals("maskIdeographic")) return "0x" + hex4(maskIdeographic >> 32);
if (x.equals("valueIgnorable")) return "0x" + hex8(valueIgnorable);
if (x.equals("valueJavaUnicodeStart")) return "0x" + hex8(valueJavaUnicodeStart);
if (x.equals("valueJavaOnlyStart")) return "0x" + hex8(valueJavaOnlyStart);
@@ -899,7 +948,7 @@
// If we ever need more than 32 bits to represent the character properties,
// then a table "B" may be needed as well.
- // genTable(result, "B", tables[n - 1], 32, 16, sizes[n - 1], false, 0, true, true, false);
+ genTable(result, "B", tables[n - 1], 32, 16, sizes[n - 1], false, 0, true, true, false);
totalBytes += ((((tables[n - 1].length * (identifiers ? 2 : 32)) + 31) >> 5) << 2);
result.append(commentStart);
@@ -1080,9 +1129,9 @@
*/
static void genTable(StringBuffer result, String name,
- long[] table, int extract, int bits, int size,
- boolean preshifted, int shift, boolean hexFormat,
- boolean properties, boolean hexComment) {
+ long[] table, int extract, int bits, int size,
+ boolean preshifted, int shift, boolean hexFormat,
+ boolean properties, boolean hexComment) {
String atype = bits == 1 ? (Csyntax ? "unsigned long" : "int") :
bits == 2 ? (Csyntax ? "unsigned long" : "int") :
@@ -1137,7 +1186,12 @@
char ch = '\u0000';
int charsPerEntry = -entriesPerChar;
for (int j=0; j<table.length; ++j) {
- long entry = table[j] >> extract;
+ //long entry = table[j] >> extract;
+ long entry;
+ if ("A".equals(name))
+ entry = (table[j] & 0xffffffffL) >> extract;
+ else
+ entry = (table[j] >> extract);
if (shiftEntries) entry <<= shift;
if (entry >= (1L << bits)) {
FAIL("Entry too big");
@@ -1549,6 +1603,7 @@
static String OutputFileName = null;
static String UnicodeSpecFileName = null; // liu
static String SpecialCasingFileName = null;
+ static String PropListFileName = null;
static boolean useCharForByte = false;
static int[] sizes;
static int bins = 0; // liu; if > 0, then perform search
@@ -1668,20 +1723,28 @@
SpecialCasingFileName = args[++j];
}
}
- else if (args[j].equals("-plane")) {
- if (j == args.length -1) {
- FAIL("Plane number missing after -plane");
- }
- else {
- plane = Integer.parseInt(args[++j]);
- }
- if (plane > 0) {
- bLatin1 = false;
- }
- }
- else if ("-usecharforbyte".equals(args[j])) {
- useCharForByte = true;
- }
+ else if (args[j].equals("-proplist")) {
+ if (j == args.length -1) {
+ FAIL("File name missing after -proplist");
+ }
+ else {
+ PropListFileName = args[++j];
+ }
+ }
+ else if (args[j].equals("-plane")) {
+ if (j == args.length -1) {
+ FAIL("Plane number missing after -plane");
+ }
+ else {
+ plane = Integer.parseInt(args[++j]);
+ }
+ if (plane > 0) {
+ bLatin1 = false;
+ }
+ }
+ else if ("-usecharforbyte".equals(args[j])) {
+ useCharForByte = true;
+ }
else if (args[j].equals("-latin1")) {
bLatin1 = true;
plane = 0;
@@ -1728,6 +1791,10 @@
SpecialCasingFileName = DefaultSpecialCasingFileName;
desc.append(" [-specialcasing " + SpecialCasingFileName + ']');
}
+ if (PropListFileName == null) {
+ PropListFileName = DefaultPropListFileName;
+ desc.append(" [-proplist " + PropListFileName + ']');
+ }
if (TemplateFileName == null) {
TemplateFileName = (Csyntax ? DefaultCTemplateFileName
: DefaultJavaTemplateFileName);
@@ -1877,12 +1944,13 @@
try {
UnicodeSpec[] data = UnicodeSpec.readSpecFile(new File(UnicodeSpecFileName), plane);
+ specialCaseMaps = SpecialCaseMap.readSpecFile(new File(SpecialCasingFileName), plane);
+ PropList propList = PropList.readSpecFile(new File(PropListFileName), plane);
- specialCaseMaps = SpecialCaseMap.readSpecFile(new File(SpecialCasingFileName), plane);
if (verbose) {
System.out.println(data.length + " items read from Unicode spec file " + UnicodeSpecFileName); // liu
}
- long[] map = buildMap(data, specialCaseMaps);
+ long[] map = buildMap(data, specialCaseMaps, propList);
if (verbose) {
System.err.println("Completed building of initial map");
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/src/build/tools/generatecharacter/PropList.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatecharacter;
+
+import java.util.regex.*;
+import java.util.*;
+import java.io.*;
+
+/**
+ * A PropList object contains the lists of code points that have
+ * the same Unicode property defined in PropList.txt
+ *
+ * @author Xueming Shen
+ */
+public class PropList {
+
+ public static PropList readSpecFile(File file, int plane)
+ throws IOException
+ {
+ return new PropList(file, plane);
+ }
+
+ public List<Integer> codepoints(String name) {
+ return propMap.get(name);
+ }
+
+ public Set<String> names() {
+ return propMap.keySet();
+ }
+
+ private Map<String, ArrayList<Integer>> propMap =
+ new LinkedHashMap<String, ArrayList<Integer>>();
+
+ private PropList(File file, int plane) throws IOException {
+
+ int i, j;
+ BufferedReader sbfr = new BufferedReader(new FileReader(file));
+ Matcher m = Pattern.compile("(\\p{XDigit}+)(?:\\.{2}(\\p{XDigit}+))?\\s*;\\s+(\\w+)\\s+#.*").matcher("");
+ String line = null;
+ int lineNo = 0;
+ while ((line = sbfr.readLine()) != null) {
+ lineNo++;
+ if (line.length() <= 1 || line.charAt(0) == '#') {
+ continue;
+ }
+ m.reset(line);
+ if (m.matches()) {
+ int start = Integer.parseInt(m.group(1), 16);
+ if ((start >> 16) != plane)
+ continue;
+ int end = (m.group(2)==null)?start
+ :Integer.parseInt(m.group(2), 16);
+ String name = m.group(3);
+
+ start &= 0xffff;
+ end &= 0xffff;
+
+ ArrayList<Integer> list = propMap.get(name);
+ if (list == null) {
+ list = new ArrayList<Integer>();
+ propMap.put(name, list);
+ }
+ while (start <= end)
+ list.add(start++);
+ } else {
+ System.out.printf("Warning: Unrecognized line %d <%s>%n", lineNo, line);
+ }
+ }
+ sbfr.close();
+
+ //for (String name: propMap.keySet()) {
+ // System.out.printf("%s %d%n", name, propMap.get(name).size());
+ //}
+ }
+
+ public static void main(String[] args) throws IOException {
+ readSpecFile(new File(args[0]), Integer.decode(args[1]));
+ }
+}
--- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Tue May 03 22:16:58 2011 -0700
@@ -1666,7 +1666,7 @@
*/
protected void removeCurrentRow() {
((Row)getCurrentRow()).setDeleted();
- rvh.remove(cursorPos);
+ rvh.remove(cursorPos - 1);
--numRows;
}
@@ -6349,7 +6349,6 @@
// this can happen if deleted rows are being shown
if (row.getDeleted() == true) {
removeCurrentRow();
- --numRows;
}
}
--- a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -395,7 +395,13 @@
private boolean succeeded = false;
private boolean commitSucceeded = false;
private String username;
+
+ // Encryption keys calculated from password. Assigned when storekey == true
+ // and useKeyTab == false (or true but not found)
private EncryptionKey[] encKeys = null;
+
+ KeyTab ktab = null;
+
private Credentials cred = null;
private PrincipalName principal = null;
@@ -663,28 +669,49 @@
(krb5PrincName.toString(),
PrincipalName.KRB_NT_PRINCIPAL);
}
+
+ /*
+ * Before dynamic KeyTab support (6894072), here we check if
+ * the keytab contains keys for the principal. If no, keytab
+ * will not be used and password is prompted for.
+ *
+ * After 6894072, we normally don't check it, and expect the
+ * keys can be populated until a real connection is made. The
+ * check is still done when isInitiator == true, where the keys
+ * will be used right now.
+ *
+ * Probably tricky relations:
+ *
+ * useKeyTab is config flag, but when it's true but the ktab
+ * does not contains keys for principal, we would use password
+ * and keep the flag unchanged (for reuse?). In this method,
+ * we use (ktab != null) to check whether keytab is used.
+ * After this method (and when storeKey == true), we use
+ * (encKeys == null) to check.
+ */
if (useKeyTab) {
- encKeys =
- EncryptionKey.acquireSecretKeys(principal, keyTabName);
-
- if (debug) {
- if (encKeys != null)
- System.out.println
- ("principal's key obtained from the keytab");
- else
- System.out.println
- ("Key for the principal " +
- principal +
- " not available in " +
- ((keyTabName == null) ?
- "default key tab" : keyTabName));
+ ktab = (keyTabName == null)
+ ? KeyTab.getInstance()
+ : KeyTab.getInstance(new File(keyTabName));
+ if (isInitiator) {
+ if (Krb5Util.keysFromJavaxKeyTab(ktab, principal).length
+ == 0) {
+ ktab = null;
+ if (debug) {
+ System.out.println
+ ("Key for the principal " +
+ principal +
+ " not available in " +
+ ((keyTabName == null) ?
+ "default key tab" : keyTabName));
+ }
+ }
}
-
}
KrbAsReqBuilder builder;
- // We can't get the key from the keytab so prompt
- if (encKeys == null) {
+
+ if (ktab == null) {
promptForPass(getPasswdFromSharedState);
builder = new KrbAsReqBuilder(principal, password);
if (isInitiator) {
@@ -693,9 +720,13 @@
// updated with PA info
cred = builder.action().getCreds();
}
- encKeys = builder.getKeys();
+ if (storeKey) {
+ encKeys = builder.getKeys();
+ // When encKeys is empty, the login actually fails.
+ // For compatibility, exception is thrown in commit().
+ }
} else {
- builder = new KrbAsReqBuilder(principal, encKeys);
+ builder = new KrbAsReqBuilder(principal, ktab);
if (isInitiator) {
cred = builder.action().getCreds();
}
@@ -705,10 +736,15 @@
if (debug) {
System.out.println("principal is " + principal);
HexDumpEncoder hd = new HexDumpEncoder();
- for (int i = 0; i < encKeys.length; i++) {
- System.out.println("EncryptionKey: keyType=" +
- encKeys[i].getEType() + " keyBytes (hex dump)=" +
- hd.encodeBuffer(encKeys[i].getBytes()));
+ if (ktab != null) {
+ System.out.println("Will use keytab");
+ } else if (storeKey) {
+ for (int i = 0; i < encKeys.length; i++) {
+ System.out.println("EncryptionKey: keyType=" +
+ encKeys[i].getEType() +
+ " keyBytes (hex dump)=" +
+ hd.encodeBuffer(encKeys[i].getBytes()));
+ }
}
}
@@ -989,8 +1025,8 @@
kerbTicket = Krb5Util.credsToTicket(cred);
}
- if (storeKey) {
- if (encKeys == null || encKeys.length <= 0) {
+ if (storeKey && encKeys != null) {
+ if (encKeys.length == 0) {
succeeded = false;
throw new LoginException("Null Server Key ");
}
@@ -1006,10 +1042,11 @@
}
}
- // Let us add the kerbClientPrinc,kerbTicket and kerbKey (if
+ // Let us add the kerbClientPrinc,kerbTicket and KeyTab/KerbKey (if
// storeKey is true)
- if (!princSet.contains(kerbClientPrinc))
+ if (!princSet.contains(kerbClientPrinc)) {
princSet.add(kerbClientPrinc);
+ }
// add the TGT
if (kerbTicket != null) {
@@ -1018,19 +1055,29 @@
}
if (storeKey) {
- for (int i = 0; i < kerbKeys.length; i++) {
- if (!privCredSet.contains(kerbKeys[i])) {
- privCredSet.add(kerbKeys[i]);
+ if (encKeys == null) {
+ if (!privCredSet.contains(ktab)) {
+ privCredSet.add(ktab);
+ // Compatibility; also add keys to privCredSet
+ for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
+ privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
+ }
}
- encKeys[i].destroy();
- encKeys[i] = null;
- if (debug) {
- System.out.println("Added server's key"
- + kerbKeys[i]);
- System.out.println("\t\t[Krb5LoginModule] " +
- "added Krb5Principal " +
- kerbClientPrinc.toString()
- + " to Subject");
+ } else {
+ for (int i = 0; i < kerbKeys.length; i ++) {
+ if (!privCredSet.contains(kerbKeys[i])) {
+ privCredSet.add(kerbKeys[i]);
+ }
+ encKeys[i].destroy();
+ encKeys[i] = null;
+ if (debug) {
+ System.out.println("Added server's key"
+ + kerbKeys[i]);
+ System.out.println("\t\t[Krb5LoginModule] " +
+ "added Krb5Principal " +
+ kerbClientPrinc.toString()
+ + " to Subject");
+ }
}
}
}
@@ -1106,7 +1153,8 @@
while (it.hasNext()) {
Object o = it.next();
if (o instanceof KerberosTicket ||
- o instanceof KerberosKey) {
+ o instanceof KerberosKey ||
+ o instanceof KeyTab) {
it.remove();
}
}
@@ -1161,6 +1209,7 @@
} else {
// remove temp results for the next try
encKeys = null;
+ ktab = null;
principal = null;
}
username = null;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import com.sun.jdi.request.*;
public class AccessWatchpointSpec extends WatchpointSpec {
@@ -38,6 +37,7 @@
/**
* The 'refType' is known to match.
*/
+ @Override
void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException {
if (!(refType instanceof ClassType)) {
@@ -51,6 +51,7 @@
.createAccessWatchpointRequest(field));
}
+ @Override
public boolean equals(Object obj) {
return (obj instanceof AccessWatchpointSpec) && super.equals(obj);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,9 @@
public class AmbiguousMethodException extends Exception
{
+
+ private static final long serialVersionUID = 7793370943251707514L;
+
public AmbiguousMethodException()
{
super();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -25,30 +25,33 @@
package com.sun.tools.example.debug.bdi;
-import com.sun.jdi.request.*;
-
public abstract class BreakpointSpec extends EventRequestSpec {
BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) {
super(specs, refSpec);
}
+ @Override
void notifySet(SpecListener listener, SpecEvent evt) {
listener.breakpointSet(evt);
}
+ @Override
void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.breakpointDeferred(evt);
}
+ @Override
void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.breakpointResolved(evt);
}
+ @Override
void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.breakpointDeleted(evt);
}
+ @Override
void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.breakpointError(evt);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java Tue May 03 22:16:58 2011 -0700
@@ -43,10 +43,6 @@
private BufferedReader out;
private BufferedReader err;
- private InputWriter inputWriter;
- private OutputReader outputReader;
- private OutputReader errorReader;
-
private InputListener input;
private OutputListener output;
private OutputListener error;
@@ -84,6 +80,7 @@
this.error = error;
}
+ @Override
public boolean attach() {
if (!connectToVMProcess()) {
@@ -131,6 +128,7 @@
return true;
}
+ @Override
public void detach() {
//### debug
@@ -242,10 +240,7 @@
this.diagnostics = diagnostics;
}
- public void quit() {
- running = false;
- }
-
+ @Override
public void run() {
try {
int count;
@@ -254,6 +249,7 @@
// Run in Swing event dispatcher thread.
final String chars = new String(buffer, 0, count);
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
output.putString(chars);
}
@@ -264,6 +260,7 @@
} catch (IOException e) {
// Run in Swing event dispatcher thread.
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
diagnostics.putString("IO error reading " +
streamName +
@@ -288,11 +285,7 @@
this.input = input;
}
- public void quit() {
- //### Won't have much effect if blocked on input!
- running = false;
- }
-
+ @Override
public void run() {
String line;
while (running) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi;
-public class EvaluationException extends Exception {}
+public class EvaluationException extends Exception {
+
+ private static final long serialVersionUID = 4947109680354951694L;
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java Tue May 03 22:16:58 2011 -0700
@@ -25,8 +25,6 @@
package com.sun.tools.example.debug.bdi;
-import java.util.*;
-
import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java Tue May 03 22:16:58 2011 -0700
@@ -26,11 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ReferenceType;
-import com.sun.jdi.request.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
public class ExceptionSpec extends EventRequestSpec {
@@ -45,22 +40,27 @@
this.notifyUncaught = notifyUncaught;
}
+ @Override
void notifySet(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptSet(evt);
}
+ @Override
void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeferred(evt);
}
+ @Override
void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptResolved(evt);
}
+ @Override
void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeleted(evt);
}
+ @Override
void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.exceptionInterceptError(evt);
}
@@ -68,16 +68,19 @@
/**
* The 'refType' is known to match.
*/
+ @Override
void resolve(ReferenceType refType) {
setRequest(refType.virtualMachine().eventRequestManager()
.createExceptionRequest(refType,
notifyCaught, notifyUncaught));
}
+ @Override
public int hashCode() {
return refSpec.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof ExceptionSpec) {
ExceptionSpec es = (ExceptionSpec)obj;
@@ -88,6 +91,7 @@
}
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer("exception catch ");
buffer.append(refSpec.toString());
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import com.sun.jdi.event.*;
import com.sun.jdi.request.*;
import com.sun.jdi.connect.*;
import com.sun.tools.example.debug.expr.ExpressionParser;
@@ -56,7 +55,7 @@
// Session Listeners
- Vector<SessionListener> sessionListeners = new Vector<SessionListener>();
+ ArrayList<SessionListener> sessionListeners = new ArrayList<SessionListener>();
public void addSessionListener(SessionListener listener) {
sessionListeners.add(listener);
@@ -68,7 +67,7 @@
// Spec Listeners
- Vector<SpecListener> specListeners = new Vector<SpecListener>();
+ ArrayList<SpecListener> specListeners = new ArrayList<SpecListener>();
public void addSpecListener(SpecListener cl) {
specListeners.add(cl);
@@ -80,7 +79,7 @@
// JDI Listeners
- Vector<JDIListener> jdiListeners = new Vector<JDIListener>();
+ ArrayList<JDIListener> jdiListeners = new ArrayList<JDIListener>();
/**
* Adds a JDIListener
@@ -105,50 +104,50 @@
// App Echo Listeners
- private Vector<OutputListener> appEchoListeners = new Vector<OutputListener>();
+ private ArrayList<OutputListener> appEchoListeners = new ArrayList<OutputListener>();
public void addApplicationEchoListener(OutputListener l) {
- appEchoListeners.addElement(l);
+ appEchoListeners.add(l);
}
public void removeApplicationEchoListener(OutputListener l) {
- appEchoListeners.removeElement(l);
+ appEchoListeners.remove(l);
}
// App Output Listeners
- private Vector<OutputListener> appOutputListeners = new Vector<OutputListener>();
+ private ArrayList<OutputListener> appOutputListeners = new ArrayList<OutputListener>();
public void addApplicationOutputListener(OutputListener l) {
- appOutputListeners.addElement(l);
+ appOutputListeners.add(l);
}
public void removeApplicationOutputListener(OutputListener l) {
- appOutputListeners.removeElement(l);
+ appOutputListeners.remove(l);
}
// App Error Listeners
- private Vector<OutputListener> appErrorListeners = new Vector<OutputListener>();
+ private ArrayList<OutputListener> appErrorListeners = new ArrayList<OutputListener>();
public void addApplicationErrorListener(OutputListener l) {
- appErrorListeners.addElement(l);
+ appErrorListeners.add(l);
}
public void removeApplicationErrorListener(OutputListener l) {
- appErrorListeners.removeElement(l);
+ appErrorListeners.remove(l);
}
// Diagnostic Listeners
- private Vector<OutputListener> diagnosticsListeners = new Vector<OutputListener>();
+ private ArrayList<OutputListener> diagnosticsListeners = new ArrayList<OutputListener>();
public void addDiagnosticsListener(OutputListener l) {
- diagnosticsListeners.addElement(l);
+ diagnosticsListeners.add(l);
}
public void removeDiagnosticsListener(OutputListener l) {
- diagnosticsListeners.removeElement(l);
+ diagnosticsListeners.remove(l);
}
/////////// End Listener Registration //////////////
@@ -159,7 +158,9 @@
}
void ensureActiveSession() throws NoSessionException {
- if (session == null) throw new NoSessionException();
+ if (session == null) {
+ throw new NoSessionException();
+ }
}
public EventRequestManager eventRequestManager() {
@@ -293,6 +294,7 @@
ensureActiveSession();
if (f != null) {
frameGetter = new ExpressionParser.GetFrame() {
+ @Override
public StackFrame get() /* throws IncompatibleThreadStateException */ {
return f;
}
@@ -628,35 +630,35 @@
*/
private void notifyInterrupted() {
- Vector l = (Vector)sessionListeners.clone();
+ ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) {
- ((SessionListener)l.elementAt(i)).sessionInterrupt(evt);
+ l.get(i).sessionInterrupt(evt);
}
}
private void notifyContinued() {
- Vector l = (Vector)sessionListeners.clone();
+ ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) {
- ((SessionListener)l.elementAt(i)).sessionContinue(evt);
+ l.get(i).sessionContinue(evt);
}
}
private void notifySessionStart() {
- Vector l = (Vector)sessionListeners.clone();
+ ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) {
- ((SessionListener)l.elementAt(i)).sessionStart(evt);
+ l.get(i).sessionStart(evt);
}
}
private void notifySessionDeath() {
/*** noop for now
- Vector l = (Vector)sessionListeners.clone();
+ ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) {
- ((SessionListener)l.elementAt(i)).sessionDeath(evt);
+ ((SessionListener)l.get(i)).sessionDeath(evt);
}
****/
}
@@ -684,6 +686,7 @@
}
private InputListener appInput = new InputListener() {
+ @Override
public String getLine() {
// Don't allow reader to be interrupted -- catch and retry.
String line = null;
@@ -703,6 +706,7 @@
// Run in Swing event dispatcher thread.
final String input = line;
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
echoInputLine(input);
}
@@ -714,37 +718,40 @@
private static String newline = System.getProperty("line.separator");
private void echoInputLine(String line) {
- Vector l = (Vector)appEchoListeners.clone();
+ ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) {
- OutputListener ol = (OutputListener)l.elementAt(i);
+ OutputListener ol = l.get(i);
ol.putString(line);
ol.putString(newline);
}
}
private OutputListener appOutput = new OutputListener() {
+ @Override
public void putString(String string) {
- Vector l = (Vector)appOutputListeners.clone();
+ ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) {
- ((OutputListener)l.elementAt(i)).putString(string);
+ l.get(i).putString(string);
}
}
};
private OutputListener appError = new OutputListener() {
+ @Override
public void putString(String string) {
- Vector l = (Vector)appErrorListeners.clone();
+ ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) {
- ((OutputListener)l.elementAt(i)).putString(string);
+ l.get(i).putString(string);
}
}
};
private OutputListener diagnostics = new OutputListener() {
+ @Override
public void putString(String string) {
- Vector l = (Vector)diagnosticsListeners.clone();
+ ArrayList<OutputListener> l = new ArrayList<OutputListener>(diagnosticsListeners);
for (int i = 0; i < l.size(); i++) {
- ((OutputListener)l.elementAt(i)).putString(string);
+ l.get(i).putString(string);
}
}
};
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi;
-public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {}
+public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {
+
+ private static final long serialVersionUID = -4870148107027371437L;
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java Tue May 03 22:16:58 2011 -0700
@@ -28,8 +28,6 @@
import com.sun.jdi.*;
import com.sun.jdi.event.*;
-import java.util.*;
-
import com.sun.tools.example.debug.event.*;
import javax.swing.SwingUtilities;
@@ -55,6 +53,7 @@
this.queue = session.vm.eventQueue();
}
+ @Override
public void run() {
try {
runLoop();
@@ -78,6 +77,7 @@
//### Gross foul hackery!
private void dispatchEventSet(final AbstractEventSet es) {
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
boolean interrupted = es.suspendedAll();
es.notify(firstListener);
@@ -117,54 +117,65 @@
//### This is a Hack, deal with it
private class FirstListener implements JDIListener {
+ @Override
public void accessWatchpoint(AccessWatchpointEventSet e) {
session.runtime.validateThreadInfo();
wantInterrupt = true;
}
+ @Override
public void classPrepare(ClassPrepareEventSet e) {
wantInterrupt = false;
runtime.resolve(e.getReferenceType());
}
+ @Override
public void classUnload(ClassUnloadEventSet e) {
wantInterrupt = false;
}
+ @Override
public void exception(ExceptionEventSet e) {
wantInterrupt = true;
}
+ @Override
public void locationTrigger(LocationTriggerEventSet e) {
session.runtime.validateThreadInfo();
wantInterrupt = true;
}
+ @Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) {
session.runtime.validateThreadInfo();
wantInterrupt = true;
}
+ @Override
public void threadDeath(ThreadDeathEventSet e) {
wantInterrupt = false;
}
+ @Override
public void threadStart(ThreadStartEventSet e) {
wantInterrupt = false;
}
+ @Override
public void vmDeath(VMDeathEventSet e) {
//### Should have some way to notify user
//### that VM died before the session ended.
wantInterrupt = false;
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
//### Notify user?
wantInterrupt = false;
session.runtime.endSession();
}
+ @Override
public void vmStart(VMStartEventSet e) {
//### Do we need to do anything with it?
wantInterrupt = false;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -26,11 +26,7 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import com.sun.jdi.request.*;
-
-import java.util.ArrayList;
import java.util.List;
-import java.util.Iterator;
public class LineBreakpointSpec extends BreakpointSpec {
int lineNumber;
@@ -44,6 +40,7 @@
/**
* The 'refType' is known to match.
*/
+ @Override
void resolve(ReferenceType refType) throws InvalidTypeException,
LineNotFoundException {
if (!(refType instanceof ClassType)) {
@@ -81,10 +78,12 @@
return lineNumber;
}
+ @Override
public int hashCode() {
return refSpec.hashCode() + lineNumber;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof LineBreakpointSpec) {
LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj;
@@ -96,6 +95,7 @@
}
}
+ @Override
public String errorMessageFor(Exception e) {
if (e instanceof LineNotFoundException) {
return ("No code at line " + lineNumber() + " in " + refSpec);
@@ -107,6 +107,7 @@
}
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString());
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,9 @@
public class LineNotFoundException extends Exception
{
+
+ private static final long serialVersionUID = -5630418117861587582L;
+
public LineNotFoundException()
{
super();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java Tue May 03 22:16:58 2011 -0700
@@ -26,6 +26,9 @@
package com.sun.tools.example.debug.bdi;
class MalformedMemberNameException extends Exception {
+
+ private static final long serialVersionUID = -7726664097374844485L;
+
public MalformedMemberNameException() {
super();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -26,11 +26,8 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import com.sun.jdi.request.*;
-
import java.util.ArrayList;
import java.util.List;
-import java.util.Iterator;
public class MethodBreakpointSpec extends BreakpointSpec {
String methodId;
@@ -47,6 +44,7 @@
/**
* The 'refType' is known to match.
*/
+ @Override
void resolve(ReferenceType refType) throws MalformedMemberNameException,
AmbiguousMethodException,
InvalidTypeException,
@@ -80,12 +78,14 @@
return methodArgs;
}
+ @Override
public int hashCode() {
return refSpec.hashCode() +
((methodId != null) ? methodId.hashCode() : 0) +
((methodArgs != null) ? methodArgs.hashCode() : 0);
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof MethodBreakpointSpec) {
MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj;
@@ -98,6 +98,7 @@
}
}
+ @Override
public String errorMessageFor(Exception e) {
if (e instanceof AmbiguousMethodException) {
return ("Method " + methodName() + " is overloaded; specify arguments");
@@ -114,6 +115,7 @@
}
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString());
@@ -257,7 +259,7 @@
*/
if ((name.indexOf('.') == -1) || name.startsWith("*.")) {
try {
- List refs = specs.runtime.findClassesMatchingPattern(name);
+ List<?> refs = specs.runtime.findClassesMatchingPattern(name);
if (refs.size() > 0) { //### ambiguity???
name = ((ReferenceType)(refs.get(0))).name();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,8 @@
public class MethodNotFoundException extends Exception
{
+ private static final long serialVersionUID = -2064968107599632609L;
+
public MethodNotFoundException()
{
super();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import com.sun.jdi.request.*;
public class ModificationWatchpointSpec extends WatchpointSpec {
@@ -38,6 +37,7 @@
/**
* The 'refType' is known to match.
*/
+ @Override
void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException {
if (!(refType instanceof ClassType)) {
@@ -51,6 +51,7 @@
.createModificationWatchpointRequest(field));
}
+ @Override
public boolean equals(Object obj) {
return (obj instanceof ModificationWatchpointSpec) &&
super.equals(obj);
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi;
-public class NoSessionException extends Exception {}
+public class NoSessionException extends Exception {
+
+ private static final long serialVersionUID = -7324357828115128603L;
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,8 @@
package com.sun.tools.example.debug.bdi;
-public class NoThreadException extends Exception {}
+public class NoThreadException extends Exception {
+
+ private static final long serialVersionUID = 1846613539928921998L;
+
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java Tue May 03 22:16:58 2011 -0700
@@ -47,6 +47,7 @@
/**
* Does the specified ReferenceType match this spec.
*/
+ @Override
public boolean matches(ReferenceType refType) {
if (isWild) {
return refType.name().endsWith(classId);
@@ -55,10 +56,12 @@
}
}
+ @Override
public int hashCode() {
return classId.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof PatternReferenceTypeSpec) {
PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj;
@@ -89,6 +92,7 @@
}
}
+ @Override
public String toString() {
return isWild? "*" + classId : classId;
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java Tue May 03 22:16:58 2011 -0700
@@ -33,7 +33,9 @@
*/
boolean matches(ReferenceType refType);
+ @Override
int hashCode();
+ @Override
boolean equals(Object obj);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/Session.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/Session.java Tue May 03 22:16:58 2011 -0700
@@ -27,7 +27,6 @@
import com.sun.jdi.VirtualMachine;
import com.sun.jdi.VMDisconnectedException;
-import com.sun.jdi.event.EventSet;
/**
* Our repository of what we know about the state of one
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java Tue May 03 22:16:58 2011 -0700
@@ -39,6 +39,7 @@
/**
* Does the specified ReferenceType match this spec.
*/
+ @Override
public boolean matches(ReferenceType refType) {
try {
if (refType.sourceName().equals(sourceName)) {
@@ -48,9 +49,6 @@
return true;
} catch(AbsentInformationException exc) {
} catch(ObjectCollectedException exc) {
- } catch(InvalidLineNumberException exc) {
-// } catch(ClassNotPreparedException exc) {
-// -- should not happen, so don't catch this ---
}
}
} catch(AbsentInformationException exc) {
@@ -59,10 +57,12 @@
return false;
}
+ @Override
public int hashCode() {
return sourceName.hashCode() + linenumber;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof SourceNameReferenceTypeSpec) {
SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj;
@@ -74,6 +74,7 @@
}
}
+ @Override
public String toString() {
return sourceName + "@" + linenumber;
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java Tue May 03 22:16:58 2011 -0700
@@ -25,10 +25,9 @@
package com.sun.tools.example.debug.bdi;
-import java.util.EventObject;
-
public class SpecErrorEvent extends SpecEvent {
+ private static final long serialVersionUID = 8162634387866409578L;
private Exception reason;
public SpecErrorEvent(EventRequestSpec eventRequestSpec,
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java Tue May 03 22:16:58 2011 -0700
@@ -31,6 +31,7 @@
public class SpecEvent extends EventObject {
+ private static final long serialVersionUID = 4820735456787276230L;
private EventRequestSpec eventRequestSpec;
public SpecEvent(EventRequestSpec eventRequestSpec) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ThreadGroupReference;
-import com.sun.jdi.ThreadReference;
import java.util.List;
import java.util.Stack;
import java.util.ArrayList;
@@ -73,10 +72,12 @@
}
}
+ @Override
public boolean hasNext() {
return !stack.isEmpty();
}
+ @Override
public ThreadGroupReference next() {
return nextThreadGroup();
}
@@ -87,6 +88,7 @@
return tg;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java Tue May 03 22:16:58 2011 -0700
@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
//### Should handle target VM death or connection failure cleanly.
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java Tue May 03 22:16:58 2011 -0700
@@ -43,6 +43,7 @@
tgi = new ThreadGroupIterator(tgl);
}
+ @Override
public boolean hasNext() {
while (it == null || !it.hasNext()) {
if (!tgi.hasNext()) {
@@ -53,6 +54,7 @@
return true;
}
+ @Override
public ThreadReference next() {
return it.next();
}
@@ -61,6 +63,7 @@
return next();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java Tue May 03 22:16:58 2011 -0700
@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi; //### does it belong here?
import com.sun.jdi.*;
-import com.sun.tools.jdi.*;
-import java.util.*;
-import java.io.*;
public class Utils {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi;
-public class VMLaunchFailureException extends Exception {}
+public class VMLaunchFailureException extends Exception {
+
+ private static final long serialVersionUID = -2439646729274310108L;
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java Tue May 03 22:16:58 2011 -0700
@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi;
-public class VMNotInterruptedException extends Exception {}
+public class VMNotInterruptedException extends Exception {
+
+ private static final long serialVersionUID = 8111074582188765600L;
+}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -25,9 +25,6 @@
package com.sun.tools.example.debug.bdi;
-import com.sun.jdi.*;
-import com.sun.jdi.request.*;
-
public abstract class WatchpointSpec extends EventRequestSpec {
final String fieldId;
@@ -40,31 +37,38 @@
// }
}
+ @Override
void notifySet(SpecListener listener, SpecEvent evt) {
listener.watchpointSet(evt);
}
+ @Override
void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.watchpointDeferred(evt);
}
+ @Override
void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.watchpointResolved(evt);
}
+ @Override
void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.watchpointDeleted(evt);
}
+ @Override
void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.watchpointError(evt);
}
+ @Override
public int hashCode() {
return refSpec.hashCode() + fieldId.hashCode() +
getClass().hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof WatchpointSpec) {
WatchpointSpec watchpoint = (WatchpointSpec)obj;
@@ -77,6 +81,7 @@
}
}
+ @Override
public String errorMessageFor(Exception e) {
if (e instanceof NoSuchFieldException) {
return ("No field " + fieldId + " in " + refSpec);
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -33,6 +33,7 @@
public abstract class AbstractEventSet extends EventObject implements EventSet {
+ private static final long serialVersionUID = 2772717574222076977L;
private final EventSet jdiEventSet;
final Event oneEvent;
@@ -81,6 +82,7 @@
// Implement Mirror
+ @Override
public VirtualMachine virtualMachine() {
return jdiEventSet.virtualMachine();
}
@@ -105,10 +107,12 @@
return jdiEventSet.suspendPolicy();
}
+ @Override
public void resume() {
jdiEventSet.resume();
}
+ @Override
public int suspendPolicy() {
return jdiEventSet.suspendPolicy();
}
@@ -128,6 +132,7 @@
/**
* Return an iterator specific to {@link Event} objects.
*/
+ @Override
public EventIterator eventIterator() {
return jdiEventSet.eventIterator();
}
@@ -142,6 +147,7 @@
*
* @return the number of elements in this set (its cardinality).
*/
+ @Override
public int size() {
return jdiEventSet.size();
}
@@ -151,6 +157,7 @@
*
* @return <tt>true</tt> if this set contains no elements.
*/
+ @Override
public boolean isEmpty() {
return jdiEventSet.isEmpty();
}
@@ -163,6 +170,7 @@
*
* @return <tt>true</tt> if this set contains the specified element.
*/
+ @Override
public boolean contains(Object o) {
return jdiEventSet.contains(o);
}
@@ -174,6 +182,7 @@
*
* @return an iterator over the elements in this set.
*/
+ @Override
public Iterator<Event> iterator() {
return jdiEventSet.iterator();
}
@@ -184,6 +193,7 @@
*
* @return an array containing all of the elements in this set.
*/
+ @Override
public Object[] toArray() {
return jdiEventSet.toArray();
}
@@ -202,6 +212,7 @@
* @throws ArrayStoreException the runtime type of a is not a supertype
* of the runtime type of every element in this set.
*/
+ @Override
public <T> T[] toArray(T a[]) {
return jdiEventSet.toArray(a);
}
@@ -217,6 +228,7 @@
* @return <tt>true</tt> if this set contains all of the elements of the
* specified collection.
*/
+ @Override
public boolean containsAll(Collection<?> c) {
return jdiEventSet.containsAll(c);
}
@@ -224,21 +236,27 @@
// Make the rest of Set unmodifiable
+ @Override
public boolean add(Event e){
throw new UnsupportedOperationException();
}
+ @Override
public boolean remove(Object o) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean addAll(Collection<? extends Event> coll) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean removeAll(Collection<?> coll) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean retainAll(Collection<?> coll) {
throw new UnsupportedOperationException();
}
+ @Override
public void clear() {
throw new UnsupportedOperationException();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event;
-import com.sun.jdi.*;
import com.sun.jdi.event.*;
public class AccessWatchpointEventSet extends WatchpointEventSet {
+ private static final long serialVersionUID = -2620394219156607673L;
+
AccessWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
+ @Override
public void notify(JDIListener listener) {
listener.accessWatchpoint(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class ClassPrepareEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = 5958493423581010491L;
+
ClassPrepareEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -55,6 +57,7 @@
return ((ClassPrepareEvent)oneEvent).referenceType();
}
+ @Override
public void notify(JDIListener listener) {
listener.classPrepare(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -25,11 +25,12 @@
package com.sun.tools.example.debug.event;
-import com.sun.jdi.*;
import com.sun.jdi.event.*;
public class ClassUnloadEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = 8370341450345835866L;
+
ClassUnloadEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -48,6 +49,7 @@
return ((ClassUnloadEvent)oneEvent).classSignature();
}
+ @Override
public void notify(JDIListener listener) {
listener.classUnload(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class ExceptionEventSet extends LocatableEventSet {
+ private static final long serialVersionUID = 5328140167954640711L;
+
ExceptionEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -75,6 +77,7 @@
return ((ExceptionEvent)oneEvent).catchLocation();
}
+ @Override
public void notify(JDIListener listener) {
listener.exception(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java Tue May 03 22:16:58 2011 -0700
@@ -33,36 +33,47 @@
*/
public class JDIAdapter implements JDIListener {
+ @Override
public void accessWatchpoint(AccessWatchpointEventSet e) {
}
+ @Override
public void classPrepare(ClassPrepareEventSet e) {
}
+ @Override
public void classUnload(ClassUnloadEventSet e) {
}
+ @Override
public void exception(ExceptionEventSet e) {
}
+ @Override
public void locationTrigger(LocationTriggerEventSet e) {
}
+ @Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) {
}
+ @Override
public void threadDeath(ThreadDeathEventSet e) {
}
+ @Override
public void threadStart(ThreadStartEventSet e) {
}
+ @Override
public void vmDeath(VMDeathEventSet e) {
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
}
+ @Override
public void vmStart(VMStartEventSet e) {
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -33,6 +33,8 @@
*/
public abstract class LocatableEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = 1027131209997915620L;
+
LocatableEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event;
-import com.sun.jdi.*;
import com.sun.jdi.event.*;
public class LocationTriggerEventSet extends LocatableEventSet {
+ private static final long serialVersionUID = -3674631710485872487L;
+
LocationTriggerEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
+ @Override
public void notify(JDIListener listener) {
listener.locationTrigger(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class ModificationWatchpointEventSet extends WatchpointEventSet {
+ private static final long serialVersionUID = -680889300856154719L;
+
ModificationWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -42,6 +44,7 @@
return ((ModificationWatchpointEvent)oneEvent).valueToBe();
}
+ @Override
public void notify(JDIListener listener) {
listener.modificationWatchpoint(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class ThreadDeathEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = -8801604712308151331L;
+
ThreadDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -44,6 +46,7 @@
return ((ThreadDeathEvent)oneEvent).thread();
}
+ @Override
public void notify(JDIListener listener) {
listener.threadDeath(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class ThreadStartEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = -3802096132294933502L;
+
ThreadStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -44,6 +46,7 @@
return ((ThreadStartEvent)oneEvent).thread();
}
+ @Override
public void notify(JDIListener listener) {
listener.threadStart(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -29,10 +29,13 @@
public class VMDeathEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = 1163097303940092229L;
+
VMDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
+ @Override
public void notify(JDIListener listener) {
listener.vmDeath(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -29,10 +29,13 @@
public class VMDisconnectEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = 7968123152344675342L;
+
VMDisconnectEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
+ @Override
public void notify(JDIListener listener) {
listener.vmDisconnect(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public class VMStartEventSet extends AbstractEventSet {
+ private static final long serialVersionUID = -3384957227835478191L;
+
VMStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
@@ -44,6 +46,7 @@
return ((VMStartEvent)oneEvent).thread();
}
+ @Override
public void notify(JDIListener listener) {
listener.vmStart(this);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,8 @@
public abstract class WatchpointEventSet extends LocatableEventSet {
+ private static final long serialVersionUID = 5606285209703845409L;
+
WatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java Tue May 03 22:16:58 2011 -0700
@@ -27,25 +27,25 @@
package com.sun.tools.example.debug.expr;
import com.sun.jdi.*;
+
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
-@SuppressWarnings("unchecked")
public class ExpressionParser implements ExpressionParserConstants {
- Stack stack = new Stack();
+ Stack<LValue> stack = new Stack<LValue>();
VirtualMachine vm = null;
GetFrame frameGetter = null;
private static GetFrame lastFrameGetter;
private static LValue lastLValue;
LValue peek() {
- return (LValue)stack.peek();
+ return stack.peek();
}
LValue pop() {
- return (LValue)stack.pop();
+ return stack.pop();
}
void push(LValue lval) {
@@ -61,17 +61,14 @@
}
public static Value evaluate(String expr, VirtualMachine vm,
- GetFrame frameGetter) throws ParseException,
- InvocationException,
- InvalidTypeException,
- ClassNotLoadedException,
+ GetFrame frameGetter) throws ParseException, InvocationException,
+ InvalidTypeException, ClassNotLoadedException,
IncompatibleThreadStateException {
// TODO StringBufferInputStream is deprecated.
java.io.InputStream in = new java.io.StringBufferInputStream(expr);
ExpressionParser parser = new ExpressionParser(in);
parser.vm = vm;
parser.frameGetter = frameGetter;
- Value value = null;
parser.Expression();
lastFrameGetter = frameGetter;
lastLValue = parser.pop();
@@ -89,8 +86,8 @@
try {
parser = new ExpressionParser(new java.io.FileInputStream(args[0]));
} catch (java.io.FileNotFoundException e) {
- System.out.println("Java Parser Version 1.0.2: File " +
- args[0] + " not found.");
+ System.out.println("Java Parser Version 1.0.2: File " + args[0]
+ + " not found.");
return;
}
} else {
@@ -137,8 +134,7 @@
jj_consume_token(-1);
throw new ParseException();
}
- label_1:
- while (true) {
+ label_1: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
@@ -189,8 +185,7 @@
StringBuffer sb = new StringBuffer();
jj_consume_token(IDENTIFIER);
sb.append(token);
- label_2:
- while (true) {
+ label_2: while (true) {
if (jj_2_1(2)) {
;
} else {
@@ -198,16 +193,18 @@
}
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
- sb.append('.'); sb.append(token);
- }
- {if (true) return sb.toString();}
+ sb.append('.');
+ sb.append(token);
+ }
+ if (true) {
+ return sb.toString();
+ }
throw new Error("Missing return statement in function");
}
final public void NameList() throws ParseException {
Name();
- label_3:
- while (true) {
+ label_3: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
@@ -261,7 +258,9 @@
PrimaryExpression();
AssignmentOperator();
Expression();
- LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal);
+ LValue exprVal = pop();
+ pop().setValue(exprVal);
+ push(exprVal);
}
final public void AssignmentOperator() throws ParseException {
@@ -317,13 +316,18 @@
Expression();
jj_consume_token(COLON);
ConditionalExpression();
- LValue falseBranch = pop(); LValue trueBranch = pop();
+ LValue falseBranch = pop();
+ LValue trueBranch = pop();
Value cond = pop().interiorGetValue();
if (cond instanceof BooleanValue) {
- push(((BooleanValue)cond).booleanValue()?
- trueBranch : falseBranch);
+ push(((BooleanValue) cond).booleanValue() ? trueBranch
+ : falseBranch);
} else {
- {if (true) throw new ParseException("Condition must be boolean");}
+ {
+ if (true) {
+ throw new ParseException("Condition must be boolean");
+ }
+ }
}
break;
default:
@@ -334,8 +338,7 @@
final public void ConditionalOrExpression() throws ParseException {
ConditionalAndExpression();
- label_4:
- while (true) {
+ label_4: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_OR:
;
@@ -346,14 +349,17 @@
}
jj_consume_token(SC_OR);
ConditionalAndExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void ConditionalAndExpression() throws ParseException {
InclusiveOrExpression();
- label_5:
- while (true) {
+ label_5: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_AND:
;
@@ -364,14 +370,17 @@
}
jj_consume_token(SC_AND);
InclusiveOrExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void InclusiveOrExpression() throws ParseException {
ExclusiveOrExpression();
- label_6:
- while (true) {
+ label_6: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_OR:
;
@@ -382,14 +391,17 @@
}
jj_consume_token(BIT_OR);
ExclusiveOrExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void ExclusiveOrExpression() throws ParseException {
AndExpression();
- label_7:
- while (true) {
+ label_7: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case XOR:
;
@@ -400,14 +412,17 @@
}
jj_consume_token(XOR);
AndExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void AndExpression() throws ParseException {
EqualityExpression();
- label_8:
- while (true) {
+ label_8: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_AND:
;
@@ -418,15 +433,18 @@
}
jj_consume_token(BIT_AND);
EqualityExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void EqualityExpression() throws ParseException {
Token tok;
InstanceOfExpression();
- label_9:
- while (true) {
+ label_9: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EQ:
case NE:
@@ -460,7 +478,11 @@
case INSTANCEOF:
jj_consume_token(INSTANCEOF);
Type();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
default:
jj_la1[14] = jj_gen;
@@ -471,8 +493,7 @@
final public void RelationalExpression() throws ParseException {
Token tok;
ShiftExpression();
- label_10:
- while (true) {
+ label_10: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case GT:
case LT:
@@ -510,8 +531,7 @@
final public void ShiftExpression() throws ParseException {
AdditiveExpression();
- label_11:
- while (true) {
+ label_11: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LSHIFT:
case RSIGNEDSHIFT:
@@ -538,15 +558,18 @@
throw new ParseException();
}
AdditiveExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
}
final public void AdditiveExpression() throws ParseException {
Token tok;
MultiplicativeExpression();
- label_12:
- while (true) {
+ label_12: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
case MINUS:
@@ -577,8 +600,7 @@
final public void MultiplicativeExpression() throws ParseException {
Token tok;
UnaryExpression();
- label_13:
- while (true) {
+ label_13: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STAR:
case SLASH:
@@ -627,7 +649,11 @@
throw new ParseException();
}
UnaryExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
case INCR:
PreIncrementExpression();
@@ -661,13 +687,21 @@
final public void PreIncrementExpression() throws ParseException {
jj_consume_token(INCR);
PrimaryExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
final public void PreDecrementExpression() throws ParseException {
jj_consume_token(DECR);
PrimaryExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
}
final public void UnaryExpressionNotPlusMinus() throws ParseException {
@@ -687,7 +721,11 @@
throw new ParseException();
}
UnaryExpression();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
default:
jj_la1[26] = jj_gen;
@@ -718,8 +756,10 @@
}
}
-// This production is to determine lookahead only. The LOOKAHEAD specifications
-// below are not used, but they are there just to indicate that we know about
+ // This production is to determine lookahead only. The LOOKAHEAD
+ // specifications
+ // below are not used, but they are there just to indicate that we know
+ // about
// this.
final public void CastLookahead() throws ParseException {
if (jj_2_4(2)) {
@@ -792,7 +832,11 @@
break;
case DECR:
jj_consume_token(DECR);
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
default:
jj_la1[30] = jj_gen;
@@ -810,8 +854,7 @@
if (jj_2_6(2)) {
jj_consume_token(LPAREN);
PrimitiveType();
- label_14:
- while (true) {
+ label_14: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
@@ -830,8 +873,7 @@
case LPAREN:
jj_consume_token(LPAREN);
Name();
- label_15:
- while (true) {
+ label_15: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
;
@@ -856,8 +898,7 @@
final public void PrimaryExpression() throws ParseException {
PrimaryPrefix();
- label_16:
- while (true) {
+ label_16: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN:
case LBRACKET:
@@ -896,7 +937,11 @@
jj_consume_token(SUPER);
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
case LPAREN:
jj_consume_token(LPAREN);
@@ -914,7 +959,7 @@
}
final public void PrimarySuffix() throws ParseException {
- List argList;
+ List<Value> argList;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
jj_consume_token(LBRACKET);
@@ -992,8 +1037,8 @@
jj_consume_token(NULL);
}
- final public List Arguments() throws ParseException {
- List argList = new ArrayList();
+ final public List<Value> Arguments() throws ParseException {
+ List<Value> argList = new ArrayList<Value>();
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE:
@@ -1021,15 +1066,18 @@
;
}
jj_consume_token(RPAREN);
- {if (true) return argList;}
+ {
+ if (true) {
+ return argList;
+ }
+ }
throw new Error("Missing return statement in function");
}
- final public void ArgumentList(List argList) throws ParseException {
+ final public void ArgumentList(List<Value> argList) throws ParseException {
Expression();
argList.add(pop().interiorGetValue());
- label_17:
- while (true) {
+ label_17: while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA:
;
@@ -1045,7 +1093,8 @@
}
final public void AllocationExpression() throws ParseException {
- List argList; String className;
+ List<Value> argList;
+ String className;
if (jj_2_7(2)) {
jj_consume_token(NEW);
PrimitiveType();
@@ -1062,7 +1111,11 @@
break;
case LBRACKET:
ArrayDimensions();
- {if (true) throw new ParseException("operation not yet supported");}
+ {
+ if (true) {
+ throw new ParseException("operation not yet supported");
+ }
+ }
break;
default:
jj_la1[42] = jj_gen;
@@ -1079,12 +1132,11 @@
}
/*
- * The second LOOKAHEAD specification below is to parse to PrimarySuffix
- * if there is an expression between the "[...]".
+ * The second LOOKAHEAD specification below is to parse to PrimarySuffix if
+ * there is an expression between the "[...]".
*/
final public void ArrayDimensions() throws ParseException {
- label_18:
- while (true) {
+ label_18: while (true) {
jj_consume_token(LBRACKET);
Expression();
jj_consume_token(RBRACKET);
@@ -1094,8 +1146,7 @@
break label_18;
}
}
- label_19:
- while (true) {
+ label_19: while (true) {
if (jj_2_9(2)) {
;
} else {
@@ -1107,71 +1158,84 @@
}
final private boolean jj_2_1(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_1();
jj_save(0, xla);
return retval;
}
final private boolean jj_2_2(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_2();
jj_save(1, xla);
return retval;
}
final private boolean jj_2_3(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_3();
jj_save(2, xla);
return retval;
}
final private boolean jj_2_4(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_4();
jj_save(3, xla);
return retval;
}
final private boolean jj_2_5(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_5();
jj_save(4, xla);
return retval;
}
final private boolean jj_2_6(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_6();
jj_save(5, xla);
return retval;
}
final private boolean jj_2_7(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_7();
jj_save(6, xla);
return retval;
}
final private boolean jj_2_8(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_8();
jj_save(7, xla);
return retval;
}
final private boolean jj_2_9(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_la = xla;
+ jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_9();
jj_save(8, xla);
return retval;
}
final private boolean jj_3R_154() {
- if (jj_scan_token(INCR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(INCR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1180,9 +1244,15 @@
xsp = jj_scanpos;
if (jj_3R_154()) {
jj_scanpos = xsp;
- if (jj_3R_155()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_155()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1191,27 +1261,54 @@
xsp = jj_scanpos;
if (jj_3_6()) {
jj_scanpos = xsp;
- if (jj_3R_150()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_150()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_6() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_23()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_23()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_152()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- }
- if (jj_scan_token(RPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_115()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_152()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ }
+ if (jj_scan_token(RPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_115()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1220,45 +1317,86 @@
xsp = jj_scanpos;
if (jj_3R_50()) {
jj_scanpos = xsp;
- if (jj_3R_51()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_51()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_50() {
- if (jj_3R_67()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_67()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_5() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_149() {
- if (jj_3R_20()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_20()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_151()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_151()) {
+ jj_scanpos = xsp;
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_41() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
if (jj_3R_59()) {
@@ -1275,51 +1413,109 @@
jj_scanpos = xsp;
if (jj_3R_65()) {
jj_scanpos = xsp;
- if (jj_3R_66()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_66()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_40() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_123() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_1() {
- if (jj_scan_token(DOT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(DOT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(IDENTIFIER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_4() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_23()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_23()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1330,76 +1526,129 @@
jj_scanpos = xsp;
if (jj_3R_40()) {
jj_scanpos = xsp;
- if (jj_3R_41()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_41()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_3() {
- if (jj_3R_22()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_22()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_24() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(IDENTIFIER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3_1()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3_1()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_147() {
- if (jj_scan_token(BANG)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BANG)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_142() {
- if (jj_3R_149()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_149()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_122() {
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_49() {
- if (jj_scan_token(DOUBLE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(DOUBLE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_141() {
- if (jj_3R_148()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_148()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_48() {
- if (jj_scan_token(FLOAT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(FLOAT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_146() {
- if (jj_scan_token(TILDE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(TILDE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_47() {
- if (jj_scan_token(LONG)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LONG)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1408,11 +1657,21 @@
xsp = jj_scanpos;
if (jj_3R_146()) {
jj_scanpos = xsp;
- if (jj_3R_147()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_115()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_147()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_115()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1423,48 +1682,84 @@
jj_scanpos = xsp;
if (jj_3R_141()) {
jj_scanpos = xsp;
- if (jj_3R_142()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_142()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_46() {
- if (jj_scan_token(INT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(INT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_145() {
- if (jj_scan_token(REM)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(REM)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_45() {
- if (jj_scan_token(SHORT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SHORT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_44() {
- if (jj_scan_token(BYTE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BYTE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_135() {
- if (jj_scan_token(DECR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_20()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(DECR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_20()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_43() {
- if (jj_scan_token(CHAR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(CHAR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1485,49 +1780,95 @@
jj_scanpos = xsp;
if (jj_3R_48()) {
jj_scanpos = xsp;
- if (jj_3R_49()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_49()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_42() {
- if (jj_scan_token(BOOLEAN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BOOLEAN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_9() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_121() {
- if (jj_3R_23()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_23()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_144() {
- if (jj_scan_token(SLASH)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SLASH)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_134() {
- if (jj_scan_token(INCR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_20()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(INCR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_20()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1536,62 +1877,105 @@
xsp = jj_scanpos;
if (jj_3R_121()) {
jj_scanpos = xsp;
- if (jj_3R_122()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_122()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
while (true) {
xsp = jj_scanpos;
- if (jj_3R_123()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_123()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_120() {
- if (jj_scan_token(GE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(GE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_133() {
- if (jj_scan_token(MINUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(MINUS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_127() {
- if (jj_3R_136()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_136()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_126() {
- if (jj_3R_135()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_135()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_139() {
- if (jj_scan_token(MINUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(MINUS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_125() {
- if (jj_3R_134()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_134()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_132() {
- if (jj_scan_token(PLUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(PLUS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_143() {
- if (jj_scan_token(STAR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(STAR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1600,11 +1984,21 @@
xsp = jj_scanpos;
if (jj_3R_132()) {
jj_scanpos = xsp;
- if (jj_3R_133()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_115()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_133()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_115()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1617,11 +2011,21 @@
jj_scanpos = xsp;
if (jj_3R_126()) {
jj_scanpos = xsp;
- if (jj_3R_127()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_127()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1632,54 +2036,95 @@
jj_scanpos = xsp;
if (jj_3R_144()) {
jj_scanpos = xsp;
- if (jj_3R_145()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_115()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_145()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_115()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_131() {
- if (jj_scan_token(RUNSIGNEDSHIFT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(RUNSIGNEDSHIFT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_119() {
- if (jj_scan_token(LE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_138() {
- if (jj_scan_token(PLUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(PLUS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_112() {
- if (jj_3R_115()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_115()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_137()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_137()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_88() {
- if (jj_3R_86()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_86()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_130() {
- if (jj_scan_token(RSIGNEDSHIFT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(RSIGNEDSHIFT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1688,29 +2133,51 @@
xsp = jj_scanpos;
if (jj_3R_138()) {
jj_scanpos = xsp;
- if (jj_3R_139()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_112()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_139()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_112()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_87() {
- if (jj_3R_82()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_82()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_118() {
- if (jj_scan_token(GT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(GT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_129() {
- if (jj_scan_token(LSHIFT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LSHIFT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1721,68 +2188,128 @@
jj_scanpos = xsp;
if (jj_3R_130()) {
jj_scanpos = xsp;
- if (jj_3R_131()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_108()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_131()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_108()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_108() {
- if (jj_3R_112()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_112()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_128()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_128()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3_8() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_86() {
Token xsp;
- if (jj_3_8()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3_8()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
while (true) {
xsp = jj_scanpos;
- if (jj_3_8()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3_8()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
while (true) {
xsp = jj_scanpos;
- if (jj_3_9()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3_9()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_117() {
- if (jj_scan_token(LT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_106() {
- if (jj_3R_108()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_108()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_116()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_116()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
@@ -1796,64 +2323,125 @@
jj_scanpos = xsp;
if (jj_3R_119()) {
jj_scanpos = xsp;
- if (jj_3R_120()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_106()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_120()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_106()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_111() {
- if (jj_scan_token(NE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(NE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_109() {
- if (jj_scan_token(INSTANCEOF)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_114()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(INSTANCEOF)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_114()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_104() {
- if (jj_3R_106()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_106()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_113()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_113()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_81() {
- if (jj_scan_token(NEW)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(NEW)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
if (jj_3R_87()) {
jj_scanpos = xsp;
- if (jj_3R_88()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_88()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_7() {
- if (jj_scan_token(NEW)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_23()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_86()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(NEW)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_23()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_86()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1862,39 +2450,68 @@
xsp = jj_scanpos;
if (jj_3_7()) {
jj_scanpos = xsp;
- if (jj_3R_81()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_81()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_97() {
- if (jj_scan_token(COMMA)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(COMMA)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_39() {
- if (jj_scan_token(ORASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(ORASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_110() {
- if (jj_scan_token(EQ)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(EQ)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_102() {
- if (jj_3R_104()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_104()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_109()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_109()) {
+ jj_scanpos = xsp;
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -1903,117 +2520,209 @@
xsp = jj_scanpos;
if (jj_3R_110()) {
jj_scanpos = xsp;
- if (jj_3R_111()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_102()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_111()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_102()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_94() {
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_97()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_97()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_89() {
- if (jj_3R_94()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_94()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_38() {
- if (jj_scan_token(XORASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(XORASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_82() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_89()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_89()) {
+ jj_scanpos = xsp;
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_105() {
- if (jj_scan_token(BIT_AND)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_100()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BIT_AND)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_100()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_100() {
- if (jj_3R_102()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_102()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_107()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_107()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_37() {
- if (jj_scan_token(ANDASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(ANDASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_85() {
- if (jj_scan_token(NULL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(NULL)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_103() {
- if (jj_scan_token(XOR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_98()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(XOR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_98()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_98() {
- if (jj_3R_100()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_100()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_105()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_105()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_92() {
- if (jj_scan_token(FALSE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(FALSE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_36() {
- if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_91() {
- if (jj_scan_token(TRUE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(TRUE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2022,109 +2731,189 @@
xsp = jj_scanpos;
if (jj_3R_91()) {
jj_scanpos = xsp;
- if (jj_3R_92()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_92()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_101() {
- if (jj_scan_token(BIT_OR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_95()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BIT_OR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_95()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_95() {
- if (jj_3R_98()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_98()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_103()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_103()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_35() {
- if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(RSIGNEDSHIFTASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_80() {
- if (jj_3R_85()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_85()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_66() {
- if (jj_3R_69()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_69()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_79() {
- if (jj_3R_84()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_84()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_78() {
- if (jj_scan_token(STRING_LITERAL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(STRING_LITERAL)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_99() {
- if (jj_scan_token(SC_AND)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_90()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SC_AND)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_90()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_90() {
- if (jj_3R_95()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_95()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_101()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_101()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_34() {
- if (jj_scan_token(LSHIFTASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LSHIFTASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_65() {
- if (jj_scan_token(NEW)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(NEW)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_77() {
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(CHARACTER_LITERAL)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_76() {
- if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(FLOATING_POINT_LITERAL)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_33() {
- if (jj_scan_token(MINUSASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(MINUSASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2141,89 +2930,161 @@
jj_scanpos = xsp;
if (jj_3R_79()) {
jj_scanpos = xsp;
- if (jj_3R_80()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_80()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_75() {
- if (jj_scan_token(INTEGER_LITERAL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(INTEGER_LITERAL)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_96() {
- if (jj_scan_token(SC_OR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_83()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SC_OR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_83()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_83() {
- if (jj_3R_90()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_90()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_99()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_99()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_64() {
- if (jj_scan_token(SUPER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SUPER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_32() {
- if (jj_scan_token(PLUSASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(PLUSASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_73() {
- if (jj_3R_82()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_82()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_72() {
- if (jj_scan_token(DOT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(DOT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(IDENTIFIER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_74() {
- if (jj_3R_83()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_83()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_96()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_96()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_63() {
- if (jj_scan_token(THIS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(THIS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_31() {
- if (jj_scan_token(REMASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(REMASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2234,120 +3095,231 @@
jj_scanpos = xsp;
if (jj_3R_72()) {
jj_scanpos = xsp;
- if (jj_3R_73()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_73()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_71() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_93() {
- if (jj_scan_token(HOOK)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(COLON)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_68()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(HOOK)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(COLON)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_68()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_57() {
- if (jj_3R_70()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_70()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_30() {
- if (jj_scan_token(SLASHASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SLASHASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_27() {
- if (jj_3R_58()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_58()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_56() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_152() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_55() {
- if (jj_scan_token(SUPER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(DOT)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SUPER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(DOT)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(IDENTIFIER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_29() {
- if (jj_scan_token(STARASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(STARASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_68() {
- if (jj_3R_74()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_74()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_93()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_93()) {
+ jj_scanpos = xsp;
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_54() {
- if (jj_scan_token(THIS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(THIS)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_62() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(IDENTIFIER)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_53() {
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_153() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(RBRACKET)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_scan_token(RBRACKET)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2364,19 +3336,37 @@
jj_scanpos = xsp;
if (jj_3R_56()) {
jj_scanpos = xsp;
- if (jj_3R_57()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_57()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_52() {
- if (jj_3R_69()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_69()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2405,103 +3395,206 @@
jj_scanpos = xsp;
if (jj_3R_38()) {
jj_scanpos = xsp;
- if (jj_3R_39()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_39()) {
+ return true;
+ }
+ if (jj_la == 0
+ && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0
+ && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0
+ && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_28() {
- if (jj_scan_token(ASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(ASSIGN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_61() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3_2() {
- if (jj_3R_20()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_21()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_20()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_21()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_20() {
- if (jj_3R_26()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_26()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_27()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_27()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
}
return false;
}
final private boolean jj_3R_60() {
- if (jj_scan_token(BANG)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(BANG)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_155() {
- if (jj_scan_token(DECR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(DECR)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_67() {
- if (jj_3R_20()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_21()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_25()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_20()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_21()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_25()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_150() {
- if (jj_scan_token(LPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_24()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(LPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_24()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_153()) { jj_scanpos = xsp; break; }
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- }
- if (jj_scan_token(RPAREN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_136()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_153()) {
+ jj_scanpos = xsp;
+ break;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ }
+ if (jj_scan_token(RPAREN)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
+ if (jj_3R_136()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_59() {
- if (jj_scan_token(TILDE)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(TILDE)) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
final private boolean jj_3R_51() {
- if (jj_3R_68()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_68()) {
+ return true;
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
+ return false;
+ }
return false;
}
@@ -2512,13 +3605,28 @@
private Token jj_scanpos, jj_lastpos;
private int jj_la;
public boolean lookingAhead = false;
- private boolean jj_semLA;
private int jj_gen;
final private int[] jj_la1 = new int[44];
- final private int[] jj_la1_0 = {0x8209400,0x0,0x8209400,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x1000000,0x1000000,0x1000000,0x0,0x0,0x0,};
- final private int[] jj_la1_1 = {0x2014,0x0,0x2014,0x0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x0,0x884480c0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x88400080,0x400000,0x884480c0,0x0,0x0,0x40,};
- final private int[] jj_la1_2 = {0x8,0x400,0x0,0x2000,0xf00c004e,0x8000,0x100000,0x4000000,0x8000000,0x0,0x0,0x0,0x2400000,0x2400000,0x0,0x1830000,0x1830000,0x0,0x0,0xc0000000,0xc0000000,0x0,0x0,0xc0000000,0xf00c004e,0xc0000,0xc0000,0x4e,0xc004e,0x40,0x30000000,0x30000000,0x400,0x400,0x40,0x4440,0x4e,0x4440,0x6,0x0,0xf00c004e,0x2000,0x440,0x0,};
- final private int[] jj_la1_3 = {0x0,0x0,0x0,0x0,0x0,0xffe00,0x0,0x0,0x0,0x8,0x10,0x4,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x23,0x23,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
+ final private int[] jj_la1_0 = { 0x8209400, 0x0, 0x8209400, 0x0, 0x1000000,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x0, 0x1000000, 0x1000000,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x1000000,
+ 0x1000000, 0x1000000, 0x0, 0x0, 0x0, };
+ final private int[] jj_la1_1 = { 0x2014, 0x0, 0x2014, 0x0, 0x884480c0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x0, 0x884480c0, 0x884480c0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x88400080, 0x400000,
+ 0x884480c0, 0x0, 0x0, 0x40, };
+ final private int[] jj_la1_2 = { 0x8, 0x400, 0x0, 0x2000, 0xf00c004e,
+ 0x8000, 0x100000, 0x4000000, 0x8000000, 0x0, 0x0, 0x0, 0x2400000,
+ 0x2400000, 0x0, 0x1830000, 0x1830000, 0x0, 0x0, 0xc0000000,
+ 0xc0000000, 0x0, 0x0, 0xc0000000, 0xf00c004e, 0xc0000, 0xc0000, 0x4e,
+ 0xc004e, 0x40, 0x30000000, 0x30000000, 0x400, 0x400, 0x40, 0x4440,
+ 0x4e, 0x4440, 0x6, 0x0, 0xf00c004e, 0x2000, 0x440, 0x0, };
+ final private int[] jj_la1_3 = { 0x0, 0x0, 0x0, 0x0, 0x0, 0xffe00, 0x0, 0x0,
+ 0x0, 0x8, 0x10, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c0, 0x1c0, 0x0, 0x0,
+ 0x23, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, };
final private JJExpressionParserCalls[] jj_2_rtns = new JJExpressionParserCalls[9];
private boolean jj_rescan = false;
private int jj_gc = 0;
@@ -2529,8 +3637,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 44; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls();
+ for (int i = 0; i < 44; i++) {
+ jj_la1[i] = -1;
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
+ jj_2_rtns[i] = new JJExpressionParserCalls();
+ }
}
public void ReInit(java.io.InputStream stream) {
@@ -2539,8 +3651,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 44; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls();
+ for (int i = 0; i < 44; i++) {
+ jj_la1[i] = -1;
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
+ jj_2_rtns[i] = new JJExpressionParserCalls();
+ }
}
public ExpressionParser(ExpressionParserTokenManager tm) {
@@ -2548,8 +3664,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 44; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls();
+ for (int i = 0; i < 44; i++) {
+ jj_la1[i] = -1;
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
+ jj_2_rtns[i] = new JJExpressionParserCalls();
+ }
}
public void ReInit(ExpressionParserTokenManager tm) {
@@ -2557,23 +3677,32 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 44; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls();
+ for (int i = 0; i < 44; i++) {
+ jj_la1[i] = -1;
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
+ jj_2_rtns[i] = new JJExpressionParserCalls();
+ }
}
final private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
+ if ((oldToken = token).next != null) {
+ token = token.next;
+ } else {
+ token = token.next = token_source.getNextToken();
+ }
jj_ntk = -1;
if (token.kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
- for (int i = 0; i < jj_2_rtns.length; i++) {
- JJExpressionParserCalls c = jj_2_rtns[i];
+ for (JJExpressionParserCalls jj_2_rtn : jj_2_rtns) {
+ JJExpressionParserCalls c = jj_2_rtn;
while (c != null) {
- if (c.gen < jj_gen) c.first = null;
+ if (c.gen < jj_gen) {
+ c.first = null;
+ }
c = c.next;
}
}
@@ -2589,7 +3718,8 @@
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
- jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source
+ .getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
@@ -2597,16 +3727,25 @@
jj_scanpos = jj_scanpos.next;
}
if (jj_rescan) {
- int i = 0; Token tok = token;
- while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
- if (tok != null) jj_add_error_token(kind, i);
+ int i = 0;
+ Token tok = token;
+ while (tok != null && tok != jj_scanpos) {
+ i++;
+ tok = tok.next;
+ }
+ if (tok != null) {
+ jj_add_error_token(kind, i);
+ }
}
return (jj_scanpos.kind != kind);
}
final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
+ if (token.next != null) {
+ token = token.next;
+ } else {
+ token = token.next = token_source.getNextToken();
+ }
jj_ntk = -1;
jj_gen++;
return token;
@@ -2615,27 +3754,33 @@
final public Token getToken(int index) {
Token t = lookingAhead ? jj_scanpos : token;
for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
+ if (t.next != null) {
+ t = t.next;
+ } else {
+ t = t.next = token_source.getNextToken();
+ }
}
return t;
}
final private int jj_ntk() {
- if ((jj_nt=token.next) == null)
+ if ((jj_nt = token.next) == null) {
return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
+ } else {
return (jj_ntk = jj_nt.kind);
}
+ }
- private java.util.Vector jj_expentries = new java.util.Vector();
+ private java.util.Vector<int[]> jj_expentries = new java.util.Vector<int[]>();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
private int jj_endpos;
private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100) return;
+ if (pos >= 100) {
+ return;
+ }
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) {
@@ -2644,8 +3789,9 @@
jj_expentry[i] = jj_lasttokens[i];
}
boolean exists = false;
- for (java.util.Enumeration enum_ = jj_expentries.elements(); enum_.hasMoreElements();) {
- int[] oldentry = (int[])(enum_.nextElement());
+ for (java.util.Enumeration<int[]> enum_ = jj_expentries.elements(); enum_
+ .hasMoreElements();) {
+ int[] oldentry = (enum_.nextElement());
if (oldentry.length == jj_expentry.length) {
exists = true;
for (int i = 0; i < jj_expentry.length; i++) {
@@ -2654,11 +3800,17 @@
break;
}
}
- if (exists) break;
- }
- }
- if (!exists) jj_expentries.addElement(jj_expentry);
- if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
+ if (exists) {
+ break;
+ }
+ }
+ }
+ if (!exists) {
+ jj_expentries.addElement(jj_expentry);
+ }
+ if (pos != 0) {
+ jj_lasttokens[(jj_endpos = pos) - 1] = kind;
+ }
}
}
@@ -2702,7 +3854,7 @@
jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.elementAt(i);
+ exptokseq[i] = jj_expentries.elementAt(i);
}
return new ParseException(token, exptokseq, tokenImage);
}
@@ -2719,17 +3871,36 @@
JJExpressionParserCalls p = jj_2_rtns[i];
do {
if (p.gen > jj_gen) {
- jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
+ jj_la = p.arg;
+ jj_lastpos = jj_scanpos = p.first;
switch (i) {
- case 0: jj_3_1(); break;
- case 1: jj_3_2(); break;
- case 2: jj_3_3(); break;
- case 3: jj_3_4(); break;
- case 4: jj_3_5(); break;
- case 5: jj_3_6(); break;
- case 6: jj_3_7(); break;
- case 7: jj_3_8(); break;
- case 8: jj_3_9(); break;
+ case 0:
+ jj_3_1();
+ break;
+ case 1:
+ jj_3_2();
+ break;
+ case 2:
+ jj_3_3();
+ break;
+ case 3:
+ jj_3_4();
+ break;
+ case 4:
+ jj_3_5();
+ break;
+ case 5:
+ jj_3_6();
+ break;
+ case 6:
+ jj_3_7();
+ break;
+ case 7:
+ jj_3_8();
+ break;
+ case 8:
+ jj_3_9();
+ break;
}
}
p = p.next;
@@ -2741,10 +3912,15 @@
final private void jj_save(int index, int xla) {
JJExpressionParserCalls p = jj_2_rtns[index];
while (p.gen > jj_gen) {
- if (p.next == null) { p = p.next = new JJExpressionParserCalls(); break; }
+ if (p.next == null) {
+ p = p.next = new JJExpressionParserCalls();
+ break;
+ }
p = p.next;
}
- p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
+ p.gen = jj_gen + xla - jj_la;
+ p.first = token;
+ p.arg = xla;
}
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java Tue May 03 22:16:58 2011 -0700
@@ -25,10 +25,6 @@
/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
package com.sun.tools.example.debug.expr;
-import com.sun.jdi.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
public class ExpressionParserTokenManager implements ExpressionParserConstants
{
@@ -37,15 +33,17 @@
switch (pos)
{
case 0:
- if ((active1 & 0x4000L) != 0L)
+ if ((active1 & 0x4000L) != 0L) {
return 4;
+ }
if ((active0 & 0x7fffffffffffe00L) != 0L)
{
jjmatchedKind = 67;
return 28;
}
- if ((active1 & 0x100200000000L) != 0L)
+ if ((active1 & 0x100200000000L) != 0L) {
return 49;
+ }
return -1;
case 1:
if ((active0 & 0x7ffffffbfcffe00L) != 0L)
@@ -57,8 +55,9 @@
}
return 28;
}
- if ((active0 & 0x40300000L) != 0L)
+ if ((active0 & 0x40300000L) != 0L) {
return 28;
+ }
return -1;
case 2:
if ((active0 & 0x77fffb3afeffe00L) != 0L)
@@ -70,8 +69,9 @@
}
return 28;
}
- if ((active0 & 0x80004c10000000L) != 0L)
+ if ((active0 & 0x80004c10000000L) != 0L) {
return 28;
+ }
return -1;
case 3:
if ((active0 & 0x63bff2b8faf4e00L) != 0L)
@@ -80,8 +80,9 @@
jjmatchedPos = 3;
return 28;
}
- if ((active0 & 0x14400902040b000L) != 0L)
+ if ((active0 & 0x14400902040b000L) != 0L) {
return 28;
+ }
return -1;
case 4:
if ((active0 & 0x2235f2b80ac0600L) != 0L)
@@ -93,8 +94,9 @@
}
return 28;
}
- if ((active0 & 0x418a0000f034800L) != 0L)
+ if ((active0 & 0x418a0000f034800L) != 0L) {
return 28;
+ }
return -1;
case 5:
if ((active0 & 0x222070a848c0600L) != 0L)
@@ -103,8 +105,9 @@
jjmatchedPos = 5;
return 28;
}
- if ((active0 & 0x11582100200000L) != 0L)
+ if ((active0 & 0x11582100200000L) != 0L) {
return 28;
+ }
return -1;
case 6:
if ((active0 & 0x222040a80040200L) != 0L)
@@ -113,8 +116,9 @@
jjmatchedPos = 6;
return 28;
}
- if ((active0 & 0x30004880400L) != 0L)
+ if ((active0 & 0x30004880400L) != 0L) {
return 28;
+ }
return -1;
case 7:
if ((active0 & 0x22040a80000000L) != 0L)
@@ -123,8 +127,9 @@
jjmatchedPos = 7;
return 28;
}
- if ((active0 & 0x200000000040200L) != 0L)
+ if ((active0 & 0x200000000040200L) != 0L) {
return 28;
+ }
return -1;
case 8:
if ((active0 & 0x2000280000000L) != 0L)
@@ -133,8 +138,9 @@
jjmatchedPos = 8;
return 28;
}
- if ((active0 & 0x20040800000000L) != 0L)
+ if ((active0 & 0x20040800000000L) != 0L) {
return 28;
+ }
return -1;
case 9:
if ((active0 & 0x2000000000000L) != 0L)
@@ -143,8 +149,9 @@
jjmatchedPos = 9;
return 28;
}
- if ((active0 & 0x280000000L) != 0L)
+ if ((active0 & 0x280000000L) != 0L) {
return 28;
+ }
return -1;
case 10:
if ((active0 & 0x2000000000000L) != 0L)
@@ -286,16 +293,19 @@
switch(curChar)
{
case 38:
- if ((active1 & 0x8000000L) != 0L)
+ if ((active1 & 0x8000000L) != 0L) {
return jjStopAtPos(1, 91);
+ }
break;
case 43:
- if ((active1 & 0x10000000L) != 0L)
+ if ((active1 & 0x10000000L) != 0L) {
return jjStopAtPos(1, 92);
+ }
break;
case 45:
- if ((active1 & 0x20000000L) != 0L)
+ if ((active1 & 0x20000000L) != 0L) {
return jjStopAtPos(1, 93);
+ }
break;
case 60:
if ((active1 & 0x4000000000L) != 0L)
@@ -305,30 +315,31 @@
}
return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L);
case 61:
- if ((active1 & 0x400000L) != 0L)
+ if ((active1 & 0x400000L) != 0L) {
return jjStopAtPos(1, 86);
- else if ((active1 & 0x800000L) != 0L)
+ } else if ((active1 & 0x800000L) != 0L) {
return jjStopAtPos(1, 87);
- else if ((active1 & 0x1000000L) != 0L)
+ } else if ((active1 & 0x1000000L) != 0L) {
return jjStopAtPos(1, 88);
- else if ((active1 & 0x2000000L) != 0L)
+ } else if ((active1 & 0x2000000L) != 0L) {
return jjStopAtPos(1, 89);
- else if ((active1 & 0x20000000000L) != 0L)
+ } else if ((active1 & 0x20000000000L) != 0L) {
return jjStopAtPos(1, 105);
- else if ((active1 & 0x40000000000L) != 0L)
+ } else if ((active1 & 0x40000000000L) != 0L) {
return jjStopAtPos(1, 106);
- else if ((active1 & 0x80000000000L) != 0L)
+ } else if ((active1 & 0x80000000000L) != 0L) {
return jjStopAtPos(1, 107);
- else if ((active1 & 0x100000000000L) != 0L)
+ } else if ((active1 & 0x100000000000L) != 0L) {
return jjStopAtPos(1, 108);
- else if ((active1 & 0x200000000000L) != 0L)
+ } else if ((active1 & 0x200000000000L) != 0L) {
return jjStopAtPos(1, 109);
- else if ((active1 & 0x400000000000L) != 0L)
+ } else if ((active1 & 0x400000000000L) != 0L) {
return jjStopAtPos(1, 110);
- else if ((active1 & 0x800000000000L) != 0L)
+ } else if ((active1 & 0x800000000000L) != 0L) {
return jjStopAtPos(1, 111);
- else if ((active1 & 0x1000000000000L) != 0L)
+ } else if ((active1 & 0x1000000000000L) != 0L) {
return jjStopAtPos(1, 112);
+ }
break;
case 62:
if ((active1 & 0x8000000000L) != 0L)
@@ -344,8 +355,9 @@
case 101:
return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L);
case 102:
- if ((active0 & 0x40000000L) != 0L)
+ if ((active0 & 0x40000000L) != 0L) {
return jjStartNfaWithStates_0(1, 30, 28);
+ }
break;
case 104:
return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L);
@@ -377,8 +389,9 @@
case 121:
return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L);
case 124:
- if ((active1 & 0x4000000L) != 0L)
+ if ((active1 & 0x4000000L) != 0L) {
return jjStopAtPos(1, 90);
+ }
break;
default :
break;
@@ -387,8 +400,9 @@
}
private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(0, old0, old1);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(1, active0, active1);
@@ -397,10 +411,11 @@
switch(curChar)
{
case 61:
- if ((active1 & 0x2000000000000L) != 0L)
+ if ((active1 & 0x2000000000000L) != 0L) {
return jjStopAtPos(2, 113);
- else if ((active1 & 0x4000000000000L) != 0L)
+ } else if ((active1 & 0x4000000000000L) != 0L) {
return jjStopAtPos(2, 114);
+ }
break;
case 62:
if ((active1 & 0x10000000000L) != 0L)
@@ -430,8 +445,9 @@
case 112:
return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L);
case 114:
- if ((active0 & 0x10000000L) != 0L)
+ if ((active0 & 0x10000000L) != 0L) {
return jjStartNfaWithStates_0(2, 28, 28);
+ }
return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L);
case 115:
return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L);
@@ -445,12 +461,14 @@
case 117:
return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L);
case 119:
- if ((active0 & 0x4000000000L) != 0L)
+ if ((active0 & 0x4000000000L) != 0L) {
return jjStartNfaWithStates_0(2, 38, 28);
+ }
break;
case 121:
- if ((active0 & 0x80000000000000L) != 0L)
+ if ((active0 & 0x80000000000000L) != 0L) {
return jjStartNfaWithStates_0(2, 55, 28);
+ }
break;
default :
break;
@@ -459,8 +477,9 @@
}
private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(1, old0, old1);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(2, active0, active1);
@@ -469,8 +488,9 @@
switch(curChar)
{
case 61:
- if ((active1 & 0x8000000000000L) != 0L)
+ if ((active1 & 0x8000000000000L) != 0L) {
return jjStopAtPos(3, 115);
+ }
break;
case 97:
return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L);
@@ -479,44 +499,51 @@
case 99:
return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L);
case 100:
- if ((active0 & 0x100000000000000L) != 0L)
+ if ((active0 & 0x100000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 56, 28);
+ }
break;
case 101:
- if ((active0 & 0x1000L) != 0L)
+ if ((active0 & 0x1000L) != 0L) {
return jjStartNfaWithStates_0(3, 12, 28);
- else if ((active0 & 0x2000L) != 0L)
+ } else if ((active0 & 0x2000L) != 0L) {
return jjStartNfaWithStates_0(3, 13, 28);
- else if ((active0 & 0x400000L) != 0L)
+ } else if ((active0 & 0x400000L) != 0L) {
return jjStartNfaWithStates_0(3, 22, 28);
- else if ((active0 & 0x40000000000000L) != 0L)
+ } else if ((active0 & 0x40000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 54, 28);
+ }
return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L);
case 103:
- if ((active0 & 0x1000000000L) != 0L)
+ if ((active0 & 0x1000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 36, 28);
+ }
break;
case 105:
return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L);
case 107:
return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L);
case 108:
- if ((active0 & 0x8000000000L) != 0L)
+ if ((active0 & 0x8000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 39, 28);
+ }
return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L);
case 110:
return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L);
case 111:
- if ((active0 & 0x20000000L) != 0L)
+ if ((active0 & 0x20000000L) != 0L) {
return jjStartNfaWithStates_0(3, 29, 28);
+ }
return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L);
case 114:
- if ((active0 & 0x8000L) != 0L)
+ if ((active0 & 0x8000L) != 0L) {
return jjStartNfaWithStates_0(3, 15, 28);
+ }
return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L);
case 115:
- if ((active0 & 0x4000000000000L) != 0L)
+ if ((active0 & 0x4000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 50, 28);
+ }
return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L);
case 116:
return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L);
@@ -531,8 +558,9 @@
}
private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
{
- if (((active0 &= old0) | (active1 &= old1)) == 0L)
+ if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(2, old0, old1);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(3, active0, 0L);
@@ -545,20 +573,23 @@
case 99:
return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L);
case 101:
- if ((active0 & 0x1000000L) != 0L)
+ if ((active0 & 0x1000000L) != 0L) {
return jjStartNfaWithStates_0(4, 24, 28);
- else if ((active0 & 0x400000000000000L) != 0L)
+ } else if ((active0 & 0x400000000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 58, 28);
+ }
return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L);
case 104:
- if ((active0 & 0x4000L) != 0L)
+ if ((active0 & 0x4000L) != 0L) {
return jjStartNfaWithStates_0(4, 14, 28);
+ }
return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L);
case 105:
return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L);
case 107:
- if ((active0 & 0x800L) != 0L)
+ if ((active0 & 0x800L) != 0L) {
return jjStartNfaWithStates_0(4, 11, 28);
+ }
break;
case 108:
if ((active0 & 0x2000000L) != 0L)
@@ -570,20 +601,23 @@
case 110:
return jjMoveStringLiteralDfa5_0(active0, 0x800000L);
case 114:
- if ((active0 & 0x800000000000L) != 0L)
+ if ((active0 & 0x800000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 47, 28);
+ }
return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L);
case 115:
- if ((active0 & 0x10000L) != 0L)
+ if ((active0 & 0x10000L) != 0L) {
return jjStartNfaWithStates_0(4, 16, 28);
+ }
return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L);
case 116:
- if ((active0 & 0x20000L) != 0L)
+ if ((active0 & 0x20000L) != 0L) {
return jjStartNfaWithStates_0(4, 17, 28);
- else if ((active0 & 0x8000000L) != 0L)
+ } else if ((active0 & 0x8000000L) != 0L) {
return jjStartNfaWithStates_0(4, 27, 28);
- else if ((active0 & 0x200000000000L) != 0L)
+ } else if ((active0 & 0x200000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 45, 28);
+ }
return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L);
case 117:
return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
@@ -603,8 +637,9 @@
}
private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(3, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(4, active0, 0L);
@@ -615,26 +650,29 @@
case 97:
return jjMoveStringLiteralDfa6_0(active0, 0x600L);
case 99:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x80000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 43, 28);
- else if ((active0 & 0x400000000000L) != 0L)
+ } else if ((active0 & 0x400000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 46, 28);
+ }
return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
case 100:
return jjMoveStringLiteralDfa6_0(active0, 0x800000L);
case 101:
- if ((active0 & 0x200000L) != 0L)
+ if ((active0 & 0x200000L) != 0L) {
return jjStartNfaWithStates_0(5, 21, 28);
- else if ((active0 & 0x2000000000L) != 0L)
+ } else if ((active0 & 0x2000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 37, 28);
+ }
break;
case 102:
return jjMoveStringLiteralDfa6_0(active0, 0x800000000L);
case 103:
return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L);
case 104:
- if ((active0 & 0x1000000000000L) != 0L)
+ if ((active0 & 0x1000000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 48, 28);
+ }
break;
case 105:
return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L);
@@ -643,18 +681,21 @@
case 109:
return jjMoveStringLiteralDfa6_0(active0, 0x80000000L);
case 110:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x100000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 44, 28);
+ }
return jjMoveStringLiteralDfa6_0(active0, 0x200040000L);
case 114:
return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L);
case 115:
- if ((active0 & 0x10000000000000L) != 0L)
+ if ((active0 & 0x10000000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 52, 28);
+ }
break;
case 116:
- if ((active0 & 0x100000000L) != 0L)
+ if ((active0 & 0x100000000L) != 0L) {
return jjStartNfaWithStates_0(5, 32, 28);
+ }
return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L);
default :
break;
@@ -663,8 +704,9 @@
}
private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(4, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(5, active0, 0L);
@@ -677,32 +719,37 @@
case 99:
return jjMoveStringLiteralDfa7_0(active0, 0x200000200L);
case 101:
- if ((active0 & 0x10000000000L) != 0L)
+ if ((active0 & 0x10000000000L) != 0L) {
return jjStartNfaWithStates_0(6, 40, 28);
- else if ((active0 & 0x20000000000L) != 0L)
+ } else if ((active0 & 0x20000000000L) != 0L) {
return jjStartNfaWithStates_0(6, 41, 28);
+ }
return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L);
case 108:
return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L);
case 110:
- if ((active0 & 0x400L) != 0L)
+ if ((active0 & 0x400L) != 0L) {
return jjStartNfaWithStates_0(6, 10, 28);
+ }
break;
case 111:
return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L);
case 115:
- if ((active0 & 0x800000L) != 0L)
+ if ((active0 & 0x800000L) != 0L) {
return jjStartNfaWithStates_0(6, 23, 28);
+ }
break;
case 116:
- if ((active0 & 0x80000L) != 0L)
+ if ((active0 & 0x80000L) != 0L) {
return jjStartNfaWithStates_0(6, 19, 28);
+ }
return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
case 117:
return jjMoveStringLiteralDfa7_0(active0, 0x40000L);
case 121:
- if ((active0 & 0x4000000L) != 0L)
+ if ((active0 & 0x4000000L) != 0L) {
return jjStartNfaWithStates_0(6, 26, 28);
+ }
break;
default :
break;
@@ -711,8 +758,9 @@
}
private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(5, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(6, active0, 0L);
@@ -723,16 +771,18 @@
case 99:
return jjMoveStringLiteralDfa8_0(active0, 0x800000000L);
case 101:
- if ((active0 & 0x40000L) != 0L)
+ if ((active0 & 0x40000L) != 0L) {
return jjStartNfaWithStates_0(7, 18, 28);
- else if ((active0 & 0x200000000000000L) != 0L)
+ } else if ((active0 & 0x200000000000000L) != 0L) {
return jjStartNfaWithStates_0(7, 57, 28);
+ }
return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L);
case 110:
return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L);
case 116:
- if ((active0 & 0x200L) != 0L)
+ if ((active0 & 0x200L) != 0L) {
return jjStartNfaWithStates_0(7, 9, 28);
+ }
break;
default :
break;
@@ -741,8 +791,9 @@
}
private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(6, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(7, active0, 0L);
@@ -751,20 +802,23 @@
switch(curChar)
{
case 100:
- if ((active0 & 0x40000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L) {
return jjStartNfaWithStates_0(8, 42, 28);
+ }
break;
case 101:
- if ((active0 & 0x800000000L) != 0L)
+ if ((active0 & 0x800000000L) != 0L) {
return jjStartNfaWithStates_0(8, 35, 28);
+ }
break;
case 105:
return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L);
case 111:
return jjMoveStringLiteralDfa9_0(active0, 0x200000000L);
case 116:
- if ((active0 & 0x20000000000000L) != 0L)
+ if ((active0 & 0x20000000000000L) != 0L) {
return jjStartNfaWithStates_0(8, 53, 28);
+ }
return jjMoveStringLiteralDfa9_0(active0, 0x80000000L);
default :
break;
@@ -773,8 +827,9 @@
}
private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(7, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(8, active0, 0L);
@@ -783,12 +838,14 @@
switch(curChar)
{
case 102:
- if ((active0 & 0x200000000L) != 0L)
+ if ((active0 & 0x200000000L) != 0L) {
return jjStartNfaWithStates_0(9, 33, 28);
+ }
break;
case 115:
- if ((active0 & 0x80000000L) != 0L)
+ if ((active0 & 0x80000000L) != 0L) {
return jjStartNfaWithStates_0(9, 31, 28);
+ }
break;
case 122:
return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L);
@@ -799,8 +856,9 @@
}
private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(8, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(9, active0, 0L);
@@ -817,8 +875,9 @@
}
private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
{
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(9, old0, 0L);
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(10, active0, 0L);
@@ -827,8 +886,9 @@
switch(curChar)
{
case 100:
- if ((active0 & 0x2000000000000L) != 0L)
+ if ((active0 & 0x2000000000000L) != 0L) {
return jjStartNfaWithStates_0(11, 49, 28);
+ }
break;
default :
break;
@@ -891,320 +951,395 @@
};
private final int jjMoveNfa_0(int startState, int curPos)
{
- int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 67;
int i = 1;
jjstateSet[0] = startState;
- int j, kind = 0x7fffffff;
+ int kind = 0x7fffffff;
for (;;)
{
- if (++jjround == 0x7fffffff)
+ if (++jjround == 0x7fffffff) {
ReInitRounds();
+ }
if (curChar < 64)
{
long l = 1L << curChar;
- MatchLoop: do
+ //MatchLoop
+ do
{
switch(jjstateSet[--i])
{
case 0:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(0, 6);
- else if (curChar == 47)
+ } else if (curChar == 47) {
jjAddStates(7, 9);
- else if (curChar == 36)
+ } else if (curChar == 36)
{
- if (kind > 67)
+ if (kind > 67) {
kind = 67;
+ }
jjCheckNAdd(28);
}
- else if (curChar == 34)
+ else if (curChar == 34) {
jjCheckNAddStates(10, 12);
- else if (curChar == 39)
+ } else if (curChar == 39) {
jjAddStates(13, 14);
- else if (curChar == 46)
+ } else if (curChar == 46) {
jjCheckNAdd(4);
+ }
if ((0x3fe000000000000L & l) != 0L)
{
- if (kind > 59)
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddTwoStates(1, 2);
}
else if (curChar == 48)
{
- if (kind > 59)
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddStates(15, 17);
}
break;
case 49:
- if (curChar == 42)
+ if (curChar == 42) {
jjCheckNAddTwoStates(62, 63);
- else if (curChar == 47)
+ } else if (curChar == 47) {
jjCheckNAddStates(18, 20);
- if (curChar == 42)
+ }
+ if (curChar == 42) {
jjstateSet[jjnewStateCnt++] = 54;
+ }
break;
case 1:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 59)
+ }
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddTwoStates(1, 2);
break;
case 3:
- if (curChar == 46)
+ if (curChar == 46) {
jjCheckNAdd(4);
+ }
break;
case 4:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddStates(21, 23);
break;
case 6:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(7);
+ }
break;
case 7:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddTwoStates(7, 8);
break;
case 9:
- if (curChar == 39)
+ if (curChar == 39) {
jjAddStates(13, 14);
+ }
break;
case 10:
- if ((0xffffff7fffffdbffL & l) != 0L)
+ if ((0xffffff7fffffdbffL & l) != 0L) {
jjCheckNAdd(11);
+ }
break;
case 11:
- if (curChar == 39 && kind > 65)
+ if (curChar == 39 && kind > 65) {
kind = 65;
+ }
break;
case 13:
- if ((0x8400000000L & l) != 0L)
+ if ((0x8400000000L & l) != 0L) {
jjCheckNAdd(11);
+ }
break;
case 14:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(15, 11);
+ }
break;
case 15:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(11);
+ }
break;
case 16:
- if ((0xf000000000000L & l) != 0L)
+ if ((0xf000000000000L & l) != 0L) {
jjstateSet[jjnewStateCnt++] = 17;
+ }
break;
case 17:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(15);
+ }
break;
case 18:
- if (curChar == 34)
+ if (curChar == 34) {
jjCheckNAddStates(10, 12);
+ }
break;
case 19:
- if ((0xfffffffbffffdbffL & l) != 0L)
+ if ((0xfffffffbffffdbffL & l) != 0L) {
jjCheckNAddStates(10, 12);
+ }
break;
case 21:
- if ((0x8400000000L & l) != 0L)
+ if ((0x8400000000L & l) != 0L) {
jjCheckNAddStates(10, 12);
+ }
break;
case 22:
- if (curChar == 34 && kind > 66)
+ if (curChar == 34 && kind > 66) {
kind = 66;
+ }
break;
case 23:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAddStates(24, 27);
+ }
break;
case 24:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAddStates(10, 12);
+ }
break;
case 25:
- if ((0xf000000000000L & l) != 0L)
+ if ((0xf000000000000L & l) != 0L) {
jjstateSet[jjnewStateCnt++] = 26;
+ }
break;
case 26:
- if ((0xff000000000000L & l) != 0L)
+ if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(24);
+ }
break;
case 27:
- if (curChar != 36)
+ if (curChar != 36) {
break;
- if (kind > 67)
+ }
+ if (kind > 67) {
kind = 67;
+ }
jjCheckNAdd(28);
break;
case 28:
- if ((0x3ff001000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L) {
break;
- if (kind > 67)
+ }
+ if (kind > 67) {
kind = 67;
+ }
jjCheckNAdd(28);
break;
case 29:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(0, 6);
+ }
break;
case 30:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(30, 31);
+ }
break;
case 31:
- if (curChar != 46)
+ if (curChar != 46) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddStates(28, 30);
break;
case 32:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddStates(28, 30);
break;
case 34:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(35);
+ }
break;
case 35:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddTwoStates(35, 8);
break;
case 36:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(36, 37);
+ }
break;
case 38:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(39);
+ }
break;
case 39:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 63)
+ }
+ if (kind > 63) {
kind = 63;
+ }
jjCheckNAddTwoStates(39, 8);
break;
case 40:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(31, 33);
+ }
break;
case 42:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(43);
+ }
break;
case 43:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(43, 8);
+ }
break;
case 44:
- if (curChar != 48)
+ if (curChar != 48) {
break;
- if (kind > 59)
+ }
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddStates(15, 17);
break;
case 46:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 59)
+ }
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddTwoStates(46, 2);
break;
case 47:
- if ((0xff000000000000L & l) == 0L)
+ if ((0xff000000000000L & l) == 0L) {
break;
- if (kind > 59)
+ }
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddTwoStates(47, 2);
break;
case 48:
- if (curChar == 47)
+ if (curChar == 47) {
jjAddStates(7, 9);
+ }
break;
case 50:
- if ((0xffffffffffffdbffL & l) != 0L)
+ if ((0xffffffffffffdbffL & l) != 0L) {
jjCheckNAddStates(18, 20);
+ }
break;
case 51:
- if ((0x2400L & l) != 0L && kind > 6)
+ if ((0x2400L & l) != 0L && kind > 6) {
kind = 6;
+ }
break;
case 52:
- if (curChar == 10 && kind > 6)
+ if (curChar == 10 && kind > 6) {
kind = 6;
+ }
break;
case 53:
- if (curChar == 13)
+ if (curChar == 13) {
jjstateSet[jjnewStateCnt++] = 52;
+ }
break;
case 54:
- if (curChar == 42)
+ if (curChar == 42) {
jjCheckNAddTwoStates(55, 56);
+ }
break;
case 55:
- if ((0xfffffbffffffffffL & l) != 0L)
+ if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(55, 56);
+ }
break;
case 56:
- if (curChar == 42)
+ if (curChar == 42) {
jjCheckNAddStates(34, 36);
+ }
break;
case 57:
- if ((0xffff7bffffffffffL & l) != 0L)
+ if ((0xffff7bffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(58, 56);
+ }
break;
case 58:
- if ((0xfffffbffffffffffL & l) != 0L)
+ if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(58, 56);
+ }
break;
case 59:
- if (curChar == 47 && kind > 7)
+ if (curChar == 47 && kind > 7) {
kind = 7;
+ }
break;
case 60:
- if (curChar == 42)
+ if (curChar == 42) {
jjstateSet[jjnewStateCnt++] = 54;
+ }
break;
case 61:
- if (curChar == 42)
+ if (curChar == 42) {
jjCheckNAddTwoStates(62, 63);
+ }
break;
case 62:
- if ((0xfffffbffffffffffL & l) != 0L)
+ if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(62, 63);
+ }
break;
case 63:
- if (curChar == 42)
+ if (curChar == 42) {
jjCheckNAddStates(37, 39);
+ }
break;
case 64:
- if ((0xffff7bffffffffffL & l) != 0L)
+ if ((0xffff7bffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(65, 63);
+ }
break;
case 65:
- if ((0xfffffbffffffffffL & l) != 0L)
+ if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(65, 63);
+ }
break;
case 66:
- if (curChar == 47 && kind > 8)
+ if (curChar == 47 && kind > 8) {
kind = 8;
+ }
break;
default : break;
}
@@ -1213,75 +1348,93 @@
else if (curChar < 128)
{
long l = 1L << (curChar & 077);
- MatchLoop: do
+ //MatchLoop
+ do
{
switch(jjstateSet[--i])
{
case 0:
case 28:
- if ((0x7fffffe87fffffeL & l) == 0L)
+ if ((0x7fffffe87fffffeL & l) == 0L) {
break;
- if (kind > 67)
+ }
+ if (kind > 67) {
kind = 67;
+ }
jjCheckNAdd(28);
break;
case 2:
- if ((0x100000001000L & l) != 0L && kind > 59)
+ if ((0x100000001000L & l) != 0L && kind > 59) {
kind = 59;
+ }
break;
case 5:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(40, 41);
+ }
break;
case 8:
- if ((0x5000000050L & l) != 0L && kind > 63)
+ if ((0x5000000050L & l) != 0L && kind > 63) {
kind = 63;
+ }
break;
case 10:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAdd(11);
+ }
break;
case 12:
- if (curChar == 92)
+ if (curChar == 92) {
jjAddStates(42, 44);
+ }
break;
case 13:
- if ((0x14404410000000L & l) != 0L)
+ if ((0x14404410000000L & l) != 0L) {
jjCheckNAdd(11);
+ }
break;
case 19:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(10, 12);
+ }
break;
case 20:
- if (curChar == 92)
+ if (curChar == 92) {
jjAddStates(45, 47);
+ }
break;
case 21:
- if ((0x14404410000000L & l) != 0L)
+ if ((0x14404410000000L & l) != 0L) {
jjCheckNAddStates(10, 12);
+ }
break;
case 33:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(48, 49);
+ }
break;
case 37:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(50, 51);
+ }
break;
case 41:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(52, 53);
+ }
break;
case 45:
- if ((0x100000001000000L & l) != 0L)
+ if ((0x100000001000000L & l) != 0L) {
jjCheckNAdd(46);
+ }
break;
case 46:
- if ((0x7e0000007eL & l) == 0L)
+ if ((0x7e0000007eL & l) == 0L) {
break;
- if (kind > 59)
+ }
+ if (kind > 59) {
kind = 59;
+ }
jjCheckNAddTwoStates(46, 2);
break;
case 50:
@@ -1312,47 +1465,57 @@
long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077);
- MatchLoop: do
+ //MatchLoop
+ do
{
switch(jjstateSet[--i])
{
case 0:
case 28:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) {
break;
- if (kind > 67)
+ }
+ if (kind > 67) {
kind = 67;
+ }
jjCheckNAdd(28);
break;
case 10:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjstateSet[jjnewStateCnt++] = 11;
+ }
break;
case 19:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(10, 12);
+ }
break;
case 50:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(18, 20);
+ }
break;
case 55:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(55, 56);
+ }
break;
case 57:
case 58:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(58, 56);
+ }
break;
case 62:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(62, 63);
+ }
break;
case 64:
case 65:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(65, 63);
+ }
break;
default : break;
}
@@ -1365,8 +1528,9 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) {
return curPos;
+ }
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
@@ -1384,8 +1548,9 @@
case 0:
return ((jjbitVec2[i2] & l2) != 0L);
default :
- if ((jjbitVec0[i1] & l1) != 0L)
+ if ((jjbitVec0[i1] & l1) != 0L) {
return true;
+ }
return false;
}
}
@@ -1404,8 +1569,9 @@
case 61:
return ((jjbitVec8[i2] & l2) != 0L);
default :
- if ((jjbitVec3[i1] & l1) != 0L)
+ if ((jjbitVec3[i1] & l1) != 0L) {
return true;
+ }
return false;
}
}
@@ -1449,8 +1615,9 @@
protected char curChar;
public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream)
{
- if (ASCII_UCodeESC_CharStream.staticFlag)
+ if (ASCII_UCodeESC_CharStream.staticFlag) {
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+ }
input_stream = stream;
}
public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState)
@@ -1469,9 +1636,10 @@
{
int i;
jjround = 0x80000001;
- for (i = 67; i-- > 0;)
+ for (i = 67; i-- > 0;) {
jjrounds[i] = 0x80000000;
}
+}
public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
{
ReInit(stream);
@@ -1479,11 +1647,12 @@
}
public void SwitchTo(int lexState)
{
- if (lexState >= 1 || lexState < 0)
+ if (lexState >= 1 || lexState < 0) {
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
+ } else {
curLexState = lexState;
}
+}
private final Token jjFillToken()
{
@@ -1507,7 +1676,6 @@
public final Token getNextToken()
{
- int kind;
Token specialToken = null;
Token matchedToken;
int curPos = 0;
@@ -1528,17 +1696,19 @@
}
try {
- while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
+ while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) {
curChar = input_stream.BeginToken();
}
+ }
catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0();
if (jjmatchedKind != 0x7fffffff)
{
- if (jjmatchedPos + 1 < curPos)
+ if (jjmatchedPos + 1 < curPos) {
input_stream.backup(curPos - jjmatchedPos - 1);
+ }
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
@@ -1550,9 +1720,9 @@
if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
- if (specialToken == null)
+ if (specialToken == null) {
specialToken = matchedToken;
- else
+ } else
{
matchedToken.specialToken = specialToken;
specialToken = (specialToken.next = matchedToken);
@@ -1572,9 +1742,9 @@
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
+ } else {
+ error_column++;
}
- else
- error_column++;
}
if (!EOFSeen) {
input_stream.backup(1);
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/LValue.java Tue May 03 22:16:58 2011 -0700
@@ -156,6 +156,7 @@
return new LValueArrayElement(interiorGetValue(), index);
}
+ @Override
public String toString() {
try {
return interiorGetValue().toString();
@@ -419,6 +420,7 @@
this.var = var;
}
+ @Override
Value getValue() {
if (jdiValue == null) {
jdiValue = frame.getValue(var);
@@ -426,12 +428,14 @@
return jdiValue;
}
+ @Override
void setValue0(Value val) throws InvalidTypeException,
ClassNotLoadedException {
frame.setValue(var, val);
jdiValue = val;
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException(var.name() + " is not a method");
}
@@ -469,6 +473,7 @@
}
}
+ @Override
Value getValue() throws InvocationException, InvalidTypeException,
ClassNotLoadedException, IncompatibleThreadStateException,
ParseException {
@@ -485,6 +490,7 @@
}
}
+ @Override
void setValue0(Value val) throws ParseException,
InvalidTypeException,
ClassNotLoadedException {
@@ -495,6 +501,7 @@
jdiValue = val;
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
if (matchingMethod != null) {
throw new ParseException("Invalid consecutive invocations");
@@ -531,6 +538,7 @@
}
}
+ @Override
Value getValue() throws InvocationException, InvalidTypeException,
ClassNotLoadedException, IncompatibleThreadStateException,
ParseException {
@@ -548,6 +556,7 @@
}
}
+ @Override
void setValue0(Value val)
throws ParseException, InvalidTypeException,
ClassNotLoadedException {
@@ -562,6 +571,7 @@
jdiValue = val;
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
if (matchingMethod != null) {
throw new ParseException("Invalid consecutive invocations");
@@ -589,6 +599,7 @@
this.arrayRef = value;
}
+ @Override
Value getValue() {
if (jdiValue == null) {
jdiValue = arrayRef.virtualMachine().mirrorOf(arrayRef.length());
@@ -596,10 +607,12 @@
return jdiValue;
}
+ @Override
void setValue0(Value value) throws ParseException {
throw new ParseException("Cannot set constant: " + value);
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Array element is not a method");
}
@@ -618,6 +631,7 @@
this.index = index;
}
+ @Override
Value getValue() {
if (jdiValue == null) {
jdiValue = array.getValue(index);
@@ -625,12 +639,14 @@
return jdiValue;
}
+ @Override
void setValue0(Value val) throws InvalidTypeException,
ClassNotLoadedException {
array.setValue(index, val);
jdiValue = val;
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Array element is not a method");
}
@@ -643,6 +659,7 @@
this.value = value;
}
+ @Override
Value getValue() {
if (jdiValue == null) {
jdiValue = value;
@@ -650,10 +667,12 @@
return jdiValue;
}
+ @Override
void setValue0(Value val) throws ParseException {
throw new ParseException("Cannot set constant: " + value);
}
+ @Override
void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Constant is not a method");
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java Tue May 03 22:16:58 2011 -0700
@@ -37,6 +37,8 @@
*/
public class ParseException extends Exception {
+ private static final long serialVersionUID = 7978489144303647901L;
+
/**
* This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
@@ -119,20 +121,21 @@
* of the final stack trace, and hence the correct error message
* gets displayed.
*/
+ @Override
public String getMessage() {
if (!specialConstructor) {
return super.getMessage();
}
String expected = "";
int maxSize = 0;
- for (int i = 0; i < expectedTokenSequences.length; i++) {
- if (maxSize < expectedTokenSequences[i].length) {
- maxSize = expectedTokenSequences[i].length;
+ for (int[] expectedTokenSequence : expectedTokenSequences) {
+ if (maxSize < expectedTokenSequence.length) {
+ maxSize = expectedTokenSequence.length;
}
- for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected += tokenImage[expectedTokenSequences[i][j]] + " ";
+ for (int j = 0; j < expectedTokenSequence.length; j++) {
+ expected += tokenImage[expectedTokenSequence[j]] + " ";
}
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
+ if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) {
expected += "...";
}
expected += eol + " ";
@@ -140,7 +143,9 @@
String retval = "Encountered \"";
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
+ if (i != 0) {
+ retval += " ";
+ }
if (tok.kind == 0) {
retval += tokenImage[0];
break;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/Token.java Tue May 03 22:16:58 2011 -0700
@@ -78,6 +78,7 @@
/**
* Returns the image.
*/
+ @Override
public final String toString()
{
return image;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java Tue May 03 22:16:58 2011 -0700
@@ -32,6 +32,8 @@
* Ordinals for various reasons why an Error of this type can be thrown.
*/
+ private static final long serialVersionUID = -6236440836177601522L;
+
/**
* Lexical error occured.
*/
@@ -136,6 +138,7 @@
*
* from this method for such cases in the release version of your parser.
*/
+ @Override
public String getMessage() {
return super.getMessage();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java Tue May 03 22:16:58 2011 -0700
@@ -29,12 +29,12 @@
import java.awt.*;
import java.awt.event.*;
-import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
public class ApplicationTool extends JPanel {
- private Environment env;
+ private static final long serialVersionUID = 310966063293205714L;
+
private ExecutionManager runtime;
private TypeScript script;
@@ -45,13 +45,13 @@
super(new BorderLayout());
- this.env = env;
this.runtime = env.getExecutionManager();
this.script = new TypeScript(PROMPT, false); // No implicit echo.
this.add(script);
script.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
runtime.sendLineToApplication(script.readln());
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java Tue May 03 22:16:58 2011 -0700
@@ -25,12 +25,10 @@
package com.sun.tools.example.debug.gui;
-import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.tree.*;
-import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
@@ -40,6 +38,8 @@
public class ClassTreeTool extends JPanel {
+ private static final long serialVersionUID = 526178912591739259L;
+
private Environment env;
private ExecutionManager runtime;
@@ -49,7 +49,7 @@
private JTree tree;
private DefaultTreeModel treeModel;
private ClassTreeNode root;
- private SearchPath sourcePath;
+// private SearchPath sourcePath;
private CommandInterpreter interpreter;
@@ -87,6 +87,7 @@
******/
MouseListener ml = new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
@@ -121,6 +122,7 @@
// SessionListener
+ @Override
public void sessionStart(EventObject e) {
// Get system classes and any others loaded before attaching.
try {
@@ -134,19 +136,24 @@
}
}
+ @Override
public void sessionInterrupt(EventObject e) {}
+ @Override
public void sessionContinue(EventObject e) {}
// JDIListener
+ @Override
public void classPrepare(ClassPrepareEventSet e) {
root.addClass(e.getReferenceType());
}
+ @Override
public void classUnload(ClassUnloadEventSet e) {
root.removeClass(e.getClassName());
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
// Clear contents of this view.
root = createClassTree(HEADING);
@@ -169,6 +176,7 @@
this.refTy = refTy;
}
+ @Override
public String toString() {
return name;
}
@@ -185,6 +193,7 @@
return (refTy == null);
}
+ @Override
public boolean isLeaf() {
return !isPackage();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Tue May 03 22:16:58 2011 -0700
@@ -29,8 +29,6 @@
import java.util.*;
import com.sun.jdi.*;
-import com.sun.jdi.request.*;
-
import com.sun.tools.example.debug.bdi.*;
public class CommandInterpreter {
@@ -93,9 +91,9 @@
try {
ThreadReference[] threads = threads();
long threadID = Long.parseLong(id, 16);
- for (int i = 0; i < threads.length; i++) {
- if (threads[i].uniqueID() == threadID) {
- thread = threads[i];
+ for (ThreadReference thread2 : threads) {
+ if (thread2.uniqueID() == threadID) {
+ thread = thread2;
break;
}
}
@@ -239,16 +237,18 @@
for (int i = 0 ; i < tlist.size() ; i++) {
ThreadReference thr = tlist.get(i);
int len = Utils.description(thr).length();
- if (len > maxId)
+ if (len > maxId) {
maxId = len;
+ }
String name = thr.name();
int iDot = name.lastIndexOf('.');
if (iDot >= 0 && name.length() > iDot) {
name = name.substring(iDot + 1);
}
- if (name.length() > maxName)
+ if (name.length() > maxName) {
maxName = name.length();
}
+ }
String maxNumString = String.valueOf(iThread + tlist.size());
int maxNumDigits = maxNumString.length();
for (int i = 0 ; i < tlist.size() ; i++) {
@@ -616,7 +616,6 @@
int cnt = 1;
if (t.hasMoreTokens()) {
String idToken = t.nextToken();
- int n;
try {
cnt = Integer.valueOf(idToken).intValue();
} catch (NumberFormatException e) {
@@ -885,7 +884,6 @@
}
private void commandStop(StringTokenizer t) throws NoSessionException {
- Location bploc;
String token;
if (!t.hasMoreTokens()) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java Tue May 03 22:16:58 2011 -0700
@@ -40,6 +40,8 @@
public class CommandTool extends JPanel {
+ private static final long serialVersionUID = 8613516856378346415L;
+
private Environment env;
private ContextManager context;
@@ -68,6 +70,7 @@
// Establish handler for incoming commands.
script.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(script.readln());
}
@@ -107,15 +110,17 @@
// JDIListener
+ @Override
public void accessWatchpoint(AccessWatchpointEventSet e) {
setThread(e);
for (EventIterator it = e.eventIterator(); it.hasNext(); ) {
- Event evt = it.nextEvent();
+ it.nextEvent();
diagnostics.putString("Watchpoint hit: " +
locationString(e));
}
}
+ @Override
public void classPrepare(ClassPrepareEventSet e) {
if (context.getVerboseFlag()) {
String name = e.getReferenceType().name();
@@ -123,6 +128,7 @@
}
}
+ @Override
public void classUnload(ClassUnloadEventSet e) {
if (context.getVerboseFlag()) {
diagnostics.putString("Class " + e.getClassName() +
@@ -130,12 +136,14 @@
}
}
+ @Override
public void exception(ExceptionEventSet e) {
setThread(e);
String name = e.getException().referenceType().name();
diagnostics.putString("Exception: " + name);
}
+ @Override
public void locationTrigger(LocationTriggerEventSet e) {
String locString = locationString(e);
setThread(e);
@@ -155,15 +163,17 @@
}
}
+ @Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) {
setThread(e);
for (EventIterator it = e.eventIterator(); it.hasNext(); ) {
- Event evt = it.nextEvent();
+ it.nextEvent();
diagnostics.putString("Watchpoint hit: " +
locationString(e));
}
}
+ @Override
public void threadDeath(ThreadDeathEventSet e) {
if (context.getVerboseFlag()) {
diagnostics.putString("Thread " + e.getThread() +
@@ -171,6 +181,7 @@
}
}
+ @Override
public void threadStart(ThreadStartEventSet e) {
if (context.getVerboseFlag()) {
diagnostics.putString("Thread " + e.getThread() +
@@ -178,16 +189,19 @@
}
}
+ @Override
public void vmDeath(VMDeathEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("VM exited");
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("Disconnected from VM");
}
+ @Override
public void vmStart(VMStartEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("VM started");
@@ -195,14 +209,17 @@
// SessionListener
+ @Override
public void sessionStart(EventObject e) {}
+ @Override
public void sessionInterrupt(EventObject e) {
Thread.yield(); // fetch output
diagnostics.putString("VM interrupted by user.");
script.setPrompt(DEFAULT_CMD_PROMPT);
}
+ @Override
public void sessionContinue(EventObject e) {
diagnostics.putString("Execution resumed.");
script.setPrompt(DEFAULT_CMD_PROMPT);
@@ -210,23 +227,28 @@
// SpecListener
+ @Override
public void breakpointSet(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint set at " + spec + ".");
}
+ @Override
public void breakpointDeferred(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint will be set at " +
spec + " when its class is loaded.");
}
+ @Override
public void breakpointDeleted(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint at " + spec.toString() + " deleted.");
}
+ @Override
public void breakpointResolved(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint resolved to " + spec.toString() + ".");
}
+ @Override
public void breakpointError(SpecErrorEvent e) {
EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Deferred breakpoint at " +
@@ -236,25 +258,35 @@
//### Add info for watchpoints and exceptions
+ @Override
public void watchpointSet(SpecEvent e) {
}
+ @Override
public void watchpointDeferred(SpecEvent e) {
}
+ @Override
public void watchpointDeleted(SpecEvent e) {
}
+ @Override
public void watchpointResolved(SpecEvent e) {
}
+ @Override
public void watchpointError(SpecErrorEvent e) {
}
+ @Override
public void exceptionInterceptSet(SpecEvent e) {
}
+ @Override
public void exceptionInterceptDeferred(SpecEvent e) {
}
+ @Override
public void exceptionInterceptDeleted(SpecEvent e) {
}
+ @Override
public void exceptionInterceptResolved(SpecEvent e) {
}
+ @Override
public void exceptionInterceptError(SpecErrorEvent e) {
}
@@ -263,6 +295,7 @@
// If the user selects a new current thread or frame, update prompt.
+ @Override
public void currentFrameChanged(CurrentFrameChangedEvent e) {
// Update prompt only if affect thread is current.
ThreadReference thread = e.getThread();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java Tue May 03 22:16:58 2011 -0700
@@ -46,7 +46,7 @@
private boolean verbose;
- private Vector<ContextListener> contextListeners = new Vector<ContextListener>();
+ private ArrayList<ContextListener> contextListeners = new ArrayList<ContextListener>();
public ContextManager(Environment env) {
classManager = env.getClassManager();
@@ -264,11 +264,11 @@
private void notifyCurrentFrameChanged(ThreadInfo tinfo, int index,
boolean invalidate) {
- Vector l = (Vector)contextListeners.clone();
+ ArrayList<ContextListener> l = new ArrayList<ContextListener>(contextListeners);
CurrentFrameChangedEvent evt =
new CurrentFrameChangedEvent(this, tinfo, index, invalidate);
for (int i = 0; i < l.size(); i++) {
- ((ContextListener)l.elementAt(i)).currentFrameChanged(evt);
+ l.get(i).currentFrameChanged(evt);
}
}
@@ -277,28 +277,34 @@
// SessionListener
+ @Override
public void sessionStart(EventObject e) {
invalidateCurrentThread();
}
+ @Override
public void sessionInterrupt(EventObject e) {
setCurrentThreadInvalidate(currentThread);
}
+ @Override
public void sessionContinue(EventObject e) {
invalidateCurrentThread();
}
// JDIListener
+ @Override
public void locationTrigger(LocationTriggerEventSet e) {
setCurrentThreadInvalidate(e.getThread());
}
+ @Override
public void exception(ExceptionEventSet e) {
setCurrentThreadInvalidate(e.getThread());
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
invalidateCurrentThread();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java Tue May 03 22:16:58 2011 -0700
@@ -31,6 +31,7 @@
public class CurrentFrameChangedEvent extends EventObject {
+ private static final long serialVersionUID = 4214479486546762179L;
private ThreadInfo tinfo;
private int index;
private boolean invalidate;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/Environment.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/Environment.java Tue May 03 22:16:58 2011 -0700
@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui;
import java.io.*;
-import java.util.*;
-
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/GUI.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/GUI.java Tue May 03 22:16:58 2011 -0700
@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui;
import java.io.*;
-import java.util.*;
-
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
@@ -38,6 +36,7 @@
public class GUI extends JPanel {
+ private static final long serialVersionUID = 3292463234530679091L;
private CommandTool cmdTool;
private ApplicationTool appTool;
//###HACK##
@@ -87,7 +86,7 @@
threadTreeTool = new ThreadTreeTool(env);
threadTreeTool.setPreferredSize(new java.awt.Dimension(200, 450));
- JTabbedPane treePane = new JTabbedPane(JTabbedPane.BOTTOM);
+ JTabbedPane treePane = new JTabbedPane(SwingConstants.BOTTOM);
treePane.addTab("Source", null, sourceTreeTool);
treePane.addTab("Classes", null, classTreeTool);
treePane.addTab("Threads", null, threadTreeTool);
@@ -139,12 +138,9 @@
}
public static void main(String argv[]) {
- String remote = null;
String clsName = "";
String progArgs = "";
String javaArgs = "";
- boolean verbose = false; //### Not implemented.
-
final Environment env = new Environment();
JPanel mainPanel = new GUI(env);
@@ -246,13 +242,14 @@
frame.setContentPane(mainPanel);
frame.addWindowListener(new WindowAdapter() {
+ @Override
public void windowClosing(WindowEvent e) {
env.terminate();
}
});
frame.pack();
- frame.show();
+ frame.setVisible(true);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java Tue May 03 22:16:58 2011 -0700
@@ -28,7 +28,6 @@
import java.io.File;
import java.util.Hashtable;
import java.util.Enumeration;
-import javax.swing.*;
import javax.swing.filechooser.*;
//### Renamed from 'ExampleFileFilter.java' provided with Swing demos.
@@ -93,8 +92,12 @@
*/
public JDBFileFilter(String extension, String description) {
this();
- if(extension!=null) addExtension(extension);
- if(description!=null) setDescription(description);
+ if(extension!=null) {
+ addExtension(extension);
+ }
+ if(description!=null) {
+ setDescription(description);
+ }
}
/**
@@ -120,11 +123,13 @@
*/
public JDBFileFilter(String[] filters, String description) {
this();
- for (int i = 0; i < filters.length; i++) {
+ for (String filter : filters) {
// add filters one by one
- addExtension(filters[i]);
+ addExtension(filter);
}
- if(description!=null) setDescription(description);
+ if(description!=null) {
+ setDescription(description);
+ }
}
/**
@@ -136,6 +141,7 @@
* @see #getExtension
* @see FileFilter#accepts
*/
+ @Override
public boolean accept(File f) {
if(f != null) {
if(f.isDirectory()) {
@@ -196,6 +202,7 @@
* @see isExtensionListInDescription
* @see FileFilter#getDescription
*/
+ @Override
public String getDescription() {
if(fullDescription == null) {
if(description == null || isExtensionListInDescription()) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java Tue May 03 22:16:58 2011 -0700
@@ -31,7 +31,6 @@
import java.util.Vector;
import java.util.List;
-import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
//### This is currently just a placeholder!
@@ -57,6 +56,7 @@
JMenuItem openItem = new JMenuItem("Open...", 'O');
openItem.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
openCommand();
}
@@ -93,6 +93,7 @@
JMenuItem monitorItem = new JMenuItem("Monitor Expression...", 'M');
monitorItem.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
monitorCommand();
}
@@ -101,6 +102,7 @@
JMenuItem unmonitorItem = new JMenuItem("Unmonitor Expression...");
unmonitorItem.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
unmonitorCommand();
}
@@ -110,6 +112,7 @@
JMenu breakpointMenu = new JMenu("Breakpoint");
JMenuItem stopItem = new JMenuItem("Stop in...", 'S');
stopItem.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
buildBreakpoint();
}
@@ -176,6 +179,7 @@
mi.setToolTipText(toolTip);
final String cmd = command;
mi.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java Tue May 03 22:16:58 2011 -0700
@@ -26,10 +26,8 @@
package com.sun.tools.example.debug.gui;
import javax.swing.*;
-import java.awt.*;
import java.awt.event.*;
-import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
class JDBToolBar extends JToolBar {
@@ -92,6 +90,7 @@
button.setToolTipText(toolTip);
final String cmd = command;
button.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java Tue May 03 22:16:58 2011 -0700
@@ -29,18 +29,10 @@
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
-import java.util.Iterator;
-
-import java.io.IOException;
-
import java.awt.BorderLayout;
-import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
@@ -98,6 +90,7 @@
comp.add(panel);
}
+ @Override
String getText() {
return textField.getText();
}
@@ -114,6 +107,7 @@
comp.add(panel);
}
+ @Override
String getText() {
return ((Connector.BooleanArgument)arg)
.stringValueOf(check.getModel().isSelected());
@@ -147,6 +141,7 @@
final boolean[] oked = {false};
JPanel buttonPanel = okCancel( dialog, new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent event) {
if (radioGroup.getSelection() == null) {
JOptionPane.showMessageDialog(dialog,
@@ -162,7 +157,7 @@
} );
content.add(BorderLayout.SOUTH, buttonPanel);
dialog.pack();
- dialog.show();
+ dialog.setVisible(true);
return oked[0] ?
modelToConnector.get(radioGroup.getSelection()) :
@@ -178,7 +173,7 @@
Container content = dialog.getContentPane();
JPanel guts = new JPanel();
Border etched = BorderFactory.createEtchedBorder();
- Border titled = BorderFactory.createTitledBorder(etched,
+ BorderFactory.createTitledBorder(etched,
connector.description(),
TitledBorder.LEFT, TitledBorder.TOP);
guts.setBorder(etched);
@@ -199,6 +194,7 @@
content.add(guts);
JPanel buttonPanel = okCancel( dialog, new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent event) {
for (ArgRep ar : argReps) {
if (!ar.isSpecified()) {
@@ -236,7 +232,7 @@
} );
content.add(BorderLayout.SOUTH, buttonPanel);
dialog.pack();
- dialog.show();
+ dialog.setVisible(true);
}
private JPanel okCancel(final JDialog dialog, ActionListener okListener) {
@@ -247,6 +243,7 @@
buttonPanel.add(cancel);
ok.addActionListener(okListener);
cancel.addActionListener( new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent event) {
dialog.setVisible(false);
dialog.dispose();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java Tue May 03 22:16:58 2011 -0700
@@ -42,10 +42,12 @@
//### remove listeners on exit!
}
+ @Override
public Object getElementAt(int index) {
return monitors.get(index);
}
+ @Override
public int getSize() {
return monitors.size();
}
@@ -70,7 +72,7 @@
return Collections.unmodifiableList(monitors);
}
- public Iterator iterator() {
+ public Iterator<?> iterator() {
return monitors().iterator();
}
@@ -80,7 +82,8 @@
private class MonitorListListener implements ContextListener {
- public void currentFrameChanged(CurrentFrameChangedEvent e) {
+ @Override
+ public void currentFrameChanged(final CurrentFrameChangedEvent e) {
invalidate();
}
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java Tue May 03 22:16:58 2011 -0700
@@ -25,15 +25,9 @@
package com.sun.tools.example.debug.gui;
-import java.io.*;
-import java.util.*;
-
import javax.swing.*;
-import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*;
-import java.awt.event.*;
-
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
import com.sun.tools.example.debug.expr.ExpressionParser;
@@ -41,6 +35,7 @@
public class MonitorTool extends JPanel {
+ private static final long serialVersionUID = -645235951031726647L;
private ExecutionManager runtime;
private ContextManager context;
@@ -64,6 +59,7 @@
}
private class MonitorToolListener implements ListSelectionListener {
+ @Override
public void valueChanged(ListSelectionEvent e) {
int index = list.getSelectedIndex();
if (index != -1) {
@@ -78,6 +74,7 @@
IncompatibleThreadStateException {
ExpressionParser.GetFrame frameGetter =
new ExpressionParser.GetFrame() {
+ @Override
public StackFrame get()
throws IncompatibleThreadStateException
{
@@ -93,6 +90,7 @@
private class MonitorRenderer extends DefaultListCellRenderer {
+ @Override
public Component getListCellRendererComponent(JList list,
Object value,
int index,
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java Tue May 03 22:16:58 2011 -0700
@@ -58,8 +58,8 @@
}
public File resolve(String relativeFileName) {
- for (int i = 0; i < pathArray.length; i++) {
- File path = new File(pathArray[i], relativeFileName);
+ for (String element : pathArray) {
+ File path = new File(element, relativeFileName);
if (path.exists()) {
return path;
}
@@ -76,8 +76,8 @@
// classpath is retained. This is the one that will be
// found if we later do a 'resolve'.
SortedSet<String> s = new TreeSet<String>(); // sorted, no duplicates
- for (int i = 0; i < pathArray.length; i++) {
- File path = new File(pathArray[i], relativeDirName);
+ for (String element : pathArray) {
+ File path = new File(element, relativeDirName);
if (path.exists()) {
String[] childArray = path.list(filter);
if (childArray != null) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java Tue May 03 22:16:58 2011 -0700
@@ -25,22 +25,25 @@
package com.sun.tools.example.debug.gui;
-import javax.swing.*;
import javax.swing.tree.*;
public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel {
+ private static final long serialVersionUID = -7849105107888117679L;
+
SingleLeafTreeSelectionModel() {
super();
selectionMode = SINGLE_TREE_SELECTION;
}
+ @Override
public void setSelectionPath(TreePath path) {
if(((TreeNode)(path.getLastPathComponent())).isLeaf()) {
super.setSelectionPath(path);
}
}
+ @Override
public void setSelectionPaths(TreePath[] paths) {
// Only look at first path, as all others will be
// ignored anyway in single tree selection mode.
@@ -49,12 +52,14 @@
}
}
+ @Override
public void addSelectionPath(TreePath path) {
if(((TreeNode)(path.getLastPathComponent())).isLeaf()) {
super.setSelectionPath(path);
}
}
+ @Override
public void addSelectionPaths(TreePath[] paths) {
// Only look at first path, as all others will be
// ignored anyway in single tree selection mode.
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java Tue May 03 22:16:58 2011 -0700
@@ -31,7 +31,6 @@
import com.sun.jdi.*;
import com.sun.tools.example.debug.event.*;
-import com.sun.tools.example.debug.bdi.*;
/**
* Manage the list of source files.
@@ -45,7 +44,7 @@
private List<SourceModel> sourceList;
private SearchPath sourcePath;
- private Vector<SourceListener> sourceListeners = new Vector<SourceListener>();
+ private ArrayList<SourceListener> sourceListeners = new ArrayList<SourceListener>();
private Map<ReferenceType, SourceModel> classToSource = new HashMap<ReferenceType, SourceModel>();
@@ -79,18 +78,18 @@
}
public void addSourceListener(SourceListener l) {
- sourceListeners.addElement(l);
+ sourceListeners.add(l);
}
public void removeSourceListener(SourceListener l) {
- sourceListeners.removeElement(l);
+ sourceListeners.remove(l);
}
private void notifySourcepathChanged() {
- Vector l = (Vector)sourceListeners.clone();
+ ArrayList<SourceListener> l = new ArrayList<SourceListener>(sourceListeners);
SourcepathChangedEvent evt = new SourcepathChangedEvent(this);
for (int i = 0; i < l.size(); i++) {
- ((SourceListener)l.elementAt(i)).sourcepathChanged(evt);
+ l.get(i).sourcepathChanged(evt);
}
}
@@ -163,6 +162,7 @@
private class SMClassListener extends JDIAdapter
implements JDIListener {
+ @Override
public void classPrepare(ClassPrepareEventSet e) {
ReferenceType refType = e.getReferenceType();
SourceModel sm = sourceForClass(refType);
@@ -171,6 +171,7 @@
}
}
+ @Override
public void classUnload(ClassUnloadEventSet e) {
//### iterate through looking for (e.getTypeName()).
//### then remove it.
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java Tue May 03 22:16:58 2011 -0700
@@ -31,8 +31,6 @@
import com.sun.jdi.*;
import com.sun.jdi.request.*;
-import com.sun.tools.example.debug.bdi.*;
-
import javax.swing.*;
/**
@@ -101,6 +99,7 @@
// **** Implement ListModel *****
+ @Override
public Object getElementAt(int index) {
if (sourceLines == null) {
initialize();
@@ -108,6 +107,7 @@
return sourceLines.get(index);
}
+ @Override
public int getSize() {
if (sourceLines == null) {
initialize();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java Tue May 03 22:16:58 2011 -0700
@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui;
import java.io.*;
-import java.util.*;
-
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@@ -35,12 +33,11 @@
import com.sun.jdi.*;
import com.sun.jdi.request.*;
-import com.sun.tools.example.debug.event.*;
import com.sun.tools.example.debug.bdi.*;
-import java.util.List;
+public class SourceTool extends JPanel {
-public class SourceTool extends JPanel {
+ private static final long serialVersionUID = -5461299294186395257L;
private Environment env;
@@ -99,6 +96,7 @@
// ContextListener
+ @Override
public void currentFrameChanged(CurrentFrameChangedEvent e) {
showSourceContext(e.getThread(), e.getIndex());
}
@@ -108,6 +106,7 @@
// SourceListener
+ @Override
public void sourcepathChanged(SourcepathChangedEvent e) {
// Reload source view if its contents depend
// on the source path.
@@ -120,12 +119,15 @@
// SpecListener
+ @Override
public void breakpointSet(SpecEvent e) {
breakpointResolved(e);
}
+ @Override
public void breakpointDeferred(SpecEvent e) { }
+ @Override
public void breakpointDeleted(SpecEvent e) {
BreakpointRequest req = (BreakpointRequest)e.getEventRequest();
Location loc = req.location();
@@ -139,6 +141,7 @@
}
}
+ @Override
public void breakpointResolved(SpecEvent e) {
BreakpointRequest req = (BreakpointRequest)e.getEventRequest();
Location loc = req.location();
@@ -150,29 +153,40 @@
}
}
+ @Override
public void breakpointError(SpecErrorEvent e) {
breakpointDeleted(e);
}
+ @Override
public void watchpointSet(SpecEvent e) {
}
+ @Override
public void watchpointDeferred(SpecEvent e) {
}
+ @Override
public void watchpointDeleted(SpecEvent e) {
}
+ @Override
public void watchpointResolved(SpecEvent e) {
}
+ @Override
public void watchpointError(SpecErrorEvent e) {
}
+ @Override
public void exceptionInterceptSet(SpecEvent e) {
}
+ @Override
public void exceptionInterceptDeferred(SpecEvent e) {
}
+ @Override
public void exceptionInterceptDeleted(SpecEvent e) {
}
+ @Override
public void exceptionInterceptResolved(SpecEvent e) {
}
+ @Override
public void exceptionInterceptError(SpecErrorEvent e) {
}
}
@@ -269,6 +283,7 @@
private class SourceLineRenderer extends DefaultListCellRenderer {
+ @Override
public Component getListCellRendererComponent(JList list,
Object value,
int index,
@@ -301,6 +316,7 @@
return this;
}
+ @Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
return new Dimension(dim.width, dim.height-5);
@@ -309,6 +325,7 @@
}
private class STMouseListener extends MouseAdapter implements MouseListener {
+ @Override
public void mousePressed(MouseEvent e) {
if (e.isPopupTrigger()) {
showPopupMenu((Component)e.getSource(),
@@ -316,6 +333,7 @@
}
}
+ @Override
public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) {
showPopupMenu((Component)e.getSource(),
@@ -354,6 +372,7 @@
private JMenuItem commandItem(String label, final String cmd) {
JMenuItem item = new JMenuItem(label);
item.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java Tue May 03 22:16:58 2011 -0700
@@ -30,15 +30,15 @@
import javax.swing.*;
import javax.swing.tree.*;
-import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
-import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
public class SourceTreeTool extends JPanel {
+ private static final long serialVersionUID = 3336680912107956419L;
+
private Environment env;
private ExecutionManager runtime;
@@ -81,6 +81,7 @@
******/
MouseListener ml = new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
@@ -112,6 +113,7 @@
private class SourceTreeToolListener implements SourceListener {
+ @Override
public void sourcepathChanged(SourcepathChangedEvent e) {
sourcePath = sourceManager.getSourcePath();
root = createDirectoryTree(HEADING);
@@ -121,6 +123,7 @@
}
private static class SourceOrDirectoryFilter implements FilenameFilter {
+ @Override
public boolean accept(File dir, String name) {
return (name.endsWith(".java") ||
new File(dir, name).isDirectory());
@@ -158,6 +161,7 @@
this.isDirectory = isDirectory;
}
+ @Override
public String toString() {
return name;
}
@@ -195,6 +199,7 @@
* Returns the child <code>TreeNode</code> at index
* <code>childIndex</code>.
*/
+ @Override
public TreeNode getChildAt(int childIndex) {
expandIfNeeded();
return children[childIndex];
@@ -204,6 +209,7 @@
* Returns the number of children <code>TreeNode</code>s the receiver
* contains.
*/
+ @Override
public int getChildCount() {
expandIfNeeded();
return children.length;
@@ -212,6 +218,7 @@
/**
* Returns the parent <code>TreeNode</code> of the receiver.
*/
+ @Override
public TreeNode getParent() {
return parent;
}
@@ -221,18 +228,21 @@
* If the receiver does not contain <code>node</code>, -1 will be
* returned.
*/
+ @Override
public int getIndex(TreeNode node) {
expandIfNeeded();
for (int i = 0; i < children.length; i++) {
- if (children[i] == node)
+ if (children[i] == node) {
return i;
}
+ }
return -1;
}
/**
* Returns true if the receiver allows children.
*/
+ @Override
public boolean getAllowsChildren() {
return isDirectory;
}
@@ -240,6 +250,7 @@
/**
* Returns true if the receiver is a leaf.
*/
+ @Override
public boolean isLeaf() {
expandIfNeeded();
return !isDirectory;
@@ -248,13 +259,16 @@
/**
* Returns the children of the receiver as an Enumeration.
*/
+ @Override
public Enumeration children() {
expandIfNeeded();
return new Enumeration() {
int i = 0;
+ @Override
public boolean hasMoreElements() {
return (i < children.length);
}
+ @Override
public Object nextElement() throws NoSuchElementException {
if (i >= children.length) {
throw new NoSuchElementException();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java Tue May 03 22:16:58 2011 -0700
@@ -29,6 +29,8 @@
public class SourcepathChangedEvent extends EventObject {
+ private static final long serialVersionUID = 8762169481005804121L;
+
public SourcepathChangedEvent(Object source) {
super(source);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java Tue May 03 22:16:58 2011 -0700
@@ -25,21 +25,16 @@
package com.sun.tools.example.debug.gui;
-import java.io.*;
-import java.util.*;
-import java.util.List; // Must import explicitly due to conflict with javax.awt.List
-
import javax.swing.*;
-import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*;
-import java.awt.event.*;
-
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*;
public class StackTraceTool extends JPanel {
+ private static final long serialVersionUID = 9140041989427965718L;
+
private Environment env;
private ExecutionManager runtime;
@@ -85,6 +80,7 @@
//### I suspect we handle the case badly that the VM is not interrupted.
+ @Override
public void currentFrameChanged(CurrentFrameChangedEvent e) {
// If the current frame of the thread appearing in this
// view is changed, move the selection to track it.
@@ -103,6 +99,7 @@
// ListSelectionListener
+ @Override
public void valueChanged(ListSelectionEvent e) {
int index = list.getSelectedIndex();
if (index != -1) {
@@ -117,6 +114,7 @@
private class StackFrameRenderer extends DefaultListCellRenderer {
+ @Override
public Component getListCellRendererComponent(JList list,
Object value,
int index,
@@ -174,6 +172,7 @@
this.tinfo = tinfo;
}
+ @Override
public Object getElementAt(int index) {
try {
return tinfo == null? null : tinfo.getFrame(index);
@@ -186,6 +185,7 @@
}
}
+ @Override
public int getSize() {
try {
return tinfo == null? 1 : tinfo.getFrameCount();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java Tue May 03 22:16:58 2011 -0700
@@ -25,13 +25,11 @@
package com.sun.tools.example.debug.gui;
-import java.io.*;
import java.util.*;
import java.util.List; // Must import explicitly due to conflict with javax.awt.List
import javax.swing.*;
import javax.swing.tree.*;
-import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
@@ -45,6 +43,8 @@
public class ThreadTreeTool extends JPanel {
+ private static final long serialVersionUID = 4168599992853038878L;
+
private Environment env;
private ExecutionManager runtime;
@@ -79,6 +79,7 @@
tree.setSelectionModel(new SingleLeafTreeSelectionModel());
MouseListener ml = new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
@@ -131,6 +132,7 @@
// SessionListener
+ @Override
public void sessionStart(EventObject e) {
try {
for (ThreadReference thread : runtime.allThreads()) {
@@ -143,20 +145,25 @@
}
}
+ @Override
public void sessionInterrupt(EventObject e) {}
+ @Override
public void sessionContinue(EventObject e) {}
// JDIListener
+ @Override
public void threadStart(ThreadStartEventSet e) {
root.addThread(e.getThread());
}
+ @Override
public void threadDeath(ThreadDeathEventSet e) {
root.removeThread(e.getThread());
}
+ @Override
public void vmDisconnect(VMDisconnectEventSet e) {
// Clear the contents of this view.
root = createThreadTree(HEADING);
@@ -193,6 +200,7 @@
}
}
+ @Override
public String toString() {
return description;
}
@@ -213,6 +221,7 @@
return (thread == null);
}
+ @Override
public boolean isLeaf() {
return !isThreadGroup();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java Tue May 03 22:16:58 2011 -0700
@@ -28,10 +28,10 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
-import javax.swing.border.*;
public class TypeScript extends JPanel {
+ private static final long serialVersionUID = -983704841363534885L;
private JTextArea history;
private JTextField entry;
@@ -41,7 +41,6 @@
private JScrollBar historyHScrollBar;
private boolean echoInput = false;
- private boolean nlPending = false;
private static String newline = System.getProperty("line.separator");
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java Tue May 03 22:16:58 2011 -0700
@@ -25,7 +25,6 @@
package com.sun.tools.example.debug.gui;
-import javax.swing.*;
import com.sun.tools.example.debug.bdi.OutputListener;
public class TypeScriptOutputListener implements OutputListener {
@@ -42,10 +41,12 @@
this.appendNewline = appendNewline;
}
+ @Override
public void putString(String s) {
script.append(s);
- if (appendNewline)
+ if (appendNewline) {
script.newline();
}
+ }
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java Tue May 03 22:16:58 2011 -0700
@@ -35,14 +35,17 @@
this.script = script;
}
+ @Override
public void write(char[] cbuf, int off, int len) throws IOException {
script.append(String.valueOf(cbuf, off, len));
}
+ @Override
public void flush() {
script.flush();
}
+ @Override
public void close() {
script.flush();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -38,6 +38,7 @@
/**
* The 'refType' is known to match, return the EventRequest.
*/
+ @Override
EventRequest resolveEventRequest(ReferenceType refType)
throws NoSuchFieldException {
Field field = refType.fieldByName(fieldId);
@@ -48,6 +49,7 @@
return wp;
}
+ @Override
public String toString() {
return MessageOutput.format("watch accesses of",
new Object [] {refSpec.toString(),
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,8 @@
public class AmbiguousMethodException extends Exception
{
+ private static final long serialVersionUID = -5372629264936918654L;
+
public AmbiguousMethodException()
{
super();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -30,7 +30,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Iterator;
class BreakpointSpec extends EventRequestSpec {
String methodId;
@@ -58,6 +57,7 @@
/**
* The 'refType' is known to match, return the EventRequest.
*/
+ @Override
EventRequest resolveEventRequest(ReferenceType refType)
throws AmbiguousMethodException,
AbsentInformationException,
@@ -91,12 +91,14 @@
return (methodId != null);
}
+ @Override
public int hashCode() {
return refSpec.hashCode() + lineNumber +
((methodId != null) ? methodId.hashCode() : 0) +
((methodArgs != null) ? methodArgs.hashCode() : 0);
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof BreakpointSpec) {
BreakpointSpec breakpoint = (BreakpointSpec)obj;
@@ -114,6 +116,7 @@
}
}
+ @Override
String errorMessageFor(Exception e) {
if (e instanceof AmbiguousMethodException) {
return (MessageOutput.format("Method is overloaded; specify arguments",
@@ -140,6 +143,7 @@
}
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer(refSpec.toString());
if (isMethodBreakpoint()) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Tue May 03 22:16:58 2011 -0700
@@ -51,6 +51,7 @@
final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo();
final int stackFrame = threadInfo == null? 0 : threadInfo.getCurrentFrameIndex();
Thread thread = new Thread("asynchronous jdb command") {
+ @Override
public void run() {
try {
action();
@@ -95,6 +96,7 @@
final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo();
if ((threadInfo != null) && (threadInfo.getCurrentFrame() != null)) {
frameGetter = new ExpressionParser.GetFrame() {
+ @Override
public StackFrame get() throws IncompatibleThreadStateException {
return threadInfo.getCurrentFrame();
}
@@ -224,7 +226,6 @@
}
void commandClass(StringTokenizer t) {
- List<ReferenceType> list = Env.vm().allClasses();
if (!t.hasMoreTokens()) {
MessageOutput.println("No class specified.");
@@ -709,6 +710,7 @@
void doKillThread(final ThreadReference threadToKill,
final StringTokenizer tokenizer) {
new AsyncExecution() {
+ @Override
void action() {
doKill(threadToKill, tokenizer);
}
@@ -1118,7 +1120,6 @@
}
void commandStop(StringTokenizer t) {
- Location bploc;
String atIn;
byte suspendPolicy = EventRequest.SUSPEND_ALL;
@@ -1665,6 +1666,7 @@
void commandPrint(final StringTokenizer t, final boolean dumpObject) {
new AsyncExecution() {
+ @Override
void action() {
doPrint(t, dumpObject);
}
@@ -1734,6 +1736,7 @@
void commandLock(final StringTokenizer t) {
new AsyncExecution() {
+ @Override
void action() {
doLock(t);
}
@@ -1809,6 +1812,7 @@
void commandDisableGC(final StringTokenizer t) {
new AsyncExecution() {
+ @Override
void action() {
doDisableGC(t);
}
@@ -1837,6 +1841,7 @@
void commandEnableGC(final StringTokenizer t) {
new AsyncExecution() {
+ @Override
void action() {
doEnableGC(t);
}
@@ -1892,6 +1897,7 @@
}
} else {
new AsyncExecution() {
+ @Override
void action() {
doSave(t);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/Env.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/Env.java Tue May 03 22:16:58 2011 -0700
@@ -29,7 +29,6 @@
import com.sun.jdi.request.StepRequest;
import com.sun.jdi.request.MethodEntryRequest;
import com.sun.jdi.request.MethodExitRequest;
-import com.sun.tools.jdi.*;
import java.util.*;
import java.io.*;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java Tue May 03 22:16:58 2011 -0700
@@ -27,14 +27,8 @@
import com.sun.jdi.*;
import com.sun.jdi.event.*;
-import com.sun.jdi.request.EventRequestManager;
import com.sun.jdi.request.EventRequest;
-import java.io.PrintStream;
-import java.util.StringTokenizer;
-import java.util.Collection;
-import java.util.Iterator;
-
public class EventHandler implements Runnable {
EventNotifier notifier;
@@ -59,6 +53,7 @@
}
}
+ @Override
public void run() {
EventQueue queue = Env.vm().eventQueue();
while (connected) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java Tue May 03 22:16:58 2011 -0700
@@ -30,9 +30,7 @@
import com.sun.jdi.request.ExceptionRequest;
import com.sun.jdi.request.ClassPrepareRequest;
import com.sun.jdi.event.ClassPrepareEvent;
-import java.util.List;
import java.util.ArrayList;
-import java.util.Iterator;
abstract class EventRequestSpec {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java Tue May 03 22:16:58 2011 -0700
@@ -25,15 +25,12 @@
package com.sun.tools.example.debug.tty;
-import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest;
import com.sun.jdi.event.ClassPrepareEvent;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Iterator;
import java.util.List;
-import java.util.StringTokenizer;
class EventRequestSpecList {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java Tue May 03 22:16:58 2011 -0700
@@ -28,10 +28,6 @@
import com.sun.jdi.ReferenceType;
import com.sun.jdi.request.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
-
class ExceptionSpec extends EventRequestSpec {
private boolean notifyCaught;
private boolean notifyUncaught;
@@ -51,6 +47,7 @@
/**
* The 'refType' is known to match, return the EventRequest.
*/
+ @Override
EventRequest resolveEventRequest(ReferenceType refType) {
EventRequestManager em = refType.virtualMachine().eventRequestManager();
ExceptionRequest excReq = em.createExceptionRequest(refType,
@@ -68,6 +65,7 @@
return notifyUncaught;
}
+ @Override
public int hashCode() {
//Reference: Effective Java[tm] (Bloch, 2001), Item 8
int result = 17;
@@ -77,6 +75,7 @@
return result;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof ExceptionSpec) {
ExceptionSpec es = (ExceptionSpec)obj;
@@ -90,6 +89,7 @@
return false;
}
+ @Override
public String toString() {
String s;
if (notifyCaught && !notifyUncaught) {
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,8 @@
public class LineNotFoundException extends Exception
{
+ private static final long serialVersionUID = 3748297722519448995L;
+
public LineNotFoundException()
{
super();
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java Tue May 03 22:16:58 2011 -0700
@@ -26,6 +26,8 @@
package com.sun.tools.example.debug.tty;
class MalformedMemberNameException extends Exception {
+ private static final long serialVersionUID = 7759071468833196630L;
+
public MalformedMemberNameException() {
super();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -38,6 +38,7 @@
/**
* The 'refType' is known to match, return the EventRequest.
*/
+ @Override
EventRequest resolveEventRequest(ReferenceType refType)
throws NoSuchFieldException {
Field field = refType.fieldByName(fieldId);
@@ -48,6 +49,7 @@
return wp;
}
+ @Override
public String toString() {
return MessageOutput.format("watch modification of",
new Object [] {refSpec.toString(),
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java Tue May 03 22:16:58 2011 -0700
@@ -55,6 +55,7 @@
/**
* Does the specified ReferenceType match this spec.
*/
+ @Override
public boolean matches(ReferenceType refType) {
if (classId.startsWith("*")) {
return refType.name().endsWith(stem);
@@ -65,6 +66,7 @@
}
}
+ @Override
public ClassPrepareRequest createPrepareRequest() {
ClassPrepareRequest request =
Env.vm().eventRequestManager().createClassPrepareRequest();
@@ -73,10 +75,12 @@
return request;
}
+ @Override
public int hashCode() {
return classId.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof PatternReferenceTypeSpec) {
PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj;
@@ -125,6 +129,7 @@
return true;
}
+ @Override
public String toString() {
return classId;
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java Tue May 03 22:16:58 2011 -0700
@@ -35,7 +35,9 @@
boolean matches(ReferenceType refType);
ClassPrepareRequest createPrepareRequest();
+ @Override
int hashCode();
+ @Override
boolean equals(Object obj);
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java Tue May 03 22:16:58 2011 -0700
@@ -27,11 +27,8 @@
import com.sun.jdi.Location;
import com.sun.jdi.AbsentInformationException;
-import java.util.Map;
-import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.StringTokenizer;
import java.io.*;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java Tue May 03 22:16:58 2011 -0700
@@ -47,34 +47,43 @@
*/
private static final String progname = "jdb";
+ @Override
public void vmStartEvent(VMStartEvent se) {
Thread.yield(); // fetch output
MessageOutput.lnprint("VM Started:");
}
+ @Override
public void vmDeathEvent(VMDeathEvent e) {
}
+ @Override
public void vmDisconnectEvent(VMDisconnectEvent e) {
}
+ @Override
public void threadStartEvent(ThreadStartEvent e) {
}
+ @Override
public void threadDeathEvent(ThreadDeathEvent e) {
}
+ @Override
public void classPrepareEvent(ClassPrepareEvent e) {
}
+ @Override
public void classUnloadEvent(ClassUnloadEvent e) {
}
+ @Override
public void breakpointEvent(BreakpointEvent be) {
Thread.yield(); // fetch output
MessageOutput.lnprint("Breakpoint hit:");
}
+ @Override
public void fieldWatchEvent(WatchpointEvent fwe) {
Field field = fwe.field();
ObjectReference obj = fwe.object();
@@ -90,11 +99,13 @@
}
}
+ @Override
public void stepEvent(StepEvent se) {
Thread.yield(); // fetch output
MessageOutput.lnprint("Step completed:");
}
+ @Override
public void exceptionEvent(ExceptionEvent ee) {
Thread.yield(); // fetch output
Location catchLocation = ee.catchLocation();
@@ -108,6 +119,7 @@
}
}
+ @Override
public void methodEntryEvent(MethodEntryEvent me) {
Thread.yield(); // fetch output
/*
@@ -125,6 +137,7 @@
}
}
+ @Override
public boolean methodExitEvent(MethodExitEvent me) {
Thread.yield(); // fetch output
/*
@@ -173,6 +186,7 @@
return false;
}
+ @Override
public void vmInterrupted() {
Thread.yield(); // fetch output
printCurrentLocation();
@@ -184,6 +198,7 @@
MessageOutput.printPrompt();
}
+ @Override
public void receivedEvent(Event event) {
}
@@ -317,18 +332,19 @@
// Adapted for use with String[][0].
int low = 0;
int high = commandList.length - 1;
- long i = 0;
while (low <= high) {
int mid = (low + high) >>> 1;
String midVal = commandList[mid][0];
int compare = midVal.compareTo(key);
- if (compare < 0)
+ if (compare < 0) {
low = mid + 1;
- else if (compare > 0)
+ } else if (compare > 0) {
high = mid - 1;
- else
+ }
+ else {
return mid; // key found
}
+ }
return -(low + 1); // key not found.
};
@@ -336,7 +352,9 @@
* Return true if the command is OK when disconnected.
*/
private boolean isDisconnectCmd(int ii) {
- if (ii < 0 || ii >= commandList.length) return false;
+ if (ii < 0 || ii >= commandList.length) {
+ return false;
+ }
return (commandList[ii][1].equals("y"));
}
@@ -344,7 +362,9 @@
* Return true if the command is OK when readonly.
*/
private boolean isReadOnlyCmd(int ii) {
- if (ii < 0 || ii >= commandList.length) return false;
+ if (ii < 0 || ii >= commandList.length) {
+ return false;
+ }
return (commandList[ii][2].equals("y"));
};
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java Tue May 03 22:16:58 2011 -0700
@@ -44,6 +44,7 @@
*
* @return the contents of this <code>ResourceBundle</code>.
*/
+ @Override
public Object[][] getContents() {
Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java Tue May 03 22:16:58 2011 -0700
@@ -44,6 +44,7 @@
*
* @return the contents of this <code>ResourceBundle</code>.
*/
+ @Override
public Object[][] getContents() {
Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java Tue May 03 22:16:58 2011 -0700
@@ -44,6 +44,7 @@
*
* @return the contents of this <code>ResourceBundle</code>.
*/
+ @Override
public Object[][] getContents() {
Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.tty;
import com.sun.jdi.ThreadGroupReference;
-import com.sun.jdi.ThreadReference;
import java.util.List;
import java.util.Stack;
import java.util.ArrayList;
@@ -70,10 +69,12 @@
}
}
+ @Override
public boolean hasNext() {
return !stack.isEmpty();
}
+ @Override
public ThreadGroupReference next() {
return nextThreadGroup();
}
@@ -84,6 +85,7 @@
return tg;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java Tue May 03 22:16:58 2011 -0700
@@ -32,8 +32,6 @@
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Iterator;
-import java.io.*;
class ThreadInfo {
// This is a list of all known ThreadInfo objects. It survives
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java Tue May 03 22:16:58 2011 -0700
@@ -46,6 +46,7 @@
tgi = new ThreadGroupIterator();
}
+ @Override
public boolean hasNext() {
while (it == null || !it.hasNext()) {
if (!tgi.hasNext()) {
@@ -56,6 +57,7 @@
return true;
}
+ @Override
public ThreadReference next() {
return it.next();
}
@@ -64,6 +66,7 @@
return next();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java Tue May 03 22:16:58 2011 -0700
@@ -28,7 +28,6 @@
import com.sun.jdi.*;
import com.sun.jdi.connect.*;
import com.sun.jdi.request.EventRequestManager;
-import com.sun.jdi.request.ExceptionRequest;
import com.sun.jdi.request.ThreadStartRequest;
import com.sun.jdi.request.ThreadDeathRequest;
@@ -292,6 +291,7 @@
*/
private void displayRemoteOutput(final InputStream stream) {
Thread thr = new Thread("output reader") {
+ @Override
public void run() {
try {
dumpStream(stream);
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java Tue May 03 22:16:58 2011 -0700
@@ -27,6 +27,8 @@
public class VMNotConnectedException extends RuntimeException {
+ private static final long serialVersionUID = -7433430494903950165L;
+
public VMNotConnectedException() {
super();
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java Tue May 03 22:16:58 2011 -0700
@@ -25,8 +25,6 @@
package com.sun.tools.example.debug.tty;
-import com.sun.jdi.*;
-
abstract class WatchpointSpec extends EventRequestSpec {
final String fieldId;
@@ -39,11 +37,13 @@
}
}
+ @Override
public int hashCode() {
return refSpec.hashCode() + fieldId.hashCode() +
getClass().hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof WatchpointSpec) {
WatchpointSpec watchpoint = (WatchpointSpec)obj;
@@ -56,6 +56,7 @@
}
}
+ @Override
String errorMessageFor(Exception e) {
if (e instanceof NoSuchFieldException) {
return (MessageOutput.format("No field in",
--- a/jdk/src/share/classes/com/sun/tools/example/trace/EventThread.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/trace/EventThread.java Tue May 03 22:16:58 2011 -0700
@@ -49,7 +49,8 @@
private boolean vmDied = true; // VMDeath occurred
// Maps ThreadReference to ThreadTrace instances
- private Map traceMap = new HashMap();
+ private Map<ThreadReference, ThreadTrace> traceMap =
+ new HashMap<>();
EventThread(VirtualMachine vm, String[] excludes, PrintWriter writer) {
super("event-handler");
@@ -63,6 +64,7 @@
* As long as we are connected, get event sets off
* the queue and dispatch the events within them.
*/
+ @Override
public void run() {
EventQueue queue = vm.eventQueue();
while (connected) {
@@ -208,7 +210,7 @@
* creating one if needed.
*/
ThreadTrace threadTrace(ThreadReference thread) {
- ThreadTrace trace = (ThreadTrace)traceMap.get(thread);
+ ThreadTrace trace = traceMap.get(thread);
if (trace == null) {
trace = new ThreadTrace(thread);
traceMap.put(thread, trace);
@@ -297,7 +299,7 @@
}
void threadDeathEvent(ThreadDeathEvent event) {
- ThreadTrace trace = (ThreadTrace)traceMap.get(event.thread());
+ ThreadTrace trace = traceMap.get(event.thread());
if (trace != null) { // only want threads we care about
trace.threadDeathEvent(event); // Forward event
}
@@ -309,9 +311,8 @@
*/
private void classPrepareEvent(ClassPrepareEvent event) {
EventRequestManager mgr = vm.eventRequestManager();
- List fields = event.referenceType().visibleFields();
- for (Iterator it = fields.iterator(); it.hasNext(); ) {
- Field field = (Field)it.next();
+ List<Field> fields = event.referenceType().visibleFields();
+ for (Field field : fields) {
ModificationWatchpointRequest req =
mgr.createModificationWatchpointRequest(field);
for (int i=0; i<excludes.length; ++i) {
@@ -323,7 +324,7 @@
}
private void exceptionEvent(ExceptionEvent event) {
- ThreadTrace trace = (ThreadTrace)traceMap.get(event.thread());
+ ThreadTrace trace = traceMap.get(event.thread());
if (trace != null) { // only want threads we care about
trace.exceptionEvent(event); // Forward event
}
--- a/jdk/src/share/classes/com/sun/tools/example/trace/StreamRedirectThread.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/trace/StreamRedirectThread.java Tue May 03 22:16:58 2011 -0700
@@ -56,6 +56,7 @@
/**
* Copy.
*/
+ @Override
public void run() {
try {
char[] cbuf = new char[BUFFER_SIZE];
--- a/jdk/src/share/classes/com/sun/tools/example/trace/Trace.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/com/sun/tools/example/trace/Trace.java Tue May 03 22:16:58 2011 -0700
@@ -31,7 +31,6 @@
import java.util.Map;
import java.util.List;
-import java.util.Iterator;
import java.io.PrintWriter;
import java.io.FileWriter;
@@ -155,7 +154,8 @@
*/
VirtualMachine launchTarget(String mainArgs) {
LaunchingConnector connector = findLaunchingConnector();
- Map arguments = connectorArguments(connector, mainArgs);
+ Map<String, Connector.Argument> arguments =
+ connectorArguments(connector, mainArgs);
try {
return connector.launch(arguments);
} catch (IOException exc) {
@@ -186,10 +186,8 @@
* Find a com.sun.jdi.CommandLineLaunch connector
*/
LaunchingConnector findLaunchingConnector() {
- List connectors = Bootstrap.virtualMachineManager().allConnectors();
- Iterator iter = connectors.iterator();
- while (iter.hasNext()) {
- Connector connector = (Connector)iter.next();
+ List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();
+ for (Connector connector : connectors) {
if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) {
return (LaunchingConnector)connector;
}
@@ -200,8 +198,8 @@
/**
* Return the launching connector's arguments.
*/
- Map connectorArguments(LaunchingConnector connector, String mainArgs) {
- Map arguments = connector.defaultArguments();
+ Map<String, Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
+ Map<String, Connector.Argument> arguments = connector.defaultArguments();
Connector.Argument mainArg =
(Connector.Argument)arguments.get("main");
if (mainArg == null) {
--- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Tue May 03 22:16:58 2011 -0700
@@ -26,6 +26,7 @@
import java.util.*;
import java.lang.reflect.*;
+import java.util.Objects;
import sun.reflect.misc.*;
@@ -181,10 +182,6 @@
return method;
}
- private static boolean equals(Object o1, Object o2) {
- return (o1 == null) ? (o2 == null) : o1.equals(o2);
- }
-
private void doProperty(Class type, PropertyDescriptor pd, Object oldInstance, Object newInstance, Encoder out) throws Exception {
Method getter = pd.getReadMethod();
Method setter = pd.getWriteMethod();
@@ -195,7 +192,7 @@
Object oldValue = oldGetExp.getValue();
Object newValue = newGetExp.getValue();
out.writeExpression(oldGetExp);
- if (!equals(newValue, out.get(oldValue))) {
+ if (!Objects.equals(newValue, out.get(oldValue))) {
// Search for a static constant with this value;
Object e = (Object[])pd.getValue("enumerationValues");
if (e instanceof Object[] && Array.getLength(e) % 3 == 0) {
@@ -233,7 +230,7 @@
Object oldValue = oldGetExp.getValue();
Object newValue = newGetExp.getValue();
out.writeExpression(oldGetExp);
- if (!equals(newValue, out.get(oldValue))) {
+ if (!Objects.equals(newValue, out.get(oldValue))) {
out.writeStatement(new Statement(field, "set", new Object[] { oldInstance, oldValue }));
}
}
--- a/jdk/src/share/classes/java/beans/MetaData.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/beans/MetaData.java Tue May 03 22:16:58 2011 -0700
@@ -56,6 +56,8 @@
import sun.swing.PrintColorUIResource;
+import java.util.Objects;
+
/*
* Like the <code>Intropector</code>, the <code>MetaData</code> class
* contains <em>meta</em> objects that describe the way
@@ -134,7 +136,7 @@
Object oldValue = oldGetExp.getValue();
Object newValue = newGetExp.getValue();
out.writeExpression(oldGetExp);
- if (!MetaData.equals(newValue, out.get(oldValue))) {
+ if (!Objects.equals(newValue, out.get(oldValue))) {
// System.out.println("Not equal: " + newGetExp + " != " + actualGetExp);
// invokeStatement(Array.class, "set", new Object[]{oldInstance, index, oldValue}, out);
DefaultPersistenceDelegate.invokeStatement(oldInstance, "set", new Object[]{index, oldValue}, out);
@@ -635,7 +637,7 @@
Object oldValue = oldGetExp.getValue();
Object newValue = newGetExp.getValue();
out.writeExpression(oldGetExp);
- if (!MetaData.equals(newValue, out.get(oldValue))) {
+ if (!Objects.equals(newValue, out.get(oldValue))) {
invokeStatement(oldInstance, "set", new Object[]{index, oldValue}, out);
}
}
@@ -675,7 +677,7 @@
Object oldValue = oldGetExp.getValue();
Object newValue = newGetExp.getValue();
out.writeExpression(oldGetExp);
- if (!MetaData.equals(newValue, out.get(oldValue))) {
+ if (!Objects.equals(newValue, out.get(oldValue))) {
invokeStatement(oldInstance, "put", new Object[]{oldKey, oldValue}, out);
} else if ((newValue == null) && !newMap.containsKey(oldKey)) {
// put oldValue(=null?) if oldKey is absent in newMap
@@ -899,17 +901,17 @@
if (!(oldInstance instanceof java.awt.Window)) {
Object oldBackground = c.isBackgroundSet() ? c.getBackground() : null;
Object newBackground = c2.isBackgroundSet() ? c2.getBackground() : null;
- if (!MetaData.equals(oldBackground, newBackground)) {
+ if (!Objects.equals(oldBackground, newBackground)) {
invokeStatement(oldInstance, "setBackground", new Object[] { oldBackground }, out);
}
Object oldForeground = c.isForegroundSet() ? c.getForeground() : null;
Object newForeground = c2.isForegroundSet() ? c2.getForeground() : null;
- if (!MetaData.equals(oldForeground, newForeground)) {
+ if (!Objects.equals(oldForeground, newForeground)) {
invokeStatement(oldInstance, "setForeground", new Object[] { oldForeground }, out);
}
Object oldFont = c.isFontSet() ? c.getFont() : null;
Object newFont = c2.isFontSet() ? c2.getFont() : null;
- if (!MetaData.equals(oldFont, newFont)) {
+ if (!Objects.equals(oldFont, newFont)) {
invokeStatement(oldInstance, "setFont", new Object[] { oldFont }, out);
}
}
@@ -1306,10 +1308,6 @@
internalPersistenceDelegates.put("java.util.RegularEnumSet", new java_util_EnumSet_PersistenceDelegate());
}
- /*pp*/ static boolean equals(Object o1, Object o2) {
- return (o1 == null) ? (o2 == null) : o1.equals(o2);
- }
-
public synchronized static PersistenceDelegate getPersistenceDelegate(Class type) {
if (type == null) {
return nullPersistenceDelegate;
--- a/jdk/src/share/classes/java/io/File.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/io/File.java Tue May 03 22:16:58 2011 -0700
@@ -25,7 +25,6 @@
package java.io;
-import java.beans.ConstructorProperties;
import java.net.URI;
import java.net.URL;
import java.net.MalformedURLException;
@@ -247,7 +246,6 @@
* @throws NullPointerException
* If the <code>pathname</code> argument is <code>null</code>
*/
- @ConstructorProperties("path")
public File(String pathname) {
if (pathname == null) {
throw new NullPointerException();
--- a/jdk/src/share/classes/java/lang/ArithmeticException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/ArithmeticException.java Tue May 03 22:16:58 2011 -0700
@@ -32,7 +32,8 @@
*
* {@code ArithmeticException} objects may be constructed by the
* virtual machine as if {@linkplain Throwable#Throwable(String,
- * Throwable, boolean) suppression were disabled}.
+ * Throwable, boolean, boolean) suppression were disabled and/or the
+ * stack trace was not writable}.
*
* @author unascribed
* @since JDK1.0
--- a/jdk/src/share/classes/java/lang/Character.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/Character.java Tue May 03 22:16:58 2011 -0700
@@ -59,14 +59,14 @@
* <p>The {@code char} data type (and therefore the value that a
* {@code Character} object encapsulates) are based on the
* original Unicode specification, which defined characters as
- * fixed-width 16-bit entities. The Unicode standard has since been
+ * fixed-width 16-bit entities. The Unicode Standard has since been
* changed to allow for characters whose representation requires more
* than 16 bits. The range of legal <em>code point</em>s is now
* U+0000 to U+10FFFF, known as <em>Unicode scalar value</em>.
* (Refer to the <a
* href="http://www.unicode.org/reports/tr27/#notation"><i>
* definition</i></a> of the U+<i>n</i> notation in the Unicode
- * standard.)
+ * Standard.)
*
* <p><a name="BMP">The set of characters from U+0000 to U+FFFF is
* sometimes referred to as the <em>Basic Multilingual Plane (BMP)</em>.
@@ -5200,7 +5200,8 @@
* <p>
* A character is lowercase if its general category type, provided
* by {@code Character.getType(ch)}, is
- * {@code LOWERCASE_LETTER}.
+ * {@code LOWERCASE_LETTER}, or it has contributory property
+ * Other_Lowercase as defined by the Unicode Standard.
* <p>
* The following are examples of lowercase characters:
* <p><blockquote><pre>
@@ -5235,7 +5236,8 @@
* <p>
* A character is lowercase if its general category type, provided
* by {@link Character#getType getType(codePoint)}, is
- * {@code LOWERCASE_LETTER}.
+ * {@code LOWERCASE_LETTER}, or it has contributory property
+ * Other_Lowercase as defined by the Unicode Standard.
* <p>
* The following are examples of lowercase characters:
* <p><blockquote><pre>
@@ -5257,7 +5259,8 @@
* @since 1.5
*/
public static boolean isLowerCase(int codePoint) {
- return getType(codePoint) == Character.LOWERCASE_LETTER;
+ return getType(codePoint) == Character.LOWERCASE_LETTER ||
+ CharacterData.of(codePoint).isOtherLowercase(codePoint);
}
/**
@@ -5265,6 +5268,7 @@
* <p>
* A character is uppercase if its general category type, provided by
* {@code Character.getType(ch)}, is {@code UPPERCASE_LETTER}.
+ * or it has contributory property Other_Uppercase as defined by the Unicode Standard.
* <p>
* The following are examples of uppercase characters:
* <p><blockquote><pre>
@@ -5298,7 +5302,8 @@
* Determines if the specified character (Unicode code point) is an uppercase character.
* <p>
* A character is uppercase if its general category type, provided by
- * {@link Character#getType(int) getType(codePoint)}, is {@code UPPERCASE_LETTER}.
+ * {@link Character#getType(int) getType(codePoint)}, is {@code UPPERCASE_LETTER},
+ * or it has contributory property Other_Uppercase as defined by the Unicode Standard.
* <p>
* The following are examples of uppercase characters:
* <p><blockquote><pre>
@@ -5320,7 +5325,8 @@
* @since 1.5
*/
public static boolean isUpperCase(int codePoint) {
- return getType(codePoint) == Character.UPPERCASE_LETTER;
+ return getType(codePoint) == Character.UPPERCASE_LETTER ||
+ CharacterData.of(codePoint).isOtherUppercase(codePoint);
}
/**
@@ -5725,6 +5731,52 @@
}
/**
+ * Determines if the specified character (Unicode code point) is an alphabet.
+ * <p>
+ * A character is considered to be alphabetic if its general category type,
+ * provided by {@link Character#getType(int) getType(codePoint)}, is any of
+ * the following:
+ * <ul>
+ * <li> <code>UPPERCASE_LETTER</code>
+ * <li> <code>LOWERCASE_LETTER</code>
+ * <li> <code>TITLECASE_LETTER</code>
+ * <li> <code>MODIFIER_LETTER</code>
+ * <li> <code>OTHER_LETTER</code>
+ * <li> <code>LETTER_NUMBER</code>
+ * </ul>
+ * or it has contributory property Other_Alphabetic as defined by the
+ * Unicode Standard.
+ *
+ * @param codePoint the character (Unicode code point) to be tested.
+ * @return <code>true</code> if the character is a Unicode alphabet
+ * character, <code>false</code> otherwise.
+ * @since 1.7
+ */
+ public static boolean isAlphabetic(int codePoint) {
+ return (((((1 << Character.UPPERCASE_LETTER) |
+ (1 << Character.LOWERCASE_LETTER) |
+ (1 << Character.TITLECASE_LETTER) |
+ (1 << Character.MODIFIER_LETTER) |
+ (1 << Character.OTHER_LETTER) |
+ (1 << Character.LETTER_NUMBER)) >> getType(codePoint)) & 1) != 0) ||
+ CharacterData.of(codePoint).isOtherAlphabetic(codePoint);
+ }
+
+ /**
+ * Determines if the specified character (Unicode code point) is a CJKV
+ * (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by
+ * the Unicode Standard.
+ *
+ * @param codePoint the character (Unicode code point) to be tested.
+ * @return <code>true</code> if the character is a Unicode ideograph
+ * character, <code>false</code> otherwise.
+ * @since 1.7
+ */
+ public static boolean isIdeographic(int codePoint) {
+ return CharacterData.of(codePoint).isIdeographic(codePoint);
+ }
+
+ /**
* Determines if the specified character is
* permissible as the first character in a Java identifier.
* <p>
@@ -6430,7 +6482,7 @@
/**
* Determines if the specified character is a Unicode space character.
* A character is considered to be a space character if and only if
- * it is specified to be a space character by the Unicode standard. This
+ * it is specified to be a space character by the Unicode Standard. This
* method returns true if the character's general category type is any of
* the following:
* <ul>
@@ -6458,7 +6510,7 @@
* Determines if the specified character (Unicode code point) is a
* Unicode space character. A character is considered to be a
* space character if and only if it is specified to be a space
- * character by the Unicode standard. This method returns true if
+ * character by the Unicode Standard. This method returns true if
* the character's general category type is any of the following:
*
* <ul>
@@ -6908,7 +6960,7 @@
* @since 1.4
*/
static char[] toUpperCaseCharArray(int codePoint) {
- // As of Unicode 4.0, 1:M uppercasings only happen in the BMP.
+ // As of Unicode 6.0, 1:M uppercasings only happen in the BMP.
assert isBmpCodePoint(codePoint);
return CharacterData.of(codePoint).toUpperCaseCharArray(codePoint);
}
@@ -6941,7 +6993,7 @@
* Note: if the specified character is not assigned a name by
* the <i>UnicodeData</i> file (part of the Unicode Character
* Database maintained by the Unicode Consortium), the returned
- * name is the same as the result of expression
+ * name is the same as the result of expression.
*
* <blockquote>{@code
* Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ')
--- a/jdk/src/share/classes/java/lang/CharacterData.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/CharacterData.java Tue May 03 22:16:58 2011 -0700
@@ -46,10 +46,27 @@
int toUpperCaseEx(int ch) {
return toUpperCase(ch);
}
+
char[] toUpperCaseCharArray(int ch) {
return null;
}
+ boolean isOtherLowercase(int ch) {
+ return false;
+ }
+
+ boolean isOtherUppercase(int ch) {
+ return false;
+ }
+
+ boolean isOtherAlphabetic(int ch) {
+ return false;
+ }
+
+ boolean isIdeographic(int ch) {
+ return false;
+ }
+
// Character <= 0xff (basic latin) is handled by internal fast-path
// to avoid initializing large tables.
// Note: performance of this "fast-path" code may be sub-optimal
--- a/jdk/src/share/classes/java/lang/Error.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/Error.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2011, 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
@@ -79,7 +79,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
@@ -90,13 +90,13 @@
/**
* Constructs a new error with the specified cause and a detail
- * message of <tt>(cause==null ? null : cause.toString())</tt> (which
- * typically contains the class and detail message of <tt>cause</tt>).
+ * message of {@code (cause==null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
* This constructor is useful for errors that are little more than
* wrappers for other throwables.
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
@@ -104,4 +104,25 @@
public Error(Throwable cause) {
super(cause);
}
+
+ /**
+ * Constructs a new error with the specified detail message,
+ * cause, suppression enabled or disabled, and writable stack
+ * trace enabled or disabled.
+ *
+ * @param message the detail message.
+ * @param cause the cause. (A {@code null} value is permitted,
+ * and indicates that the cause is nonexistent or unknown.)
+ * @param enableSuppression whether or not suppression is enabled
+ * or disabled
+ * @param writableStackTrace whether or not the stack trace should
+ * be writable
+ *
+ * @since 1.7
+ */
+ protected Error(String message, Throwable cause,
+ boolean enableSuppression,
+ boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
}
--- a/jdk/src/share/classes/java/lang/Exception.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/Exception.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2011, 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
@@ -101,4 +101,24 @@
public Exception(Throwable cause) {
super(cause);
}
+
+ /**
+ * Constructs a new exception with the specified detail message,
+ * cause, suppression enabled or disabled, and writable stack
+ * trace enabled or disabled.
+ *
+ * @param message the detail message.
+ * @param cause the cause. (A {@code null} value is permitted,
+ * and indicates that the cause is nonexistent or unknown.)
+ * @param enableSuppression whether or not suppression is enabled
+ * or disabled
+ * @param writableStackTrace whether or not the stack trace should
+ * be writable
+ * @since 1.7
+ */
+ protected Exception(String message, Throwable cause,
+ boolean enableSuppression,
+ boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
}
--- a/jdk/src/share/classes/java/lang/NullPointerException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/NullPointerException.java Tue May 03 22:16:58 2011 -0700
@@ -43,7 +43,8 @@
*
* {@code NullPointerException} objects may be constructed by the
* virtual machine as if {@linkplain Throwable#Throwable(String,
- * Throwable, boolean) suppression were disabled}.
+ * Throwable, boolean, boolean) suppression were disabled and/or the
+ * stack trace was not writable}.
*
* @author unascribed
* @since JDK1.0
--- a/jdk/src/share/classes/java/lang/OutOfMemoryError.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/OutOfMemoryError.java Tue May 03 22:16:58 2011 -0700
@@ -32,7 +32,8 @@
*
* {@code OutOfMemoryError} objects may be constructed by the virtual
* machine as if {@linkplain Throwable#Throwable(String, Throwable,
- * boolean) suppression were disabled}.
+ * boolean, boolean) suppression were disabled and/or the stack trace was not
+ * writable}.
*
* @author unascribed
* @since JDK1.0
--- a/jdk/src/share/classes/java/lang/ProcessBuilder.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/ProcessBuilder.java Tue May 03 22:16:58 2011 -0700
@@ -938,6 +938,11 @@
* but at the very least the command must be a non-empty list of
* non-null strings.
*
+ * <p>A minimal set of system dependent environment variables may
+ * be required to start a process on some operating systems.
+ * As a result, the subprocess may inherit additional environment variable
+ * settings beyond those in the process builder's {@link #environment()}.
+ *
* <p>If there is a security manager, its
* {@link SecurityManager#checkExec checkExec}
* method is called with the first component of this object's
--- a/jdk/src/share/classes/java/lang/Runtime.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/Runtime.java Tue May 03 22:16:58 2011 -0700
@@ -544,6 +544,11 @@
* <p>If <tt>envp</tt> is <tt>null</tt>, the subprocess inherits the
* environment settings of the current process.
*
+ * <p>A minimal set of system dependent environment variables may
+ * be required to start a process on some operating systems.
+ * As a result, the subprocess may inherit additional environment variable
+ * settings beyond those in the specified environment.
+ *
* <p>{@link ProcessBuilder#start()} is now the preferred way to
* start a process with a modified environment.
*
--- a/jdk/src/share/classes/java/lang/RuntimeException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/RuntimeException.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2011, 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
@@ -95,4 +95,25 @@
public RuntimeException(Throwable cause) {
super(cause);
}
+
+ /**
+ * Constructs a new runtime exception with the specified detail
+ * message, cause, suppression enabled or disabled, and writable
+ * stack trace enabled or disabled.
+ *
+ * @param message the detail message.
+ * @param cause the cause. (A {@code null} value is permitted,
+ * and indicates that the cause is nonexistent or unknown.)
+ * @param enableSuppression whether or not suppression is enabled
+ * or disabled
+ * @param writableStackTrace whether or not the stack trace should
+ * be writable
+ *
+ * @since 1.7
+ */
+ protected RuntimeException(String message, Throwable cause,
+ boolean enableSuppression,
+ boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
}
--- a/jdk/src/share/classes/java/lang/StringCoding.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/StringCoding.java Tue May 03 22:16:58 2011 -0700
@@ -222,13 +222,13 @@
off = 0;
}
}
+ cd.onMalformedInput(CodingErrorAction.REPLACE)
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .reset();
if (cd instanceof ArrayDecoder) {
int clen = ((ArrayDecoder)cd).decode(ba, off, len, ca);
return safeTrim(ca, clen, cs, isTrusted);
} else {
- cd.onMalformedInput(CodingErrorAction.REPLACE)
- .onUnmappableCharacter(CodingErrorAction.REPLACE)
- .reset();
ByteBuffer bb = ByteBuffer.wrap(ba, off, len);
CharBuffer cb = CharBuffer.wrap(ca);
try {
@@ -356,13 +356,13 @@
off = 0;
}
}
+ ce.onMalformedInput(CodingErrorAction.REPLACE)
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .reset();
if (ce instanceof ArrayEncoder) {
int blen = ((ArrayEncoder)ce).encode(ca, off, len, ba);
return safeTrim(ba, blen, cs, isTrusted);
} else {
- ce.onMalformedInput(CodingErrorAction.REPLACE)
- .onUnmappableCharacter(CodingErrorAction.REPLACE)
- .reset();
ByteBuffer bb = ByteBuffer.wrap(ba);
CharBuffer cb = CharBuffer.wrap(ca, off, len);
try {
--- a/jdk/src/share/classes/java/lang/Throwable.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/lang/Throwable.java Tue May 03 22:16:58 2011 -0700
@@ -129,16 +129,41 @@
*/
private String detailMessage;
+
+ /**
+ * Holder class to defer initializing sentinel objects only used
+ * for serialization.
+ */
+ private static class SentinelHolder {
+ /**
+ * {@linkplain #setStackTrace(StackTraceElement[]) Setting the
+ * stack trace} to a one-element array containing this sentinel
+ * value indicates future attempts to set the stack trace will be
+ * ignored. The sentinal is equal to the result of calling:<br>
+ * {@code new StackTraceElement("", "", null, Integer.MIN_VALUE)}
+ */
+ public static final StackTraceElement STACK_TRACE_ELEMENT_SENTINEL =
+ new StackTraceElement("", "", null, Integer.MIN_VALUE);
+
+ /**
+ * Sentinel value used in the serial form to indicate an immutable
+ * stack trace.
+ */
+ public static final StackTraceElement[] STACK_TRACE_SENTINEL =
+ new StackTraceElement[] {STACK_TRACE_ELEMENT_SENTINEL};
+ }
+
/**
* A shared value for an empty stack.
*/
- private static final StackTraceElement[] EMPTY_STACK = new StackTraceElement[0];
+ private static final StackTraceElement[] UNASSIGNED_STACK = new StackTraceElement[0];
/*
* To allow Throwable objects to be made immutable and safely
* reused by the JVM, such as OutOfMemoryErrors, fields of
- * Throwable that are writable in response to user actions, cause
- * and suppressedExceptions obey the following protocol:
+ * Throwable that are writable in response to user actions, cause,
+ * stackTrace, and suppressedExceptions obey the following
+ * protocol:
*
* 1) The fields are initialized to a non-null sentinel value
* which indicates the value has logically not been set.
@@ -174,10 +199,15 @@
/**
* The stack trace, as returned by {@link #getStackTrace()}.
*
+ * The field is initialized to a zero-length array. A {@code
+ * null} value of this field indicates subsequent calls to {@link
+ * #setStackTrace(StackTraceElement[])} and {@link
+ * #fillInStackTrace()} will be be no-ops.
+ *
* @serial
* @since 1.4
*/
- private StackTraceElement[] stackTrace;
+ private StackTraceElement[] stackTrace = UNASSIGNED_STACK;
// Setting this static field introduces an acceptable
// initialization dependency on a few java.util classes.
@@ -284,24 +314,36 @@
/**
* Constructs a new throwable with the specified detail message,
- * cause, and {@linkplain #addSuppressed suppression} enabled or
- * disabled. If suppression is disabled, {@link #getSuppressed}
- * for this object will return a zero-length array and calls to
- * {@link #addSuppressed} that would otherwise append an exception
- * to the suppressed list will have no effect.
+ * cause, {@linkplain #addSuppressed suppression} enabled or
+ * disabled, and writable stack trace enabled or disabled. If
+ * suppression is disabled, {@link #getSuppressed} for this object
+ * will return a zero-length array and calls to {@link
+ * #addSuppressed} that would otherwise append an exception to the
+ * suppressed list will have no effect. If the writable stack
+ * trace is false, this constructor will not call {@link
+ * #fillInStackTrace()}, a {@code null} will be written to the
+ * {@code stackTrace} field, and subsequent calls to {@code
+ * fillInStackTrace} and {@link
+ * #setStackTrace(StackTraceElement[])} will not set the stack
+ * trace. If the writable stack trace is false, {@link
+ * #getStackTrace} will return a zero length array.
*
* <p>Note that the other constructors of {@code Throwable} treat
- * suppression as being enabled. Subclasses of {@code Throwable}
- * should document any conditions under which suppression is
- * disabled. Disabling of suppression should only occur in
- * exceptional circumstances where special requirements exist,
- * such as a virtual machine reusing exception objects under
- * low-memory situations.
+ * suppression as being enabled and the stack trace as being
+ * writable. Subclasses of {@code Throwable} should document any
+ * conditions under which suppression is disabled and document
+ * conditions under which the stack trace is not writable.
+ * Disabling of suppression should only occur in exceptional
+ * circumstances where special requirements exist, such as a
+ * virtual machine reusing exception objects under low-memory
+ * situations.
*
* @param message the detail message.
* @param cause the cause. (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @param enableSuppression whether or not suppression is enabled or disabled
+ * @param writableStackTrace whether or not the stack trace should be
+ * writable
*
* @see OutOfMemoryError
* @see NullPointerException
@@ -309,8 +351,13 @@
* @since 1.7
*/
protected Throwable(String message, Throwable cause,
- boolean enableSuppression) {
- fillInStackTrace();
+ boolean enableSuppression,
+ boolean writableStackTrace) {
+ if (writableStackTrace) {
+ fillInStackTrace();
+ } else {
+ stackTrace = null;
+ }
detailMessage = message;
this.cause = cause;
if (!enableSuppression)
@@ -707,10 +754,22 @@
* {@code Throwable} object information about the current state of
* the stack frames for the current thread.
*
+ * <p>If the stack trace of this {@code Throwable} {@linkplain
+ * Throwable#Throwable(String, Throwable, boolean, boolean) is not
+ * writable}, calling this method has no effect.
+ *
* @return a reference to this {@code Throwable} instance.
* @see java.lang.Throwable#printStackTrace()
*/
- public synchronized native Throwable fillInStackTrace();
+ public synchronized Throwable fillInStackTrace() {
+ if (stackTrace != null) {
+ fillInStackTrace(0);
+ stackTrace = UNASSIGNED_STACK;
+ }
+ return this;
+ }
+
+ private native Throwable fillInStackTrace(int dummy);
/**
* Provides programmatic access to the stack trace information printed by
@@ -740,12 +799,15 @@
}
private synchronized StackTraceElement[] getOurStackTrace() {
- // Initialize stack trace if this is the first call to this method
- if (stackTrace == null) {
+ // Initialize stack trace field with information from
+ // backtrace if this is the first call to this method
+ if (stackTrace == UNASSIGNED_STACK) {
int depth = getStackTraceDepth();
stackTrace = new StackTraceElement[depth];
for (int i=0; i < depth; i++)
stackTrace[i] = getStackTraceElement(i);
+ } else if (stackTrace == null) {
+ return UNASSIGNED_STACK;
}
return stackTrace;
}
@@ -761,6 +823,11 @@
* when a throwable is constructed or deserialized when a throwable is
* read from a serialization stream.
*
+ * <p>If the stack trace of this {@code Throwable} {@linkplain
+ * Throwable#Throwable(String, Throwable, boolean, boolean) is not
+ * writable}, calling this method has no effect other than
+ * validating its argument.
+ *
* @param stackTrace the stack trace elements to be associated with
* this {@code Throwable}. The specified array is copied by this
* call; changes in the specified array after the method invocation
@@ -768,18 +835,22 @@
* trace.
*
* @throws NullPointerException if {@code stackTrace} is
- * {@code null}, or if any of the elements of
+ * {@code null} or if any of the elements of
* {@code stackTrace} are {@code null}
*
* @since 1.4
*/
public void setStackTrace(StackTraceElement[] stackTrace) {
+ // Validate argument
StackTraceElement[] defensiveCopy = stackTrace.clone();
- for (int i = 0; i < defensiveCopy.length; i++)
+ for (int i = 0; i < defensiveCopy.length; i++) {
if (defensiveCopy[i] == null)
throw new NullPointerException("stackTrace[" + i + "]");
+ }
synchronized (this) {
+ if (this.stackTrace == null) // Immutable stack
+ return;
this.stackTrace = defensiveCopy;
}
}
@@ -808,7 +879,11 @@
* well-formedness constraints on fields. Null entries and
* self-pointers are not allowed in the list of {@code
* suppressedExceptions}. Null entries are not allowed for stack
- * trace elements.
+ * trace elements. A null stack trace in the serial form results
+ * in a zero-length stack element array. A single-element stack
+ * trace whose entry is equal to {@code new StackTraceElement("",
+ * "", null, Integer.MIN_VALUE)} results in a {@code null} {@code
+ * stackTrace} field.
*
* Note that there are no constraints on the value the {@code
* cause} field can hold; both {@code null} and {@code this} are
@@ -837,26 +912,60 @@
suppressedExceptions = suppressed;
} // else a null suppressedExceptions field remains null
+ /*
+ * For zero-length stack traces, use a clone of
+ * UNASSIGNED_STACK rather than UNASSIGNED_STACK itself to
+ * allow identity comparison against UNASSIGNED_STACK in
+ * getOurStackTrace. The identity of UNASSIGNED_STACK in
+ * stackTrace indicates to the getOurStackTrace method that
+ * the stackTrace needs to be constructed from the information
+ * in backtrace.
+ */
if (stackTrace != null) {
- for (StackTraceElement ste : stackTrace) {
- if (ste == null)
- throw new NullPointerException("null StackTraceElement in serial stream. ");
+ if (stackTrace.length == 0) {
+ stackTrace = UNASSIGNED_STACK.clone();
+ } else if (stackTrace.length == 1 &&
+ // Check for the marker of an immutable stack trace
+ SentinelHolder.STACK_TRACE_ELEMENT_SENTINEL.equals(stackTrace[0])) {
+ stackTrace = null;
+ } else { // Verify stack trace elements are non-null.
+ for(StackTraceElement ste : stackTrace) {
+ if (ste == null)
+ throw new NullPointerException("null StackTraceElement in serial stream. ");
+ }
}
} else {
- // A null stackTrace field in the serial form can result from
- // an exception serialized without that field in older JDK releases.
- stackTrace = EMPTY_STACK;
+ // A null stackTrace field in the serial form can result
+ // from an exception serialized without that field in
+ // older JDK releases; treat such exceptions as having
+ // empty stack traces.
+ stackTrace = UNASSIGNED_STACK.clone();
}
-
}
/**
* Write a {@code Throwable} object to a stream.
+ *
+ * A {@code null} stack trace field is represented in the serial
+ * form as a one-element array whose element is equal to {@code
+ * new StackTraceElement("", "", null, Integer.MIN_VALUE)}.
*/
private synchronized void writeObject(ObjectOutputStream s)
throws IOException {
- getOurStackTrace(); // Ensure that stackTrace field is initialized.
- s.defaultWriteObject();
+ // Ensure that the stackTrace field is initialized to a
+ // non-null value, if appropriate. As of JDK 7, a null stack
+ // trace field is a valid value indicating the stack trace
+ // should not be set.
+ getOurStackTrace();
+
+ StackTraceElement[] oldStackTrace = stackTrace;
+ try {
+ if (stackTrace == null)
+ stackTrace = SentinelHolder.STACK_TRACE_SENTINEL;
+ s.defaultWriteObject();
+ } finally {
+ stackTrace = oldStackTrace;
+ }
}
/**
@@ -866,8 +975,8 @@
* try}-with-resources statement.
*
* <p>The suppression behavior is enabled <em>unless</em> disabled
- * {@linkplain #Throwable(String, Throwable, boolean) via a
- * constructor}. When suppression is disabled, this method does
+ * {@linkplain #Throwable(String, Throwable, boolean, boolean) via
+ * a constructor}. When suppression is disabled, this method does
* nothing other than to validate its argument.
*
* <p>Note that when one exception {@linkplain
@@ -933,8 +1042,8 @@
* statement, in order to deliver this exception.
*
* If no exceptions were suppressed or {@linkplain
- * Throwable(String, Throwable, boolean) suppression is disabled},
- * an empty array is returned.
+ * #Throwable(String, Throwable, boolean, boolean) suppression is
+ * disabled}, an empty array is returned.
*
* @return an array containing all of the exceptions that were
* suppressed to deliver this exception.
--- a/jdk/src/share/classes/java/net/HttpCookie.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/net/HttpCookie.java Tue May 03 22:16:58 2011 -0700
@@ -34,6 +34,7 @@
import java.lang.NullPointerException; // for javadoc
import java.util.Locale;
+import java.util.Objects;
/**
* An HttpCookie object represents an http cookie, which carries state
@@ -817,7 +818,7 @@
// 3. and have same path (case-sensitive).
return equalsIgnoreCase(getName(), other.getName()) &&
equalsIgnoreCase(getDomain(), other.getDomain()) &&
- equals(getPath(), other.getPath());
+ Objects.equals(getPath(), other.getPath());
}
@@ -1162,14 +1163,6 @@
return false;
}
- private static boolean equals(String s, String t) {
- if (s == t) return true;
- if ((s != null) && (t != null)) {
- return s.equals(t);
- }
- return false;
- }
-
private static boolean startsWithIgnoreCase(String s, String start) {
if (s == null || start == null) return false;
--- a/jdk/src/share/classes/java/nio/charset/Charset.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/nio/charset/Charset.java Tue May 03 22:16:58 2011 -0700
@@ -143,6 +143,8 @@
*
* <h4>Standard charsets</h4>
*
+ * <a name="standard">
+ *
* <p> Every implementation of the Java platform is required to support the
* following standard charsets. Consult the release documentation for your
* implementation to see if any other charsets are supported. The behavior
@@ -213,6 +215,8 @@
* determined during virtual-machine startup and typically depends upon the
* locale and charset being used by the underlying operating system. </p>
*
+ * <p>The {@link StandardCharset} class defines constants for each of the
+ * standard charsets.
*
* <h4>Terminology</h4>
*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/nio/charset/StandardCharset.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.nio.charset;
+
+/**
+ * Constant definitions for the standard {@link Charset Charsets}. These
+ * charsets are guaranteed to be available on every implementation of the Java
+ * platform.
+ *
+ * @see <a href="Charset#standard">Standard Charsets</a>
+ * @since 1.7
+ */
+public final class StandardCharset {
+
+ private StandardCharset() {
+ throw new AssertionError("No java.nio.charset.StandardCharset instances for you!");
+ }
+ /**
+ * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
+ * Unicode character set
+ */
+ public static final Charset US_ASCII = Charset.forName("US-ASCII");
+ /**
+ * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
+ */
+ public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
+ /**
+ * Eight-bit UCS Transformation Format
+ */
+ public static final Charset UTF_8 = Charset.forName("UTF-8");
+ /**
+ * Sixteen-bit UCS Transformation Format, big-endian byte order
+ */
+ public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
+ /**
+ * Sixteen-bit UCS Transformation Format, little-endian byte order
+ */
+ public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
+ /**
+ * Sixteen-bit UCS Transformation Format, byte order identified by an
+ * optional byte-order mark
+ */
+ public static final Charset UTF_16 = Charset.forName("UTF-16");
+}
--- a/jdk/src/share/classes/java/nio/file/FileSystem.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/nio/file/FileSystem.java Tue May 03 22:16:58 2011 -0700
@@ -391,6 +391,13 @@
* character is used to separate the subpatterns. Groups cannot be nested.
* </p></li>
*
+ * <li><p> Leading period<tt>/</tt>dot characters in file name are
+ * treated as regular characters in match operations. For example,
+ * the {@code "*"} glob pattern matches file name {@code ".login"}.
+ * The {@link Files#isHidden} method may be used to test whether a file
+ * is considered hidden.
+ * </p></li>
+ *
* <li><p> All other characters match themselves in an implementation
* dependent manner. This includes characters representing any {@link
* FileSystem#getSeparator name-separators}. </p></li>
--- a/jdk/src/share/classes/java/nio/file/Path.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/nio/file/Path.java Tue May 03 22:16:58 2011 -0700
@@ -72,7 +72,7 @@
* directory and is UTF-8 encoded.
* <pre>
* Path path = FileSystems.getDefault().getPath("logs", "access.log");
- * BufferReader reader = Files.newBufferedReader(path, Charset.forName("UTF-8"));
+ * BufferReader reader = Files.newBufferedReader(path, StandardCharset.UTF_8);
* </pre>
*
* <a name="interop"><h4>Interoperability</h4></a>
--- a/jdk/src/share/classes/java/sql/BatchUpdateException.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/sql/BatchUpdateException.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, 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
@@ -25,6 +25,8 @@
package java.sql;
+import java.util.Arrays;
+
/**
* The subclass of {@link SQLException} thrown when an error
* occurs during a batch update operation. In addition to the
@@ -77,8 +79,7 @@
*/
public BatchUpdateException( String reason, String SQLState, int vendorCode,
int[] updateCounts ) {
- super(reason, SQLState, vendorCode);
- this.updateCounts = updateCounts;
+ this(reason, SQLState, vendorCode, updateCounts, null);
}
/**
@@ -105,8 +106,7 @@
*/
public BatchUpdateException(String reason, String SQLState,
int[] updateCounts) {
- super(reason, SQLState);
- this.updateCounts = updateCounts;
+ this(reason, SQLState, 0, updateCounts, null);
}
/**
@@ -132,8 +132,7 @@
* @since 1.2
*/
public BatchUpdateException(String reason, int[] updateCounts) {
- super(reason);
- this.updateCounts = updateCounts;
+ this(reason, null, 0, updateCounts, null);
}
/**
@@ -156,8 +155,7 @@
* @since 1.2
*/
public BatchUpdateException(int[] updateCounts) {
- super();
- this.updateCounts = updateCounts;
+ this(null, null, 0, updateCounts, null);
}
/**
@@ -172,8 +170,7 @@
* @since 1.2
*/
public BatchUpdateException() {
- super();
- this.updateCounts = null;
+ this(null, null, 0, null, null);
}
/**
@@ -191,8 +188,7 @@
* @since 1.6
*/
public BatchUpdateException(Throwable cause) {
- super(cause);
- this.updateCounts = null;
+ this(null, null, 0, null, cause);
}
/**
@@ -218,8 +214,7 @@
* @since 1.6
*/
public BatchUpdateException(int []updateCounts , Throwable cause) {
- super(cause);
- this.updateCounts = updateCounts;
+ this(null, null, 0, updateCounts, cause);
}
/**
@@ -243,8 +238,7 @@
* @since 1.6
*/
public BatchUpdateException(String reason, int []updateCounts, Throwable cause) {
- super(reason,cause);
- this.updateCounts = updateCounts;
+ this(reason, null, 0, updateCounts, cause);
}
/**
@@ -269,8 +263,7 @@
*/
public BatchUpdateException(String reason, String SQLState,
int []updateCounts, Throwable cause) {
- super(reason,SQLState,cause);
- this.updateCounts = updateCounts;
+ this(reason, SQLState, 0, updateCounts, cause);
}
/**
@@ -297,8 +290,8 @@
*/
public BatchUpdateException(String reason, String SQLState, int vendorCode,
int []updateCounts,Throwable cause) {
- super(reason,SQLState,vendorCode,cause);
- this.updateCounts = updateCounts;
+ super(reason, SQLState, vendorCode, cause);
+ this.updateCounts = (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length);
}
/**
@@ -332,7 +325,7 @@
* @since 1.3
*/
public int[] getUpdateCounts() {
- return updateCounts;
+ return (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length);
}
/**
@@ -340,7 +333,7 @@
* @serial
* @since 1.2
*/
- private int[] updateCounts;
+ private final int[] updateCounts;
private static final long serialVersionUID = 5977529877145521757L;
}
--- a/jdk/src/share/classes/java/util/AbstractSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/AbstractSet.java Tue May 03 22:16:58 2011 -0700
@@ -156,9 +156,11 @@
* @throws UnsupportedOperationException if the <tt>removeAll</tt> operation
* is not supported by this set
* @throws ClassCastException if the class of an element of this set
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this set contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
--- a/jdk/src/share/classes/java/util/ArrayList.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/ArrayList.java Tue May 03 22:16:58 2011 -0700
@@ -628,9 +628,11 @@
* @param c collection containing elements to be removed from this list
* @return {@code true} if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see Collection#contains(Object)
*/
@@ -646,9 +648,11 @@
* @param c collection containing elements to be retained in this list
* @return {@code true} if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see Collection#contains(Object)
*/
--- a/jdk/src/share/classes/java/util/Collection.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Collection.java Tue May 03 22:16:58 2011 -0700
@@ -60,7 +60,8 @@
* but is not required to, throw the exception if the collection to be added
* is empty.
*
- * <p>Some collection implementations have restrictions on the elements that
+ * <p><a name="optional-restrictions"/>
+ * Some collection implementations have restrictions on the elements that
* they may contain. For example, some implementations prohibit null elements,
* and some have restrictions on the types of their elements. Attempting to
* add an ineligible element throws an unchecked exception, typically
@@ -152,9 +153,11 @@
* @return <tt>true</tt> if this collection contains the specified
* element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this collection (optional)
+ * is incompatible with this collection
+ * (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * collection does not permit null elements (optional)
+ * collection does not permit null elements
+ * (<a href="#optional-restrictions">optional</a>)
*/
boolean contains(Object o);
@@ -279,9 +282,11 @@
* @param o element to be removed from this collection, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the type of the specified element
- * is incompatible with this collection (optional)
+ * is incompatible with this collection
+ * (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * collection does not permit null elements (optional)
+ * collection does not permit null elements
+ * (<a href="#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* is not supported by this collection
*/
@@ -299,10 +304,13 @@
* in the specified collection
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
- * collection (optional)
+ * collection
+ * (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified collection contains one
* or more null elements and this collection does not permit null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="#optional-restrictions">optional</a>),
+ * or if the specified collection is null.
* @see #contains(Object)
*/
boolean containsAll(Collection<?> c);
@@ -346,10 +354,13 @@
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
- * collection (optional)
+ * collection
+ * (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if this collection contains one or more
* null elements and the specified collection does not support
- * null elements (optional), or if the specified collection is null
+ * null elements
+ * (<a href="#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
*/
@@ -367,10 +378,13 @@
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
- * collection (optional)
+ * collection
+ * (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if this collection contains one or more
* null elements and the specified collection does not permit null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
*/
--- a/jdk/src/share/classes/java/util/Collections.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Collections.java Tue May 03 22:16:58 2011 -0700
@@ -3746,9 +3746,10 @@
* @throws NullPointerException if either collection is {@code null}.
* @throws NullPointerException if one collection contains a {@code null}
* element and {@code null} is not an eligible element for the other collection.
- * (optional)
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws ClassCastException if one collection contains an element that is
- * of a type which is ineligible for the other collection. (optional)
+ * of a type which is ineligible for the other collection.
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @since 1.5
*/
public static boolean disjoint(Collection<?> c1, Collection<?> c2) {
--- a/jdk/src/share/classes/java/util/Deque.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Deque.java Tue May 03 22:16:58 2011 -0700
@@ -351,9 +351,11 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
+ * is incompatible with this deque
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * deque does not permit null elements (optional)
+ * deque does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean removeFirstOccurrence(Object o);
@@ -369,9 +371,11 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
+ * is incompatible with this deque
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * deque does not permit null elements (optional)
+ * deque does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean removeLastOccurrence(Object o);
@@ -527,9 +531,11 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
+ * is incompatible with this deque
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * deque does not permit null elements (optional)
+ * deque does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean remove(Object o);
@@ -542,9 +548,11 @@
* @param o element whose presence in this deque is to be tested
* @return <tt>true</tt> if this deque contains the specified element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this deque (optional)
+ * is incompatible with this deque
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * deque does not permit null elements (optional)
+ * deque does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean contains(Object o);
--- a/jdk/src/share/classes/java/util/List.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/List.java Tue May 03 22:16:58 2011 -0700
@@ -134,9 +134,11 @@
* @param o element whose presence in this list is to be tested
* @return <tt>true</tt> if this list contains the specified element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this list (optional)
+ * is incompatible with this list
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * list does not permit null elements (optional)
+ * list does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean contains(Object o);
@@ -245,9 +247,11 @@
* @param o element to be removed from this list, if present
* @return <tt>true</tt> if this list contained the specified element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this list (optional)
+ * is incompatible with this list
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * list does not permit null elements (optional)
+ * list does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* is not supported by this list
*/
@@ -265,10 +269,13 @@
* specified collection
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
- * list (optional)
+ * list
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified collection contains one
* or more null elements and this list does not permit null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @see #contains(Object)
*/
boolean containsAll(Collection<?> c);
@@ -334,9 +341,11 @@
* @throws UnsupportedOperationException if the <tt>removeAll</tt> operation
* is not supported by this list
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
@@ -354,9 +363,11 @@
* @throws UnsupportedOperationException if the <tt>retainAll</tt> operation
* is not supported by this list
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
@@ -493,9 +504,11 @@
* @return the index of the first occurrence of the specified element in
* this list, or -1 if this list does not contain the element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this list (optional)
+ * is incompatible with this list
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * list does not permit null elements (optional)
+ * list does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
int indexOf(Object o);
@@ -510,9 +523,11 @@
* @return the index of the last occurrence of the specified element in
* this list, or -1 if this list does not contain the element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this list (optional)
+ * is incompatible with this list
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * list does not permit null elements (optional)
+ * list does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
int lastIndexOf(Object o);
--- a/jdk/src/share/classes/java/util/ListIterator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/ListIterator.java Tue May 03 22:16:58 2011 -0700
@@ -173,9 +173,9 @@
/**
* Inserts the specified element into the list (optional operation).
- * The element is inserted immediately before the next element that
- * would be returned by {@link #next}, if any, and after the next
- * element that would be returned by {@link #previous}, if any. (If the
+ * The element is inserted immediately before the element that
+ * would be returned by {@link #next}, if any, and after the element
+ * that would be returned by {@link #previous}, if any. (If the
* list contains no elements, the new element becomes the sole element
* on the list.) The new element is inserted before the implicit
* cursor: a subsequent call to {@code next} would be unaffected, and a
--- a/jdk/src/share/classes/java/util/Map.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Map.java Tue May 03 22:16:58 2011 -0700
@@ -144,9 +144,11 @@
* @return <tt>true</tt> if this map contains a mapping for the specified
* key
* @throws ClassCastException if the key is of an inappropriate type for
- * this map (optional)
+ * this map
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified key is null and this map
- * does not permit null keys (optional)
+ * does not permit null keys
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean containsKey(Object key);
@@ -162,9 +164,11 @@
* @return <tt>true</tt> if this map maps one or more keys to the
* specified value
* @throws ClassCastException if the value is of an inappropriate type for
- * this map (optional)
+ * this map
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified value is null and this
- * map does not permit null values (optional)
+ * map does not permit null values
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean containsValue(Object value);
@@ -187,9 +191,11 @@
* @return the value to which the specified key is mapped, or
* {@code null} if this map contains no mapping for the key
* @throws ClassCastException if the key is of an inappropriate type for
- * this map (optional)
+ * this map
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified key is null and this map
- * does not permit null keys (optional)
+ * does not permit null keys
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
V get(Object key);
@@ -245,9 +251,11 @@
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* is not supported by this map
* @throws ClassCastException if the key is of an inappropriate type for
- * this map (optional)
+ * this map
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified key is null and this
- * map does not permit null keys (optional)
+ * map does not permit null keys
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
V remove(Object key);
@@ -466,4 +474,5 @@
* @see #equals(Object)
*/
int hashCode();
+
}
--- a/jdk/src/share/classes/java/util/Set.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Set.java Tue May 03 22:16:58 2011 -0700
@@ -110,9 +110,11 @@
* @param o element whose presence in this set is to be tested
* @return <tt>true</tt> if this set contains the specified element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this set (optional)
+ * is incompatible with this set
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * set does not permit null elements (optional)
+ * set does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
*/
boolean contains(Object o);
@@ -236,9 +238,11 @@
* @param o object to be removed from this set, if present
* @return <tt>true</tt> if this set contained the specified element
* @throws ClassCastException if the type of the specified element
- * is incompatible with this set (optional)
+ * is incompatible with this set
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
- * set does not permit null elements (optional)
+ * set does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* is not supported by this set
*/
@@ -257,10 +261,13 @@
* specified collection
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
- * set (optional)
+ * set
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified collection contains one
* or more null elements and this set does not permit null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @see #contains(Object)
*/
boolean containsAll(Collection<?> c);
@@ -302,9 +309,11 @@
* @throws UnsupportedOperationException if the <tt>retainAll</tt> operation
* is not supported by this set
* @throws ClassCastException if the class of an element of this set
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this set contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
*/
@@ -322,9 +331,11 @@
* @throws UnsupportedOperationException if the <tt>removeAll</tt> operation
* is not supported by this set
* @throws ClassCastException if the class of an element of this set
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this set contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
* @see #contains(Object)
--- a/jdk/src/share/classes/java/util/Vector.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/Vector.java Tue May 03 22:16:58 2011 -0700
@@ -893,10 +893,13 @@
* @return true if this Vector changed as a result of the call
* @throws ClassCastException if the types of one or more elements
* in this vector are incompatible with the specified
- * collection (optional)
+ * collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this vector contains one or more null
* elements and the specified collection does not support null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @since 1.2
*/
public synchronized boolean removeAll(Collection<?> c) {
@@ -913,10 +916,13 @@
* @return true if this Vector changed as a result of the call
* @throws ClassCastException if the types of one or more elements
* in this vector are incompatible with the specified
- * collection (optional)
+ * collection
+ * (<a href="Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this vector contains one or more null
* elements and the specified collection does not support null
- * elements (optional), or if the specified collection is null
+ * elements
+ * (<a href="Collection.html#optional-restrictions">optional</a>),
+ * or if the specified collection is null
* @since 1.2
*/
public synchronized boolean retainAll(Collection<?> c) {
--- a/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/BlockingDeque.java Tue May 03 22:16:58 2011 -0700
@@ -400,8 +400,10 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
boolean removeFirstOccurrence(Object o);
@@ -416,8 +418,10 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
boolean removeLastOccurrence(Object o);
@@ -591,8 +595,10 @@
* @param o element to be removed from this deque, if present
* @return <tt>true</tt> if this deque changed as a result of the call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
boolean remove(Object o);
@@ -604,8 +610,10 @@
* @param o object to be checked for containment in this deque
* @return <tt>true</tt> if this deque contains the specified element
* @throws ClassCastException if the class of the specified element
- * is incompatible with this deque (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this deque
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
public boolean contains(Object o);
--- a/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/BlockingQueue.java Tue May 03 22:16:58 2011 -0700
@@ -303,8 +303,10 @@
* @param o element to be removed from this queue, if present
* @return <tt>true</tt> if this queue changed as a result of the call
* @throws ClassCastException if the class of the specified element
- * is incompatible with this queue (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this queue
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
boolean remove(Object o);
@@ -316,8 +318,10 @@
* @param o object to be checked for containment in this queue
* @return <tt>true</tt> if this queue contains the specified element
* @throws ClassCastException if the class of the specified element
- * is incompatible with this queue (optional)
- * @throws NullPointerException if the specified element is null (optional)
+ * is incompatible with this queue
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
+ * @throws NullPointerException if the specified element is null
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
public boolean contains(Object o);
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Tue May 03 22:16:58 2011 -0700
@@ -239,7 +239,8 @@
/**
* Gets the ith element of given table (if nonnull) with volatile
- * read semantics.
+ * read semantics. Note: This is manually integrated into a few
+ * performance-sensitive methods to reduce call overhead.
*/
@SuppressWarnings("unchecked")
static final <K,V> HashEntry<K,V> entryAt(HashEntry<K,V>[] tab, int i) {
@@ -389,8 +390,7 @@
else
node = new HashEntry<K,V>(hash, key, value, first);
int c = count + 1;
- if (c > threshold && first != null &&
- tab.length < MAXIMUM_CAPACITY)
+ if (c > threshold && tab.length < MAXIMUM_CAPACITY)
rehash(node);
else
setEntryAt(tab, index, node);
@@ -647,7 +647,11 @@
/**
* Gets the jth element of given segment array (if nonnull) with
- * volatile element access semantics via Unsafe.
+ * volatile element access semantics via Unsafe. (The null check
+ * can trigger harmlessly only during deserialization.) Note:
+ * because each element of segments array is set only once (using
+ * fully ordered writes), some performance-sensitive methods rely
+ * on this method only as a recheck upon null reads.
*/
@SuppressWarnings("unchecked")
static final <K,V> Segment<K,V> segmentAt(Segment<K,V>[] ss, int j) {
@@ -913,12 +917,19 @@
* @throws NullPointerException if the specified key is null
*/
public V get(Object key) {
- int hash = hash(key.hashCode());
- for (HashEntry<K,V> e = entryForHash(segmentForHash(hash), hash);
- e != null; e = e.next) {
- K k;
- if ((k = e.key) == key || (e.hash == hash && key.equals(k)))
- return e.value;
+ Segment<K,V> s; // manually integrate access methods to reduce overhead
+ HashEntry<K,V>[] tab;
+ int h = hash(key.hashCode());
+ long u = (((h >>> segmentShift) & segmentMask) << SSHIFT) + SBASE;
+ if ((s = (Segment<K,V>)UNSAFE.getObjectVolatile(segments, u)) != null &&
+ (tab = s.table) != null) {
+ for (HashEntry<K,V> e = (HashEntry<K,V>) UNSAFE.getObjectVolatile
+ (tab, ((long)(((tab.length - 1) & h)) << TSHIFT) + TBASE);
+ e != null; e = e.next) {
+ K k;
+ if ((k = e.key) == key || (e.hash == h && key.equals(k)))
+ return e.value;
+ }
}
return null;
}
@@ -932,13 +943,21 @@
* <tt>equals</tt> method; <tt>false</tt> otherwise.
* @throws NullPointerException if the specified key is null
*/
+ @SuppressWarnings("unchecked")
public boolean containsKey(Object key) {
- int hash = hash(key.hashCode());
- for (HashEntry<K,V> e = entryForHash(segmentForHash(hash), hash);
- e != null; e = e.next) {
- K k;
- if ((k = e.key) == key || (e.hash == hash && key.equals(k)))
- return true;
+ Segment<K,V> s; // same as get() except no need for volatile value read
+ HashEntry<K,V>[] tab;
+ int h = hash(key.hashCode());
+ long u = (((h >>> segmentShift) & segmentMask) << SSHIFT) + SBASE;
+ if ((s = (Segment<K,V>)UNSAFE.getObjectVolatile(segments, u)) != null &&
+ (tab = s.table) != null) {
+ for (HashEntry<K,V> e = (HashEntry<K,V>) UNSAFE.getObjectVolatile
+ (tab, ((long)(((tab.length - 1) & h)) << TSHIFT) + TBASE);
+ e != null; e = e.next) {
+ K k;
+ if ((k = e.key) == key || (e.hash == h && key.equals(k)))
+ return true;
+ }
}
return false;
}
@@ -1032,13 +1051,15 @@
* <tt>null</tt> if there was no mapping for <tt>key</tt>
* @throws NullPointerException if the specified key or value is null
*/
+ @SuppressWarnings("unchecked")
public V put(K key, V value) {
+ Segment<K,V> s;
if (value == null)
throw new NullPointerException();
int hash = hash(key.hashCode());
int j = (hash >>> segmentShift) & segmentMask;
- Segment<K,V> s = segmentAt(segments, j);
- if (s == null)
+ if ((s = (Segment<K,V>)UNSAFE.getObject // nonvolatile; recheck
+ (segments, (j << SSHIFT) + SBASE)) == null) // in ensureSegment
s = ensureSegment(j);
return s.put(key, hash, value, false);
}
@@ -1050,13 +1071,15 @@
* or <tt>null</tt> if there was no mapping for the key
* @throws NullPointerException if the specified key or value is null
*/
+ @SuppressWarnings("unchecked")
public V putIfAbsent(K key, V value) {
+ Segment<K,V> s;
if (value == null)
throw new NullPointerException();
int hash = hash(key.hashCode());
int j = (hash >>> segmentShift) & segmentMask;
- Segment<K,V> s = segmentAt(segments, j);
- if (s == null)
+ if ((s = (Segment<K,V>)UNSAFE.getObject
+ (segments, (j << SSHIFT) + SBASE)) == null)
s = ensureSegment(j);
return s.put(key, hash, value, true);
}
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java Tue May 03 22:16:58 2011 -0700
@@ -59,10 +59,17 @@
* ConcurrentModificationException}, and may proceed concurrently with
* other operations.
*
- * <p>Beware that, unlike in most collections, the {@code size}
- * method is <em>NOT</em> a constant-time operation. Because of the
+ * <p>Beware that, unlike in most collections, the {@code size} method
+ * is <em>NOT</em> a constant-time operation. Because of the
* asynchronous nature of these deques, determining the current number
- * of elements requires a traversal of the elements.
+ * of elements requires a traversal of the elements, and so may report
+ * inaccurate results if this collection is modified during traversal.
+ * Additionally, the bulk operations {@code addAll},
+ * {@code removeAll}, {@code retainAll}, {@code containsAll},
+ * {@code equals}, and {@code toArray} are <em>not</em> guaranteed
+ * to be performed atomically. For example, an iterator operating
+ * concurrently with an {@code addAll} operation might view only some
+ * of the added elements.
*
* <p>This class and its iterator implement all of the <em>optional</em>
* methods of the {@link Deque} and {@link Iterator} interfaces.
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java Tue May 03 22:16:58 2011 -0700
@@ -72,7 +72,14 @@
* <p>Beware that, unlike in most collections, the {@code size} method
* is <em>NOT</em> a constant-time operation. Because of the
* asynchronous nature of these queues, determining the current number
- * of elements requires a traversal of the elements.
+ * of elements requires a traversal of the elements, and so may report
+ * inaccurate results if this collection is modified during traversal.
+ * Additionally, the bulk operations {@code addAll},
+ * {@code removeAll}, {@code retainAll}, {@code containsAll},
+ * {@code equals}, and {@code toArray} are <em>not</em> guaranteed
+ * to be performed atomically. For example, an iterator operating
+ * concurrently with an {@code addAll} operation might view only some
+ * of the added elements.
*
* <p>This class and its iterator implement all of the <em>optional</em>
* methods of the {@link Queue} and {@link Iterator} interfaces.
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java Tue May 03 22:16:58 2011 -0700
@@ -103,9 +103,11 @@
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* is not supported by this map
* @throws ClassCastException if the key or value is of an inappropriate
- * type for this map (optional)
+ * type for this map
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified key or value is null,
- * and this map does not permit null keys or values (optional)
+ * and this map does not permit null keys or values
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
*/
boolean remove(Object key, Object value);
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Tue May 03 22:16:58 2011 -0700
@@ -66,12 +66,13 @@
* <p>Beware that, unlike in most collections, the <tt>size</tt>
* method is <em>not</em> a constant-time operation. Because of the
* asynchronous nature of these maps, determining the current number
- * of elements requires a traversal of the elements. Additionally,
- * the bulk operations <tt>putAll</tt>, <tt>equals</tt>, and
- * <tt>clear</tt> are <em>not</em> guaranteed to be performed
- * atomically. For example, an iterator operating concurrently with a
- * <tt>putAll</tt> operation might view only some of the added
- * elements.
+ * of elements requires a traversal of the elements, and so may report
+ * inaccurate results if this collection is modified during traversal.
+ * Additionally, the bulk operations <tt>putAll</tt>, <tt>equals</tt>,
+ * <tt>toArray</tt>, <tt>containsValue</tt>, and <tt>clear</tt> are
+ * <em>not</em> guaranteed to be performed atomically. For example, an
+ * iterator operating concurrently with a <tt>putAll</tt> operation
+ * might view only some of the added elements.
*
* <p>This class and its views and iterators implement all of the
* <em>optional</em> methods of the {@link Map} and {@link Iterator}
@@ -1661,7 +1662,9 @@
/**
* Returns <tt>true</tt> if this map maps one or more keys to the
* specified value. This operation requires time linear in the
- * map size.
+ * map size. Additionally, it is possible for the map to change
+ * during execution of this method, in which case the returned
+ * result may be inaccurate.
*
* @param value value whose presence in this map is to be tested
* @return <tt>true</tt> if a mapping to <tt>value</tt> exists;
@@ -1751,7 +1754,7 @@
*
* @return a navigable set view of the keys in this map
*/
- public NavigableSet<K> keySet() {
+ public NavigableSet<K> keySet() {
KeySet ks = keySet;
return (ks != null) ? ks : (keySet = new KeySet(this));
}
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java Tue May 03 22:16:58 2011 -0700
@@ -58,12 +58,14 @@
* <p>Beware that, unlike in most collections, the <tt>size</tt>
* method is <em>not</em> a constant-time operation. Because of the
* asynchronous nature of these sets, determining the current number
- * of elements requires a traversal of the elements. Additionally, the
- * bulk operations <tt>addAll</tt>, <tt>removeAll</tt>,
- * <tt>retainAll</tt>, and <tt>containsAll</tt> are <em>not</em>
- * guaranteed to be performed atomically. For example, an iterator
- * operating concurrently with an <tt>addAll</tt> operation might view
- * only some of the added elements.
+ * of elements requires a traversal of the elements, and so may report
+ * inaccurate results if this collection is modified during traversal.
+ * Additionally, the bulk operations <tt>addAll</tt>,
+ * <tt>removeAll</tt>, <tt>retainAll</tt>, <tt>containsAll</tt>,
+ * <tt>equals</tt>, and <tt>toArray</tt> are <em>not</em> guaranteed
+ * to be performed atomically. For example, an iterator operating
+ * concurrently with an <tt>addAll</tt> operation might view only some
+ * of the added elements.
*
* <p>This class and its iterators implement all of the
* <em>optional</em> methods of the {@link Set} and {@link Iterator}
--- a/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java Tue May 03 22:16:58 2011 -0700
@@ -631,9 +631,11 @@
* @param c collection containing elements to be removed from this list
* @return <tt>true</tt> if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="../Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
*/
@@ -671,9 +673,11 @@
* @param c collection containing elements to be retained in this list
* @return <tt>true</tt> if this list changed as a result of the call
* @throws ClassCastException if the class of an element of this list
- * is incompatible with the specified collection (optional)
+ * is incompatible with the specified collection
+ * (<a href="../Collection.html#optional-restrictions">optional</a>)
* @throws NullPointerException if this list contains a null element and the
- * specified collection does not permit null elements (optional),
+ * specified collection does not permit null elements
+ * (<a href="../Collection.html#optional-restrictions">optional</a>),
* or if the specified collection is null
* @see #remove(Object)
*/
--- a/jdk/src/share/classes/java/util/concurrent/LinkedTransferQueue.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/LinkedTransferQueue.java Tue May 03 22:16:58 2011 -0700
@@ -51,10 +51,17 @@
* producer. The <em>tail</em> of the queue is that element that has
* been on the queue the shortest time for some producer.
*
- * <p>Beware that, unlike in most collections, the {@code size}
- * method is <em>NOT</em> a constant-time operation. Because of the
+ * <p>Beware that, unlike in most collections, the {@code size} method
+ * is <em>NOT</em> a constant-time operation. Because of the
* asynchronous nature of these queues, determining the current number
- * of elements requires a traversal of the elements.
+ * of elements requires a traversal of the elements, and so may report
+ * inaccurate results if this collection is modified during traversal.
+ * Additionally, the bulk operations {@code addAll},
+ * {@code removeAll}, {@code retainAll}, {@code containsAll},
+ * {@code equals}, and {@code toArray} are <em>not</em> guaranteed
+ * to be performed atomically. For example, an iterator operating
+ * concurrently with an {@code addAll} operation might view only some
+ * of the added elements.
*
* <p>This class and its iterator implement all of the
* <em>optional</em> methods of the {@link Collection} and {@link
--- a/jdk/src/share/classes/java/util/regex/Pattern.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/regex/Pattern.java Tue May 03 22:16:58 2011 -0700
@@ -206,13 +206,15 @@
* <td>Equivalent to java.lang.Character.isMirrored()</td></tr>
*
* <tr><th> </th></tr>
- * <tr align="left"><th colspan="2" id="unicode">Classes for Unicode scripts, blocks and categories</th></tr>
+ * <tr align="left"><th colspan="2" id="unicode">Classes for Unicode scripts, blocks, categories and binary properties</th></tr>
* * <tr><td valign="top" headers="construct unicode"><tt>\p{IsLatin}</tt></td>
- * <td headers="matches">A Latin script character (simple <a href="#ubc">script</a>)</td></tr>
+ * <td headers="matches">A Latin script character (<a href="#usc">script</a>)</td></tr>
* <tr><td valign="top" headers="construct unicode"><tt>\p{InGreek}</tt></td>
- * <td headers="matches">A character in the Greek block (simple <a href="#ubc">block</a>)</td></tr>
+ * <td headers="matches">A character in the Greek block (<a href="#ubc">block</a>)</td></tr>
* <tr><td valign="top" headers="construct unicode"><tt>\p{Lu}</tt></td>
- * <td headers="matches">An uppercase letter (simple <a href="#ubc">category</a>)</td></tr>
+ * <td headers="matches">An uppercase letter (<a href="#ucc">category</a>)</td></tr>
+ * <tr><td valign="top" headers="construct unicode"><tt>\p{isAlphabetic}</tt></td>
+ * <td headers="matches">An alphabetic character (<a href="#ubpc">binary property</a>)</td></tr>
* <tr><td valign="top" headers="construct unicode"><tt>\p{Sc}</tt></td>
* <td headers="matches">A currency symbol</td></tr>
* <tr><td valign="top" headers="construct unicode"><tt>\P{InGreek}</tt></td>
@@ -328,10 +330,11 @@
* <td headers="matches"><i>X</i>, as a named-capturing group</td></tr>
* <tr><td valign="top" headers="construct special"><tt>(?:</tt><i>X</i><tt>)</tt></td>
* <td headers="matches"><i>X</i>, as a non-capturing group</td></tr>
- * <tr><td valign="top" headers="construct special"><tt>(?idmsux-idmsux) </tt></td>
+ * <tr><td valign="top" headers="construct special"><tt>(?idmsuxU-idmsuxU) </tt></td>
* <td headers="matches">Nothing, but turns match flags <a href="#CASE_INSENSITIVE">i</a>
* <a href="#UNIX_LINES">d</a> <a href="#MULTILINE">m</a> <a href="#DOTALL">s</a>
- * <a href="#UNICODE_CASE">u</a> <a href="#COMMENTS">x</a> on - off</td></tr>
+ * <a href="#UNICODE_CASE">u</a> <a href="#COMMENTS">x</a> <a href="#UNICODE_CHARACTER_CLASS">U</a>
+ * on - off</td></tr>
* <tr><td valign="top" headers="construct special"><tt>(?idmsux-idmsux:</tt><i>X</i><tt>)</tt> </td>
* <td headers="matches"><i>X</i>, as a <a href="#cg">non-capturing group</a> with the
* given flags <a href="#CASE_INSENSITIVE">i</a> <a href="#UNIX_LINES">d</a>
@@ -518,61 +521,140 @@
*
* <p> This class is in conformance with Level 1 of <a
* href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical
- * Standard #18: Unicode Regular Expression Guidelines</i></a>, plus RL2.1
+ * Standard #18: Unicode Regular Expression</i></a>, plus RL2.1
* Canonical Equivalents.
- *
- * <p> Unicode escape sequences such as <tt>\u2014</tt> in Java source code
+ * <p>
+ * <b>Unicode escape sequences</b> such as <tt>\u2014</tt> in Java source code
* are processed as described in section 3.3 of
* <cite>The Java™ Language Specification</cite>.
- * Such escape sequences are also
- * implemented directly by the regular-expression parser so that Unicode
- * escapes can be used in expressions that are read from files or from the
- * keyboard. Thus the strings <tt>"\u2014"</tt> and <tt>"\\u2014"</tt>,
- * while not equal, compile into the same pattern, which matches the character
- * with hexadecimal value <tt>0x2014</tt>.
- *
- * <p> A Unicode character can also be represented in a regular-expression by
- * using its hexadecimal code point value directly as described in construct
+ * Such escape sequences are also implemented directly by the regular-expression
+ * parser so that Unicode escapes can be used in expressions that are read from
+ * files or from the keyboard. Thus the strings <tt>"\u2014"</tt> and
+ * <tt>"\\u2014"</tt>, while not equal, compile into the same pattern, which
+ * matches the character with hexadecimal value <tt>0x2014</tt>.
+ * <p>
+ * A Unicode character can also be represented in a regular-expression by
+ * using its <b>Hex notation</b>(hexadecimal code point value) directly as described in construct
* <tt>\x{...}</tt>, for example a supplementary character U+2011F
* can be specified as <tt>\x{2011F}</tt>, instead of two consecutive
* Unicode escape sequences of the surrogate pair
* <tt>\uD840</tt><tt>\uDD1F</tt>.
- *
- * <a name="ubc">
- * <p>Unicode scripts, blocks and categories are written with the <tt>\p</tt> and
- * <tt>\P</tt> constructs as in Perl. <tt>\p{</tt><i>prop</i><tt>}</tt> matches if
+ * <p>
+ * Unicode scripts, blocks, categories and binary properties are written with
+ * the <tt>\p</tt> and <tt>\P</tt> constructs as in Perl.
+ * <tt>\p{</tt><i>prop</i><tt>}</tt> matches if
* the input has the property <i>prop</i>, while <tt>\P{</tt><i>prop</i><tt>}</tt>
* does not match if the input has that property.
* <p>
- * Scripts are specified either with the prefix {@code Is}, as in
+ * Scripts, blocks, categories and binary properties can be used both inside
+ * and outside of a character class.
+ * <a name="usc">
+ * <p>
+ * <b>Scripts</b> are specified either with the prefix {@code Is}, as in
* {@code IsHiragana}, or by using the {@code script} keyword (or its short
* form {@code sc})as in {@code script=Hiragana} or {@code sc=Hiragana}.
* <p>
- * Blocks are specified with the prefix {@code In}, as in
+ * The script names supported by <code>Pattern</code> are the valid script names
+ * accepted and defined by
+ * {@link java.lang.Character.UnicodeScript#forName(String) UnicodeScript.forName}.
+ * <a name="ubc">
+ * <p>
+ * <b>Blocks</b> are specified with the prefix {@code In}, as in
* {@code InMongolian}, or by using the keyword {@code block} (or its short
* form {@code blk}) as in {@code block=Mongolian} or {@code blk=Mongolian}.
* <p>
- * Categories may be specified with the optional prefix {@code Is}:
+ * The block names supported by <code>Pattern</code> are the valid block names
+ * accepted and defined by
+ * {@link java.lang.Character.UnicodeBlock#forName(String) UnicodeBlock.forName}.
+ * <p>
+ * <a name="ucc">
+ * <b>Categories</b> may be specified with the optional prefix {@code Is}:
* Both {@code \p{L}} and {@code \p{IsL}} denote the category of Unicode
* letters. Same as scripts and blocks, categories can also be specified
* by using the keyword {@code general_category} (or its short form
* {@code gc}) as in {@code general_category=Lu} or {@code gc=Lu}.
* <p>
- * Scripts, blocks and categories can be used both inside and outside of a
- * character class.
- * <p> The supported categories are those of
+ * The supported categories are those of
* <a href="http://www.unicode.org/unicode/standard/standard.html">
* <i>The Unicode Standard</i></a> in the version specified by the
* {@link java.lang.Character Character} class. The category names are those
* defined in the Standard, both normative and informative.
- * The script names supported by <code>Pattern</code> are the valid script names
- * accepted and defined by
- * {@link java.lang.Character.UnicodeScript#forName(String) UnicodeScript.forName}.
- * The block names supported by <code>Pattern</code> are the valid block names
- * accepted and defined by
- * {@link java.lang.Character.UnicodeBlock#forName(String) UnicodeBlock.forName}.
+ * <p>
+ * <a name="ubpc">
+ * <b>Binary properties</b> are specified with the prefix {@code Is}, as in
+ * {@code IsAlphabetic}. The supported binary properties by <code>Pattern</code>
+ * are
+ * <ul>
+ * <li> Alphabetic
+ * <li> Ideographic
+ * <li> Letter
+ * <li> Lowercase
+ * <li> Uppercase
+ * <li> Titlecase
+ * <li> Punctuation
+ * <Li> Control
+ * <li> White_Space
+ * <li> Digit
+ * <li> Hex_Digit
+ * <li> Noncharacter_Code_Point
+ * <li> Assigned
+ * </ul>
+
+
+ * <p>
+ * <b>Predefined Character classes</b> and <b>POSIX character classes</b> are in
+ * conformance with the recommendation of <i>Annex C: Compatibility Properties</i>
+ * of <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Regular Expression
+ * </i></a>, when {@link #UNICODE_CHARACTER_CLASS} flag is specified.
* <p>
- * <a name="jcc"> <p>Categories that behave like the java.lang.Character
+ * <table border="0" cellpadding="1" cellspacing="0"
+ * summary="predefined and posix character classes in Unicode mode">
+ * <tr align="left">
+ * <th bgcolor="#CCCCFF" align="left" id="classes">Classes</th>
+ * <th bgcolor="#CCCCFF" align="left" id="matches">Matches</th>
+ *</tr>
+ * <tr><td><tt>\p{Lower}</tt></td>
+ * <td>A lowercase character:<tt>\p{IsLowercase}</tt></td></tr>
+ * <tr><td><tt>\p{Upper}</tt></td>
+ * <td>An uppercase character:<tt>\p{IsUppercase}</tt></td></tr>
+ * <tr><td><tt>\p{ASCII}</tt></td>
+ * <td>All ASCII:<tt>[\x00-\x7F]</tt></td></tr>
+ * <tr><td><tt>\p{Alpha}</tt></td>
+ * <td>An alphabetic character:<tt>\p{IsAlphabetic}</tt></td></tr>
+ * <tr><td><tt>\p{Digit}</tt></td>
+ * <td>A decimal digit character:<tt>p{IsDigit}</tt></td></tr>
+ * <tr><td><tt>\p{Alnum}</tt></td>
+ * <td>An alphanumeric character:<tt>[\p{IsAlphabetic}\p{IsDigit}]</tt></td></tr>
+ * <tr><td><tt>\p{Punct}</tt></td>
+ * <td>A punctuation character:<tt>p{IsPunctuation}</tt></td></tr>
+ * <tr><td><tt>\p{Graph}</tt></td>
+ * <td>A visible character: <tt>[^\p{IsWhite_Space}\p{gc=Cc}\p{gc=Cs}\p{gc=Cn}]</tt></td></tr>
+ * <tr><td><tt>\p{Print}</tt></td>
+ * <td>A printable character: <tt>[\p{Graph}\p{Blank}&&[^\p{Cntrl}]]</tt></td></tr>
+ * <tr><td><tt>\p{Blank}</tt></td>
+ * <td>A space or a tab: <tt>[\p{IsWhite_Space}&&[^\p{gc=Zl}\p{gc=Zp}\x0a\x0b\x0c\x0d\x85]]</tt></td></tr>
+ * <tr><td><tt>\p{Cntrl}</tt></td>
+ * <td>A control character: <tt>\p{gc=Cc}</tt></td></tr>
+ * <tr><td><tt>\p{XDigit}</tt></td>
+ * <td>A hexadecimal digit: <tt>[\p{gc=Nd}\p{IsHex_Digit}]</tt></td></tr>
+ * <tr><td><tt>\p{Space}</tt></td>
+ * <td>A whitespace character:<tt>\p{IsWhite_Space}</tt></td></tr>
+ * <tr><td><tt>\d</tt></td>
+ * <td>A digit: <tt>\p{IsDigit}</tt></td></tr>
+ * <tr><td><tt>\D</tt></td>
+ * <td>A non-digit: <tt>[^\d]</tt></td></tr>
+ * <tr><td><tt>\s</tt></td>
+ * <td>A whitespace character: <tt>\p{IsWhite_Space}</tt></td></tr>
+ * <tr><td><tt>\S</tt></td>
+ * <td>A non-whitespace character: <tt>[^\s]</tt></td></tr>
+ * <tr><td><tt>\w</tt></td>
+ * <td>A word character: <tt>[\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}]</tt></td></tr>
+ * <tr><td><tt>\W</tt></td>
+ * <td>A non-word character: <tt>[^\w]</tt></td></tr>
+ * </table>
+ * <p>
+ * <a name="jcc">
+ * Categories that behave like the java.lang.Character
* boolean is<i>methodname</i> methods (except for the deprecated ones) are
* available through the same <tt>\p{</tt><i>prop</i><tt>}</tt> syntax where
* the specified property has the name <tt>java<i>methodname</i></tt>.
@@ -585,8 +667,30 @@
* <p> Perl constructs not supported by this class: </p>
*
* <ul>
+ * <li><p> Predefined character classes (Unicode character)
+ * <p><tt>\h </tt>A horizontal whitespace
+ * <p><tt>\H </tt>A non horizontal whitespace
+ * <p><tt>\v </tt>A vertical whitespace
+ * <p><tt>\V </tt>A non vertical whitespace
+ * <p><tt>\R </tt>Any Unicode linebreak sequence
+ * <tt>\u005cu000D\u005cu000A|[\u005cu000A\u005cu000B\u005cu000C\u005cu000D\u005cu0085\u005cu2028\u005cu2029]</tt>
+ * <p><tt>\X </tt>Match Unicode
+ * <a href="http://www.unicode.org/reports/tr18/#Default_Grapheme_Clusters">
+ * <i>extended grapheme cluster</i></a>
+ * </p></li>
*
- * <li><p> The conditional constructs <tt>(?{</tt><i>X</i><tt>})</tt> and
+ * <li><p> The backreference constructs, <tt>\g{</tt><i>n</i><tt>}</tt> for
+ * the <i>n</i><sup>th</sup><a href="#cg">capturing group</a> and
+ * <tt>\g{</tt><i>name</i><tt>}</tt> for
+ * <a href="#groupname">named-capturing group</a>.
+ * </p></li>
+ *
+ * <li><p> The named character construct, <tt>\N{</tt><i>name</i><tt>}</tt>
+ * for a Unicode character by its name.
+ * </p></li>
+ *
+ * <li><p> The conditional constructs
+ * <tt>(?(</tt><i>condition</i><tt>)</tt><i>X</i><tt>)</tt> and
* <tt>(?(</tt><i>condition</i><tt>)</tt><i>X</i><tt>|</tt><i>Y</i><tt>)</tt>,
* </p></li>
*
@@ -604,10 +708,6 @@
*
* <ul>
*
- * <li><p> Possessive quantifiers, which greedily match as much as they can
- * and do not back off, even when doing so would allow the overall match to
- * succeed. </p></li>
- *
* <li><p> Character-class union and intersection as described
* <a href="#cc">above</a>.</p></li>
*
@@ -641,13 +741,6 @@
* within a group; in the latter case, flags are restored at the end of the
* group just as in Perl. </p></li>
*
- * <li><p> Perl is forgiving about malformed matching constructs, as in the
- * expression <tt>*a</tt>, as well as dangling brackets, as in the
- * expression <tt>abc]</tt>, and treats them as literals. This
- * class also accepts dangling brackets but is strict about dangling
- * metacharacters like +, ? and *, and will throw a
- * {@link PatternSyntaxException} if it encounters them. </p></li>
- *
* </ul>
*
*
@@ -796,6 +889,28 @@
*/
public static final int CANON_EQ = 0x80;
+ /**
+ * Enables the Unicode version of <i>Predefined character classes</i> and
+ * <i>POSIX character classes</i>.
+ *
+ * <p> When this flag is specified then the (US-ASCII only)
+ * <i>Predefined character classes</i> and <i>POSIX character classes</i>
+ * are in conformance with
+ * <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical
+ * Standard #18: Unicode Regular Expression</i></a>
+ * <i>Annex C: Compatibility Properties</i>.
+ * <p>
+ * The UNICODE_CHARACTER_CLASS mode can also be enabled via the embedded
+ * flag expression <tt>(?U)</tt>.
+ * <p>
+ * The flag implies UNICODE_CASE, that is, it enables Unicode-aware case
+ * folding.
+ * <p>
+ * Specifying this flag may impose a performance penalty. </p>
+ * @since 1.7
+ */
+ public static final int UNICODE_CHARACTER_CLASS = 0x100;
+
/* Pattern has only two serialized components: The pattern string
* and the flags, which are all that is needed to recompile the pattern
* when it is deserialized.
@@ -918,7 +1033,8 @@
* Match flags, a bit mask that may include
* {@link #CASE_INSENSITIVE}, {@link #MULTILINE}, {@link #DOTALL},
* {@link #UNICODE_CASE}, {@link #CANON_EQ}, {@link #UNIX_LINES},
- * {@link #LITERAL} and {@link #COMMENTS}
+ * {@link #LITERAL}, {@link #UNICODE_CHARACTER_CLASS}
+ * and {@link #COMMENTS}
*
* @throws IllegalArgumentException
* If bit values other than those corresponding to the defined
@@ -1209,6 +1325,10 @@
pattern = p;
flags = f;
+ // to use UNICODE_CASE if UNICODE_CHARACTER_CLASS present
+ if ((flags & UNICODE_CHARACTER_CLASS) != 0)
+ flags |= UNICODE_CASE;
+
// Reset group index count
capturingGroupCount = 1;
localCount = 0;
@@ -2164,12 +2284,14 @@
return -1;
case 'B':
if (inclass) break;
- if (create) root = new Bound(Bound.NONE);
+ if (create) root = new Bound(Bound.NONE, has(UNICODE_CHARACTER_CLASS));
return -1;
case 'C':
break;
case 'D':
- if (create) root = new Ctype(ASCII.DIGIT).complement();
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.DIGIT).complement()
+ : new Ctype(ASCII.DIGIT).complement();
return -1;
case 'E':
case 'F':
@@ -2191,14 +2313,18 @@
case 'R':
break;
case 'S':
- if (create) root = new Ctype(ASCII.SPACE).complement();
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.WHITE_SPACE).complement()
+ : new Ctype(ASCII.SPACE).complement();
return -1;
case 'T':
case 'U':
case 'V':
break;
case 'W':
- if (create) root = new Ctype(ASCII.WORD).complement();
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.WORD).complement()
+ : new Ctype(ASCII.WORD).complement();
return -1;
case 'X':
case 'Y':
@@ -2216,12 +2342,14 @@
return '\007';
case 'b':
if (inclass) break;
- if (create) root = new Bound(Bound.BOTH);
+ if (create) root = new Bound(Bound.BOTH, has(UNICODE_CHARACTER_CLASS));
return -1;
case 'c':
return c();
case 'd':
- if (create) root = new Ctype(ASCII.DIGIT);
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.DIGIT)
+ : new Ctype(ASCII.DIGIT);
return -1;
case 'e':
return '\033';
@@ -2259,7 +2387,9 @@
case 'r':
return '\r';
case 's':
- if (create) root = new Ctype(ASCII.SPACE);
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.WHITE_SPACE)
+ : new Ctype(ASCII.SPACE);
return -1;
case 't':
return '\t';
@@ -2268,7 +2398,9 @@
case 'v':
return '\013';
case 'w':
- if (create) root = new Ctype(ASCII.WORD);
+ if (create) root = has(UNICODE_CHARACTER_CLASS)
+ ? new Utype(UnicodeProp.WORD)
+ : new Ctype(ASCII.WORD);
return -1;
case 'x':
return x();
@@ -2490,7 +2622,7 @@
{
next();
String name;
- CharProperty node;
+ CharProperty node = null;
if (singleLetter) {
int c = temp[cursor];
@@ -2536,11 +2668,21 @@
} else if (name.startsWith("Is")) {
// \p{isGeneralCategory} and \p{isScriptName}
name = name.substring(2);
- node = CharPropertyNames.charPropertyFor(name);
+ UnicodeProp uprop = UnicodeProp.forName(name);
+ if (uprop != null)
+ node = new Utype(uprop);
+ if (node == null)
+ node = CharPropertyNames.charPropertyFor(name);
if (node == null)
node = unicodeScriptPropertyFor(name);
} else {
- node = charPropertyNodeFor(name);
+ if (has(UNICODE_CHARACTER_CLASS)) {
+ UnicodeProp uprop = UnicodeProp.forPOSIXName(name);
+ if (uprop != null)
+ node = new Utype(uprop);
+ }
+ if (node == null)
+ node = charPropertyNodeFor(name);
}
}
if (maybeComplement) {
@@ -2822,6 +2964,9 @@
case 'x':
flags |= COMMENTS;
break;
+ case 'U':
+ flags |= (UNICODE_CHARACTER_CLASS | UNICODE_CASE);
+ break;
case '-': // subFlag then fall through
ch = next();
subFlag();
@@ -2861,6 +3006,8 @@
case 'x':
flags &= ~COMMENTS;
break;
+ case 'U':
+ flags &= ~(UNICODE_CHARACTER_CLASS | UNICODE_CASE);
default:
return;
}
@@ -3664,6 +3811,18 @@
}
/**
+ * Node class that matches a Unicode "type"
+ */
+ static final class Utype extends CharProperty {
+ final UnicodeProp uprop;
+ Utype(UnicodeProp uprop) { this.uprop = uprop; }
+ boolean isSatisfiedBy(int ch) {
+ return uprop.is(ch);
+ }
+ }
+
+
+ /**
* Node class that matches a POSIX type.
*/
static final class Ctype extends BmpCharProperty {
@@ -5025,9 +5184,17 @@
static int BOTH = 0x3;
static int NONE = 0x4;
int type;
- Bound(int n) {
+ boolean useUWORD;
+ Bound(int n, boolean useUWORD) {
type = n;
- }
+ this.useUWORD = useUWORD;
+ }
+
+ boolean isWord(int ch) {
+ return useUWORD ? UnicodeProp.WORD.is(ch)
+ : (ch == '_' || Character.isLetterOrDigit(ch));
+ }
+
int check(Matcher matcher, int i, CharSequence seq) {
int ch;
boolean left = false;
@@ -5039,14 +5206,14 @@
}
if (i > startIndex) {
ch = Character.codePointBefore(seq, i);
- left = (ch == '_' || Character.isLetterOrDigit(ch) ||
+ left = (isWord(ch) ||
((Character.getType(ch) == Character.NON_SPACING_MARK)
&& hasBaseCharacter(matcher, i-1, seq)));
}
boolean right = false;
if (i < endIndex) {
ch = Character.codePointAt(seq, i);
- right = (ch == '_' || Character.isLetterOrDigit(ch) ||
+ right = (isWord(ch) ||
((Character.getType(ch) == Character.NON_SPACING_MARK)
&& hasBaseCharacter(matcher, i, seq)));
} else {
@@ -5428,6 +5595,12 @@
defClone("javaUpperCase", new CloneableProperty() {
boolean isSatisfiedBy(int ch) {
return Character.isUpperCase(ch);}});
+ defClone("javaAlphabetic", new CloneableProperty() {
+ boolean isSatisfiedBy(int ch) {
+ return Character.isAlphabetic(ch);}});
+ defClone("javaIdeographic", new CloneableProperty() {
+ boolean isSatisfiedBy(int ch) {
+ return Character.isIdeographic(ch);}});
defClone("javaTitleCase", new CloneableProperty() {
boolean isSatisfiedBy(int ch) {
return Character.isTitleCase(ch);}});
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/util/regex/UnicodeProp.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.util.regex;
+
+import java.util.HashMap;
+import java.util.Locale;
+
+enum UnicodeProp {
+
+ ALPHABETIC {
+ public boolean is(int ch) {
+ return Character.isAlphabetic(ch);
+ }
+ },
+
+ LETTER {
+ public boolean is(int ch) {
+ return Character.isLetter(ch);
+ }
+ },
+
+ IDEOGRAPHIC {
+ public boolean is(int ch) {
+ return Character.isIdeographic(ch);
+ }
+ },
+
+ LOWERCASE {
+ public boolean is(int ch) {
+ return Character.isLowerCase(ch);
+ }
+ },
+
+ UPPERCASE {
+ public boolean is(int ch) {
+ return Character.isUpperCase(ch);
+ }
+ },
+
+ TITLECASE {
+ public boolean is(int ch) {
+ return Character.isTitleCase(ch);
+ }
+ },
+
+ WHITE_SPACE {
+ // \p{Whitespace}
+ public boolean is(int ch) {
+ return ((((1 << Character.SPACE_SEPARATOR) |
+ (1 << Character.LINE_SEPARATOR) |
+ (1 << Character.PARAGRAPH_SEPARATOR)) >> Character.getType(ch)) & 1)
+ != 0 || (ch >= 0x9 && ch <= 0xd) || (ch == 0x85);
+ }
+ },
+
+ CONTROL {
+ // \p{gc=Control}
+ public boolean is(int ch) {
+ return Character.getType(ch) == Character.CONTROL;
+ }
+ },
+
+ PUNCTUATION {
+ // \p{gc=Punctuation}
+ public boolean is(int ch) {
+ return ((((1 << Character.CONNECTOR_PUNCTUATION) |
+ (1 << Character.DASH_PUNCTUATION) |
+ (1 << Character.START_PUNCTUATION) |
+ (1 << Character.END_PUNCTUATION) |
+ (1 << Character.OTHER_PUNCTUATION) |
+ (1 << Character.INITIAL_QUOTE_PUNCTUATION) |
+ (1 << Character.FINAL_QUOTE_PUNCTUATION)) >> Character.getType(ch)) & 1)
+ != 0;
+ }
+ },
+
+ HEX_DIGIT {
+ // \p{gc=Decimal_Number}
+ // \p{Hex_Digit} -> PropList.txt: Hex_Digit
+ public boolean is(int ch) {
+ return DIGIT.is(ch) ||
+ (ch >= 0x0030 && ch <= 0x0039) ||
+ (ch >= 0x0041 && ch <= 0x0046) ||
+ (ch >= 0x0061 && ch <= 0x0066) ||
+ (ch >= 0xFF10 && ch <= 0xFF19) ||
+ (ch >= 0xFF21 && ch <= 0xFF26) ||
+ (ch >= 0xFF41 && ch <= 0xFF46);
+ }
+ },
+
+ ASSIGNED {
+ public boolean is(int ch) {
+ return Character.getType(ch) != Character.UNASSIGNED;
+ }
+ },
+
+ NONCHARACTER_CODE_POINT {
+ // PropList.txt:Noncharacter_Code_Point
+ public boolean is(int ch) {
+ return (ch & 0xfffe) == 0xfffe || (ch >= 0xfdd0 && ch <= 0xfdef);
+ }
+ },
+
+ DIGIT {
+ // \p{gc=Decimal_Number}
+ public boolean is(int ch) {
+ return Character.isDigit(ch);
+ }
+ },
+
+ ALNUM {
+ // \p{alpha}
+ // \p{digit}
+ public boolean is(int ch) {
+ return ALPHABETIC.is(ch) || DIGIT.is(ch);
+ }
+ },
+
+ BLANK {
+ // \p{Whitespace} --
+ // [\N{LF} \N{VT} \N{FF} \N{CR} \N{NEL} -> 0xa, 0xb, 0xc, 0xd, 0x85
+ // \p{gc=Line_Separator}
+ // \p{gc=Paragraph_Separator}]
+ public boolean is(int ch) {
+ return Character.getType(ch) == Character.SPACE_SEPARATOR ||
+ ch == 0x9; // \N{HT}
+ }
+ },
+
+ GRAPH {
+ // [^
+ // \p{space}
+ // \p{gc=Control}
+ // \p{gc=Surrogate}
+ // \p{gc=Unassigned}]
+ public boolean is(int ch) {
+ return ((((1 << Character.SPACE_SEPARATOR) |
+ (1 << Character.LINE_SEPARATOR) |
+ (1 << Character.PARAGRAPH_SEPARATOR) |
+ (1 << Character.CONTROL) |
+ (1 << Character.SURROGATE) |
+ (1 << Character.UNASSIGNED)) >> Character.getType(ch)) & 1)
+ == 0;
+ }
+ },
+
+ PRINT {
+ // \p{graph}
+ // \p{blank}
+ // -- \p{cntrl}
+ public boolean is(int ch) {
+ return (GRAPH.is(ch) || BLANK.is(ch)) && !CONTROL.is(ch);
+ }
+ },
+
+ WORD {
+ // \p{alpha}
+ // \p{gc=Mark}
+ // \p{digit}
+ // \p{gc=Connector_Punctuation}
+
+ public boolean is(int ch) {
+ return ALPHABETIC.is(ch) ||
+ ((((1 << Character.NON_SPACING_MARK) |
+ (1 << Character.ENCLOSING_MARK) |
+ (1 << Character.COMBINING_SPACING_MARK) |
+ (1 << Character.DECIMAL_DIGIT_NUMBER) |
+ (1 << Character.CONNECTOR_PUNCTUATION)) >> Character.getType(ch)) & 1)
+ != 0;
+ }
+ };
+
+ private final static HashMap<String, String> posix = new HashMap<>();
+ private final static HashMap<String, String> aliases = new HashMap<>();
+ static {
+ posix.put("ALPHA", "ALPHABETIC");
+ posix.put("LOWER", "LOWERCASE");
+ posix.put("UPPER", "UPPERCASE");
+ posix.put("SPACE", "WHITE_SPACE");
+ posix.put("PUNCT", "PUNCTUATION");
+ posix.put("XDIGIT","HEX_DIGIT");
+ posix.put("ALNUM", "ALNUM");
+ posix.put("CNTRL", "CONTROL");
+ posix.put("DIGIT", "DIGIT");
+ posix.put("BLANK", "BLANK");
+ posix.put("GRAPH", "GRAPH");
+ posix.put("PRINT", "PRINT");
+
+ aliases.put("WHITESPACE", "WHITE_SPACE");
+ aliases.put("HEXDIGIT","HEX_DIGIT");
+ aliases.put("NONCHARACTERCODEPOINT", "NONCHARACTER_CODE_POINT");
+ }
+
+ public static UnicodeProp forName(String propName) {
+ propName = propName.toUpperCase(Locale.ENGLISH);
+ String alias = aliases.get(propName);
+ if (alias != null)
+ propName = alias;
+ try {
+ return valueOf (propName);
+ } catch (IllegalArgumentException x) {}
+ return null;
+ }
+
+ public static UnicodeProp forPOSIXName(String propName) {
+ propName = posix.get(propName.toUpperCase(Locale.ENGLISH));
+ if (propName == null)
+ return null;
+ return valueOf (propName);
+ }
+
+ public abstract boolean is(int ch);
+}
--- a/jdk/src/share/classes/java/util/zip/ZipCoder.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipCoder.java Tue May 03 22:16:58 2011 -0700
@@ -28,11 +28,14 @@
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
import java.nio.charset.CodingErrorAction;
import java.util.Arrays;
+import sun.nio.cs.ArrayDecoder;
+import sun.nio.cs.ArrayEncoder;
/**
* Utility class for zipfile name and comment decoding and encoding
@@ -46,6 +49,15 @@
char[] ca = new char[len];
if (len == 0)
return new String(ca);
+ // UTF-8 only for now. Other ArrayDeocder only handles
+ // CodingErrorAction.REPLACE mode. ZipCoder uses
+ // REPORT mode.
+ if (isUTF8 && cd instanceof ArrayDecoder) {
+ int clen = ((ArrayDecoder)cd).decode(ba, 0, length, ca);
+ if (clen == -1) // malformed
+ throw new IllegalArgumentException("MALFORMED");
+ return new String(ca, 0, clen);
+ }
ByteBuffer bb = ByteBuffer.wrap(ba, 0, length);
CharBuffer cb = CharBuffer.wrap(ca);
CoderResult cr = cd.decode(bb, cb, true);
@@ -68,6 +80,14 @@
byte[] ba = new byte[len];
if (len == 0)
return ba;
+ // UTF-8 only for now. Other ArrayDeocder only handles
+ // CodingErrorAction.REPLACE mode.
+ if (isUTF8 && ce instanceof ArrayEncoder) {
+ int blen = ((ArrayEncoder)ce).encode(ca, 0, ca.length, ba);
+ if (blen == -1) // malformed
+ throw new IllegalArgumentException("MALFORMED");
+ return Arrays.copyOf(ba, blen);
+ }
ByteBuffer bb = ByteBuffer.wrap(ba);
CharBuffer cb = CharBuffer.wrap(ca);
CoderResult cr = ce.encode(cb, bb, true);
@@ -84,35 +104,35 @@
// assume invoked only if "this" is not utf8
byte[] getBytesUTF8(String s) {
- if (isutf8)
+ if (isUTF8)
return getBytes(s);
if (utf8 == null)
- utf8 = new ZipCoder(Charset.forName("UTF-8"));
+ utf8 = new ZipCoder(StandardCharset.UTF_8);
return utf8.getBytes(s);
}
String toStringUTF8(byte[] ba, int len) {
- if (isutf8)
+ if (isUTF8)
return toString(ba, len);
if (utf8 == null)
- utf8 = new ZipCoder(Charset.forName("UTF-8"));
+ utf8 = new ZipCoder(StandardCharset.UTF_8);
return utf8.toString(ba, len);
}
boolean isUTF8() {
- return isutf8;
+ return isUTF8;
}
private Charset cs;
private CharsetDecoder dec;
private CharsetEncoder enc;
- private boolean isutf8;
+ private boolean isUTF8;
private ZipCoder utf8;
private ZipCoder(Charset cs) {
this.cs = cs;
- this.isutf8 = cs.name().equals("UTF-8");
+ this.isUTF8 = cs.name().equals(StandardCharset.UTF_8.name());
}
static ZipCoder get(Charset charset) {
--- a/jdk/src/share/classes/java/util/zip/ZipFile.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipFile.java Tue May 03 22:16:58 2011 -0700
@@ -31,6 +31,7 @@
import java.io.EOFException;
import java.io.File;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharset;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Enumeration;
@@ -140,7 +141,7 @@
* @since 1.3
*/
public ZipFile(File file, int mode) throws IOException {
- this(file, mode, Charset.forName("UTF-8"));
+ this(file, mode, StandardCharset.UTF_8);
}
/**
--- a/jdk/src/share/classes/java/util/zip/ZipInputStream.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipInputStream.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,7 @@
import java.io.EOFException;
import java.io.PushbackInputStream;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharset;
import static java.util.zip.ZipConstants64.*;
/**
@@ -75,7 +76,7 @@
* @param in the actual input stream
*/
public ZipInputStream(InputStream in) {
- this(in, Charset.forName("UTF-8"));
+ this(in, StandardCharset.UTF_8);
}
/**
--- a/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Tue May 03 22:16:58 2011 -0700
@@ -28,6 +28,7 @@
import java.io.OutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
+import java.nio.charset.StandardCharset;
import java.util.Vector;
import java.util.HashSet;
import static java.util.zip.ZipConstants64.*;
@@ -100,7 +101,7 @@
* @param out the actual output stream
*/
public ZipOutputStream(OutputStream out) {
- this(out, Charset.forName("UTF-8"));
+ this(out, StandardCharset.UTF_8);
}
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/JavaxSecurityAuthKerberosAccessImpl.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.security.auth.kerberos;
+
+import sun.misc.JavaxSecurityAuthKerberosAccess;
+import sun.security.krb5.EncryptionKey;
+import sun.security.krb5.PrincipalName;
+
+class JavaxSecurityAuthKerberosAccessImpl
+ implements JavaxSecurityAuthKerberosAccess {
+ public EncryptionKey[] keyTabGetEncryptionKeys(
+ KeyTab ktab, PrincipalName principal) {
+ return ktab.getEncryptionKeys(principal);
+ }
+}
--- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosKey.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -35,14 +35,16 @@
* principal.<p>
*
* All Kerberos JAAS login modules that obtain a principal's password and
- * generate the secret key from it should use this class. Where available,
- * the login module might even read this secret key directly from a
- * Kerberos "keytab". Sometimes, such as when authenticating a server in
+ * generate the secret key from it should use this class.
+ * Sometimes, such as when authenticating a server in
* the absence of user-to-user authentication, the login module will store
* an instance of this class in the private credential set of a
* {@link javax.security.auth.Subject Subject} during the commit phase of the
* authentication process.<p>
*
+ * A Kerberos service using a keytab to read secret keys should use
+ * the {@link KeyTab} class, where latest keys can be read when needed.<p>
+ *
* It might be necessary for the application to be granted a
* {@link javax.security.auth.PrivateCredentialPermission
* PrivateCredentialPermission} if it needs to access the KerberosKey
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.security.auth.kerberos;
+
+import java.io.File;
+import java.util.Objects;
+import sun.misc.SharedSecrets;
+import sun.security.krb5.EncryptionKey;
+import sun.security.krb5.PrincipalName;
+import sun.security.krb5.RealmException;
+
+/**
+ * This class encapsulates a keytab file.
+ * <p>
+ * A Kerberos JAAS login module that obtains long term secret keys from a
+ * keytab file should use this class. The login module will store
+ * an instance of this class in the private credential set of a
+ * {@link javax.security.auth.Subject Subject} during the commit phase of the
+ * authentication process.
+ * <p>
+ * It might be necessary for the application to be granted a
+ * {@link javax.security.auth.PrivateCredentialPermission
+ * PrivateCredentialPermission} if it needs to access the KeyTab
+ * instance from a Subject. This permission is not needed when the
+ * application depends on the default JGSS Kerberos mechanism to access the
+ * KeyTab. In that case, however, the application will need an appropriate
+ * {@link javax.security.auth.kerberos.ServicePermission ServicePermission}.
+ * <p>
+ * The keytab file format is described at
+ * <a href="http://www.ioplex.com/utilities/keytab.txt">
+ * http://www.ioplex.com/utilities/keytab.txt</a>.
+ *
+ * @since 1.7
+ */
+public final class KeyTab {
+
+ /*
+ * Impl notes:
+ *
+ * This class is only a name, a permanent link to the keytab source
+ * (can be missing). Itself has no content. In order to read content,
+ * take a snapshot and read from it.
+ *
+ * The snapshot is of type sun.security.krb5.internal.ktab.KeyTab, which
+ * contains the content of the keytab file when the snapshot is taken.
+ * Itself has no refresh function and mostly an immutable class (except
+ * for the create/add/save methods only used by the ktab command).
+ */
+
+ // Source, null if using the default one. Note that the default name
+ // is maintained in snapshot, this field is never "resolved".
+ private final File file;
+
+ // Set up JavaxSecurityAuthKerberosAccess in SharedSecrets
+ static {
+ SharedSecrets.setJavaxSecurityAuthKerberosAccess(
+ new JavaxSecurityAuthKerberosAccessImpl());
+ }
+
+ private KeyTab(File file) {
+ this.file = file;
+ }
+
+ /**
+ * Returns a {@code KeyTab} instance from a {@code File} object.
+ * <p>
+ * The result of this method is never null. This method only associates
+ * the returned {@code KeyTab} object with the file and does not read it.
+ * @param file the keytab {@code File} object, must not be null
+ * @return the keytab instance
+ * @throws NullPointerException if the {@code file} argument is null
+ */
+ public static KeyTab getInstance(File file) {
+ if (file == null) {
+ throw new NullPointerException("file must be non null");
+ }
+ return new KeyTab(file);
+ }
+
+ /**
+ * Returns the default {@code KeyTab} instance.
+ * <p>
+ * The result of this method is never null. This method only associates
+ * the returned {@code KeyTab} object with the default keytab file and
+ * does not read it.
+ * @return the default keytab instance.
+ */
+ public static KeyTab getInstance() {
+ return new KeyTab(null);
+ }
+
+ //Takes a snapshot of the keytab content
+ private sun.security.krb5.internal.ktab.KeyTab takeSnapshot() {
+ return sun.security.krb5.internal.ktab.KeyTab.getInstance(file);
+ }
+
+ /**
+ * Returns fresh keys for the given Kerberos principal.
+ * <p>
+ * Implementation of this method should make sure the returned keys match
+ * the latest content of the keytab file. The result is a newly created
+ * copy that can be modified by the caller without modifying the keytab
+ * object. The caller should {@link KerberosKey#destroy() destroy} the
+ * result keys after they are used.
+ * <p>
+ * Please note that the keytab file can be created after the
+ * {@code KeyTab} object is instantiated and its content may change over
+ * time. Therefore, an application should call this method only when it
+ * needs to use the keys. Any previous result from an earlier invocation
+ * could potentially be expired.
+ * <p>
+ * If there is any error (say, I/O error or format error)
+ * during the reading process of the KeyTab file, a saved result should be
+ * returned. If there is no saved result (say, this is the first time this
+ * method is called, or, all previous read attempts failed), an empty array
+ * should be returned. This can make sure the result is not drastically
+ * changed during the (probably slow) update of the keytab file.
+ * <p>
+ * Each time this method is called and the reading of the file succeeds
+ * with no exception (say, I/O error or file format error),
+ * the result should be saved for {@code principal}. The implementation can
+ * also save keys for other principals having keys in the same keytab object
+ * if convenient.
+ * <p>
+ * Any unsupported key read from the keytab is ignored and not included
+ * in the result.
+ *
+ * @param principal the Kerberos principal, must not be null.
+ * @return the keys (never null, may be empty)
+ * @throws NullPointerException if the {@code principal}
+ * argument is null
+ * @throws SecurityException if a security manager exists and the read
+ * access to the keytab file is not permitted
+ */
+ public KerberosKey[] getKeys(KerberosPrincipal principal) {
+ try {
+ EncryptionKey[] keys = takeSnapshot().readServiceKeys(
+ new PrincipalName(principal.getName()));
+ KerberosKey[] kks = new KerberosKey[keys.length];
+ for (int i=0; i<kks.length; i++) {
+ Integer tmp = keys[i].getKeyVersionNumber();
+ kks[i] = new KerberosKey(
+ principal,
+ keys[i].getBytes(),
+ keys[i].getEType(),
+ tmp == null ? 0 : tmp.intValue());
+ keys[i].destroy();
+ }
+ return kks;
+ } catch (RealmException re) {
+ return new KerberosKey[0];
+ }
+ }
+
+ EncryptionKey[] getEncryptionKeys(PrincipalName principal) {
+ return takeSnapshot().readServiceKeys(principal);
+ }
+
+ /**
+ * Checks if the keytab file exists. Implementation of this method
+ * should make sure that the result matches the latest status of the
+ * keytab file.
+ * <p>
+ * The caller can use the result to determine if it should fallback to
+ * another mechanism to read the keys.
+ * @return true if the keytab file exists; false otherwise.
+ * @throws SecurityException if a security manager exists and the read
+ * access to the keytab file is not permitted
+ */
+ public boolean exists() {
+ return !takeSnapshot().isMissing();
+ }
+
+ public String toString() {
+ return file == null ? "Default keytab" : file.toString();
+ }
+
+ /**
+ * Returns a hashcode for this KeyTab.
+ *
+ * @return a hashCode() for the <code>KeyTab</code>
+ */
+ public int hashCode() {
+ return Objects.hash(file);
+ }
+
+ /**
+ * Compares the specified Object with this KeyTab for equality.
+ * Returns true if the given object is also a
+ * <code>KeyTab</code> and the two
+ * <code>KeyTab</code> instances are equivalent.
+ *
+ * @param other the Object to compare to
+ * @return true if the specified object is equal to this KeyTab
+ */
+ public boolean equals(Object other) {
+ if (other == this)
+ return true;
+
+ if (! (other instanceof KeyTab)) {
+ return false;
+ }
+
+ KeyTab otherKtab = (KeyTab) other;
+ return Objects.equals(otherKtab.file, file);
+ }
+}
--- a/jdk/src/share/classes/sun/awt/FontDescriptor.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/awt/FontDescriptor.java Tue May 03 22:16:58 2011 -0700
@@ -26,6 +26,7 @@
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
+import java.nio.charset.StandardCharset;
import sun.nio.cs.HistoricallyNamedCharset;
public class FontDescriptor implements Cloneable {
@@ -104,8 +105,8 @@
if (useUnicode && unicodeEncoder == null) {
try {
this.unicodeEncoder = isLE?
- Charset.forName("UTF_16LE").newEncoder():
- Charset.forName("UTF_16BE").newEncoder();
+ StandardCharset.UTF_16LE.newEncoder():
+ StandardCharset.UTF_16BE.newEncoder();
} catch (IllegalArgumentException x) {}
}
return useUnicode;
--- a/jdk/src/share/classes/sun/misc/FloatingDecimal.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/misc/FloatingDecimal.java Tue May 03 22:16:58 2011 -0700
@@ -30,7 +30,7 @@
import sun.misc.FloatConsts;
import java.util.regex.*;
-public strictfp class FloatingDecimal{
+public class FloatingDecimal{
boolean isExceptional;
boolean isNegative;
int decExponent;
@@ -239,8 +239,7 @@
* More difficult if subtracting and the argument
* is a normalized a power of 2, as the ULP changes at these points.
*/
- private static double
- ulp( double dval, boolean subtracting ){
+ private static double ulp( double dval, boolean subtracting ){
long lbits = Double.doubleToLongBits( dval ) & ~signMask;
int binexp = (int)(lbits >>> expShift);
double ulpval;
@@ -1251,8 +1250,7 @@
* for a single-precision float.
*/
- public double
- doubleValue(){
+ public strictfp double doubleValue(){
int kDigits = Math.min( nDigits, maxDecimalDigits+1 );
long lValue;
double dValue;
@@ -1611,8 +1609,7 @@
* ( because of the preference to a zero low-order bit ).
*/
- public float
- floatValue(){
+ public strictfp float floatValue(){
int kDigits = Math.min( nDigits, singleMaxDecimalDigits+1 );
int iValue;
float fValue;
--- a/jdk/src/share/classes/sun/misc/FormattedFloatingDecimal.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/misc/FormattedFloatingDecimal.java Tue May 03 22:16:58 2011 -0700
@@ -30,7 +30,7 @@
import sun.misc.FloatConsts;
import java.util.regex.*;
-public strictfp class FormattedFloatingDecimal{
+public class FormattedFloatingDecimal{
boolean isExceptional;
boolean isNegative;
int decExponent; // value set at construction, then immutable
@@ -247,8 +247,7 @@
* More difficult if subtracting and the argument
* is a normalized a power of 2, as the ULP changes at these points.
*/
- private static double
- ulp( double dval, boolean subtracting ){
+ private static double ulp( double dval, boolean subtracting ){
long lbits = Double.doubleToLongBits( dval ) & ~signMask;
int binexp = (int)(lbits >>> expShift);
double ulpval;
@@ -1157,8 +1156,7 @@
* for a single-precision float.
*/
- public double
- doubleValue(){
+ public strictfp double doubleValue(){
int kDigits = Math.min( nDigits, maxDecimalDigits+1 );
long lValue;
double dValue;
@@ -1517,8 +1515,7 @@
* ( because of the preference to a zero low-order bit ).
*/
- public float
- floatValue(){
+ public strictfp float floatValue(){
int kDigits = Math.min( nDigits, singleMaxDecimalDigits+1 );
int iValue;
float fValue;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/misc/JavaxSecurityAuthKerberosAccess.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.misc;
+
+import javax.security.auth.kerberos.KeyTab;
+import sun.security.krb5.EncryptionKey;
+import sun.security.krb5.PrincipalName;
+
+/**
+ * An unsafe tunnel to get non-public access to classes in the
+ * javax.security.auth.kerberos package.
+ */
+public interface JavaxSecurityAuthKerberosAccess {
+ /**
+ * Returns keys for a principal in a keytab.
+ * @return the keys, never null, can be empty.
+ */
+ public EncryptionKey[] keyTabGetEncryptionKeys(
+ KeyTab ktab, PrincipalName principal);
+}
--- a/jdk/src/share/classes/sun/misc/SharedSecrets.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/misc/SharedSecrets.java Tue May 03 22:16:58 2011 -0700
@@ -29,6 +29,7 @@
import java.io.Console;
import java.io.FileDescriptor;
import java.security.ProtectionDomain;
+import javax.security.auth.kerberos.KeyTab;
import java.security.AccessController;
@@ -51,6 +52,7 @@
private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
private static JavaSecurityAccess javaSecurityAccess;
+ private static JavaxSecurityAuthKerberosAccess javaxSecurityAuthKerberosAccess;
public static JavaUtilJarAccess javaUtilJarAccess() {
if (javaUtilJarAccess == null) {
@@ -139,4 +141,16 @@
}
return javaSecurityAccess;
}
+
+ public static void setJavaxSecurityAuthKerberosAccess
+ (JavaxSecurityAuthKerberosAccess jsaka) {
+ javaxSecurityAuthKerberosAccess = jsaka;
+ }
+
+ public static JavaxSecurityAuthKerberosAccess
+ getJavaxSecurityAuthKerberosAccess() {
+ if (javaxSecurityAuthKerberosAccess == null)
+ unsafe.ensureClassInitialized(KeyTab.class);
+ return javaxSecurityAuthKerberosAccess;
+ }
}
--- a/jdk/src/share/classes/sun/nio/cs/UTF_8.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/nio/cs/UTF_8.java Tue May 03 22:16:58 2011 -0700
@@ -32,6 +32,7 @@
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CoderResult;
+import java.nio.charset.CodingErrorAction;
/* Legal UTF-8 Byte Sequences
*
@@ -77,7 +78,8 @@
dst.position(dp - dst.arrayOffset());
}
- private static class Decoder extends CharsetDecoder {
+ private static class Decoder extends CharsetDecoder
+ implements ArrayDecoder {
private Decoder(Charset cs) {
super(cs, 1.0f, 1.0f);
}
@@ -353,9 +355,132 @@
else
return decodeBufferLoop(src, dst);
}
+
+ private static ByteBuffer getByteBuffer(ByteBuffer bb, byte[] ba, int sp)
+ {
+ if (bb == null)
+ bb = ByteBuffer.wrap(ba);
+ bb.position(sp);
+ return bb;
+ }
+
+ // returns -1 if there is malformed byte(s) and the
+ // "action" for malformed input is not REPLACE.
+ public int decode(byte[] sa, int sp, int len, char[] da) {
+ final int sl = sp + len;
+ int dp = 0;
+ int dlASCII = Math.min(len, da.length);
+ ByteBuffer bb = null; // only necessary if malformed
+
+ // ASCII only optimized loop
+ while (dp < dlASCII && sa[sp] >= 0)
+ da[dp++] = (char) sa[sp++];
+
+ while (sp < sl) {
+ int b1 = sa[sp++];
+ if (b1 >= 0) {
+ // 1 byte, 7 bits: 0xxxxxxx
+ da[dp++] = (char) b1;
+ } else if ((b1 >> 5) == -2) {
+ // 2 bytes, 11 bits: 110xxxxx 10xxxxxx
+ if (sp < sl) {
+ int b2 = sa[sp++];
+ if (isMalformed2(b1, b2)) {
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ sp--; // malformedN(bb, 2) always returns 1
+ } else {
+ da[dp++] = (char) (((b1 << 6) ^ b2)^
+ (((byte) 0xC0 << 6) ^
+ ((byte) 0x80 << 0)));
+ }
+ continue;
+ }
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ return dp;
+ } else if ((b1 >> 4) == -2) {
+ // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx
+ if (sp + 1 < sl) {
+ int b2 = sa[sp++];
+ int b3 = sa[sp++];
+ if (isMalformed3(b1, b2, b3)) {
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ sp -=3;
+ bb = getByteBuffer(bb, sa, sp);
+ sp += malformedN(bb, 3).length();
+ } else {
+ da[dp++] = (char)((b1 << 12) ^
+ (b2 << 6) ^
+ (b3 ^
+ (((byte) 0xE0 << 12) ^
+ ((byte) 0x80 << 6) ^
+ ((byte) 0x80 << 0))));
+ }
+ continue;
+ }
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ return dp;
+ } else if ((b1 >> 3) == -2) {
+ // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+ if (sp + 2 < sl) {
+ int b2 = sa[sp++];
+ int b3 = sa[sp++];
+ int b4 = sa[sp++];
+ int uc = ((b1 << 18) ^
+ (b2 << 12) ^
+ (b3 << 6) ^
+ (b4 ^
+ (((byte) 0xF0 << 18) ^
+ ((byte) 0x80 << 12) ^
+ ((byte) 0x80 << 6) ^
+ ((byte) 0x80 << 0))));
+ if (isMalformed4(b2, b3, b4) ||
+ // shortest form check
+ !Character.isSupplementaryCodePoint(uc)) {
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ sp -= 4;
+ bb = getByteBuffer(bb, sa, sp);
+ sp += malformedN(bb, 4).length();
+ } else {
+ da[dp++] = Character.highSurrogate(uc);
+ da[dp++] = Character.lowSurrogate(uc);
+ }
+ continue;
+ }
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ return dp;
+ } else {
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement().charAt(0);
+ sp--;
+ bb = getByteBuffer(bb, sa, sp);
+ CoderResult cr = malformedN(bb, 1);
+ if (!cr.isError()) {
+ // leading byte for 5 or 6-byte, but don't have enough
+ // bytes in buffer to check. Consumed rest as malformed.
+ return dp;
+ }
+ sp += cr.length();
+ }
+ }
+ return dp;
+ }
}
- private static class Encoder extends CharsetEncoder {
+ private static class Encoder extends CharsetEncoder
+ implements ArrayEncoder {
private Encoder(Charset cs) {
super(cs, 1.1f, 3.0f);
@@ -495,5 +620,50 @@
else
return encodeBufferLoop(src, dst);
}
+
+ // returns -1 if there is malformed char(s) and the
+ // "action" for malformed input is not REPLACE.
+ public int encode(char[] sa, int sp, int len, byte[] da) {
+ int sl = sp + len;
+ int dp = 0;
+ int dlASCII = dp + Math.min(len, da.length);
+
+ // ASCII only optimized loop
+ while (dp < dlASCII && sa[sp] < '\u0080')
+ da[dp++] = (byte) sa[sp++];
+
+ while (sp < sl) {
+ char c = sa[sp++];
+ if (c < 0x80) {
+ // Have at most seven bits
+ da[dp++] = (byte)c;
+ } else if (c < 0x800) {
+ // 2 bytes, 11 bits
+ da[dp++] = (byte)(0xc0 | (c >> 6));
+ da[dp++] = (byte)(0x80 | (c & 0x3f));
+ } else if (Character.isSurrogate(c)) {
+ if (sgp == null)
+ sgp = new Surrogate.Parser();
+ int uc = sgp.parse(c, sa, sp - 1, sl);
+ if (uc < 0) {
+ if (malformedInputAction() != CodingErrorAction.REPLACE)
+ return -1;
+ da[dp++] = replacement()[0];
+ } else {
+ da[dp++] = (byte)(0xf0 | ((uc >> 18)));
+ da[dp++] = (byte)(0x80 | ((uc >> 12) & 0x3f));
+ da[dp++] = (byte)(0x80 | ((uc >> 6) & 0x3f));
+ da[dp++] = (byte)(0x80 | (uc & 0x3f));
+ sp++; // 2 chars
+ }
+ } else {
+ // 3 bytes, 16 bits
+ da[dp++] = (byte)(0xe0 | ((c >> 12)));
+ da[dp++] = (byte)(0x80 | ((c >> 6) & 0x3f));
+ da[dp++] = (byte)(0x80 | (c & 0x3f));
+ }
+ }
+ return dp;
+ }
}
}
--- a/jdk/src/share/classes/sun/rmi/log/ReliableLog.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/rmi/log/ReliableLog.java Tue May 03 22:16:58 2011 -0700
@@ -380,9 +380,7 @@
} catch (IOException e) {
throw e;
} catch (Exception e) {
- throw new IOException("snapshot failed with exception of type: " +
- e.getClass().getName() +
- ", message was: " + e.getMessage());
+ throw new IOException("snapshot failed", e);
}
lastSnapshot = System.currentTimeMillis();
} finally {
--- a/jdk/src/share/classes/sun/rmi/server/Activation.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/rmi/server/Activation.java Tue May 03 22:16:58 2011 -0700
@@ -30,6 +30,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
@@ -98,6 +99,7 @@
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import sun.rmi.log.LogHandler;
import sun.rmi.log.ReliableLog;
import sun.rmi.registry.RegistryImpl;
@@ -147,10 +149,10 @@
/** maps activation id to its respective group id */
private Map<ActivationID,ActivationGroupID> idTable =
- new HashMap<ActivationID,ActivationGroupID>();
+ new ConcurrentHashMap<>();
/** maps group id to its GroupEntry groups */
private Map<ActivationGroupID,GroupEntry> groupTable =
- new HashMap<ActivationGroupID,GroupEntry>();
+ new ConcurrentHashMap<>();
private byte majorVersion = MAJOR_VERSION;
private byte minorVersion = MINOR_VERSION;
@@ -236,9 +238,11 @@
groupSemaphore = getInt("sun.rmi.activation.groupThrottle", 3);
groupCounter = 0;
Runtime.getRuntime().addShutdownHook(shutdownHook);
+
+ // Use array size of 0, since the value from calling size()
+ // may be out of date by the time toArray() is called.
ActivationGroupID[] gids =
- groupTable.keySet().toArray(
- new ActivationGroupID[groupTable.size()]);
+ groupTable.keySet().toArray(new ActivationGroupID[0]);
synchronized (startupLock = new Object()) {
// all the remote methods briefly synchronize on startupLock
@@ -274,6 +278,23 @@
}
}
+ /**
+ * Previous versions used HashMap instead of ConcurrentHashMap.
+ * Replace any HashMaps found during deserialization with
+ * ConcurrentHashMaps.
+ */
+ private void readObject(ObjectInputStream ois)
+ throws IOException, ClassNotFoundException
+ {
+ ois.defaultReadObject();
+ if (! (groupTable instanceof ConcurrentHashMap)) {
+ groupTable = new ConcurrentHashMap<>(groupTable);
+ }
+ if (! (idTable instanceof ConcurrentHashMap)) {
+ idTable = new ConcurrentHashMap<>(idTable);
+ }
+ }
+
private static class SystemRegistryImpl extends RegistryImpl {
private static final String NAME = ActivationSystem.class.getName();
@@ -488,9 +509,7 @@
ActivationGroupID id = new ActivationGroupID(systemStub);
GroupEntry entry = new GroupEntry(id, desc);
// table insertion must take place before log update
- synchronized (groupTable) {
- groupTable.put(id, entry);
- }
+ groupTable.put(id, entry);
addLogRecord(new LogRegisterGroup(id, desc));
return id;
}
@@ -515,11 +534,7 @@
// remove entry before unregister so state is updated before
// logged
- synchronized (groupTable) {
- GroupEntry entry = getGroupEntry(id);
- groupTable.remove(id);
- entry.unregisterGroup(true);
- }
+ removeGroupEntry(id).unregisterGroup(true);
}
public ActivationDesc setActivationDesc(ActivationID id,
@@ -637,12 +652,7 @@
unexport(system);
// destroy all child processes (groups)
- GroupEntry[] groupEntries;
- synchronized (groupTable) {
- groupEntries = groupTable.values().
- toArray(new GroupEntry[groupTable.size()]);
- }
- for (GroupEntry groupEntry : groupEntries) {
+ for (GroupEntry groupEntry : groupTable.values()) {
groupEntry.shutdown();
}
@@ -693,10 +703,8 @@
}
// destroy all child processes (groups) quickly
- synchronized (groupTable) {
- for (GroupEntry groupEntry : groupTable.values()) {
- groupEntry.shutdownFast();
- }
+ for (GroupEntry groupEntry : groupTable.values()) {
+ groupEntry.shutdownFast();
}
}
}
@@ -708,13 +716,32 @@
private ActivationGroupID getGroupID(ActivationID id)
throws UnknownObjectException
{
- synchronized (idTable) {
- ActivationGroupID groupID = idTable.get(id);
- if (groupID != null) {
- return groupID;
+ ActivationGroupID groupID = idTable.get(id);
+ if (groupID != null) {
+ return groupID;
+ }
+ throw new UnknownObjectException("unknown object: " + id);
+ }
+
+ /**
+ * Returns the group entry for the group id, optionally removing it.
+ * Throws UnknownGroupException if the group is not registered.
+ */
+ private GroupEntry getGroupEntry(ActivationGroupID id, boolean rm)
+ throws UnknownGroupException
+ {
+ if (id.getClass() == ActivationGroupID.class) {
+ GroupEntry entry;
+ if (rm) {
+ entry = groupTable.remove(id);
+ } else {
+ entry = groupTable.get(id);
+ }
+ if (entry != null && !entry.removed) {
+ return entry;
}
}
- throw new UnknownObjectException("unknown object: " + id);
+ throw new UnknownGroupException("group unknown");
}
/**
@@ -724,15 +751,17 @@
private GroupEntry getGroupEntry(ActivationGroupID id)
throws UnknownGroupException
{
- if (id.getClass() == ActivationGroupID.class) {
- synchronized (groupTable) {
- GroupEntry entry = groupTable.get(id);
- if (entry != null && !entry.removed) {
- return entry;
- }
- }
- }
- throw new UnknownGroupException("group unknown");
+ return getGroupEntry(id, false);
+ }
+
+ /**
+ * Removes and returns the group entry for the group id. Throws
+ * UnknownGroupException if the group is not registered.
+ */
+ private GroupEntry removeGroupEntry(ActivationGroupID id)
+ throws UnknownGroupException
+ {
+ return getGroupEntry(id, true);
}
/**
@@ -744,11 +773,9 @@
throws UnknownObjectException
{
ActivationGroupID gid = getGroupID(id);
- synchronized (groupTable) {
- GroupEntry entry = groupTable.get(gid);
- if (entry != null) {
- return entry;
- }
+ GroupEntry entry = groupTable.get(gid);
+ if (entry != null && !entry.removed) {
+ return entry;
}
throw new UnknownObjectException("object's group removed");
}
@@ -882,9 +909,7 @@
}
// table insertion must take place before log update
- synchronized (idTable) {
- idTable.put(id, groupID);
- }
+ idTable.put(id, groupID);
if (addRecord) {
addLogRecord(new LogRegisterObject(id, desc));
@@ -901,10 +926,8 @@
restartSet.remove(id);
}
- // table insertion must take place before log update
- synchronized (idTable) {
- idTable.remove(id);
- }
+ // table removal must take place before log update
+ idTable.remove(id);
if (addRecord) {
addLogRecord(new LogUnregisterObject(id));
}
@@ -919,9 +942,7 @@
objects.entrySet())
{
ActivationID id = entry.getKey();
- synchronized (idTable) {
- idTable.remove(id);
- }
+ idTable.remove(id);
ObjectEntry objEntry = entry.getValue();
objEntry.removed = true;
}
--- a/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/ec/ECKeyPairGenerator.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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
@@ -121,15 +121,16 @@
}
random.nextBytes(seed);
- long[] handles = generateECKeyPair(keySize, encodedParams, seed);
+ try {
- // The 'params' object supplied above is equivalent to the native one
- // so there is no need to fetch it.
+ long[] handles = generateECKeyPair(keySize, encodedParams, seed);
- // handles[0] points to the native private key
- BigInteger s = new BigInteger(1, getEncodedBytes(handles[0]));
+ // The 'params' object supplied above is equivalent to the native
+ // one so there is no need to fetch it.
- try {
+ // handles[0] points to the native private key
+ BigInteger s = new BigInteger(1, getEncodedBytes(handles[0]));
+
PrivateKey privateKey =
new ECPrivateKeyImpl(s, (ECParameterSpec)params);
@@ -163,7 +164,7 @@
* The first handle points to the private key, the second to the public key.
*/
private static native long[] generateECKeyPair(int keySize,
- byte[] encodedParams, byte[] seed);
+ byte[] encodedParams, byte[] seed) throws GeneralSecurityException;
/*
* Extracts the encoded key data using the supplied handle.
--- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5AcceptCredential.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5AcceptCredential.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,6 @@
import sun.security.jgss.GSSCaller;
import sun.security.jgss.spi.*;
import sun.security.krb5.*;
-import javax.security.auth.kerberos.*;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.security.AccessController;
@@ -43,40 +42,23 @@
* @since 1.4
*/
public class Krb5AcceptCredential
- extends KerberosKey
implements Krb5CredElement {
private static final long serialVersionUID = 7714332137352567952L;
private Krb5NameElement name;
- /**
- * We cache an EncryptionKey representation of this key because many
- * Krb5 operation require a key in that form. At some point we might do
- * away with EncryptionKey altogether and use the base class
- * KerberosKey everywhere.
- */
- private EncryptionKey[] krb5EncryptionKeys;
+ private Krb5Util.ServiceCreds screds;
- private Krb5AcceptCredential(Krb5NameElement name, KerberosKey[] keys) {
+ private Krb5AcceptCredential(Krb5NameElement name, Krb5Util.ServiceCreds creds) {
/*
* Initialize this instance with the data from the acquired
* KerberosKey. This class needs to be a KerberosKey too
* hence we can't just store a reference.
*/
- super(keys[0].getPrincipal(),
- keys[0].getEncoded(),
- keys[0].getKeyType(),
- keys[0].getVersionNumber());
this.name = name;
- // Cache this for later use by the sun.security.krb5 package.
- krb5EncryptionKeys = new EncryptionKey[keys.length];
- for (int i = 0; i < keys.length; i++) {
- krb5EncryptionKeys[i] = new EncryptionKey(keys[i].getEncoded(),
- keys[i].getKeyType(),
- new Integer(keys[i].getVersionNumber()));
- }
+ this.screds = creds;
}
static Krb5AcceptCredential getInstance(final GSSCaller caller, Krb5NameElement name)
@@ -86,12 +68,12 @@
name.getKrb5PrincipalName().getName());
final AccessControlContext acc = AccessController.getContext();
- KerberosKey[] keys;
+ Krb5Util.ServiceCreds creds = null;
try {
- keys = AccessController.doPrivileged(
- new PrivilegedExceptionAction<KerberosKey[]>() {
- public KerberosKey[] run() throws Exception {
- return Krb5Util.getKeys(
+ creds = AccessController.doPrivileged(
+ new PrivilegedExceptionAction<Krb5Util.ServiceCreds>() {
+ public Krb5Util.ServiceCreds run() throws Exception {
+ return Krb5Util.getServiceCreds(
caller == GSSCaller.CALLER_UNKNOWN ? GSSCaller.CALLER_ACCEPT: caller,
serverPrinc, acc);
}});
@@ -103,17 +85,17 @@
throw ge;
}
- if (keys == null || keys.length == 0)
+ if (creds == null)
throw new GSSException(GSSException.NO_CRED, -1,
- "Failed to find any Kerberos Key");
+ "Failed to find any Kerberos credentails");
if (name == null) {
- String fullName = keys[0].getPrincipal().getName();
+ String fullName = creds.getName();
name = Krb5NameElement.getInstance(fullName,
Krb5MechFactory.NT_GSS_KRB5_PRINCIPAL);
}
- return new Krb5AcceptCredential(name, keys);
+ return new Krb5AcceptCredential(name, creds);
}
/**
@@ -171,7 +153,7 @@
}
EncryptionKey[] getKrb5EncryptionKeys() {
- return krb5EncryptionKeys;
+ return screds.getEKeys();
}
/**
@@ -193,13 +175,6 @@
* destroy in the base class.
*/
public void destroy() throws DestroyFailedException {
- if (krb5EncryptionKeys != null) {
- for (int i = 0; i < krb5EncryptionKeys.length; i++) {
- krb5EncryptionKeys[i].destroy();
- }
- krb5EncryptionKeys = null;
- }
-
- super.destroy();
+ screds.destroy();
}
}
--- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Util.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5Util.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -28,6 +28,7 @@
import javax.security.auth.kerberos.KerberosTicket;
import javax.security.auth.kerberos.KerberosKey;
import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KeyTab;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginException;
import java.security.AccessControlContext;
@@ -38,7 +39,13 @@
import sun.security.krb5.EncryptionKey;
import sun.security.krb5.KrbException;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import sun.misc.SharedSecrets;
+import sun.security.krb5.PrincipalName;
/**
* Utilities for obtaining and converting Kerberos tickets.
*
@@ -75,7 +82,7 @@
// 1. Try to find service ticket in acc subject
Subject accSubj = Subject.getSubject(acc);
- KerberosTicket ticket = (KerberosTicket) SubjectComber.find(accSubj,
+ KerberosTicket ticket = SubjectComber.find(accSubj,
serverPrincipal, clientPrincipal, KerberosTicket.class);
if (ticket != null) {
@@ -87,7 +94,7 @@
// 2. Try to get ticket from login
try {
loginSubj = GSSUtil.login(caller, GSSUtil.GSS_KRB5_MECH_OID);
- ticket = (KerberosTicket) SubjectComber.find(loginSubj,
+ ticket = SubjectComber.find(loginSubj,
serverPrincipal, clientPrincipal, KerberosTicket.class);
if (ticket != null) {
return ticket; // found it
@@ -102,13 +109,13 @@
// Try to get TGT to acquire service ticket
// 3. Try to get TGT from acc subject
- KerberosTicket tgt = (KerberosTicket) SubjectComber.find(accSubj,
+ KerberosTicket tgt = SubjectComber.find(accSubj,
tgsPrincipal, clientPrincipal, KerberosTicket.class);
boolean fromAcc;
if (tgt == null && loginSubj != null) {
// 4. Try to get TGT from login subject
- tgt = (KerberosTicket) SubjectComber.find(loginSubj,
+ tgt = SubjectComber.find(loginSubj,
tgsPrincipal, clientPrincipal, KerberosTicket.class);
fromAcc = false;
} else {
@@ -145,14 +152,14 @@
// Try to get ticket from acc's Subject
Subject accSubj = Subject.getSubject(acc);
- KerberosTicket ticket = (KerberosTicket)
+ KerberosTicket ticket =
SubjectComber.find(accSubj, serverPrincipal, clientPrincipal,
KerberosTicket.class);
// Try to get ticket from Subject obtained from GSSUtil
if (ticket == null && !GSSUtil.useSubjectCredsOnly(caller)) {
Subject subject = GSSUtil.login(caller, GSSUtil.GSS_KRB5_MECH_OID);
- ticket = (KerberosTicket) SubjectComber.find(subject,
+ ticket = SubjectComber.find(subject,
serverPrincipal, clientPrincipal, KerberosTicket.class);
}
return ticket;
@@ -182,37 +189,152 @@
return subject;
}
+ // A special KerberosKey, used as keys read from a KeyTab object.
+ // Each time new keys are read from KeyTab objects in the private
+ // credentials set, old ones are removed and new ones added.
+ public static class KeysFromKeyTab extends KerberosKey {
+ public KeysFromKeyTab(KerberosKey key) {
+ super(key.getPrincipal(), key.getEncoded(),
+ key.getKeyType(), key.getVersionNumber());
+ }
+ }
+
/**
- * Retrieves the keys for the specified server principal from
- * the Subject in the specified AccessControlContext.
- * If the ticket can not be found in the Subject, and if
- * useSubjectCredsOnly is false, then obtain keys from
- * a LoginContext.
+ * Credentials of a service, the private secret to authenticate its
+ * identity, which can be:
+ * 1. Some KerberosKeys (generated from password)
+ * 2. A KeyTab (for a typical service)
+ * 3. A TGT (for a user2user service. Not supported yet)
*
- * NOTE: This method is used by JSSE Kerberos Cipher Suites
+ * Note that some creds can coexist. For example, a user2user service
+ * can use its keytab (or keys) if the client can successfully obtain a
+ * normal service ticket, otherwise, it can uses the TGT (actually, the
+ * session key of the TGT) if the client can only acquire a service ticket
+ * of ENC-TKT-IN-SKEY style.
*/
- public static KerberosKey[] getKeys(GSSCaller caller,
+ public static class ServiceCreds {
+ private KerberosPrincipal kp;
+ private List<KeyTab> ktabs;
+ private List<KerberosKey> kk;
+ private Subject subj;
+ //private KerberosTicket tgt; // user2user, not supported yet
+
+ private static ServiceCreds getInstance(
+ Subject subj, String serverPrincipal) {
+
+ ServiceCreds sc = new ServiceCreds();
+ sc.subj = subj;
+
+ for (KerberosPrincipal p: subj.getPrincipals(KerberosPrincipal.class)) {
+ if (serverPrincipal == null ||
+ p.getName().equals(serverPrincipal)) {
+ sc.kp = p;
+ serverPrincipal = p.getName();
+ break;
+ }
+ }
+ if (sc.kp == null) {
+ // Compatibility with old behavior: even when there is no
+ // KerberosPrincipal, we can find one from KerberosKeys
+ List<KerberosKey> keys = SubjectComber.findMany(
+ subj, null, null, KerberosKey.class);
+ if (!keys.isEmpty()) {
+ sc.kp = keys.get(0).getPrincipal();
+ serverPrincipal = sc.kp.getName();
+ if (DEBUG) {
+ System.out.println(">>> ServiceCreds: no kp?"
+ + " find one from kk: " + serverPrincipal);
+ }
+ } else {
+ return null;
+ }
+ }
+ sc.ktabs = SubjectComber.findMany(
+ subj, null, null, KeyTab.class);
+ sc.kk = SubjectComber.findMany(
+ subj, serverPrincipal, null, KerberosKey.class);
+ if (sc.ktabs.isEmpty() && sc.kk.isEmpty()) {
+ return null;
+ }
+ return sc;
+ }
+
+ public String getName() {
+ return kp.getName();
+ }
+
+ public KerberosKey[] getKKeys() {
+ if (ktabs.isEmpty()) {
+ return kk.toArray(new KerberosKey[kk.size()]);
+ } else {
+ List<KerberosKey> keys = new ArrayList<>();
+ for (KeyTab ktab: ktabs) {
+ for (KerberosKey k: ktab.getKeys(kp)) {
+ keys.add(k);
+ }
+ }
+ // Compatibility: also add keys to privCredSet. Remove old
+ // ones first, only remove those from keytab.
+ if (!subj.isReadOnly()) {
+ Set<Object> pcs = subj.getPrivateCredentials();
+ synchronized (pcs) {
+ Iterator<Object> iterator = pcs.iterator();
+ while (iterator.hasNext()) {
+ Object obj = iterator.next();
+ if (obj instanceof KeysFromKeyTab) {
+ KerberosKey key = (KerberosKey)obj;
+ if (Objects.equals(key.getPrincipal(), kp)) {
+ iterator.remove();
+ }
+ }
+ }
+ }
+ for (KerberosKey key: keys) {
+ subj.getPrivateCredentials().add(new KeysFromKeyTab(key));
+ }
+ }
+ return keys.toArray(new KerberosKey[keys.size()]);
+ }
+ }
+
+ public EncryptionKey[] getEKeys() {
+ KerberosKey[] kkeys = getKKeys();
+ EncryptionKey[] ekeys = new EncryptionKey[kkeys.length];
+ for (int i=0; i<ekeys.length; i++) {
+ ekeys[i] = new EncryptionKey(
+ kkeys[i].getEncoded(), kkeys[i].getKeyType(),
+ new Integer(kkeys[i].getVersionNumber()));
+ }
+ return ekeys;
+ }
+
+ public void destroy() {
+ kp = null;
+ ktabs = null;
+ kk = null;
+ }
+ }
+ /**
+ * Retrieves the ServiceCreds for the specified server principal from
+ * the Subject in the specified AccessControlContext. If not found, and if
+ * useSubjectCredsOnly is false, then obtain from a LoginContext.
+ *
+ * NOTE: This method is also used by JSSE Kerberos Cipher Suites
+ */
+ public static ServiceCreds getServiceCreds(GSSCaller caller,
String serverPrincipal, AccessControlContext acc)
throws LoginException {
Subject accSubj = Subject.getSubject(acc);
- List<KerberosKey> kkeys = (List<KerberosKey>)SubjectComber.findMany(
- accSubj, serverPrincipal, null, KerberosKey.class);
-
- if (kkeys == null && !GSSUtil.useSubjectCredsOnly(caller)) {
- Subject subject = GSSUtil.login(caller, GSSUtil.GSS_KRB5_MECH_OID);
- kkeys = (List<KerberosKey>) SubjectComber.findMany(subject,
- serverPrincipal, null, KerberosKey.class);
+ ServiceCreds sc = null;
+ if (accSubj != null) {
+ sc = ServiceCreds.getInstance(accSubj, serverPrincipal);
}
-
- int len;
- if (kkeys != null && (len = kkeys.size()) > 0) {
- KerberosKey[] keys = new KerberosKey[len];
- kkeys.toArray(keys);
- return keys;
- } else {
- return null;
+ if (sc == null && !GSSUtil.useSubjectCredsOnly(caller)) {
+ Subject subject = GSSUtil.login(caller, GSSUtil.GSS_KRB5_MECH_OID);
+ sc = ServiceCreds.getInstance(subject, serverPrincipal);
}
+ return sc;
}
public static KerberosTicket credsToTicket(Credentials serviceCreds) {
@@ -247,4 +369,17 @@
kerbTicket.getRenewTill(),
kerbTicket.getClientAddresses());
}
+
+ /**
+ * A helper method to get EncryptionKeys from a javax..KeyTab
+ * @param ktab the javax..KeyTab class
+ * @param cname the PrincipalName
+ * @return the EKeys, never null, might be empty
+ */
+ public static EncryptionKey[] keysFromJavaxKeyTab(
+ KeyTab ktab, PrincipalName cname) {
+ return SharedSecrets.getJavaxSecurityAuthKerberosAccess().
+ keyTabGetEncryptionKeys(ktab, cname);
+ }
+
}
--- a/jdk/src/share/classes/sun/security/jgss/krb5/SubjectComber.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/krb5/SubjectComber.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, 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
@@ -33,10 +33,11 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import javax.security.auth.kerberos.KeyTab;
/**
- * This utility looks through the current Subject and retrieves a ticket or key
- * for the desired client/server principals.
+ * This utility looks through the current Subject and retrieves private
+ * credentials for the desired client/server principals.
*
* @author Ram Marti
* @since 1.4.2
@@ -52,58 +53,70 @@
private SubjectComber() { // Cannot create one of these
}
- static Object find(Subject subject, String serverPrincipal,
- String clientPrincipal, Class credClass) {
+ static <T> T find(Subject subject, String serverPrincipal,
+ String clientPrincipal, Class<T> credClass) {
- return findAux(subject, serverPrincipal, clientPrincipal, credClass,
+ return (T)findAux(subject, serverPrincipal, clientPrincipal, credClass,
true);
}
- static Object findMany(Subject subject, String serverPrincipal,
- String clientPrincipal, Class credClass) {
+ static <T> List<T> findMany(Subject subject, String serverPrincipal,
+ String clientPrincipal, Class<T> credClass) {
- return findAux(subject, serverPrincipal, clientPrincipal, credClass,
+ return (List<T>)findAux(subject, serverPrincipal, clientPrincipal, credClass,
false);
}
/**
- * Find the ticket or key for the specified client/server principals
+ * Find private credentials for the specified client/server principals
* in the subject. Returns null if the subject is null.
*
- * @return the ticket or key
+ * @return the private credentials
*/
- private static Object findAux(Subject subject, String serverPrincipal,
- String clientPrincipal, Class credClass, boolean oneOnly) {
+ private static <T> Object findAux(Subject subject, String serverPrincipal,
+ String clientPrincipal, Class<T> credClass, boolean oneOnly) {
if (subject == null) {
return null;
} else {
- List<Object> answer = (oneOnly ? null : new ArrayList<Object>());
+ List<T> answer = (oneOnly ? null : new ArrayList<T>());
- if (credClass == KerberosKey.class) {
- // We are looking for a KerberosKey credentials for the
- // serverPrincipal
- Iterator<KerberosKey> iterator =
- subject.getPrivateCredentials(KerberosKey.class).iterator();
+ if (credClass == KeyTab.class) { // Principal un-related
+ // We are looking for credentials unrelated to serverPrincipal
+ Iterator<T> iterator =
+ subject.getPrivateCredentials(credClass).iterator();
while (iterator.hasNext()) {
- KerberosKey key = iterator.next();
- if (serverPrincipal == null ||
- serverPrincipal.equals(key.getPrincipal().getName())) {
+ T t = iterator.next();
+ if (DEBUG) {
+ System.out.println("Found " + credClass.getSimpleName());
+ }
+ if (oneOnly) {
+ return t;
+ } else {
+ answer.add(t);
+ }
+ }
+ } else if (credClass == KerberosKey.class) {
+ // We are looking for credentials for the serverPrincipal
+ Iterator<T> iterator =
+ subject.getPrivateCredentials(credClass).iterator();
+ while (iterator.hasNext()) {
+ T t = iterator.next();
+ String name = ((KerberosKey)t).getPrincipal().getName();
+ if (serverPrincipal == null || serverPrincipal.equals(name)) {
if (DEBUG) {
- System.out.println("Found key for "
- + key.getPrincipal() + "(" +
- key.getKeyType() + ")");
+ System.out.println("Found " +
+ credClass.getSimpleName() + " for " + name);
}
if (oneOnly) {
- return key;
+ return t;
} else {
if (serverPrincipal == null) {
// Record name so that keys returned will all
// belong to the same principal
- serverPrincipal =
- key.getPrincipal().getName();
+ serverPrincipal = name;
}
- answer.add(key);
+ answer.add(t);
}
}
}
@@ -167,7 +180,7 @@
serverPrincipal =
ticket.getServer().getName();
}
- answer.add(ticket);
+ answer.add((T)ticket);
}
}
}
--- a/jdk/src/share/classes/sun/security/jgss/spnego/NegTokenInit.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/spnego/NegTokenInit.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -152,75 +152,50 @@
"did not have the Sequence tag");
}
- // parse SEQUENCE of mechTypes, if present
- if (tmp1.data.available() > 0) {
+ // parse various fields if present
+ int lastField = -1;
+ while (tmp1.data.available() > 0) {
DerValue tmp2 = tmp1.data.getDerValue();
- if (!tmp2.isContextSpecific((byte)0x00)) {
- throw new IOException("SPNEGO NegoTokenInit : " +
- "did not have the right context tag for mechTypes");
- }
- // get the DER-encoded sequence of mechTypes
- DerInputStream mValue = tmp2.data;
- mechTypes = mValue.toByteArray();
+ if (tmp2.isContextSpecific((byte)0x00)) {
+ // get the DER-encoded sequence of mechTypes
+ lastField = checkNextField(lastField, 0);
+ DerInputStream mValue = tmp2.data;
+ mechTypes = mValue.toByteArray();
- // read all the mechTypes
- DerValue[] mList = mValue.getSequence(0);
- mechTypeList = new Oid[mList.length];
- ObjectIdentifier mech = null;
- for (int i = 0; i < mList.length; i++) {
- mech = mList[i].getOID();
+ // read all the mechTypes
+ DerValue[] mList = mValue.getSequence(0);
+ mechTypeList = new Oid[mList.length];
+ ObjectIdentifier mech = null;
+ for (int i = 0; i < mList.length; i++) {
+ mech = mList[i].getOID();
+ if (DEBUG) {
+ System.out.println("SpNegoToken NegTokenInit: " +
+ "reading Mechanism Oid = " + mech);
+ }
+ mechTypeList[i] = new Oid(mech.toString());
+ }
+ } else if (tmp2.isContextSpecific((byte)0x01)) {
+ lastField = checkNextField(lastField, 1);
+ // received reqFlags, skip it
+ } else if (tmp2.isContextSpecific((byte)0x02)) {
+ lastField = checkNextField(lastField, 2);
if (DEBUG) {
System.out.println("SpNegoToken NegTokenInit: " +
- "reading Mechanism Oid = " + mech);
+ "reading Mech Token");
}
- mechTypeList[i] = new Oid(mech.toString());
- }
- }
-
- // parse mechToken, if present (skip reqFlags)
- if (tmp1.data.available() > 0) {
- DerValue tmp3 = tmp1.data.getDerValue();
- if (tmp3.isContextSpecific((byte)0x01)) {
- // received reqFlags, skip it
- // now parse next field mechToken
- if (tmp1.data.available() > 0) {
- tmp3 = tmp1.data.getDerValue();
+ mechToken = tmp2.data.getOctetString();
+ } else if (tmp2.isContextSpecific((byte)0x03)) {
+ lastField = checkNextField(lastField, 3);
+ if (!GSSUtil.useMSInterop()) {
+ mechListMIC = tmp2.data.getOctetString();
+ if (DEBUG) {
+ System.out.println("SpNegoToken NegTokenInit: " +
+ "MechListMIC Token = " +
+ getHexBytes(mechListMIC));
+ }
}
}
- if (!tmp3.isContextSpecific((byte)0x02)) {
- throw new IOException("SPNEGO NegoTokenInit : " +
- "did not have the right context tag for mechToken");
- }
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenInit: " +
- "reading Mech Token");
- }
- mechToken = tmp3.data.getOctetString();
}
-
- // parse mechListMIC, if present and not in MS interop mode
- if (!GSSUtil.useMSInterop() && (tmp1.data.available() > 0)) {
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenInit: " +
- "receiving MechListMIC");
- }
- DerValue tmp6 = tmp1.data.getDerValue();
- if (!tmp6.isContextSpecific((byte)0x03)) {
- throw new IOException("SPNEGO NegoTokenInit : " +
- "did not have the right context tag for MICToken");
- }
- mechListMIC = tmp6.data.getOctetString();
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenInit: " +
- "MechListMIC Token = " + getHexBytes(mechListMIC));
- }
- } else {
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenInit : " +
- "no MIC token included");
- }
- }
-
} catch (IOException e) {
throw new GSSException(GSSException.DEFECTIVE_TOKEN, -1,
"Invalid SPNEGO NegTokenInit token : " + e.getMessage());
--- a/jdk/src/share/classes/sun/security/jgss/spnego/NegTokenTarg.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/spnego/NegTokenTarg.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -153,69 +153,40 @@
"did not have the Sequence tag");
}
- // parse negResult, if present
- if (tmp1.data.available() > 0) {
+ // parse various fields if present
+ int lastField = -1;
+ while (tmp1.data.available() > 0) {
DerValue tmp2 = tmp1.data.getDerValue();
- if (!tmp2.isContextSpecific((byte)0x00)) {
- throw new IOException("SPNEGO NegoTokenTarg : " +
- "did not have the right context tag for negResult");
- }
- negResult = tmp2.data.getEnumerated();
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenTarg: negotiated" +
- " result = " + getNegoResultString(negResult));
- }
- }
-
- // parse supportedMech, if present
- if (tmp1.data.available() > 0) {
- DerValue tmp3 = tmp1.data.getDerValue();
- if (!tmp3.isContextSpecific((byte)0x01)) {
- throw new IOException("SPNEGO NegoTokenTarg : " +
- "did not have the right context tag for supportedMech");
- }
- ObjectIdentifier mech = tmp3.data.getOID();
- supportedMech = new Oid(mech.toString());
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenTarg: " +
- "supported mechanism = " + supportedMech);
+ if (tmp2.isContextSpecific((byte)0x00)) {
+ lastField = checkNextField(lastField, 0);
+ negResult = tmp2.data.getEnumerated();
+ if (DEBUG) {
+ System.out.println("SpNegoToken NegTokenTarg: negotiated" +
+ " result = " + getNegoResultString(negResult));
+ }
+ } else if (tmp2.isContextSpecific((byte)0x01)) {
+ lastField = checkNextField(lastField, 1);
+ ObjectIdentifier mech = tmp2.data.getOID();
+ supportedMech = new Oid(mech.toString());
+ if (DEBUG) {
+ System.out.println("SpNegoToken NegTokenTarg: " +
+ "supported mechanism = " + supportedMech);
+ }
+ } else if (tmp2.isContextSpecific((byte)0x02)) {
+ lastField = checkNextField(lastField, 2);
+ responseToken = tmp2.data.getOctetString();
+ } else if (tmp2.isContextSpecific((byte)0x03)) {
+ lastField = checkNextField(lastField, 3);
+ if (!GSSUtil.useMSInterop()) {
+ mechListMIC = tmp2.data.getOctetString();
+ if (DEBUG) {
+ System.out.println("SpNegoToken NegTokenTarg: " +
+ "MechListMIC Token = " +
+ getHexBytes(mechListMIC));
+ }
+ }
}
}
-
- // parse ResponseToken, if present
- if (tmp1.data.available() > 0) {
- DerValue tmp4 = tmp1.data.getDerValue();
- if (!tmp4.isContextSpecific((byte)0x02)) {
- throw new IOException("SPNEGO NegoTokenTarg : did not" +
- " have the right context tag for response token");
- }
- responseToken = tmp4.data.getOctetString();
- }
-
- // parse mechListMIC if present and not in MS interop
- if (!GSSUtil.useMSInterop() && (tmp1.data.available() > 0)) {
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenTarg: " +
- "receiving MechListMIC");
- }
- DerValue tmp5 = tmp1.data.getDerValue();
- if (!tmp5.isContextSpecific((byte)0x03)) {
- throw new IOException("SPNEGO NegoTokenTarg : " +
- "did not have the right context tag for mechListMIC");
- }
- mechListMIC = tmp5.data.getOctetString();
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenTarg: " +
- "MechListMIC Token = " +
- getHexBytes(mechListMIC));
- }
- } else {
- if (DEBUG) {
- System.out.println("SpNegoToken NegTokenTarg : " +
- "no MIC token included");
- }
- }
-
} catch (IOException e) {
throw new GSSException(GSSException.DEFECTIVE_TOKEN, -1,
"Invalid SPNEGO NegTokenTarg token : " + e.getMessage());
--- a/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoToken.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/jgss/spnego/SpNegoToken.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -187,4 +187,21 @@
return ("Unknown Negotiated Result: " + result);
}
}
+
+ /**
+ * Checks if the context tag in a sequence is in correct order. The "last"
+ * value must be smaller than "current".
+ * @param last the last tag seen
+ * @param current the current tag
+ * @return the current tag, used as the next value for last
+ * @throws GSSException if there's a wrong order
+ */
+ static int checkNextField(int last, int current) throws GSSException {
+ if (last < current) {
+ return current;
+ } else {
+ throw new GSSException(GSSException.DEFECTIVE_TOKEN, -1,
+ "Invalid SpNegoToken token : wrong order");
+ }
+ }
}
--- a/jdk/src/share/classes/sun/security/krb5/Config.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/Config.java Tue May 03 22:16:58 2011 -0700
@@ -110,7 +110,6 @@
public static synchronized void refresh() throws KrbException {
singleton = new Config();
- KeyTab.refresh();
KdcComm.initStatic();
}
--- a/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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,8 +138,7 @@
* @returns an array of secret keys or null if none were found.
*/
public static EncryptionKey[] acquireSecretKeys(PrincipalName princ,
- String keytab)
- throws KrbException, IOException {
+ String keytab) {
if (princ == null)
throw new IllegalArgumentException(
@@ -148,11 +147,6 @@
// KeyTab getInstance(keytab) will call KeyTab.getInstance()
// if keytab is null
KeyTab ktab = KeyTab.getInstance(keytab);
-
- if (ktab == null) {
- return null;
- }
-
return ktab.readServiceKeys(princ);
}
--- a/jdk/src/share/classes/sun/security/krb5/KrbAsRep.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/KrbAsRep.java Tue May 03 22:16:58 2011 -0700
@@ -37,6 +37,8 @@
import sun.security.util.*;
import java.io.IOException;
import java.util.Objects;
+import javax.security.auth.kerberos.KeyTab;
+import sun.security.jgss.krb5.Krb5Util;
/**
* This class encapsulates a AS-REP message that the KDC sends to the
@@ -90,29 +92,32 @@
}
/**
- * Called by KrbAsReqBuilder to resolve a AS-REP message using keys.
- * @param keys user provided keys, not null
+ * Called by KrbAsReqBuilder to resolve a AS-REP message using a keytab.
+ * @param ktab the keytab, not null
* @param asReq the original AS-REQ sent, used to validate AS-REP
+ * @param cname the user principal name, used to locate keys in ktab
*/
- void decryptUsingKeys(EncryptionKey[] keys, KrbAsReq asReq)
+ void decryptUsingKeyTab(KeyTab ktab, KrbAsReq asReq, PrincipalName cname)
throws KrbException, Asn1Exception, IOException {
EncryptionKey dkey = null;
int encPartKeyType = rep.encPart.getEType();
Integer encPartKvno = rep.encPart.kvno;
- try {
- dkey = EncryptionKey.findKey(encPartKeyType, encPartKvno, keys);
- } catch (KrbException ke) {
- if (ke.returnCode() == Krb5.KRB_AP_ERR_BADKEYVER) {
- // Fallback to no kvno. In some cases, keytab is generated
- // not by sysadmin but Java's ktab command
- dkey = EncryptionKey.findKey(encPartKeyType, keys);
+ try {
+ dkey = EncryptionKey.findKey(encPartKeyType, encPartKvno,
+ Krb5Util.keysFromJavaxKeyTab(ktab, cname));
+ } catch (KrbException ke) {
+ if (ke.returnCode() == Krb5.KRB_AP_ERR_BADKEYVER) {
+ // Fallback to no kvno. In some cases, keytab is generated
+ // not by sysadmin but Java's ktab command
+ dkey = EncryptionKey.findKey(encPartKeyType,
+ Krb5Util.keysFromJavaxKeyTab(ktab, cname));
+ }
}
- }
- if (dkey == null) {
- throw new KrbException(Krb5.API_INVALID_ARG,
- "Cannot find key for type/kvno to decrypt AS REP - " +
- EType.toString(encPartKeyType) + "/" + encPartKvno);
- }
+ if (dkey == null) {
+ throw new KrbException(Krb5.API_INVALID_ARG,
+ "Cannot find key for type/kvno to decrypt AS REP - " +
+ EType.toString(encPartKeyType) + "/" + encPartKvno);
+ }
decrypt(dkey, asReq);
}
--- a/jdk/src/share/classes/sun/security/krb5/KrbAsReqBuilder.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/KrbAsReqBuilder.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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
@@ -27,6 +27,8 @@
import java.io.IOException;
import java.util.Arrays;
+import javax.security.auth.kerberos.KeyTab;
+import sun.security.jgss.krb5.Krb5Util;
import sun.security.krb5.internal.HostAddresses;
import sun.security.krb5.internal.KDCOptions;
import sun.security.krb5.internal.KRBError;
@@ -42,13 +44,16 @@
* 1. Gather information to create AS-REQ
* 2. Create and send AS-REQ
* 3. Receive AS-REP and KRB-ERROR (-KRB_ERR_RESPONSE_TOO_BIG) and parse them
- * 4. Emit credentials and secret keys (for JAAS storeKey=true)
+ * 4. Emit credentials and secret keys (for JAAS storeKey=true with password)
*
* This class does not:
* 1. Deal with real communications (KdcComm does it, and TGS-REQ)
* a. Name of KDCs for a realm
* b. Server availability, timeout, UDP or TCP
* d. KRB_ERR_RESPONSE_TOO_BIG
+ * 2. Stores its own copy of password, this means:
+ * a. Do not change/wipe it before Builder finish
+ * b. Builder will not wipe it for you
*
* With this class:
* 1. KrbAsReq has only one constructor
@@ -70,19 +75,17 @@
private HostAddresses addresses;
// Secret source: can't be changed once assigned, only one (of the two
- // sources) can be set and should be non-null
- private EncryptionKey[] keys;
- private char[] password;
+ // sources) can be set to non-null
+ private final char[] password;
+ private final KeyTab ktab;
// Used to create a ENC-TIMESTAMP in the 2nd AS-REQ
- private EncryptionKey pakey;
private PAData[] paList; // PA-DATA from both KRB-ERROR and AS-REP.
// Used by getKeys() only.
// Only AS-REP should be enough per RFC,
// combined in case etypes are different.
// The generated and received:
- int[] eTypes;
private KrbAsReq req;
private KrbAsRep rep;
@@ -94,7 +97,7 @@
private State state;
// Called by other constructors
- private KrbAsReqBuilder(PrincipalName cname)
+ private void init(PrincipalName cname)
throws KrbException {
if (cname.getRealm() == null) {
cname.setRealm(Config.getInstance().getDefaultRealm());
@@ -114,14 +117,11 @@
* This argument will neither be modified nor stored by the method.
* @throws KrbException
*/
- public KrbAsReqBuilder(PrincipalName cname, EncryptionKey[] keys)
+ public KrbAsReqBuilder(PrincipalName cname, KeyTab ktab)
throws KrbException {
- this(cname);
- this.keys = new EncryptionKey[keys.length];
- for (int i=0; i<keys.length; i++) {
- this.keys[i] = (EncryptionKey)keys[i].clone();
- }
- eTypes = EType.getDefaults("default_tkt_enctypes", keys);
+ init(cname);
+ this.ktab = ktab;
+ this.password = null;
}
/**
@@ -137,30 +137,24 @@
*/
public KrbAsReqBuilder(PrincipalName cname, char[] pass)
throws KrbException {
- this(cname);
+ init(cname);
this.password = pass.clone();
- eTypes = EType.getDefaults("default_tkt_enctypes");
+ this.ktab = null;
}
/**
- * Retrieves an array of secret keys for the client. This is useful if
+ * Retrieves an array of secret keys for the client. This is used when
* the client supplies password but need keys to act as an acceptor
* (in JAAS words, isInitiator=true and storeKey=true)
- * @return original keys if initiated with keys, or generated keys if
- * password. In latter case, PA-DATA from server might be used to
- * generate keys. All "default_tkt_enctypes" keys will be generated,
- * Never null.
+ * @return generated keys from password. PA-DATA from server might be used.
+ * All "default_tkt_enctypes" keys will be generated, Never null.
+ * @throws IllegalStateException if not constructed from a password
* @throws KrbException
*/
public EncryptionKey[] getKeys() throws KrbException {
checkState(State.REQ_OK, "Cannot get keys");
- if (keys != null) {
- EncryptionKey[] result = new EncryptionKey[keys.length];
- for (int i=0; i<keys.length; i++) {
- result[i] = (EncryptionKey)keys[i].clone();
- }
- return result;
- } else {
+ if (password != null) {
+ int[] eTypes = EType.getDefaults("default_tkt_enctypes");
EncryptionKey[] result = new EncryptionKey[eTypes.length];
/*
@@ -205,6 +199,8 @@
}
}
return result;
+ } else {
+ throw new IllegalStateException("Required password not provided");
}
}
@@ -241,12 +237,22 @@
/**
* Build a KrbAsReq object from all info fed above. Normally this method
* will be called twice: initial AS-REQ and second with pakey
+ * @param key null (initial AS-REQ) or pakey (with preauth)
* @return the KrbAsReq object
* @throws KrbException
* @throws IOException
*/
- private KrbAsReq build() throws KrbException, IOException {
- return new KrbAsReq(pakey,
+ private KrbAsReq build(EncryptionKey key) throws KrbException, IOException {
+ int[] eTypes;
+ if (password != null) {
+ eTypes = EType.getDefaults("default_tkt_enctypes");
+ } else {
+ EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
+ eTypes = EType.getDefaults("default_tkt_enctypes",
+ ks);
+ for (EncryptionKey k: ks) k.destroy();
+ }
+ return new KrbAsReq(key,
options,
cname,
sname,
@@ -263,9 +269,10 @@
* @throws Asn1Exception
* @throws IOException
*/
- private KrbAsReqBuilder resolve() throws KrbException, Asn1Exception, IOException {
- if (keys != null) {
- rep.decryptUsingKeys(keys, req);
+ private KrbAsReqBuilder resolve()
+ throws KrbException, Asn1Exception, IOException {
+ if (ktab != null) {
+ rep.decryptUsingKeyTab(ktab, req, cname);
} else {
rep.decryptUsingPassword(password, req, cname);
}
@@ -292,9 +299,10 @@
private KrbAsReqBuilder send() throws KrbException, IOException {
boolean preAuthFailedOnce = false;
KdcComm comm = new KdcComm(cname.getRealmAsString());
+ EncryptionKey pakey = null;
while (true) {
try {
- req = build();
+ req = build(pakey);
rep = new KrbAsRep(comm.send(req.encoding()));
return this;
} catch (KrbException ke) {
@@ -308,7 +316,10 @@
preAuthFailedOnce = true;
KRBError kerr = ke.getError();
if (password == null) {
- pakey = EncryptionKey.findKey(kerr.getEType(), keys);
+ EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
+ pakey = EncryptionKey.findKey(kerr.getEType(), ks);
+ if (pakey != null) pakey = (EncryptionKey)pakey.clone();
+ for (EncryptionKey k: ks) k.destroy();
} else {
PAData.SaltAndParams snp = PAData.getSaltAndParams(
kerr.getEType(), kerr.getPA());
@@ -317,7 +328,7 @@
// does not recommend this
pakey = EncryptionKey.acquireSecretKey(password,
snp.salt == null ? cname.getSalt() : snp.salt,
- eTypes[0],
+ EType.getDefaults("default_tkt_enctypes")[0],
null);
} else {
pakey = EncryptionKey.acquireSecretKey(password,
@@ -369,15 +380,8 @@
*/
public void destroy() {
state = State.DESTROYED;
- if (keys != null) {
- for (EncryptionKey k: keys) {
- k.destroy();
- }
- keys = null;
- }
if (password != null) {
Arrays.fill(password, (char)0);
- password = null;
}
}
--- a/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/ktab/KeyTab.java Tue May 03 22:16:58 2011 -0700
@@ -40,6 +40,7 @@
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.File;
+import java.io.FileNotFoundException;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
@@ -50,92 +51,138 @@
* This class represents key table. The key table functions deal with storing
* and retrieving service keys for use in authentication exchanges.
*
+ * A KeyTab object is always constructed, if the file specified does not
+ * exist, it's still valid but empty. If there is an I/O error or file format
+ * error, it's invalid.
+ *
+ * The class is immutable on the read side (the write side is only used by
+ * the ktab tool).
+ *
* @author Yanni Zhang
*/
public class KeyTab implements KeyTabConstants {
- int kt_vno;
- private static KeyTab singleton = null;
+
private static final boolean DEBUG = Krb5.DEBUG;
- private static String name;
+ private static String defaultTabName = null;
+
+ // Attention: Currently there is no way to remove a keytab from this map,
+ // this might lead to a memory leak.
+ private static Map<String,KeyTab> map = new HashMap<>();
+
+ // KeyTab file does not exist. Note: a missing keytab is still valid
+ private boolean isMissing = false;
+
+ // KeyTab file is invalid, possibly an I/O error or a file format error.
+ private boolean isValid = true;
+
+ private final String tabName;
+ private long lastModified;
+ private int kt_vno;
+
private Vector<KeyTabEntry> entries = new Vector<>();
- private KeyTab(String filename) throws IOException, RealmException {
- init(filename);
- }
-
- public static KeyTab getInstance(String s) {
- name = parse(s);
- if (name == null) {
- return getInstance();
+ /**
+ * Constructs a KeyTab object.
+ *
+ * If there is any I/O error or format errot during the loading, the
+ * isValid flag is set to false, and all half-read entries are dismissed.
+ * @param filename path name for the keytab file, must not be null
+ */
+ private KeyTab(String filename) {
+ tabName = filename;
+ try {
+ lastModified = new File(tabName).lastModified();
+ try (KeyTabInputStream kis =
+ new KeyTabInputStream(new FileInputStream(filename))) {
+ load(kis);
+ }
+ } catch (FileNotFoundException e) {
+ entries.clear();
+ isMissing = true;
+ } catch (Exception ioe) {
+ entries.clear();
+ isValid = false;
}
- return getInstance(new File(name));
}
/**
- * Gets the single instance of KeyTab class.
- * @param file the key tab file.
- * @return single instance of KeyTab;
- * return null if error occurs while reading data out of the file.
+ * Read a keytab file. Returns a new object and save it into cache when
+ * new content (modified since last read) is available. If keytab file is
+ * invalid, the old object will be returned. This is a safeguard for
+ * partial-written keytab files or non-stable network. Please note that
+ * a missing keytab is valid, which is equivalent to an empty keytab.
+ *
+ * @param s file name of keytab, must not be null
+ * @return the keytab object, can be invalid, but never null.
*/
- public static KeyTab getInstance(File file) {
- try {
- if (!(file.exists())) {
- singleton = null;
- } else {
- String fname = file.getAbsolutePath();
- // Since this class deals with file I/O operations,
- // we want only one class instance existing.
- if (singleton != null) {
- File kfile = new File(singleton.name);
- String kname = kfile.getAbsolutePath();
- if (kname.equalsIgnoreCase(fname)) {
- if (DEBUG) {
- System.out.println("KeyTab instance already exists");
- }
- }
- } else {
- singleton = new KeyTab(fname);
- }
- }
- } catch (Exception e) {
- singleton = null;
- if (DEBUG) {
- System.out.println("Could not obtain an instance of KeyTab" +
- e.getMessage());
- }
+ private synchronized static KeyTab getInstance0(String s) {
+ long lm = new File(s).lastModified();
+ KeyTab old = map.get(s);
+ if (old != null && old.isValid() && old.lastModified == lm) {
+ return old;
}
- return singleton;
+ KeyTab ktab = new KeyTab(s);
+ if (ktab.isValid()) { // A valid new keytab
+ map.put(s, ktab);
+ return ktab;
+ } else if (old != null) { // An existing old one
+ return old;
+ } else {
+ return ktab; // first read is invalid
+ }
}
/**
- * Gets the single instance of KeyTab class.
- * @return single instance of KeyTab; return null if default keytab file
- * does not exist, or error occurs while reading data from the file.
+ * Gets a KeyTab object.
+ * @param s the key tab file name.
+ * @return the KeyTab object, never null.
+ */
+ public static KeyTab getInstance(String s) {
+ if (s == null) {
+ return getInstance();
+ } else {
+ return getInstance0(s);
+ }
+ }
+
+ /**
+ * Gets a KeyTab object.
+ * @param file the key tab file.
+ * @return the KeyTab object, never null.
+ */
+ public static KeyTab getInstance(File file) {
+ if (file == null) {
+ return getInstance();
+ } else {
+ return getInstance0(file.getPath());
+ }
+ }
+
+ /**
+ * Gets the default KeyTab object.
+ * @return the KeyTab object, never null.
*/
public static KeyTab getInstance() {
- try {
- name = getDefaultKeyTab();
- if (name != null) {
- singleton = getInstance(new File(name));
- }
- } catch (Exception e) {
- singleton = null;
- if (DEBUG) {
- System.out.println("Could not obtain an instance of KeyTab" +
- e.getMessage());
- }
- }
- return singleton;
+ return getInstance(getDefaultTabName());
+ }
+
+ public boolean isMissing() {
+ return isMissing;
+ }
+
+ public boolean isValid() {
+ return isValid;
}
/**
* The location of keytab file will be read from the configuration file
* If it is not specified, consider user.home as the keytab file's
* default location.
+ * @return never null
*/
- private static String getDefaultKeyTab() {
- if (name != null) {
- return name;
+ private static String getDefaultTabName() {
+ if (defaultTabName != null) {
+ return defaultTabName;
} else {
String kname = null;
try {
@@ -145,7 +192,7 @@
StringTokenizer st = new StringTokenizer(keytab_names, " ");
while (st.hasMoreTokens()) {
kname = parse(st.nextToken());
- if (kname != null) {
+ if (new File(kname).exists()) {
break;
}
}
@@ -165,19 +212,20 @@
new sun.security.action.GetPropertyAction("user.dir"));
}
- if (user_home != null) {
- kname = user_home + File.separator + "krb5.keytab";
- }
+ kname = user_home + File.separator + "krb5.keytab";
}
+ defaultTabName = kname;
return kname;
}
}
+ /**
+ * Parses some common keytab name formats
+ * @param name never null
+ * @return never null
+ */
private static String parse(String name) {
- String kname = null;
- if (name == null) {
- return null;
- }
+ String kname;
if ((name.length() >= 5) &&
(name.substring(0, 5).equalsIgnoreCase("FILE:"))) {
kname = name.substring(5);
@@ -194,18 +242,6 @@
return kname;
}
- private synchronized void init(String filename)
- throws IOException, RealmException {
-
- if (filename != null) {
- KeyTabInputStream kis =
- new KeyTabInputStream(new FileInputStream(filename));
- load(kis);
- kis.close();
- name = filename;
- }
- }
-
private void load(KeyTabInputStream kis)
throws IOException, RealmException {
@@ -234,14 +270,13 @@
* etypes that have been configured for use. If there are multiple
* keys with same etype, the one with the highest kvno is returned.
* @param service the PrincipalName of the requested service
- * @return an array containing all the service keys
+ * @return an array containing all the service keys, never null
*/
public EncryptionKey[] readServiceKeys(PrincipalName service) {
KeyTabEntry entry;
EncryptionKey key;
int size = entries.size();
ArrayList<EncryptionKey> keys = new ArrayList<>(size);
-
for (int i = size-1; i >= 0; i--) {
entry = entries.elementAt(i);
if (entry.service.match(service)) {
@@ -260,10 +295,7 @@
}
}
}
-
size = keys.size();
- if (size == 0)
- return null;
EncryptionKey[] retVal = keys.toArray(new EncryptionKey[size]);
// Sort keys according to default_tkt_enctypes
@@ -328,10 +360,13 @@
return false;
}
- public static String tabName() {
- return name;
+ public String tabName() {
+ return tabName;
}
+ /////////////////// THE WRITE SIDE ///////////////////////
+ /////////////// only used by ktab tool //////////////////
+
/**
* Adds a new entry in the key table.
* @param service the service which will have a new entry in the key table.
@@ -394,7 +429,7 @@
*/
public synchronized static KeyTab create()
throws IOException, RealmException {
- String dname = getDefaultKeyTab();
+ String dname = getDefaultTabName();
return create(dname);
}
@@ -404,25 +439,24 @@
public synchronized static KeyTab create(String name)
throws IOException, RealmException {
- KeyTabOutputStream kos =
- new KeyTabOutputStream(new FileOutputStream(name));
- kos.writeVersion(KRB5_KT_VNO);
- kos.close();
- singleton = new KeyTab(name);
- return singleton;
+ try (KeyTabOutputStream kos =
+ new KeyTabOutputStream(new FileOutputStream(name))) {
+ kos.writeVersion(KRB5_KT_VNO);
+ }
+ return new KeyTab(name);
}
/**
* Saves the file at the directory.
*/
public synchronized void save() throws IOException {
- KeyTabOutputStream kos =
- new KeyTabOutputStream(new FileOutputStream(name));
- kos.writeVersion(kt_vno);
- for (int i = 0; i < entries.size(); i++) {
- kos.writeEntry(entries.elementAt(i));
+ try (KeyTabOutputStream kos =
+ new KeyTabOutputStream(new FileOutputStream(tabName))) {
+ kos.writeVersion(kt_vno);
+ for (int i = 0; i < entries.size(); i++) {
+ kos.writeEntry(entries.elementAt(i));
+ }
}
- kos.close();
}
/**
@@ -485,18 +519,9 @@
* @exception IOException.
*/
public synchronized void createVersion(File file) throws IOException {
- KeyTabOutputStream kos =
- new KeyTabOutputStream(new FileOutputStream(file));
- kos.write16(KRB5_KT_VNO);
- kos.close();
- }
-
- public static void refresh() {
- if (singleton != null) {
- if (DEBUG) {
- System.out.println("Refreshing Keytab");
- }
- singleton = null;
+ try (KeyTabOutputStream kos =
+ new KeyTabOutputStream(new FileOutputStream(file))) {
+ kos.write16(KRB5_KT_VNO);
}
}
}
--- a/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java Tue May 03 22:16:58 2011 -0700
@@ -312,7 +312,8 @@
DistributionPointFetcher.getInstance();
// all CRLs returned by the DP Fetcher have also been verified
mApprovedCRLs.addAll(store.getCRLs(sel, signFlag, prevKey,
- mSigProvider, mStores, reasonsMask, trustAnchors));
+ mSigProvider, mStores, reasonsMask, trustAnchors,
+ mParams.getDate()));
} catch (Exception e) {
if (debug != null) {
debug.println("CrlRevocationChecker.verifyRevocationStatus() "
@@ -769,7 +770,7 @@
for (X509CRL crl : crls) {
if (dpf.verifyCRL(certImpl, point, crl, reasonsMask,
signFlag, prevKey, mSigProvider,
- trustAnchors, mStores)) {
+ trustAnchors, mStores, mParams.getDate())) {
results.add(crl);
}
}
--- a/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java Tue May 03 22:16:58 2011 -0700
@@ -90,8 +90,8 @@
*/
Collection<X509CRL> getCRLs(X509CRLSelector selector, boolean signFlag,
PublicKey prevKey, String provider, List<CertStore> certStores,
- boolean[] reasonsMask,
- Set<TrustAnchor> trustAnchors) throws CertStoreException {
+ boolean[] reasonsMask, Set<TrustAnchor> trustAnchors,
+ Date validity) throws CertStoreException {
if (USE_CRLDP == false) {
return Collections.emptySet();
@@ -122,7 +122,7 @@
DistributionPoint point = t.next();
Collection<X509CRL> crls = getCRLs(selector, certImpl,
point, reasonsMask, signFlag, prevKey, provider,
- certStores, trustAnchors);
+ certStores, trustAnchors, validity);
results.addAll(crls);
}
if (debug != null) {
@@ -143,7 +143,8 @@
private Collection<X509CRL> getCRLs(X509CRLSelector selector,
X509CertImpl certImpl, DistributionPoint point, boolean[] reasonsMask,
boolean signFlag, PublicKey prevKey, String provider,
- List<CertStore> certStores, Set<TrustAnchor> trustAnchors) {
+ List<CertStore> certStores, Set<TrustAnchor> trustAnchors,
+ Date validity) {
// check for full name
GeneralNames fullName = point.getFullName();
@@ -196,7 +197,7 @@
selector.setIssuerNames(null);
if (selector.match(crl) && verifyCRL(certImpl, point, crl,
reasonsMask, signFlag, prevKey, provider, trustAnchors,
- certStores)) {
+ certStores, validity)) {
crls.add(crl);
}
} catch (Exception e) {
@@ -280,13 +281,15 @@
* @param trustAnchors a {@code Set} of {@code TrustAnchor}s
* @param certStores a {@code List} of {@code CertStore}s to be used in
* finding certificates and CRLs
+ * @param validity the time for which the validity of the CRL issuer's
+ * certification path should be determined
* @return true if ok, false if not
*/
boolean verifyCRL(X509CertImpl certImpl, DistributionPoint point,
X509CRL crl, boolean[] reasonsMask, boolean signFlag,
PublicKey prevKey, String provider,
- Set<TrustAnchor> trustAnchors,
- List<CertStore> certStores) throws CRLException, IOException {
+ Set<TrustAnchor> trustAnchors, List<CertStore> certStores,
+ Date validity) throws CRLException, IOException {
boolean indirectCRL = false;
X509CRLImpl crlImpl = X509CRLImpl.toImpl(crl);
@@ -605,6 +608,7 @@
}
params.setCertStores(certStores);
params.setSigProvider(provider);
+ params.setDate(validity);
try {
CertPathBuilder builder = CertPathBuilder.getInstance("PKIX");
PKIXCertPathBuilderResult result =
--- a/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Tue May 03 22:16:58 2011 -0700
@@ -1453,6 +1453,21 @@
}
}
+ private void closeSocket(boolean selfInitiated) throws IOException {
+ if ((debug != null) && Debug.isOn("ssl")) {
+ System.out.println(threadName() + ", called closeSocket(selfInitiated)");
+ }
+ if (self == this) {
+ super.close();
+ } else if (autoClose) {
+ self.close();
+ } else if (selfInitiated) {
+ // layered && non-autoclose
+ // read close_notify alert to clear input stream
+ waitForClose(false);
+ }
+ }
+
/*
* Closing the connection is tricky ... we can't officially close the
* connection until we know the other end is ready to go away too,
@@ -1491,6 +1506,8 @@
}
int state = getConnectionState();
+ boolean closeSocketCalled = false;
+ Throwable cachedThrowable = null;
try {
switch (state) {
/*
@@ -1531,8 +1548,18 @@
return; // connection was closed while we waited
}
if (state != cs_SENT_CLOSE) {
- warning(Alerts.alert_close_notify);
- connectionState = cs_SENT_CLOSE;
+ try {
+ warning(Alerts.alert_close_notify);
+ connectionState = cs_SENT_CLOSE;
+ } catch (Throwable th) {
+ // we need to ensure socket is closed out
+ // if we encounter any errors.
+ connectionState = cs_ERROR;
+ // cache this for later use
+ cachedThrowable = th;
+ closeSocketCalled = true;
+ closeSocket(selfInitiated);
+ }
}
}
// If state was cs_SENT_CLOSE before, we don't do the actual
@@ -1569,22 +1596,11 @@
return;
}
- if (self == this) {
- super.close();
- } else if (autoClose) {
- self.close();
- } else if (selfInitiated) {
- // layered && non-autoclose
- // read close_notify alert to clear input stream
- waitForClose(false);
+ if (!closeSocketCalled) {
+ closeSocketCalled = true;
+ closeSocket(selfInitiated);
}
- // See comment in changeReadCiphers()
- readCipher.dispose();
- writeCipher.dispose();
-
- // state will be set to cs_CLOSED in the finally block below
-
break;
}
} finally {
@@ -1595,6 +1611,20 @@
// notify any threads waiting for the closing to finish
this.notifyAll();
}
+ if (closeSocketCalled) {
+ // Dispose of ciphers since we've closed socket
+ disposeCiphers();
+ }
+ if (cachedThrowable != null) {
+ /*
+ * Rethrow the error to the calling method
+ * The Throwable caught can only be an Error or RuntimeException
+ */
+ if (cachedThrowable instanceof Error)
+ throw (Error) cachedThrowable;
+ if (cachedThrowable instanceof RuntimeException)
+ throw (RuntimeException) cachedThrowable;
+ }
}
}
@@ -1641,6 +1671,24 @@
}
}
+ /**
+ * Called by closeInternal() only. Be sure to consider the
+ * synchronization locks carefully before calling it elsewhere.
+ */
+ private void disposeCiphers() {
+ // See comment in changeReadCiphers()
+ synchronized (readLock) {
+ readCipher.dispose();
+ }
+ // See comment in changeReadCiphers()
+ writeLock.lock();
+ try {
+ writeCipher.dispose();
+ } finally {
+ writeLock.unlock();
+ }
+ }
+
//
// EXCEPTION AND ALERT HANDLING
//
@@ -1761,7 +1809,9 @@
}
int oldState = connectionState;
- connectionState = cs_ERROR;
+ if (connectionState < cs_ERROR) {
+ connectionState = cs_ERROR;
+ }
/*
* Has there been an error received yet? If not, remember it.
@@ -1792,13 +1842,17 @@
* Clean up our side.
*/
closeSocket();
+ // Another thread may have disposed the ciphers during closing
+ if (connectionState < cs_CLOSED) {
+ connectionState = (oldState == cs_APP_CLOSED) ? cs_APP_CLOSED
+ : cs_CLOSED;
- // See comment in changeReadCiphers()
- readCipher.dispose();
- writeCipher.dispose();
+ // We should lock readLock and writeLock if no deadlock risks.
+ // See comment in changeReadCiphers()
+ readCipher.dispose();
+ writeCipher.dispose();
+ }
- connectionState = (oldState == cs_APP_CLOSED) ? cs_APP_CLOSED
- : cs_CLOSED;
throw closeReason;
}
--- a/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, 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
@@ -1285,11 +1285,12 @@
// check permission to access and use the secret key of the
// Kerberized "host" service
- if (kerberosKeys != null) {
-
+ if (kerberosKeys != null && kerberosKeys.length > 0) {
if (debug != null && Debug.isOn("handshake")) {
- System.out.println("Using Kerberos key: " +
- kerberosKeys[0]);
+ for (SecretKey k: kerberosKeys) {
+ System.out.println("Using Kerberos key: " +
+ k);
+ }
}
String serverPrincipal =
--- a/jdk/src/share/classes/sun/security/ssl/krb5/Krb5ProxyImpl.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/krb5/Krb5ProxyImpl.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@
import sun.security.ssl.Krb5Proxy;
/**
- * An implementatin of Krb5Proxy that simply delegates to the appropriate
+ * An implementation of Krb5Proxy that simply delegates to the appropriate
* Kerberos APIs.
*/
public class Krb5ProxyImpl implements Krb5Proxy {
@@ -62,7 +62,7 @@
@Override
public SecretKey[] getServerKeys(AccessControlContext acc)
throws LoginException {
- return Krb5Util.getKeys(GSSCaller.CALLER_SSL_SERVER, null, acc);
+ return Krb5Util.getServiceCreds(GSSCaller.CALLER_SSL_SERVER, null, acc).getKKeys();
}
@Override
--- a/jdk/src/share/demo/jvmti/minst/Minst.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/jvmti/minst/Minst.java Tue May 03 22:16:58 2011 -0700
@@ -45,7 +45,7 @@
*/
public static void method_entry(int cnum, int mnum) {
- Class x = Minst.class;
+ Class<Minst> x = Minst.class;
synchronized ( x ) {
if ( engaged > 0 ) {
engaged = 0;
--- a/jdk/src/share/demo/management/FullThreadDump/Deadlock.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/FullThreadDump/Deadlock.java Tue May 03 22:16:58 2011 -0700
@@ -48,7 +48,7 @@
*/
public class Deadlock {
public static void main(String[] argv) {
- Deadlock dl = new Deadlock();
+ new Deadlock();
// Now find deadlock
ThreadMonitor monitor = new ThreadMonitor();
@@ -112,6 +112,7 @@
this.mon2 = mon2;
this.useSync = false;
}
+ @Override
public void run() {
if (useSync) {
syncLock();
--- a/jdk/src/share/demo/management/FullThreadDump/ThreadMonitor.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/FullThreadDump/ThreadMonitor.java Tue May 03 22:16:58 2011 -0700
@@ -39,7 +39,6 @@
import java.lang.management.MonitorInfo;
import javax.management.*;
import java.io.*;
-import java.util.*;
/**
* Example of using the java.lang.management API to dump stack trace
@@ -167,7 +166,8 @@
}
}
- private void printMonitorInfo(ThreadInfo ti, MonitorInfo[] monitors) {
+ private void printMonitorInfo(ThreadInfo ti) {
+ MonitorInfo[] monitors = ti.getLockedMonitors();
System.out.println(INDENT + "Locked monitors: count = " + monitors.length);
for (MonitorInfo mi : monitors) {
System.out.println(INDENT + " - " + mi + " locked at ");
@@ -201,6 +201,7 @@
ThreadInfo[] infos = tmbean.getThreadInfo(tids, true, true);
for (ThreadInfo ti : infos) {
printThreadInfo(ti);
+ printMonitorInfo(ti);
printLockInfo(ti.getLockedSynchronizers());
System.out.println();
}
--- a/jdk/src/share/demo/management/JTop/JTop.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/JTop/JTop.java Tue May 03 22:16:58 2011 -0700
@@ -57,7 +57,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedMap;
import java.util.Timer;
@@ -69,10 +68,8 @@
import static java.lang.management.ManagementFactory.*;
import java.awt.*;
-import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
-import javax.swing.event.*;
import javax.swing.table.*;
/**
@@ -80,6 +77,8 @@
* in a table.
*/
public class JTop extends JPanel {
+
+ private static final long serialVersionUID = -1499762160973870696L;
private MBeanServerConnection server;
private ThreadMXBean tmbean;
private MyTableModel tmodel;
@@ -122,29 +121,34 @@
}
class MyTableModel extends AbstractTableModel {
+ private static final long serialVersionUID = -7877310288576779514L;
private String[] columnNames = {"ThreadName",
"CPU(sec)",
"State"};
// List of all threads. The key of each entry is the CPU time
// and its value is the ThreadInfo object with no stack trace.
private List<Map.Entry<Long, ThreadInfo>> threadList =
- Collections.EMPTY_LIST;
+ Collections.emptyList();
public MyTableModel() {
}
+ @Override
public int getColumnCount() {
return columnNames.length;
}
+ @Override
public int getRowCount() {
return threadList.size();
}
+ @Override
public String getColumnName(int col) {
return columnNames[col];
}
+ @Override
public Object getValueAt(int row, int col) {
Map.Entry<Long, ThreadInfo> me = threadList.get(row);
switch (col) {
@@ -164,7 +168,8 @@
}
}
- public Class getColumnClass(int c) {
+ @Override
+ public Class<?> getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
@@ -207,12 +212,14 @@
* Format Double with 4 fraction digits
*/
class DoubleRenderer extends DefaultTableCellRenderer {
+ private static final long serialVersionUID = 1704639497162584382L;
NumberFormat formatter;
public DoubleRenderer() {
super();
setHorizontalAlignment(JLabel.RIGHT);
}
+ @Override
public void setValue(Object value) {
if (formatter==null) {
formatter = NumberFormat.getInstance();
@@ -238,12 +245,14 @@
}
// Get the current thread info and CPU time
+ @Override
public List<Map.Entry<Long, ThreadInfo>> doInBackground() {
return getThreadList();
}
// fire table data changed to trigger GUI update
// when doInBackground() is finished
+ @Override
protected void done() {
try {
// Set table model with the new thread list
@@ -290,6 +299,7 @@
// A timer task to update GUI per each interval
TimerTask timerTask = new TimerTask() {
+ @Override
public void run() {
// Schedule the SwingWorker to update the GUI
jtop.newSwingWorker().execute();
@@ -299,6 +309,7 @@
// Create the standalone window with JTop panel
// by the event dispatcher thread
SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
public void run() {
createAndShowGUI(jtop);
}
--- a/jdk/src/share/demo/management/JTop/JTopPlugin.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/JTop/JTopPlugin.java Tue May 03 22:16:58 2011 -0700
@@ -40,13 +40,13 @@
import java.beans.PropertyChangeListener;
import java.util.LinkedHashMap;
import java.util.Map;
-import javax.management.MBeanServerConnection;
+
import javax.swing.JPanel;
import javax.swing.SwingWorker;
-import com.sun.tools.jconsole.JConsolePlugin;
import com.sun.tools.jconsole.JConsoleContext;
import com.sun.tools.jconsole.JConsoleContext.ConnectionState;
+import com.sun.tools.jconsole.JConsolePlugin;
/**
* JTopPlugin is a subclass to com.sun.tools.jconsole.JConsolePlugin
@@ -70,6 +70,7 @@
/*
* Returns a JTop tab to be added in JConsole.
*/
+ @Override
public synchronized Map<String, JPanel> getTabs() {
if (tabs == null) {
jtop = new JTop();
@@ -86,6 +87,7 @@
/*
* Returns a SwingWorker which is responsible for updating the JTop tab.
*/
+ @Override
public SwingWorker<?,?> newSwingWorker() {
return jtop.newSwingWorker();
}
@@ -101,10 +103,10 @@
* Property listener to reset the MBeanServerConnection
* at reconnection time.
*/
+ @Override
public void propertyChange(PropertyChangeEvent ev) {
String prop = ev.getPropertyName();
if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) {
- ConnectionState oldState = (ConnectionState)ev.getOldValue();
ConnectionState newState = (ConnectionState)ev.getNewValue();
// JConsole supports disconnection and reconnection
// The MBeanServerConnection will become invalid when
--- a/jdk/src/share/demo/management/MemoryMonitor/MemoryMonitor.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/MemoryMonitor/MemoryMonitor.java Tue May 03 22:16:58 2011 -0700
@@ -42,9 +42,6 @@
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
import java.lang.management.*;
-import java.util.*;
-
-
/**
* Demo code which plots the memory usage by all memory pools.
* The memory usage is sampled at some time interval using
@@ -53,6 +50,7 @@
*/
public class MemoryMonitor extends JPanel {
+ private static final long serialVersionUID = -3463003810776195761L;
static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp");
public Surface surf;
JPanel controls;
@@ -84,6 +82,7 @@
controls.add(dateStampCB);
dateStampCB.setFont(font);
addMouseListener(new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
removeAll();
if ((doControls = !doControls)) {
@@ -128,28 +127,32 @@
public Surface() {
setBackground(Color.black);
addMouseListener(new MouseAdapter() {
+ @Override
public void mouseClicked(MouseEvent e) {
if (thread == null) start(); else stop();
}
});
- int i = 0;
usedMem = new float[numPools][];
ptNum = new int[numPools];
}
+ @Override
public Dimension getMinimumSize() {
return getPreferredSize();
}
+ @Override
public Dimension getMaximumSize() {
return getPreferredSize();
}
+ @Override
public Dimension getPreferredSize() {
return new Dimension(135,80);
}
+ @Override
public void paint(Graphics g) {
if (big == null) {
@@ -315,13 +318,14 @@
notify();
}
+ @Override
public void run() {
Thread me = Thread.currentThread();
while (thread == me && !isShowing() || getSize().width == 0) {
try {
- thread.sleep(500);
+ Thread.sleep(500);
} catch (InterruptedException e) { return; }
}
@@ -339,7 +343,7 @@
}
repaint();
try {
- thread.sleep(sleepAmount);
+ Thread.sleep(sleepAmount);
} catch (InterruptedException e) { break; }
if (MemoryMonitor.dateStampCB.isSelected()) {
System.out.println(new Date().toString() + " " + usedStr);
@@ -354,6 +358,7 @@
static class Memeater extends ClassLoader implements Runnable {
Object y[];
public Memeater() {}
+ @Override
public void run() {
y = new Object[10000000];
int k =0;
@@ -378,7 +383,7 @@
}
- Class loadNext() throws ClassNotFoundException {
+ Class<?> loadNext() throws ClassNotFoundException {
// public class TestNNNNNN extends java.lang.Object{
// public TestNNNNNN();
@@ -424,15 +429,15 @@
int len = begin.length + value.length + end.length;
byte b[] = new byte[len];
- int i, pos=0;
- for (i=0; i<begin.length; i++) {
- b[pos++] = (byte)begin[i];
+ int pos=0;
+ for (int i: begin) {
+ b[pos++] = (byte) i;
}
- for (i=0; i<value.length; i++) {
- b[pos++] = value[i];
+ for (byte v: value) {
+ b[pos++] = v;
}
- for (i=0; i<end.length; i++) {
- b[pos++] = (byte)end[i];
+ for (int e: end) {
+ b[pos++] = (byte) e;
}
return defineClass(name, b, 0, b.length);
@@ -445,8 +450,11 @@
public static void main(String s[]) {
final MemoryMonitor demo = new MemoryMonitor();
WindowListener l = new WindowAdapter() {
+ @Override
public void windowClosing(WindowEvent e) {System.exit(0);}
+ @Override
public void windowDeiconified(WindowEvent e) { demo.surf.start(); }
+ @Override
public void windowIconified(WindowEvent e) { demo.surf.stop(); }
};
JFrame f = new JFrame("MemoryMonitor");
--- a/jdk/src/share/demo/management/VerboseGC/PrintGCStat.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/VerboseGC/PrintGCStat.java Tue May 03 22:16:58 2011 -0700
@@ -71,12 +71,10 @@
assert(false);
}
- Set mbeans = server.queryNames(poolName, null);
+ Set<ObjectName> mbeans = server.queryNames(poolName, null);
if (mbeans != null) {
pools = new ArrayList<MemoryPoolMXBean>();
- Iterator iterator = mbeans.iterator();
- while (iterator.hasNext()) {
- ObjectName objName = (ObjectName) iterator.next();
+ for (ObjectName objName : mbeans) {
MemoryPoolMXBean p =
newPlatformMXBeanProxy(server,
objName.getCanonicalName(),
@@ -88,9 +86,7 @@
mbeans = server.queryNames(gcName, null);
if (mbeans != null) {
gcmbeans = new ArrayList<GarbageCollectorMXBean>();
- Iterator iterator = mbeans.iterator();
- while (iterator.hasNext()) {
- ObjectName objName = (ObjectName) iterator.next();
+ for (ObjectName objName : mbeans) {
GarbageCollectorMXBean gc =
newPlatformMXBeanProxy(server,
objName.getCanonicalName(),
@@ -116,7 +112,9 @@
* of all memory pools as well as the GC statistics.
*/
public void printVerboseGc() {
- System.out.print("Uptime: " + formatMillis(rmbean.getUptime()));
+ System.out.println("Uptime: " + formatMillis(rmbean.getUptime()));
+ System.out.println("Heap usage: " + mmbean.getHeapMemoryUsage());
+ System.out.println("Non-Heap memory usage: " + mmbean.getNonHeapMemoryUsage());
for (GarbageCollectorMXBean gc : gcmbeans) {
System.out.print(" [" + gc.getName() + ": ");
System.out.print("Count=" + gc.getCollectionCount());
--- a/jdk/src/share/demo/management/VerboseGC/VerboseGC.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/management/VerboseGC/VerboseGC.java Tue May 03 22:16:58 2011 -0700
@@ -95,9 +95,8 @@
int port = -1;
long interval = 5000; // default is 5 second interval
long mins = 5;
- for (int argIndex = 0; argIndex < args.length; argIndex++) {
- String arg = args[argIndex];
- if (args[argIndex].startsWith("-")) {
+ for (String arg: args) {
+ if (arg.startsWith("-")) {
if (arg.equals("-h") ||
arg.equals("-help") ||
arg.equals("-?")) {
--- a/jdk/src/share/demo/nio/zipfs/Demo.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/nio/zipfs/Demo.java Tue May 03 22:16:58 2011 -0700
@@ -42,7 +42,6 @@
import static java.nio.file.StandardOpenOption.*;
import static java.nio.file.StandardCopyOption.*;
-
/*
* ZipFileSystem usage demo
*
@@ -157,7 +156,6 @@
env.put("create", "true");
try (FileSystem fs = provider.newFileSystem(Paths.get(args[1]), env)) {
Path path, src, dst;
- boolean isRename = false;
switch (action) {
case rename:
src = fs.getPath(args[2]);
@@ -303,6 +301,7 @@
final String fStr = (args.length > 3)?args[3]:"";
try (DirectoryStream<Path> ds = Files.newDirectoryStream(path,
new DirectoryStream.Filter<Path>() {
+ @Override
public boolean accept(Path path) {
return path.toString().contains(fStr);
}
@@ -358,10 +357,18 @@
return null;
}
+ @SuppressWarnings("unused")
+ /**
+ * Not used in demo, but included for demonstrational purposes.
+ */
private static byte[] getBytes(String name) {
return name.getBytes();
}
+ @SuppressWarnings("unused")
+ /**
+ * Not used in demo, but included for demonstrational purposes.
+ */
private static String getString(byte[] name) {
return new String(name);
}
@@ -534,6 +541,10 @@
Files.createDirectory(path);
}
+ @SuppressWarnings("unused")
+ /**
+ * Not used in demo, but included for demonstrational purposes.
+ */
private static void rmdirs(Path path) throws IOException {
while (path != null && path.getNameCount() != 0) {
Files.delete(path);
@@ -557,7 +568,11 @@
}
}
- // check the content of two paths are equal
+ @SuppressWarnings("unused")
+ /**
+ * Checks that the content of two paths are equal.
+ * Not used in demo, but included for demonstrational purposes.
+ */
private static void checkEqual(Path src, Path dst) throws IOException
{
//System.out.printf("checking <%s> vs <%s>...%n",
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java Tue May 03 22:16:58 2011 -0700
@@ -38,14 +38,18 @@
* document. This is used in ScriptShellPanel class as document for editor.
*/
public class EditableAtEndDocument extends PlainDocument {
+
+ private static final long serialVersionUID = 5358116444851502167L;
private int mark;
+ @Override
public void insertString(int offset, String text, AttributeSet a)
throws BadLocationException {
int len = getLength();
super.insertString(len, text, a);
}
+ @Override
public void remove(int offs, int len) throws BadLocationException {
int start = offs;
int end = offs + len;
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java Tue May 03 22:16:58 2011 -0700
@@ -32,14 +32,10 @@
package com.sun.demo.scripting.jconsole;
import com.sun.tools.jconsole.*;
-import java.awt.*;
-import java.awt.event.*;
import java.io.*;
-import java.lang.reflect.*;
import java.util.concurrent.CountDownLatch;
import javax.script.*;
import javax.swing.*;
-import javax.swing.event.*;
import java.util.*;
/**
@@ -86,6 +82,7 @@
tabs.put("Script Shell", window);
new Thread(new Runnable() {
+ @Override
public void run() {
// initialize the script engine
initScriptEngine();
@@ -103,10 +100,12 @@
window.dispose();
}
+ @Override
public String getPrompt() {
return prompt;
}
+ @Override
public String executeCommand(String cmd) {
String res;
try {
@@ -176,7 +175,7 @@
String oldFilename = (String) engine.get(ScriptEngine.FILENAME);
engine.put(ScriptEngine.FILENAME, "<built-in jconsole." + extension + ">");
try {
- Class myClass = this.getClass();
+ Class<? extends ScriptJConsolePlugin> myClass = this.getClass();
InputStream stream = myClass.getResourceAsStream("/resources/jconsole." +
extension);
if (stream != null) {
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java Tue May 03 22:16:58 2011 -0700
@@ -44,8 +44,11 @@
* A JPanel subclass containing a scrollable text area displaying the
* jconsole's script console.
*/
+
class ScriptShellPanel extends JPanel {
+ private static final long serialVersionUID = 4116273141148726319L;
+
// interface to evaluate script command and script prompt
interface CommandProcessor {
// execute given String as script and return the result
@@ -75,9 +78,11 @@
add(scroller, BorderLayout.CENTER);
editor.getDocument().addDocumentListener(new DocumentListener() {
+ @Override
public void changedUpdate(DocumentEvent e) {
}
+ @Override
public void insertUpdate(DocumentEvent e) {
if (updating) return;
beginUpdate();
@@ -90,10 +95,12 @@
// Trim "\\n" combinations
final String cmd1 = trimContinuations(cmd);
commandExecutor.execute(new Runnable() {
+ @Override
public void run() {
final String result = executeCommand(cmd1);
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
if (result != null) {
print(result + "\n");
@@ -113,6 +120,7 @@
}
}
+ @Override
public void removeUpdate(DocumentEvent e) {
}
});
@@ -121,6 +129,7 @@
// the JEditorPane to update the caret's position precisely the
// size of the insertion
editor.addCaretListener(new CaretListener() {
+ @Override
public void caretUpdate(CaretEvent e) {
int len = editor.getDocument().getLength();
if (e.getDot() > len) {
@@ -133,6 +142,7 @@
hbox.add(Box.createGlue());
JButton button = new JButton("Clear"); // FIXME: i18n?
button.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
clear();
}
@@ -148,6 +158,7 @@
commandExecutor.shutdown();
}
+ @Override
public void requestFocus() {
editor.requestFocus();
}
--- a/jdk/src/share/lib/security/sunpkcs11-solaris.cfg Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/lib/security/sunpkcs11-solaris.cfg Tue May 03 22:16:58 2011 -0700
@@ -14,6 +14,8 @@
attributes = compatibility
disabledMechanisms = {
+# the following mechanisms are disabled due to lack of digest cloning support
+# need to fix 6414899 first
CKM_MD2
CKM_MD5
CKM_SHA_1
@@ -21,9 +23,6 @@
CKM_SHA384
CKM_SHA512
CKM_DSA_KEY_PAIR_GEN
-# KEY_AND_MAC_DERIVE disabled due to Solaris bug 6306708
- CKM_SSL3_KEY_AND_MAC_DERIVE
- CKM_TLS_KEY_AND_MAC_DERIVE
# the following mechanisms are disabled due to performance issues (Solaris bug 6337157)
CKM_DSA_SHA1
CKM_MD5_RSA_PKCS
--- a/jdk/src/share/native/java/lang/Throwable.c Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/share/native/java/lang/Throwable.c Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2011, 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
@@ -44,7 +44,7 @@
* `this' so you can write 'throw e.fillInStackTrace();'
*/
JNIEXPORT jobject JNICALL
-Java_java_lang_Throwable_fillInStackTrace(JNIEnv *env, jobject throwable)
+Java_java_lang_Throwable_fillInStackTrace(JNIEnv *env, jobject throwable, int dummy)
{
JVM_FillInStackTrace(env, throwable);
return throwable;
--- a/jdk/src/solaris/classes/sun/nio/ch/EPoll.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/solaris/classes/sun/nio/ch/EPoll.java Tue May 03 22:16:58 2011 -0700
@@ -99,8 +99,6 @@
// -- Native methods --
- private static native void init();
-
private static native int eventSize();
private static native int eventsOffset();
@@ -116,6 +114,5 @@
static {
Util.load();
- init();
}
}
--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java Tue May 03 22:16:58 2011 -0700
@@ -432,8 +432,6 @@
// -- native methods --
- private static native void init();
-
// sizeof inotify_event
private static native int eventSize();
@@ -461,6 +459,5 @@
System.loadLibrary("nio");
return null;
}});
- init();
}
}
--- a/jdk/src/solaris/native/sun/nio/ch/EPoll.c Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/solaris/native/sun/nio/ch/EPoll.c Tue May 03 22:16:58 2011 -0700
@@ -34,55 +34,7 @@
#include <dlfcn.h>
#include <unistd.h>
#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* epoll_wait(2) man page */
-
-typedef union epoll_data {
- void *ptr;
- int fd;
- __uint32_t u32;
- __uint64_t u64;
-} epoll_data_t;
-
-struct epoll_event {
- __uint32_t events; /* Epoll events */
- epoll_data_t data; /* User data variable */
-} __attribute__ ((__packed__));
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * epoll event notification is new in 2.6 kernel. As the offical build
- * platform for the JDK is on a 2.4-based distribution then we must
- * obtain the addresses of the epoll functions dynamically.
- */
-typedef int (*epoll_create_t)(int size);
-typedef int (*epoll_ctl_t) (int epfd, int op, int fd, struct epoll_event *event);
-typedef int (*epoll_wait_t) (int epfd, struct epoll_event *events, int maxevents, int timeout);
-
-static epoll_create_t epoll_create_func;
-static epoll_ctl_t epoll_ctl_func;
-static epoll_wait_t epoll_wait_func;
-
-
-JNIEXPORT void JNICALL
-Java_sun_nio_ch_EPoll_init(JNIEnv *env, jclass this)
-{
- epoll_create_func = (epoll_create_t) dlsym(RTLD_DEFAULT, "epoll_create");
- epoll_ctl_func = (epoll_ctl_t) dlsym(RTLD_DEFAULT, "epoll_ctl");
- epoll_wait_func = (epoll_wait_t) dlsym(RTLD_DEFAULT, "epoll_wait");
-
- if ((epoll_create_func == NULL) || (epoll_ctl_func == NULL) ||
- (epoll_wait_func == NULL)) {
- JNU_ThrowInternalError(env, "unable to get address of epoll functions, pre-2.6 kernel?");
- }
-}
+#include <sys/epoll.h>
JNIEXPORT jint JNICALL
Java_sun_nio_ch_EPoll_eventSize(JNIEnv* env, jclass this)
@@ -108,7 +60,7 @@
* epoll_create expects a size as a hint to the kernel about how to
* dimension internal structures. We can't predict the size in advance.
*/
- int epfd = (*epoll_create_func)(256);
+ int epfd = epoll_create(256);
if (epfd < 0) {
JNU_ThrowIOExceptionWithLastError(env, "epoll_create failed");
}
@@ -125,7 +77,7 @@
event.events = events;
event.data.fd = fd;
- RESTARTABLE((*epoll_ctl_func)(epfd, (int)opcode, (int)fd, &event), res);
+ RESTARTABLE(epoll_ctl(epfd, (int)opcode, (int)fd, &event), res);
return (res == 0) ? 0 : errno;
}
@@ -137,7 +89,7 @@
struct epoll_event *events = jlong_to_ptr(address);
int res;
- RESTARTABLE((*epoll_wait_func)(epfd, events, numfds, -1), res);
+ RESTARTABLE(epoll_wait(epfd, events, numfds, -1), res);
if (res < 0) {
JNU_ThrowIOExceptionWithLastError(env, "epoll_wait failed");
}
--- a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c Tue May 03 22:16:58 2011 -0700
@@ -33,33 +33,10 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/poll.h>
+#include <sys/inotify.h>
#include "sun_nio_fs_LinuxWatchService.h"
-/* inotify.h may not be available at build time */
-#ifdef __cplusplus
-extern "C" {
-#endif
-struct inotify_event
-{
- int wd;
- uint32_t mask;
- uint32_t cookie;
- uint32_t len;
- char name __flexarr;
-};
-#ifdef __cplusplus
-}
-#endif
-
-typedef int inotify_init_func(void);
-typedef int inotify_add_watch_func(int fd, const char* path, uint32_t mask);
-typedef int inotify_rm_watch_func(int fd, uint32_t wd);
-
-inotify_init_func* my_inotify_init_func = NULL;
-inotify_add_watch_func* my_inotify_add_watch_func = NULL;
-inotify_rm_watch_func* my_inotify_rm_watch_func = NULL;
-
static void throwUnixException(JNIEnv* env, int errnum) {
jobject x = JNU_NewObjectByName(env, "sun/nio/fs/UnixException",
"(I)V", errnum);
@@ -68,22 +45,6 @@
}
}
-JNIEXPORT void JNICALL
-Java_sun_nio_fs_LinuxWatchService_init(JNIEnv *env, jclass clazz)
-{
- my_inotify_init_func = (inotify_init_func*)
- dlsym(RTLD_DEFAULT, "inotify_init");
- my_inotify_add_watch_func =
- (inotify_add_watch_func*) dlsym(RTLD_DEFAULT, "inotify_add_watch");
- my_inotify_rm_watch_func =
- (inotify_rm_watch_func*) dlsym(RTLD_DEFAULT, "inotify_rm_watch");
-
- if ((my_inotify_init_func == NULL) || (my_inotify_add_watch_func == NULL) ||
- (my_inotify_rm_watch_func == NULL)) {
- JNU_ThrowInternalError(env, "unable to get address of inotify functions");
- }
-}
-
JNIEXPORT jint JNICALL
Java_sun_nio_fs_LinuxWatchService_eventSize(JNIEnv *env, jclass clazz)
{
@@ -111,7 +72,7 @@
Java_sun_nio_fs_LinuxWatchService_inotifyInit
(JNIEnv* env, jclass clazz)
{
- int ifd = (*my_inotify_init_func)();
+ int ifd = inotify_init();
if (ifd == -1) {
throwUnixException(env, errno);
}
@@ -125,7 +86,7 @@
int wfd = -1;
const char* path = (const char*)jlong_to_ptr(address);
- wfd = (*my_inotify_add_watch_func)((int)fd, path, mask);
+ wfd = inotify_add_watch((int)fd, path, mask);
if (wfd == -1) {
throwUnixException(env, errno);
}
@@ -136,7 +97,7 @@
Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch
(JNIEnv* env, jclass clazz, jint fd, jint wd)
{
- int err = (*my_inotify_rm_watch_func)((int)fd, (int)wd);
+ int err = inotify_rm_watch((int)fd, (int)wd);
if (err == -1)
throwUnixException(env, errno);
}
@@ -166,7 +127,6 @@
res[1] = (jint)sp[1];
(*env)->SetIntArrayRegion(env, sv, 0, 2, &res[0]);
}
-
}
JNIEXPORT jint JNICALL
@@ -190,6 +150,4 @@
}
}
return (jint)n;
-
-
}
--- a/jdk/src/windows/classes/java/lang/ProcessEnvironment.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/java/lang/ProcessEnvironment.java Tue May 03 22:16:58 2011 -0700
@@ -143,7 +143,7 @@
public void remove() { i.remove();}
};
}
- private static Map.Entry<String,String> checkedEntry (Object o) {
+ private static Map.Entry<String,String> checkedEntry(Object o) {
Map.Entry<String,String> e = (Map.Entry<String,String>) o;
nonNullString(e.getKey());
nonNullString(e.getValue());
@@ -285,7 +285,7 @@
return (Map<String,String>) theEnvironment.clone();
}
- // Only for use by Runtime.exec(...String[]envp...)
+ // Only for use by ProcessBuilder.environment(String[] envp)
static Map<String,String> emptyEnvironment(int capacity) {
return new ProcessEnvironment(capacity);
}
@@ -299,19 +299,46 @@
Collections.sort(list, entryComparator);
StringBuilder sb = new StringBuilder(size()*30);
- for (Map.Entry<String,String> e : list)
- sb.append(e.getKey())
- .append('=')
- .append(e.getValue())
- .append('\u0000');
- // Ensure double NUL termination,
- // even if environment is empty.
- if (sb.length() == 0)
+ int cmp = -1;
+
+ // Some versions of MSVCRT.DLL require SystemRoot to be set.
+ // So, we make sure that it is always set, even if not provided
+ // by the caller.
+ final String SYSTEMROOT = "SystemRoot";
+
+ for (Map.Entry<String,String> e : list) {
+ String key = e.getKey();
+ String value = e.getValue();
+ if (cmp < 0 && (cmp = nameComparator.compare(key, SYSTEMROOT)) > 0) {
+ // Not set, so add it here
+ addToEnvIfSet(sb, SYSTEMROOT);
+ }
+ addToEnv(sb, key, value);
+ }
+ if (cmp < 0) {
+ // Got to end of list and still not found
+ addToEnvIfSet(sb, SYSTEMROOT);
+ }
+ if (sb.length() == 0) {
+ // Environment was empty and SystemRoot not set in parent
sb.append('\u0000');
+ }
+ // Block is double NUL terminated
sb.append('\u0000');
return sb.toString();
}
+ // add the environment variable to the child, if it exists in parent
+ private static void addToEnvIfSet(StringBuilder sb, String name) {
+ String s = getenv(name);
+ if (s != null)
+ addToEnv(sb, name, s);
+ }
+
+ private static void addToEnv(StringBuilder sb, String name, String val) {
+ sb.append(name).append('=').append(val).append('\u0000');
+ }
+
static String toEnvironmentBlock(Map<String,String> map) {
return map == null ? null :
((ProcessEnvironment)map).toEnvironmentBlock();
--- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Kinit.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Kinit.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -30,12 +30,15 @@
package sun.security.krb5.internal.tools;
+import java.io.File;
import sun.security.krb5.*;
import sun.security.krb5.internal.*;
import sun.security.krb5.internal.ccache.*;
import java.io.IOException;
import java.util.Arrays;
+import javax.security.auth.kerberos.KerberosPrincipal;
import sun.security.util.Password;
+import javax.security.auth.kerberos.KeyTab;
/**
* Kinit tool for obtaining Kerberos v5 tickets.
@@ -153,7 +156,6 @@
System.out.println("Principal is " + principal);
}
char[] psswd = options.password;
- EncryptionKey[] skeys = null;
boolean useKeytab = options.useKeytabFile();
if (!useKeytab) {
if (princName == null) {
@@ -186,17 +188,9 @@
}
}
- // assert princName and principal are nonnull
- skeys = EncryptionKey.acquireSecretKeys(principal, ktabName);
-
- if (skeys == null || skeys.length == 0) {
- String msg = "No supported key found in keytab";
- if (princName != null) {
- msg += " for principal " + princName;
- }
- throw new KrbException(msg);
- }
- builder = new KrbAsReqBuilder(principal, skeys);
+ builder = new KrbAsReqBuilder(principal, ktabName == null
+ ? KeyTab.getInstance()
+ : KeyTab.getInstance(new File(ktabName)));
}
KDCOptions opt = new KDCOptions();
--- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Klist.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -95,16 +95,15 @@
}
break;
case 'k':
- if (klist.name == null) {
- klist.target = KeyTab.getInstance();
- klist.name = KeyTab.tabName();
- } else klist.target = KeyTab.getInstance(klist.name);
- if (klist.target != null) {
- klist.displayTab();
- } else {
+ try {
+ KeyTab ktab = KeyTab.getInstance(klist.name);
+ klist.target = ktab;
+ klist.name = ktab.tabName();
+ } catch (Exception e) {
klist.displayMessage("KeyTab");
System.exit(-1);
}
+ klist.displayTab();
break;
default:
if (klist.name != null) {
@@ -295,9 +294,10 @@
void displayMessage(String target) {
if (name == null) {
- name = "";
+ System.out.println("Default " + target + " not found.");
+ } else {
+ System.out.println(target + " " + name + " not found.");
}
- System.out.println(target + " " + name + " not found.");
}
/**
* Reformats the date from the form -
--- a/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -321,7 +321,7 @@
* Lists key table name and entries in it.
*/
void listKt() {
- System.out.println("Keytab name: " + KeyTab.tabName());
+ System.out.println("Keytab name: " + table.tabName());
KeyTabEntry[] entries = table.getEntries();
if ((entries != null) && (entries.length > 0)) {
String[][] output = new String[entries.length+1][showTime?3:2];
--- a/jdk/src/windows/classes/sun/security/mscapi/KeyStore.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/KeyStore.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -31,6 +31,7 @@
import java.io.OutputStream;
import java.math.BigInteger;
import java.security.AccessController;
+import java.security.InvalidKeyException;
import java.security.KeyStoreSpi;
import java.security.KeyStoreException;
import java.security.UnrecoverableKeyException;
@@ -123,6 +124,7 @@
* Sets the private key for the keystore entry.
*/
void setPrivateKey(RSAPrivateCrtKey key)
+ throws InvalidKeyException, KeyStoreException
{
byte[] modulusBytes = key.getModulus().toByteArray();
@@ -158,7 +160,7 @@
* Sets the certificate chain for the keystore entry.
*/
void setCertificateChain(X509Certificate[] chain)
- throws CertificateException
+ throws CertificateException, KeyStoreException
{
for (int i = 0; i < chain.length; i++) {
byte[] encoding = chain[i].getEncoded();
@@ -404,13 +406,16 @@
}
entry.setAlias(alias);
- entry.setPrivateKey((RSAPrivateCrtKey) key);
try {
+ entry.setPrivateKey((RSAPrivateCrtKey) key);
entry.setCertificateChain((X509Certificate[]) chain);
} catch (CertificateException ce) {
throw new KeyStoreException(ce);
+
+ } catch (InvalidKeyException ike) {
+ throw new KeyStoreException(ike);
}
} else {
@@ -537,7 +542,7 @@
removeCertificate(getName(), alias, encoding,
encoding.length);
- } catch (CertificateEncodingException e) {
+ } catch (CertificateException e) {
throw new KeyStoreException("Cannot remove entry: " +
e);
}
@@ -754,8 +759,14 @@
// Clear all key entries
entries.clear();
- // Load keys and/or certificate chains
- loadKeysOrCertificateChains(getName(), entries);
+ try {
+
+ // Load keys and/or certificate chains
+ loadKeysOrCertificateChains(getName(), entries);
+
+ } catch (KeyStoreException e) {
+ throw new IOException(e);
+ }
}
/**
@@ -868,7 +879,7 @@
* @param entries Collection of key/certificate.
*/
private native void loadKeysOrCertificateChains(String name,
- Collection<KeyEntry> entries);
+ Collection<KeyEntry> entries) throws KeyStoreException;
/**
* Stores a DER-encoded certificate into the certificate store
@@ -879,7 +890,7 @@
*/
private native void storeCertificate(String name, String alias,
byte[] encoding, int encodingLength, long hCryptProvider,
- long hCryptKey);
+ long hCryptKey) throws CertificateException, KeyStoreException;
/**
* Removes the certificate from the certificate store
@@ -889,14 +900,16 @@
* @param encoding DER-encoded certificate.
*/
private native void removeCertificate(String name, String alias,
- byte[] encoding, int encodingLength);
+ byte[] encoding, int encodingLength)
+ throws CertificateException, KeyStoreException;
/**
* Destroys the key container.
*
* @param keyContainerName The name of the key container.
*/
- private native void destroyKeyContainer(String keyContainerName);
+ private native void destroyKeyContainer(String keyContainerName)
+ throws KeyStoreException;
/**
* Generates a private-key BLOB from a key's components.
@@ -910,8 +923,8 @@
byte[] primeQ,
byte[] exponentP,
byte[] exponentQ,
- byte[] crtCoefficient);
+ byte[] crtCoefficient) throws InvalidKeyException;
private native RSAPrivateKey storePrivateKey(byte[] keyBlob,
- String keyContainerName, int keySize);
+ String keyContainerName, int keySize) throws KeyStoreException;
}
--- a/jdk/src/windows/classes/sun/security/mscapi/RSACipher.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/RSACipher.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -25,6 +25,7 @@
package sun.security.mscapi;
+import java.math.BigInteger;
import java.security.*;
import java.security.Key;
import java.security.interfaces.*;
@@ -33,6 +34,8 @@
import javax.crypto.*;
import javax.crypto.spec.*;
+import sun.security.rsa.RSAKeyFactory;
+
/**
* RSA cipher implementation using the Microsoft Crypto API.
* Supports RSA en/decryption and signing/verifying using PKCS#1 v1.5 padding.
@@ -189,8 +192,43 @@
default:
throw new InvalidKeyException("Unknown mode: " + opmode);
}
+
if (!(key instanceof sun.security.mscapi.Key)) {
- throw new InvalidKeyException("Unsupported key type: " + key);
+ if (key instanceof java.security.interfaces.RSAPublicKey) {
+ java.security.interfaces.RSAPublicKey rsaKey =
+ (java.security.interfaces.RSAPublicKey) key;
+
+ // Convert key to MSCAPI format
+
+ BigInteger modulus = rsaKey.getModulus();
+ BigInteger exponent = rsaKey.getPublicExponent();
+
+ // Check against the local and global values to make sure
+ // the sizes are ok. Round up to the nearest byte.
+ RSAKeyFactory.checkKeyLengths(((modulus.bitLength() + 7) & ~7),
+ exponent, -1, RSAKeyPairGenerator.KEY_SIZE_MAX);
+
+ byte[] modulusBytes = modulus.toByteArray();
+ byte[] exponentBytes = exponent.toByteArray();
+
+ // Adjust key length due to sign bit
+ int keyBitLength = (modulusBytes[0] == 0)
+ ? (modulusBytes.length - 1) * 8
+ : modulusBytes.length * 8;
+
+ byte[] keyBlob = RSASignature.generatePublicKeyBlob(
+ keyBitLength, modulusBytes, exponentBytes);
+
+ try {
+ key = RSASignature.importPublicKey(keyBlob, keyBitLength);
+
+ } catch (KeyStoreException e) {
+ throw new InvalidKeyException(e);
+ }
+
+ } else {
+ throw new InvalidKeyException("Unsupported key type: " + key);
+ }
}
if (key instanceof PublicKey) {
@@ -358,6 +396,10 @@
if (key instanceof sun.security.mscapi.Key) {
return ((sun.security.mscapi.Key) key).bitLength();
+
+ } else if (key instanceof RSAKey) {
+ return ((RSAKey) key).getModulus().bitLength();
+
} else {
throw new InvalidKeyException("Unsupported key type: " + key);
}
--- a/jdk/src/windows/classes/sun/security/mscapi/RSAKeyPairGenerator.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/RSAKeyPairGenerator.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -105,14 +105,20 @@
// generate the keypair. See JCA doc
public KeyPair generateKeyPair() {
- // Generate each keypair in a unique key container
- RSAKeyPair keys =
- generateRSAKeyPair(keySize,
- "{" + UUID.randomUUID().toString() + "}");
+ try {
- return new KeyPair(keys.getPublic(), keys.getPrivate());
+ // Generate each keypair in a unique key container
+ RSAKeyPair keys =
+ generateRSAKeyPair(keySize,
+ "{" + UUID.randomUUID().toString() + "}");
+
+ return new KeyPair(keys.getPublic(), keys.getPrivate());
+
+ } catch (KeyException e) {
+ throw new ProviderException(e);
+ }
}
private static native RSAKeyPair generateRSAKeyPair(int keySize,
- String keyContainerName);
+ String keyContainerName) throws KeyException;
}
--- a/jdk/src/windows/classes/sun/security/mscapi/RSAPublicKey.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/RSAPublicKey.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -27,7 +27,9 @@
import java.math.BigInteger;
import java.security.InvalidKeyException;
+import java.security.KeyException;
import java.security.KeyRep;
+import java.security.ProviderException;
import java.security.PublicKey;
import sun.security.rsa.RSAPublicKeyImpl;
@@ -89,9 +91,14 @@
public BigInteger getPublicExponent() {
if (exponent == null) {
- publicKeyBlob = getPublicKeyBlob(hCryptKey);
- exponent = new BigInteger(getExponent(publicKeyBlob));
+ try {
+ publicKeyBlob = getPublicKeyBlob(hCryptKey);
+ exponent = new BigInteger(1, getExponent(publicKeyBlob));
+
+ } catch (KeyException e) {
+ throw new ProviderException(e);
+ }
}
return exponent;
@@ -103,8 +110,14 @@
public BigInteger getModulus() {
if (modulus == null) {
- publicKeyBlob = getPublicKeyBlob(hCryptKey);
- modulus = new BigInteger(getModulus(publicKeyBlob));
+
+ try {
+ publicKeyBlob = getPublicKeyBlob(hCryptKey);
+ modulus = new BigInteger(1, getModulus(publicKeyBlob));
+
+ } catch (KeyException e) {
+ throw new ProviderException(e);
+ }
}
return modulus;
@@ -147,7 +160,7 @@
encoding = new RSAPublicKeyImpl(getModulus(),
getPublicExponent()).getEncoded();
- } catch (InvalidKeyException e) {
+ } catch (KeyException e) {
// ignore
}
}
@@ -164,15 +177,15 @@
/*
* Returns the Microsoft CryptoAPI representation of the key.
*/
- private native byte[] getPublicKeyBlob(long hCryptKey);
+ private native byte[] getPublicKeyBlob(long hCryptKey) throws KeyException;
/*
* Returns the key's public exponent (in big-endian 2's complement format).
*/
- private native byte[] getExponent(byte[] keyBlob);
+ private native byte[] getExponent(byte[] keyBlob) throws KeyException;
/*
* Returns the key's modulus (in big-endian 2's complement format).
*/
- private native byte[] getModulus(byte[] keyBlob);
+ private native byte[] getModulus(byte[] keyBlob) throws KeyException;
}
--- a/jdk/src/windows/classes/sun/security/mscapi/RSASignature.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/RSASignature.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -31,6 +31,7 @@
import java.security.InvalidKeyException;
import java.security.InvalidParameterException;
import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.ProviderException;
import java.security.MessageDigest;
@@ -48,11 +49,20 @@
* Objects should be instantiated by calling Signature.getInstance() using the
* following algorithm names:
*
+ * . "NONEwithRSA"
* . "SHA1withRSA"
+ * . "SHA256withRSA"
+ * . "SHA384withRSA"
+ * . "SHA512withRSA"
* . "MD5withRSA"
* . "MD2withRSA"
*
- * Note: RSA keys must be at least 512 bits long
+ * NOTE: RSA keys must be at least 512 bits long.
+ *
+ * NOTE: NONEwithRSA must be supplied with a pre-computed message digest.
+ * Only the following digest algorithms are supported: MD5, SHA-1,
+ * SHA-256, SHA-384, SHA-512 and a special-purpose digest algorithm
+ * which is a concatenation of SHA-1 and MD5 digests.
*
* @since 1.6
* @author Stanley Man-Kit Ho
@@ -62,7 +72,10 @@
// message digest implementation we use
private final MessageDigest messageDigest;
- // flag indicating whether the digest is reset
+ // message digest name
+ private String messageDigestAlgorithm;
+
+ // flag indicating whether the digest has been reset
private boolean needsReset;
// the signing key
@@ -71,11 +84,23 @@
// the verification key
private Key publicKey = null;
+ /**
+ * Constructs a new RSASignature. Used by Raw subclass.
+ */
+ RSASignature() {
+ messageDigest = null;
+ messageDigestAlgorithm = null;
+ }
+ /**
+ * Constructs a new RSASignature. Used by subclasses.
+ */
RSASignature(String digestName) {
try {
messageDigest = MessageDigest.getInstance(digestName);
+ // Get the digest's canonical name
+ messageDigestAlgorithm = messageDigest.getAlgorithm();
} catch (NoSuchAlgorithmException e) {
throw new ProviderException(e);
@@ -84,12 +109,118 @@
needsReset = false;
}
+ // Nested class for NONEwithRSA signatures
+ public static final class Raw extends RSASignature {
+
+ // the longest supported digest is 512 bits (SHA-512)
+ private static final int RAW_RSA_MAX = 64;
+
+ private final byte[] precomputedDigest;
+ private int offset = 0;
+
+ public Raw() {
+ precomputedDigest = new byte[RAW_RSA_MAX];
+ }
+
+ // Stores the precomputed message digest value.
+ @Override
+ protected void engineUpdate(byte b) throws SignatureException {
+ if (offset >= precomputedDigest.length) {
+ offset = RAW_RSA_MAX + 1;
+ return;
+ }
+ precomputedDigest[offset++] = b;
+ }
+
+ // Stores the precomputed message digest value.
+ @Override
+ protected void engineUpdate(byte[] b, int off, int len)
+ throws SignatureException {
+ if (offset + len > precomputedDigest.length) {
+ offset = RAW_RSA_MAX + 1;
+ return;
+ }
+ System.arraycopy(b, off, precomputedDigest, offset, len);
+ offset += len;
+ }
+
+ // Stores the precomputed message digest value.
+ @Override
+ protected void engineUpdate(ByteBuffer byteBuffer) {
+ int len = byteBuffer.remaining();
+ if (len <= 0) {
+ return;
+ }
+ if (offset + len > precomputedDigest.length) {
+ offset = RAW_RSA_MAX + 1;
+ return;
+ }
+ byteBuffer.get(precomputedDigest, offset, len);
+ offset += len;
+ }
+
+ @Override
+ protected void resetDigest(){
+ offset = 0;
+ }
+
+ // Returns the precomputed message digest value.
+ @Override
+ protected byte[] getDigestValue() throws SignatureException {
+ if (offset > RAW_RSA_MAX) {
+ throw new SignatureException("Message digest is too long");
+ }
+
+ // Determine the digest algorithm from the digest length
+ if (offset == 20) {
+ setDigestName("SHA1");
+ } else if (offset == 36) {
+ setDigestName("SHA1+MD5");
+ } else if (offset == 32) {
+ setDigestName("SHA-256");
+ } else if (offset == 48) {
+ setDigestName("SHA-384");
+ } else if (offset == 64) {
+ setDigestName("SHA-512");
+ } else if (offset == 16) {
+ setDigestName("MD5");
+ } else {
+ throw new SignatureException(
+ "Message digest length is not supported");
+ }
+
+ byte[] result = new byte[offset];
+ System.arraycopy(precomputedDigest, 0, result, 0, offset);
+ offset = 0;
+
+ return result;
+ }
+ }
+
public static final class SHA1 extends RSASignature {
public SHA1() {
super("SHA1");
}
}
+ public static final class SHA256 extends RSASignature {
+ public SHA256() {
+ super("SHA-256");
+ }
+ }
+
+ public static final class SHA384 extends RSASignature {
+ public SHA384() {
+ super("SHA-384");
+ }
+ }
+
+ public static final class SHA512 extends RSASignature {
+ public SHA512() {
+ super("SHA-512");
+ }
+ }
+
public static final class MD5 extends RSASignature {
public MD5() {
super("MD5");
@@ -102,16 +233,7 @@
}
}
- /**
- * Initializes this signature object with the specified
- * public key for verification operations.
- *
- * @param publicKey the public key of the identity whose signature is
- * going to be verified.
- *
- * @exception InvalidKeyException if the key is improperly
- * encoded, parameters are missing, and so on.
- */
+ // initialize for signing. See JCA doc
protected void engineInitVerify(PublicKey key)
throws InvalidKeyException
{
@@ -146,30 +268,23 @@
byte[] keyBlob = generatePublicKeyBlob(
keyBitLength, modulusBytes, exponentBytes);
- publicKey = importPublicKey(keyBlob, keyBitLength);
+ try {
+ publicKey = importPublicKey(keyBlob, keyBitLength);
+
+ } catch (KeyStoreException e) {
+ throw new InvalidKeyException(e);
+ }
} else {
publicKey = (sun.security.mscapi.RSAPublicKey) key;
}
- if (needsReset) {
- messageDigest.reset();
- needsReset = false;
- }
+ this.privateKey = null;
+ resetDigest();
}
- /**
- * Initializes this signature object with the specified
- * private key for signing operations.
- *
- * @param privateKey the private key of the identity whose signature
- * will be generated.
- *
- * @exception InvalidKeyException if the key is improperly
- * encoded, parameters are missing, and so on.
- */
- protected void engineInitSign(PrivateKey key)
- throws InvalidKeyException
+ // initialize for signing. See JCA doc
+ protected void engineInitSign(PrivateKey key) throws InvalidKeyException
{
// This signature accepts only RSAPrivateKey
if ((key instanceof sun.security.mscapi.RSAPrivateKey) == false) {
@@ -183,12 +298,29 @@
null, RSAKeyPairGenerator.KEY_SIZE_MIN,
RSAKeyPairGenerator.KEY_SIZE_MAX);
+ this.publicKey = null;
+ resetDigest();
+ }
+
+ /**
+ * Resets the message digest if needed.
+ */
+ protected void resetDigest() {
if (needsReset) {
messageDigest.reset();
needsReset = false;
}
}
+ protected byte[] getDigestValue() throws SignatureException {
+ needsReset = false;
+ return messageDigest.digest();
+ }
+
+ protected void setDigestName(String name) {
+ messageDigestAlgorithm = name;
+ }
+
/**
* Updates the data to be signed or verified
* using the specified byte.
@@ -248,13 +380,15 @@
*/
protected byte[] engineSign() throws SignatureException {
- byte[] hash = messageDigest.digest();
- needsReset = false;
+ byte[] hash = getDigestValue();
+
+ // Omit the hash OID when generating a Raw signature
+ boolean noHashOID = this instanceof Raw;
// Sign hash using MS Crypto APIs
- byte[] result = signHash(hash, hash.length,
- messageDigest.getAlgorithm(), privateKey.getHCryptProvider(),
+ byte[] result = signHash(noHashOID, hash, hash.length,
+ messageDigestAlgorithm, privateKey.getHCryptProvider(),
privateKey.getHCryptKey());
// Convert signature array from little endian to big endian
@@ -282,8 +416,8 @@
* Sign hash using Microsoft Crypto API with HCRYPTKEY.
* The returned data is in little-endian.
*/
- private native static byte[] signHash(byte[] hash, int hashSize,
- String hashAlgorithm, long hCryptProv, long hCryptKey)
+ private native static byte[] signHash(boolean noHashOID, byte[] hash,
+ int hashSize, String hashAlgorithm, long hCryptProv, long hCryptKey)
throws SignatureException;
/**
@@ -308,11 +442,10 @@
protected boolean engineVerify(byte[] sigBytes)
throws SignatureException
{
- byte[] hash = messageDigest.digest();
- needsReset = false;
+ byte[] hash = getDigestValue();
return verifySignedHash(hash, hash.length,
- messageDigest.getAlgorithm(), convertEndianArray(sigBytes),
+ messageDigestAlgorithm, convertEndianArray(sigBytes),
sigBytes.length, publicKey.getHCryptProvider(),
publicKey.getHCryptKey());
}
@@ -379,11 +512,15 @@
/**
* Generates a public-key BLOB from a key's components.
*/
- private native byte[] generatePublicKeyBlob(
- int keyBitLength, byte[] modulus, byte[] publicExponent);
+ // used by RSACipher
+ static native byte[] generatePublicKeyBlob(
+ int keyBitLength, byte[] modulus, byte[] publicExponent)
+ throws InvalidKeyException;
/**
* Imports a public-key BLOB.
*/
- private native RSAPublicKey importPublicKey(byte[] keyBlob, int keySize);
+ // used by RSACipher
+ static native RSAPublicKey importPublicKey(byte[] keyBlob, int keySize)
+ throws KeyStoreException;
}
--- a/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/classes/sun/security/mscapi/SunMSCAPI.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, 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
@@ -79,22 +79,40 @@
/*
* Signature engines
*/
+ // NONEwithRSA must be supplied with a pre-computed message digest.
+ // Only the following digest algorithms are supported: MD5, SHA-1,
+ // SHA-256, SHA-384, SHA-512 and a special-purpose digest algorithm
+ // which is a concatenation of SHA-1 and MD5 digests.
+ map.put("Signature.NONEwithRSA",
+ "sun.security.mscapi.RSASignature$Raw");
map.put("Signature.SHA1withRSA",
"sun.security.mscapi.RSASignature$SHA1");
+ map.put("Signature.SHA256withRSA",
+ "sun.security.mscapi.RSASignature$SHA256");
+ map.put("Signature.SHA384withRSA",
+ "sun.security.mscapi.RSASignature$SHA384");
+ map.put("Signature.SHA512withRSA",
+ "sun.security.mscapi.RSASignature$SHA512");
map.put("Signature.MD5withRSA",
"sun.security.mscapi.RSASignature$MD5");
map.put("Signature.MD2withRSA",
"sun.security.mscapi.RSASignature$MD2");
// supported key classes
+ map.put("Signature.NONEwithRSA SupportedKeyClasses",
+ "sun.security.mscapi.Key");
map.put("Signature.SHA1withRSA SupportedKeyClasses",
"sun.security.mscapi.Key");
+ map.put("Signature.SHA256withRSA SupportedKeyClasses",
+ "sun.security.mscapi.Key");
+ map.put("Signature.SHA384withRSA SupportedKeyClasses",
+ "sun.security.mscapi.Key");
+ map.put("Signature.SHA512withRSA SupportedKeyClasses",
+ "sun.security.mscapi.Key");
map.put("Signature.MD5withRSA SupportedKeyClasses",
"sun.security.mscapi.Key");
map.put("Signature.MD2withRSA SupportedKeyClasses",
"sun.security.mscapi.Key");
- map.put("Signature.NONEwithRSA SupportedKeyClasses",
- "sun.security.mscapi.Key");
/*
* Key Pair Generator engines
--- a/jdk/src/windows/native/sun/security/mscapi/security.cpp Tue May 03 22:14:39 2011 -0700
+++ b/jdk/src/windows/native/sun/security/mscapi/security.cpp Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,8 @@
#define CERTIFICATE_PARSING_EXCEPTION \
"java/security/cert/CertificateParsingException"
+#define INVALID_KEY_EXCEPTION \
+ "java/security/InvalidKeyException"
#define KEY_EXCEPTION "java/security/KeyException"
#define KEYSTORE_EXCEPTION "java/security/KeyStoreException"
#define PROVIDER_EXCEPTION "java/security/ProviderException"
@@ -79,6 +81,8 @@
(strcmp("SHA-1", pszHashAlgorithm) == 0)) {
algId = CALG_SHA1;
+ } else if (strcmp("SHA1+MD5", pszHashAlgorithm) == 0) {
+ algId = CALG_SSL3_SHAMD5; // a 36-byte concatenation of SHA-1 and MD5
} else if (strcmp("SHA-256", pszHashAlgorithm) == 0) {
algId = CALG_SHA_256;
} else if (strcmp("SHA-384", pszHashAlgorithm) == 0) {
@@ -471,16 +475,18 @@
/*
* Class: sun_security_mscapi_RSASignature
* Method: signHash
- * Signature: ([BILjava/lang/String;JJ)[B
+ * Signature: (Z[BILjava/lang/String;JJ)[B
*/
JNIEXPORT jbyteArray JNICALL Java_sun_security_mscapi_RSASignature_signHash
- (JNIEnv *env, jclass clazz, jbyteArray jHash, jint jHashSize,
- jstring jHashAlgorithm, jlong hCryptProv, jlong hCryptKey)
+ (JNIEnv *env, jclass clazz, jboolean noHashOID, jbyteArray jHash,
+ jint jHashSize, jstring jHashAlgorithm, jlong hCryptProv,
+ jlong hCryptKey)
{
HCRYPTHASH hHash = NULL;
jbyte* pHashBuffer = NULL;
jbyte* pSignedHashBuffer = NULL;
jbyteArray jSignedHash = NULL;
+ HCRYPTPROV hCryptProvAlt = NULL;
__try
{
@@ -490,8 +496,32 @@
// Acquire a hash object handle.
if (::CryptCreateHash(HCRYPTPROV(hCryptProv), algId, 0, 0, &hHash) == FALSE)
{
- ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
- __leave;
+ // Failover to using the PROV_RSA_AES CSP
+
+ DWORD cbData = 256;
+ BYTE pbData[256];
+ pbData[0] = '\0';
+
+ // Get name of the key container
+ ::CryptGetProvParam((HCRYPTPROV)hCryptProv, PP_CONTAINER,
+ (BYTE *)pbData, &cbData, 0);
+
+ // Acquire an alternative CSP handle
+ if (::CryptAcquireContext(&hCryptProvAlt, LPCSTR(pbData), NULL,
+ PROV_RSA_AES, 0) == FALSE)
+ {
+
+ ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
+ __leave;
+ }
+
+ // Acquire a hash object handle.
+ if (::CryptCreateHash(HCRYPTPROV(hCryptProvAlt), algId, 0, 0,
+ &hHash) == FALSE)
+ {
+ ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
+ __leave;
+ }
}
// Copy hash from Java to native buffer
@@ -521,14 +551,20 @@
// Determine size of buffer
DWORD dwBufLen = 0;
- if (::CryptSignHash(hHash, dwKeySpec, NULL, NULL, NULL, &dwBufLen) == FALSE)
+ DWORD dwFlags = 0;
+
+ if (noHashOID == JNI_TRUE) {
+ dwFlags = CRYPT_NOHASHOID; // omit hash OID in NONEwithRSA signature
+ }
+
+ if (::CryptSignHash(hHash, dwKeySpec, NULL, dwFlags, NULL, &dwBufLen) == FALSE)
{
ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
__leave;
}
pSignedHashBuffer = new jbyte[dwBufLen];
- if (::CryptSignHash(hHash, dwKeySpec, NULL, NULL, (BYTE*)pSignedHashBuffer, &dwBufLen) == FALSE)
+ if (::CryptSignHash(hHash, dwKeySpec, NULL, dwFlags, (BYTE*)pSignedHashBuffer, &dwBufLen) == FALSE)
{
ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
__leave;
@@ -544,6 +580,9 @@
}
__finally
{
+ if (hCryptProvAlt)
+ ::CryptReleaseContext(hCryptProvAlt, 0);
+
if (pSignedHashBuffer)
delete [] pSignedHashBuffer;
@@ -572,6 +611,7 @@
jbyte* pSignedHashBuffer = NULL;
DWORD dwSignedHashBufferLen = jSignedHashSize;
jboolean result = JNI_FALSE;
+ HCRYPTPROV hCryptProvAlt = NULL;
__try
{
@@ -582,8 +622,32 @@
if (::CryptCreateHash(HCRYPTPROV(hCryptProv), algId, 0, 0, &hHash)
== FALSE)
{
- ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
- __leave;
+ // Failover to using the PROV_RSA_AES CSP
+
+ DWORD cbData = 256;
+ BYTE pbData[256];
+ pbData[0] = '\0';
+
+ // Get name of the key container
+ ::CryptGetProvParam((HCRYPTPROV)hCryptProv, PP_CONTAINER,
+ (BYTE *)pbData, &cbData, 0);
+
+ // Acquire an alternative CSP handle
+ if (::CryptAcquireContext(&hCryptProvAlt, LPCSTR(pbData), NULL,
+ PROV_RSA_AES, 0) == FALSE)
+ {
+
+ ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
+ __leave;
+ }
+
+ // Acquire a hash object handle.
+ if (::CryptCreateHash(HCRYPTPROV(hCryptProvAlt), algId, 0, 0,
+ &hHash) == FALSE)
+ {
+ ThrowException(env, SIGNATURE_EXCEPTION, GetLastError());
+ __leave;
+ }
}
// Copy hash and signedHash from Java to native buffer
@@ -614,6 +678,9 @@
__finally
{
+ if (hCryptProvAlt)
+ ::CryptReleaseContext(hCryptProvAlt, 0);
+
if (pSignedHashBuffer)
delete [] pSignedHashBuffer;
@@ -646,15 +713,27 @@
pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
// Acquire a CSP context (create a new key container).
+ // Prefer a PROV_RSA_AES CSP, when available, due to its support
+ // for SHA-2-based signatures.
if (::CryptAcquireContext(
&hCryptProv,
pszKeyContainerName,
NULL,
- PROV_RSA_FULL,
+ PROV_RSA_AES,
CRYPT_NEWKEYSET) == FALSE)
{
- ThrowException(env, KEY_EXCEPTION, GetLastError());
- __leave;
+ // Failover to using the default CSP (PROV_RSA_FULL)
+
+ if (::CryptAcquireContext(
+ &hCryptProv,
+ pszKeyContainerName,
+ NULL,
+ PROV_RSA_FULL,
+ CRYPT_NEWKEYSET) == FALSE)
+ {
+ ThrowException(env, KEY_EXCEPTION, GetLastError());
+ __leave;
+ }
}
// Generate an RSA keypair
@@ -1398,7 +1477,7 @@
jbyteArray blob = NULL;
DWORD dwBlobLen;
- BYTE* pbKeyBlob;
+ BYTE* pbKeyBlob = NULL;
__try
{
@@ -1656,7 +1735,7 @@
// Sanity check
jsize jPublicExponentLength = env->GetArrayLength(jPublicExponent);
if (jPublicExponentLength > sizeof(pRsaPubKey->pubexp)) {
- ThrowException(env, KEY_EXCEPTION, NTE_BAD_TYPE);
+ ThrowException(env, INVALID_KEY_EXCEPTION, NTE_BAD_TYPE);
__leave;
}
// The length argument must be the smaller of jPublicExponentLength
@@ -1847,15 +1926,27 @@
pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0);
// Acquire a CSP context (create a new key container).
+ // Prefer a PROV_RSA_AES CSP, when available, due to its support
+ // for SHA-2-based signatures.
if (::CryptAcquireContext(
&hCryptProv,
NULL,
NULL,
- PROV_RSA_FULL,
+ PROV_RSA_AES,
CRYPT_VERIFYCONTEXT) == FALSE)
{
- ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
- __leave;
+ // Failover to using the default CSP (PROV_RSA_FULL)
+
+ if (::CryptAcquireContext(
+ &hCryptProv,
+ NULL,
+ NULL,
+ PROV_RSA_FULL,
+ CRYPT_VERIFYCONTEXT) == FALSE)
+ {
+ ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
+ __leave;
+ }
}
// Import the public key
--- a/jdk/test/java/beans/XMLEncoder/java_io_File.java Tue May 03 22:14:39 2011 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 6708550
- * @summary Tests File encoding
- * @author Sergey Malenkov
- */
-
-import java.io.File;
-
-public final class java_io_File extends AbstractTest<File> {
- public static void main(String[] args) {
- new java_io_File().test(true);
- }
-
- @Override
- protected File getObject() {
- return new File("test.txt"); // NON-NLS: local file
- }
-
- @Override
- protected File getAnotherObject() {
- return new File("/pub/demo/"); // NON-NLS: path
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/Character/CheckProp.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/**
+ * @test
+ * @bug 7037261
+ * @summary Check j.l.Character.isLowerCase/isUppercase/isAlphabetic/isIdeographic
+ */
+
+import java.util.regex.*;
+import java.util.*;
+import java.io.*;
+import static java.lang.Character.*;
+
+public class CheckProp {
+
+ public static void main(String[] args) throws IOException {
+ File fPropList = new File(System.getProperty("test.src", "."), "PropList.txt");
+ int i, j;
+ BufferedReader sbfr = new BufferedReader(new FileReader(fPropList));
+ Matcher m = Pattern.compile("(\\p{XDigit}+)(?:\\.{2}(\\p{XDigit}+))?\\s*;\\s+(\\w+)\\s+#.*").matcher("");
+ Map<String, ArrayList<Integer>> propMap = new LinkedHashMap<>();
+
+ String line = null;
+ int lineNo = 0;
+ while ((line = sbfr.readLine()) != null) {
+ lineNo++;
+ if (line.length() <= 1 || line.charAt(0) == '#') {
+ continue;
+ }
+ m.reset(line);
+ if (m.matches()) {
+ int start = Integer.parseInt(m.group(1), 16);
+ int end = (m.group(2)==null)?start
+ :Integer.parseInt(m.group(2), 16);
+ String name = m.group(3);
+
+ ArrayList<Integer> list = propMap.get(name);
+ if (list == null) {
+ list = new ArrayList<Integer>();
+ propMap.put(name, list);
+ }
+ while (start <= end)
+ list.add(start++);
+ } else {
+ System.out.printf("Warning: Unrecognized line %d <%s>%n", lineNo, line);
+ }
+ }
+ sbfr.close();
+ //for (String name: propMap.keySet()) {
+ // System.out.printf("%s %d%n", name, propMap.get(name).size());
+ //}
+
+ Integer[] otherLowercase = propMap.get("Other_Lowercase").toArray(new Integer[0]);
+ Integer[] otherUppercase = propMap.get("Other_Uppercase").toArray(new Integer[0]);
+ Integer[] otherAlphabetic = propMap.get("Other_Alphabetic").toArray(new Integer[0]);
+ Integer[] ideographic = propMap.get("Ideographic").toArray(new Integer[0]);
+
+ int fails = 0;
+ for (int cp = MIN_CODE_POINT; cp < MAX_CODE_POINT; cp++) {
+ int type = getType(cp);
+ if (isLowerCase(cp) !=
+ (type == LOWERCASE_LETTER ||
+ Arrays.binarySearch(otherLowercase, cp) >= 0))
+ {
+ fails++;
+ System.err.printf("Wrong isLowerCase(U+%04x)\n", cp);
+ }
+ if (isUpperCase(cp) !=
+ (type == UPPERCASE_LETTER ||
+ Arrays.binarySearch(otherUppercase, cp) >= 0))
+ {
+ fails++;
+ System.err.printf("Wrong isUpperCase(U+%04x)\n", cp);
+ }
+ if (isAlphabetic(cp) !=
+ (type == UPPERCASE_LETTER || type == LOWERCASE_LETTER ||
+ type == TITLECASE_LETTER || type == MODIFIER_LETTER ||
+ type == OTHER_LETTER || type == OTHER_LETTER ||
+ type == LETTER_NUMBER ||
+ Arrays.binarySearch(otherAlphabetic, cp) >=0))
+ {
+ fails++;
+ System.err.printf("Wrong isAlphabetic(U+%04x)\n", cp);
+ }
+ if (isIdeographic(cp) !=
+ (Arrays.binarySearch(ideographic, cp) >= 0))
+ {
+ fails++;
+ System.err.printf("Wrong isIdeographic(U+%04x)\n", cp);
+ }
+ }
+ if (fails != 0)
+ throw new RuntimeException("CheckProp failed=" + fails);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/Character/PropList.txt Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,1296 @@
+# PropList-6.0.0.txt
+# Date: 2010-08-19, 00:48:28 GMT [MD]
+#
+# Unicode Character Database
+# 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/
+
+# ================================================
+
+0009..000D ; White_Space # Cc [5] <control-0009>..<control-000D>
+0020 ; White_Space # Zs SPACE
+0085 ; White_Space # Cc <control-0085>
+00A0 ; White_Space # Zs NO-BREAK SPACE
+1680 ; White_Space # Zs OGHAM SPACE MARK
+180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
+2000..200A ; White_Space # Zs [11] EN QUAD..HAIR SPACE
+2028 ; White_Space # Zl LINE SEPARATOR
+2029 ; White_Space # Zp PARAGRAPH SEPARATOR
+202F ; White_Space # Zs NARROW NO-BREAK SPACE
+205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE
+3000 ; White_Space # Zs IDEOGRAPHIC SPACE
+
+# Total code points: 26
+
+# ================================================
+
+200E..200F ; Bidi_Control # Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK
+202A..202E ; Bidi_Control # Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE
+
+# Total code points: 7
+
+# ================================================
+
+200C..200D ; Join_Control # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
+
+# Total code points: 2
+
+# ================================================
+
+002D ; Dash # Pd HYPHEN-MINUS
+058A ; Dash # Pd ARMENIAN HYPHEN
+05BE ; Dash # Pd HEBREW PUNCTUATION MAQAF
+1400 ; Dash # Pd CANADIAN SYLLABICS HYPHEN
+1806 ; Dash # Pd MONGOLIAN TODO SOFT HYPHEN
+2010..2015 ; Dash # Pd [6] HYPHEN..HORIZONTAL BAR
+2053 ; Dash # Po SWUNG DASH
+207B ; Dash # Sm SUPERSCRIPT MINUS
+208B ; Dash # Sm SUBSCRIPT MINUS
+2212 ; Dash # Sm MINUS SIGN
+2E17 ; Dash # Pd DOUBLE OBLIQUE HYPHEN
+2E1A ; Dash # Pd HYPHEN WITH DIAERESIS
+301C ; Dash # Pd WAVE DASH
+3030 ; Dash # Pd WAVY DASH
+30A0 ; Dash # Pd KATAKANA-HIRAGANA DOUBLE HYPHEN
+FE31..FE32 ; Dash # Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH
+FE58 ; Dash # Pd SMALL EM DASH
+FE63 ; Dash # Pd SMALL HYPHEN-MINUS
+FF0D ; Dash # Pd FULLWIDTH HYPHEN-MINUS
+
+# Total code points: 25
+
+# ================================================
+
+002D ; Hyphen # Pd HYPHEN-MINUS
+00AD ; Hyphen # Cf SOFT HYPHEN
+058A ; Hyphen # Pd ARMENIAN HYPHEN
+1806 ; Hyphen # Pd MONGOLIAN TODO SOFT HYPHEN
+2010..2011 ; Hyphen # Pd [2] HYPHEN..NON-BREAKING HYPHEN
+2E17 ; Hyphen # Pd DOUBLE OBLIQUE HYPHEN
+30FB ; Hyphen # Po KATAKANA MIDDLE DOT
+FE63 ; Hyphen # Pd SMALL HYPHEN-MINUS
+FF0D ; Hyphen # Pd FULLWIDTH HYPHEN-MINUS
+FF65 ; Hyphen # Po HALFWIDTH KATAKANA MIDDLE DOT
+
+# Total code points: 11
+
+# ================================================
+
+0022 ; Quotation_Mark # Po QUOTATION MARK
+0027 ; Quotation_Mark # Po APOSTROPHE
+00AB ; Quotation_Mark # Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+00BB ; Quotation_Mark # Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+2018 ; Quotation_Mark # Pi LEFT SINGLE QUOTATION MARK
+2019 ; Quotation_Mark # Pf RIGHT SINGLE QUOTATION MARK
+201A ; Quotation_Mark # Ps SINGLE LOW-9 QUOTATION MARK
+201B..201C ; Quotation_Mark # Pi [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK
+201D ; Quotation_Mark # Pf RIGHT DOUBLE QUOTATION MARK
+201E ; Quotation_Mark # Ps DOUBLE LOW-9 QUOTATION MARK
+201F ; Quotation_Mark # Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+2039 ; Quotation_Mark # Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+203A ; Quotation_Mark # Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+300C ; Quotation_Mark # Ps LEFT CORNER BRACKET
+300D ; Quotation_Mark # Pe RIGHT CORNER BRACKET
+300E ; Quotation_Mark # Ps LEFT WHITE CORNER BRACKET
+300F ; Quotation_Mark # Pe RIGHT WHITE CORNER BRACKET
+301D ; Quotation_Mark # Ps REVERSED DOUBLE PRIME QUOTATION MARK
+301E..301F ; Quotation_Mark # Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK
+FE41 ; Quotation_Mark # Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
+FE42 ; Quotation_Mark # Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
+FE43 ; Quotation_Mark # Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
+FE44 ; Quotation_Mark # Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
+FF02 ; Quotation_Mark # Po FULLWIDTH QUOTATION MARK
+FF07 ; Quotation_Mark # Po FULLWIDTH APOSTROPHE
+FF62 ; Quotation_Mark # Ps HALFWIDTH LEFT CORNER BRACKET
+FF63 ; Quotation_Mark # Pe HALFWIDTH RIGHT CORNER BRACKET
+
+# Total code points: 29
+
+# ================================================
+
+0021 ; Terminal_Punctuation # Po EXCLAMATION MARK
+002C ; Terminal_Punctuation # Po COMMA
+002E ; Terminal_Punctuation # Po FULL STOP
+003A..003B ; Terminal_Punctuation # Po [2] COLON..SEMICOLON
+003F ; Terminal_Punctuation # Po QUESTION MARK
+037E ; Terminal_Punctuation # Po GREEK QUESTION MARK
+0387 ; Terminal_Punctuation # Po GREEK ANO TELEIA
+0589 ; Terminal_Punctuation # Po ARMENIAN FULL STOP
+05C3 ; Terminal_Punctuation # Po HEBREW PUNCTUATION SOF PASUQ
+060C ; Terminal_Punctuation # Po ARABIC COMMA
+061B ; Terminal_Punctuation # Po ARABIC SEMICOLON
+061F ; Terminal_Punctuation # Po ARABIC QUESTION MARK
+06D4 ; Terminal_Punctuation # Po ARABIC FULL STOP
+0700..070A ; Terminal_Punctuation # Po [11] SYRIAC END OF PARAGRAPH..SYRIAC CONTRACTION
+070C ; Terminal_Punctuation # Po SYRIAC HARKLEAN METOBELUS
+07F8..07F9 ; Terminal_Punctuation # Po [2] NKO COMMA..NKO EXCLAMATION MARK
+0830..083E ; Terminal_Punctuation # Po [15] SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU
+085E ; Terminal_Punctuation # Po MANDAIC PUNCTUATION
+0964..0965 ; Terminal_Punctuation # Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
+0E5A..0E5B ; Terminal_Punctuation # Po [2] THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT
+0F08 ; Terminal_Punctuation # Po TIBETAN MARK SBRUL SHAD
+0F0D..0F12 ; Terminal_Punctuation # Po [6] TIBETAN MARK SHAD..TIBETAN MARK RGYA GRAM SHAD
+104A..104B ; Terminal_Punctuation # Po [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION
+1361..1368 ; Terminal_Punctuation # Po [8] ETHIOPIC WORDSPACE..ETHIOPIC PARAGRAPH SEPARATOR
+166D..166E ; Terminal_Punctuation # Po [2] CANADIAN SYLLABICS CHI SIGN..CANADIAN SYLLABICS FULL STOP
+16EB..16ED ; Terminal_Punctuation # Po [3] RUNIC SINGLE PUNCTUATION..RUNIC CROSS PUNCTUATION
+17D4..17D6 ; Terminal_Punctuation # Po [3] KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH
+17DA ; Terminal_Punctuation # Po KHMER SIGN KOOMUUT
+1802..1805 ; Terminal_Punctuation # Po [4] MONGOLIAN COMMA..MONGOLIAN FOUR DOTS
+1808..1809 ; Terminal_Punctuation # Po [2] MONGOLIAN MANCHU COMMA..MONGOLIAN MANCHU FULL STOP
+1944..1945 ; Terminal_Punctuation # Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
+1AA8..1AAB ; Terminal_Punctuation # Po [4] TAI THAM SIGN KAAN..TAI THAM SIGN SATKAANKUU
+1B5A..1B5B ; Terminal_Punctuation # Po [2] BALINESE PANTI..BALINESE PAMADA
+1B5D..1B5F ; Terminal_Punctuation # Po [3] BALINESE CARIK PAMUNGKAH..BALINESE CARIK PAREREN
+1C3B..1C3F ; Terminal_Punctuation # Po [5] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK
+1C7E..1C7F ; Terminal_Punctuation # Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD
+203C..203D ; Terminal_Punctuation # Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG
+2047..2049 ; Terminal_Punctuation # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2E2E ; Terminal_Punctuation # Po REVERSED QUESTION MARK
+3001..3002 ; Terminal_Punctuation # Po [2] IDEOGRAPHIC COMMA..IDEOGRAPHIC FULL STOP
+A4FE..A4FF ; Terminal_Punctuation # Po [2] LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP
+A60D..A60F ; Terminal_Punctuation # Po [3] VAI COMMA..VAI QUESTION MARK
+A6F3..A6F7 ; Terminal_Punctuation # Po [5] BAMUM FULL STOP..BAMUM QUESTION MARK
+A876..A877 ; Terminal_Punctuation # Po [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD
+A8CE..A8CF ; Terminal_Punctuation # Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
+A92F ; Terminal_Punctuation # Po KAYAH LI SIGN SHYA
+A9C7..A9C9 ; Terminal_Punctuation # Po [3] JAVANESE PADA PANGKAT..JAVANESE PADA LUNGSI
+AA5D..AA5F ; Terminal_Punctuation # Po [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA
+AADF ; Terminal_Punctuation # Po TAI VIET SYMBOL KOI KOI
+ABEB ; Terminal_Punctuation # Po MEETEI MAYEK CHEIKHEI
+FE50..FE52 ; Terminal_Punctuation # Po [3] SMALL COMMA..SMALL FULL STOP
+FE54..FE57 ; Terminal_Punctuation # Po [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK
+FF01 ; Terminal_Punctuation # Po FULLWIDTH EXCLAMATION MARK
+FF0C ; Terminal_Punctuation # Po FULLWIDTH COMMA
+FF0E ; Terminal_Punctuation # Po FULLWIDTH FULL STOP
+FF1A..FF1B ; Terminal_Punctuation # Po [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON
+FF1F ; Terminal_Punctuation # Po FULLWIDTH QUESTION MARK
+FF61 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+FF64 ; Terminal_Punctuation # Po HALFWIDTH IDEOGRAPHIC COMMA
+1039F ; Terminal_Punctuation # Po UGARITIC WORD DIVIDER
+103D0 ; Terminal_Punctuation # Po OLD PERSIAN WORD DIVIDER
+10857 ; Terminal_Punctuation # Po IMPERIAL ARAMAIC SECTION SIGN
+1091F ; Terminal_Punctuation # Po PHOENICIAN WORD SEPARATOR
+10B3A..10B3F ; Terminal_Punctuation # Po [6] TINY TWO DOTS OVER ONE DOT PUNCTUATION..LARGE ONE RING OVER TWO RINGS PUNCTUATION
+11047..1104D ; Terminal_Punctuation # Po [7] BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS
+110BE..110C1 ; Terminal_Punctuation # Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA
+12470..12473 ; Terminal_Punctuation # Po [4] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON
+
+# Total code points: 169
+
+# ================================================
+
+005E ; Other_Math # Sk CIRCUMFLEX ACCENT
+03D0..03D2 ; Other_Math # L& [3] GREEK BETA SYMBOL..GREEK UPSILON WITH HOOK SYMBOL
+03D5 ; Other_Math # L& GREEK PHI SYMBOL
+03F0..03F1 ; Other_Math # L& [2] GREEK KAPPA SYMBOL..GREEK RHO SYMBOL
+03F4..03F5 ; Other_Math # L& [2] GREEK CAPITAL THETA SYMBOL..GREEK LUNATE EPSILON SYMBOL
+2016 ; Other_Math # Po DOUBLE VERTICAL LINE
+2032..2034 ; Other_Math # Po [3] PRIME..TRIPLE PRIME
+2040 ; Other_Math # Pc CHARACTER TIE
+2061..2064 ; Other_Math # Cf [4] FUNCTION APPLICATION..INVISIBLE PLUS
+207D ; Other_Math # Ps SUPERSCRIPT LEFT PARENTHESIS
+207E ; Other_Math # Pe SUPERSCRIPT RIGHT PARENTHESIS
+208D ; Other_Math # Ps SUBSCRIPT LEFT PARENTHESIS
+208E ; Other_Math # Pe SUBSCRIPT RIGHT PARENTHESIS
+20D0..20DC ; Other_Math # Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE
+20E1 ; Other_Math # Mn COMBINING LEFT RIGHT ARROW ABOVE
+20E5..20E6 ; Other_Math # Mn [2] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING DOUBLE VERTICAL STROKE OVERLAY
+20EB..20EF ; Other_Math # Mn [5] COMBINING LONG DOUBLE SOLIDUS OVERLAY..COMBINING RIGHT ARROW BELOW
+2102 ; Other_Math # L& DOUBLE-STRUCK CAPITAL C
+2107 ; Other_Math # L& EULER CONSTANT
+210A..2113 ; Other_Math # L& [10] SCRIPT SMALL G..SCRIPT SMALL L
+2115 ; Other_Math # L& DOUBLE-STRUCK CAPITAL N
+2119..211D ; Other_Math # L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
+2124 ; Other_Math # L& DOUBLE-STRUCK CAPITAL Z
+2128 ; Other_Math # L& BLACK-LETTER CAPITAL Z
+2129 ; Other_Math # So TURNED GREEK SMALL LETTER IOTA
+212C..212D ; Other_Math # L& [2] SCRIPT CAPITAL B..BLACK-LETTER CAPITAL C
+212F..2131 ; Other_Math # L& [3] SCRIPT SMALL E..SCRIPT CAPITAL F
+2133..2134 ; Other_Math # L& [2] SCRIPT CAPITAL M..SCRIPT SMALL O
+2135..2138 ; Other_Math # Lo [4] ALEF SYMBOL..DALET SYMBOL
+213C..213F ; Other_Math # L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
+2145..2149 ; Other_Math # L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
+2195..2199 ; Other_Math # So [5] UP DOWN ARROW..SOUTH WEST ARROW
+219C..219F ; Other_Math # So [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW
+21A1..21A2 ; Other_Math # So [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL
+21A4..21A5 ; Other_Math # So [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR
+21A7 ; Other_Math # So DOWNWARDS ARROW FROM BAR
+21A9..21AD ; Other_Math # So [5] LEFTWARDS ARROW WITH HOOK..LEFT RIGHT WAVE ARROW
+21B0..21B1 ; Other_Math # So [2] UPWARDS ARROW WITH TIP LEFTWARDS..UPWARDS ARROW WITH TIP RIGHTWARDS
+21B6..21B7 ; Other_Math # So [2] ANTICLOCKWISE TOP SEMICIRCLE ARROW..CLOCKWISE TOP SEMICIRCLE ARROW
+21BC..21CD ; Other_Math # So [18] LEFTWARDS HARPOON WITH BARB UPWARDS..LEFTWARDS DOUBLE ARROW WITH STROKE
+21D0..21D1 ; Other_Math # So [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW
+21D3 ; Other_Math # So DOWNWARDS DOUBLE ARROW
+21D5..21DB ; Other_Math # So [7] UP DOWN DOUBLE ARROW..RIGHTWARDS TRIPLE ARROW
+21DD ; Other_Math # So RIGHTWARDS SQUIGGLE ARROW
+21E4..21E5 ; Other_Math # So [2] LEFTWARDS ARROW TO BAR..RIGHTWARDS ARROW TO BAR
+23B4..23B5 ; Other_Math # So [2] TOP SQUARE BRACKET..BOTTOM SQUARE BRACKET
+23B7 ; Other_Math # So RADICAL SYMBOL BOTTOM
+23D0 ; Other_Math # So VERTICAL LINE EXTENSION
+23E2 ; Other_Math # So WHITE TRAPEZIUM
+25A0..25A1 ; Other_Math # So [2] BLACK SQUARE..WHITE SQUARE
+25AE..25B6 ; Other_Math # So [9] BLACK VERTICAL RECTANGLE..BLACK RIGHT-POINTING TRIANGLE
+25BC..25C0 ; Other_Math # So [5] BLACK DOWN-POINTING TRIANGLE..BLACK LEFT-POINTING TRIANGLE
+25C6..25C7 ; Other_Math # So [2] BLACK DIAMOND..WHITE DIAMOND
+25CA..25CB ; Other_Math # So [2] LOZENGE..WHITE CIRCLE
+25CF..25D3 ; Other_Math # So [5] BLACK CIRCLE..CIRCLE WITH UPPER HALF BLACK
+25E2 ; Other_Math # So BLACK LOWER RIGHT TRIANGLE
+25E4 ; Other_Math # So BLACK UPPER LEFT TRIANGLE
+25E7..25EC ; Other_Math # So [6] SQUARE WITH LEFT HALF BLACK..WHITE UP-POINTING TRIANGLE WITH DOT
+2605..2606 ; Other_Math # So [2] BLACK STAR..WHITE STAR
+2640 ; Other_Math # So FEMALE SIGN
+2642 ; Other_Math # So MALE SIGN
+2660..2663 ; Other_Math # So [4] BLACK SPADE SUIT..BLACK CLUB SUIT
+266D..266E ; Other_Math # So [2] MUSIC FLAT SIGN..MUSIC NATURAL SIGN
+27C5 ; Other_Math # Ps LEFT S-SHAPED BAG DELIMITER
+27C6 ; Other_Math # Pe RIGHT S-SHAPED BAG DELIMITER
+27E6 ; Other_Math # Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET
+27E7 ; Other_Math # Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET
+27E8 ; Other_Math # Ps MATHEMATICAL LEFT ANGLE BRACKET
+27E9 ; Other_Math # Pe MATHEMATICAL RIGHT ANGLE BRACKET
+27EA ; Other_Math # Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
+27EB ; Other_Math # Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
+27EC ; Other_Math # Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
+27ED ; Other_Math # Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
+27EE ; Other_Math # Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS
+27EF ; Other_Math # Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+2983 ; Other_Math # Ps LEFT WHITE CURLY BRACKET
+2984 ; Other_Math # Pe RIGHT WHITE CURLY BRACKET
+2985 ; Other_Math # Ps LEFT WHITE PARENTHESIS
+2986 ; Other_Math # Pe RIGHT WHITE PARENTHESIS
+2987 ; Other_Math # Ps Z NOTATION LEFT IMAGE BRACKET
+2988 ; Other_Math # Pe Z NOTATION RIGHT IMAGE BRACKET
+2989 ; Other_Math # Ps Z NOTATION LEFT BINDING BRACKET
+298A ; Other_Math # Pe Z NOTATION RIGHT BINDING BRACKET
+298B ; Other_Math # Ps LEFT SQUARE BRACKET WITH UNDERBAR
+298C ; Other_Math # Pe RIGHT SQUARE BRACKET WITH UNDERBAR
+298D ; Other_Math # Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
+298E ; Other_Math # Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+298F ; Other_Math # Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+2990 ; Other_Math # Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
+2991 ; Other_Math # Ps LEFT ANGLE BRACKET WITH DOT
+2992 ; Other_Math # Pe RIGHT ANGLE BRACKET WITH DOT
+2993 ; Other_Math # Ps LEFT ARC LESS-THAN BRACKET
+2994 ; Other_Math # Pe RIGHT ARC GREATER-THAN BRACKET
+2995 ; Other_Math # Ps DOUBLE LEFT ARC GREATER-THAN BRACKET
+2996 ; Other_Math # Pe DOUBLE RIGHT ARC LESS-THAN BRACKET
+2997 ; Other_Math # Ps LEFT BLACK TORTOISE SHELL BRACKET
+2998 ; Other_Math # Pe RIGHT BLACK TORTOISE SHELL BRACKET
+29D8 ; Other_Math # Ps LEFT WIGGLY FENCE
+29D9 ; Other_Math # Pe RIGHT WIGGLY FENCE
+29DA ; Other_Math # Ps LEFT DOUBLE WIGGLY FENCE
+29DB ; Other_Math # Pe RIGHT DOUBLE WIGGLY FENCE
+29FC ; Other_Math # Ps LEFT-POINTING CURVED ANGLE BRACKET
+29FD ; Other_Math # Pe RIGHT-POINTING CURVED ANGLE BRACKET
+FE61 ; Other_Math # Po SMALL ASTERISK
+FE63 ; Other_Math # Pd SMALL HYPHEN-MINUS
+FE68 ; Other_Math # Po SMALL REVERSE SOLIDUS
+FF3C ; Other_Math # Po FULLWIDTH REVERSE SOLIDUS
+FF3E ; Other_Math # Sk FULLWIDTH CIRCUMFLEX ACCENT
+1D400..1D454 ; Other_Math # L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
+1D456..1D49C ; Other_Math # L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
+1D49E..1D49F ; Other_Math # L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
+1D4A2 ; Other_Math # L& MATHEMATICAL SCRIPT CAPITAL G
+1D4A5..1D4A6 ; Other_Math # L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
+1D4A9..1D4AC ; Other_Math # L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
+1D4AE..1D4B9 ; Other_Math # L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
+1D4BB ; Other_Math # L& MATHEMATICAL SCRIPT SMALL F
+1D4BD..1D4C3 ; Other_Math # L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
+1D4C5..1D505 ; Other_Math # L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
+1D507..1D50A ; Other_Math # L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
+1D50D..1D514 ; Other_Math # L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
+1D516..1D51C ; Other_Math # L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
+1D51E..1D539 ; Other_Math # L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
+1D53B..1D53E ; Other_Math # L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
+1D540..1D544 ; Other_Math # L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
+1D546 ; Other_Math # L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O
+1D54A..1D550 ; Other_Math # L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
+1D552..1D6A5 ; Other_Math # L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
+1D6A8..1D6C0 ; Other_Math # L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
+1D6C2..1D6DA ; Other_Math # L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
+1D6DC..1D6FA ; Other_Math # L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
+1D6FC..1D714 ; Other_Math # L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
+1D716..1D734 ; Other_Math # L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
+1D736..1D74E ; Other_Math # L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
+1D750..1D76E ; Other_Math # L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
+1D770..1D788 ; Other_Math # L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
+1D78A..1D7A8 ; Other_Math # L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
+1D7AA..1D7C2 ; Other_Math # L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
+1D7C4..1D7CB ; Other_Math # L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
+1D7CE..1D7FF ; Other_Math # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
+
+# Total code points: 1217
+
+# ================================================
+
+0030..0039 ; Hex_Digit # Nd [10] DIGIT ZERO..DIGIT NINE
+0041..0046 ; Hex_Digit # L& [6] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER F
+0061..0066 ; Hex_Digit # L& [6] LATIN SMALL LETTER A..LATIN SMALL LETTER F
+FF10..FF19 ; Hex_Digit # Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE
+FF21..FF26 ; Hex_Digit # L& [6] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER F
+FF41..FF46 ; Hex_Digit # L& [6] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER F
+
+# Total code points: 44
+
+# ================================================
+
+0030..0039 ; ASCII_Hex_Digit # Nd [10] DIGIT ZERO..DIGIT NINE
+0041..0046 ; ASCII_Hex_Digit # L& [6] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER F
+0061..0066 ; ASCII_Hex_Digit # L& [6] LATIN SMALL LETTER A..LATIN SMALL LETTER F
+
+# Total code points: 22
+
+# ================================================
+
+0345 ; Other_Alphabetic # Mn COMBINING GREEK YPOGEGRAMMENI
+05B0..05BD ; Other_Alphabetic # Mn [14] HEBREW POINT SHEVA..HEBREW POINT METEG
+05BF ; Other_Alphabetic # Mn HEBREW POINT RAFE
+05C1..05C2 ; Other_Alphabetic # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
+05C4..05C5 ; Other_Alphabetic # Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT
+05C7 ; Other_Alphabetic # Mn HEBREW POINT QAMATS QATAN
+0610..061A ; Other_Alphabetic # Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA
+064B..0657 ; Other_Alphabetic # Mn [13] ARABIC FATHATAN..ARABIC INVERTED DAMMA
+0659..065F ; Other_Alphabetic # Mn [7] ARABIC ZWARAKAY..ARABIC WAVY HAMZA BELOW
+0670 ; Other_Alphabetic # Mn ARABIC LETTER SUPERSCRIPT ALEF
+06D6..06DC ; Other_Alphabetic # Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
+06E1..06E4 ; Other_Alphabetic # Mn [4] ARABIC SMALL HIGH DOTLESS HEAD OF KHAH..ARABIC SMALL HIGH MADDA
+06E7..06E8 ; Other_Alphabetic # Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
+06ED ; Other_Alphabetic # Mn ARABIC SMALL LOW MEEM
+0711 ; Other_Alphabetic # Mn SYRIAC LETTER SUPERSCRIPT ALAPH
+0730..073F ; Other_Alphabetic # Mn [16] SYRIAC PTHAHA ABOVE..SYRIAC RWAHA
+07A6..07B0 ; Other_Alphabetic # Mn [11] THAANA ABAFILI..THAANA SUKUN
+0816..0817 ; Other_Alphabetic # Mn [2] SAMARITAN MARK IN..SAMARITAN MARK IN-ALAF
+081B..0823 ; Other_Alphabetic # Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A
+0825..0827 ; Other_Alphabetic # Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U
+0829..082C ; Other_Alphabetic # Mn [4] SAMARITAN VOWEL SIGN LONG I..SAMARITAN VOWEL SIGN SUKUN
+0900..0902 ; Other_Alphabetic # Mn [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA
+0903 ; Other_Alphabetic # Mc DEVANAGARI SIGN VISARGA
+093A ; Other_Alphabetic # Mn DEVANAGARI VOWEL SIGN OE
+093B ; Other_Alphabetic # Mc DEVANAGARI VOWEL SIGN OOE
+093E..0940 ; Other_Alphabetic # Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II
+0941..0948 ; Other_Alphabetic # Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI
+0949..094C ; Other_Alphabetic # Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU
+094E..094F ; Other_Alphabetic # Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW
+0955..0957 ; Other_Alphabetic # Mn [3] DEVANAGARI VOWEL SIGN CANDRA LONG E..DEVANAGARI VOWEL SIGN UUE
+0962..0963 ; Other_Alphabetic # Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
+0981 ; Other_Alphabetic # Mn BENGALI SIGN CANDRABINDU
+0982..0983 ; Other_Alphabetic # Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA
+09BE..09C0 ; Other_Alphabetic # Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II
+09C1..09C4 ; Other_Alphabetic # Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR
+09C7..09C8 ; Other_Alphabetic # Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
+09CB..09CC ; Other_Alphabetic # Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
+09D7 ; Other_Alphabetic # Mc BENGALI AU LENGTH MARK
+09E2..09E3 ; Other_Alphabetic # Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL
+0A01..0A02 ; Other_Alphabetic # Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI
+0A03 ; Other_Alphabetic # Mc GURMUKHI SIGN VISARGA
+0A3E..0A40 ; Other_Alphabetic # Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II
+0A41..0A42 ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU
+0A47..0A48 ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
+0A4B..0A4C ; Other_Alphabetic # Mn [2] GURMUKHI VOWEL SIGN OO..GURMUKHI VOWEL SIGN AU
+0A51 ; Other_Alphabetic # Mn GURMUKHI SIGN UDAAT
+0A70..0A71 ; Other_Alphabetic # Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK
+0A75 ; Other_Alphabetic # Mn GURMUKHI SIGN YAKASH
+0A81..0A82 ; Other_Alphabetic # Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA
+0A83 ; Other_Alphabetic # Mc GUJARATI SIGN VISARGA
+0ABE..0AC0 ; Other_Alphabetic # Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II
+0AC1..0AC5 ; Other_Alphabetic # Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E
+0AC7..0AC8 ; Other_Alphabetic # Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI
+0AC9 ; Other_Alphabetic # Mc GUJARATI VOWEL SIGN CANDRA O
+0ACB..0ACC ; Other_Alphabetic # Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU
+0AE2..0AE3 ; Other_Alphabetic # Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL
+0B01 ; Other_Alphabetic # Mn ORIYA SIGN CANDRABINDU
+0B02..0B03 ; Other_Alphabetic # Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA
+0B3E ; Other_Alphabetic # Mc ORIYA VOWEL SIGN AA
+0B3F ; Other_Alphabetic # Mn ORIYA VOWEL SIGN I
+0B40 ; Other_Alphabetic # Mc ORIYA VOWEL SIGN II
+0B41..0B44 ; Other_Alphabetic # Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR
+0B47..0B48 ; Other_Alphabetic # Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
+0B4B..0B4C ; Other_Alphabetic # Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
+0B56 ; Other_Alphabetic # Mn ORIYA AI LENGTH MARK
+0B57 ; Other_Alphabetic # Mc ORIYA AU LENGTH MARK
+0B62..0B63 ; Other_Alphabetic # Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL
+0B82 ; Other_Alphabetic # Mn TAMIL SIGN ANUSVARA
+0BBE..0BBF ; Other_Alphabetic # Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I
+0BC0 ; Other_Alphabetic # Mn TAMIL VOWEL SIGN II
+0BC1..0BC2 ; Other_Alphabetic # Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU
+0BC6..0BC8 ; Other_Alphabetic # Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
+0BCA..0BCC ; Other_Alphabetic # Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
+0BD7 ; Other_Alphabetic # Mc TAMIL AU LENGTH MARK
+0C01..0C03 ; Other_Alphabetic # Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
+0C3E..0C40 ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II
+0C41..0C44 ; Other_Alphabetic # Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR
+0C46..0C48 ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
+0C4A..0C4C ; Other_Alphabetic # Mn [3] TELUGU VOWEL SIGN O..TELUGU VOWEL SIGN AU
+0C55..0C56 ; Other_Alphabetic # Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
+0C62..0C63 ; Other_Alphabetic # Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
+0C82..0C83 ; Other_Alphabetic # Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
+0CBE ; Other_Alphabetic # Mc KANNADA VOWEL SIGN AA
+0CBF ; Other_Alphabetic # Mn KANNADA VOWEL SIGN I
+0CC0..0CC4 ; Other_Alphabetic # Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR
+0CC6 ; Other_Alphabetic # Mn KANNADA VOWEL SIGN E
+0CC7..0CC8 ; Other_Alphabetic # Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
+0CCA..0CCB ; Other_Alphabetic # Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
+0CCC ; Other_Alphabetic # Mn KANNADA VOWEL SIGN AU
+0CD5..0CD6 ; Other_Alphabetic # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0CE2..0CE3 ; Other_Alphabetic # Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL
+0D02..0D03 ; Other_Alphabetic # Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
+0D3E..0D40 ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II
+0D41..0D44 ; Other_Alphabetic # Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR
+0D46..0D48 ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
+0D4A..0D4C ; Other_Alphabetic # Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
+0D57 ; Other_Alphabetic # Mc MALAYALAM AU LENGTH MARK
+0D62..0D63 ; Other_Alphabetic # Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
+0D82..0D83 ; Other_Alphabetic # Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
+0DCF..0DD1 ; Other_Alphabetic # Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA
+0DD2..0DD4 ; Other_Alphabetic # Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
+0DD6 ; Other_Alphabetic # Mn SINHALA VOWEL SIGN DIGA PAA-PILLA
+0DD8..0DDF ; Other_Alphabetic # Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
+0DF2..0DF3 ; Other_Alphabetic # Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
+0E31 ; Other_Alphabetic # Mn THAI CHARACTER MAI HAN-AKAT
+0E34..0E3A ; Other_Alphabetic # Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
+0E4D ; Other_Alphabetic # Mn THAI CHARACTER NIKHAHIT
+0EB1 ; Other_Alphabetic # Mn LAO VOWEL SIGN MAI KAN
+0EB4..0EB9 ; Other_Alphabetic # Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU
+0EBB..0EBC ; Other_Alphabetic # Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO
+0ECD ; Other_Alphabetic # Mn LAO NIGGAHITA
+0F71..0F7E ; Other_Alphabetic # Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO
+0F7F ; Other_Alphabetic # Mc TIBETAN SIGN RNAM BCAD
+0F80..0F81 ; Other_Alphabetic # Mn [2] TIBETAN VOWEL SIGN REVERSED I..TIBETAN VOWEL SIGN REVERSED II
+0F8D..0F97 ; Other_Alphabetic # Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA
+0F99..0FBC ; Other_Alphabetic # Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
+102B..102C ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA
+102D..1030 ; Other_Alphabetic # Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU
+1031 ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN E
+1032..1036 ; Other_Alphabetic # Mn [5] MYANMAR VOWEL SIGN AI..MYANMAR SIGN ANUSVARA
+1038 ; Other_Alphabetic # Mc MYANMAR SIGN VISARGA
+103B..103C ; Other_Alphabetic # Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA
+103D..103E ; Other_Alphabetic # Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA
+1056..1057 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR
+1058..1059 ; Other_Alphabetic # Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL
+105E..1060 ; Other_Alphabetic # Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA
+1062 ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN SGAW KAREN EU
+1067..1068 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR VOWEL SIGN WESTERN PWO KAREN UE
+1071..1074 ; Other_Alphabetic # Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE
+1082 ; Other_Alphabetic # Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA
+1083..1084 ; Other_Alphabetic # Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E
+1085..1086 ; Other_Alphabetic # Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y
+109C ; Other_Alphabetic # Mc MYANMAR VOWEL SIGN AITON A
+109D ; Other_Alphabetic # Mn MYANMAR VOWEL SIGN AITON AI
+135F ; Other_Alphabetic # Mn ETHIOPIC COMBINING GEMINATION MARK
+1712..1713 ; Other_Alphabetic # Mn [2] TAGALOG VOWEL SIGN I..TAGALOG VOWEL SIGN U
+1732..1733 ; Other_Alphabetic # Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U
+1752..1753 ; Other_Alphabetic # Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U
+1772..1773 ; Other_Alphabetic # Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U
+17B6 ; Other_Alphabetic # Mc KHMER VOWEL SIGN AA
+17B7..17BD ; Other_Alphabetic # Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA
+17BE..17C5 ; Other_Alphabetic # Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU
+17C6 ; Other_Alphabetic # Mn KHMER SIGN NIKAHIT
+17C7..17C8 ; Other_Alphabetic # Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU
+18A9 ; Other_Alphabetic # Mn MONGOLIAN LETTER ALI GALI DAGALGA
+1920..1922 ; Other_Alphabetic # Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U
+1923..1926 ; Other_Alphabetic # Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU
+1927..1928 ; Other_Alphabetic # Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O
+1929..192B ; Other_Alphabetic # Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA
+1930..1931 ; Other_Alphabetic # Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
+1932 ; Other_Alphabetic # Mn LIMBU SMALL LETTER ANUSVARA
+1933..1938 ; Other_Alphabetic # Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
+19B0..19C0 ; Other_Alphabetic # Mc [17] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE VOWEL SIGN IY
+19C8..19C9 ; Other_Alphabetic # Mc [2] NEW TAI LUE TONE MARK-1..NEW TAI LUE TONE MARK-2
+1A17..1A18 ; Other_Alphabetic # Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
+1A19..1A1B ; Other_Alphabetic # Mc [3] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN AE
+1A55 ; Other_Alphabetic # Mc TAI THAM CONSONANT SIGN MEDIAL RA
+1A56 ; Other_Alphabetic # Mn TAI THAM CONSONANT SIGN MEDIAL LA
+1A57 ; Other_Alphabetic # Mc TAI THAM CONSONANT SIGN LA TANG LAI
+1A58..1A5E ; Other_Alphabetic # Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA
+1A61 ; Other_Alphabetic # Mc TAI THAM VOWEL SIGN A
+1A62 ; Other_Alphabetic # Mn TAI THAM VOWEL SIGN MAI SAT
+1A63..1A64 ; Other_Alphabetic # Mc [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA
+1A65..1A6C ; Other_Alphabetic # Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW
+1A6D..1A72 ; Other_Alphabetic # Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI
+1A73..1A74 ; Other_Alphabetic # Mn [2] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN MAI KANG
+1B00..1B03 ; Other_Alphabetic # Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG
+1B04 ; Other_Alphabetic # Mc BALINESE SIGN BISAH
+1B35 ; Other_Alphabetic # Mc BALINESE VOWEL SIGN TEDUNG
+1B36..1B3A ; Other_Alphabetic # Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA
+1B3B ; Other_Alphabetic # Mc BALINESE VOWEL SIGN RA REPA TEDUNG
+1B3C ; Other_Alphabetic # Mn BALINESE VOWEL SIGN LA LENGA
+1B3D..1B41 ; Other_Alphabetic # Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
+1B42 ; Other_Alphabetic # Mn BALINESE VOWEL SIGN PEPET
+1B43 ; Other_Alphabetic # Mc BALINESE VOWEL SIGN PEPET TEDUNG
+1B80..1B81 ; Other_Alphabetic # Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR
+1B82 ; Other_Alphabetic # Mc SUNDANESE SIGN PANGWISAD
+1BA1 ; Other_Alphabetic # Mc SUNDANESE CONSONANT SIGN PAMINGKAL
+1BA2..1BA5 ; Other_Alphabetic # Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU
+1BA6..1BA7 ; Other_Alphabetic # Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG
+1BA8..1BA9 ; Other_Alphabetic # Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG
+1BE7 ; Other_Alphabetic # Mc BATAK VOWEL SIGN E
+1BE8..1BE9 ; Other_Alphabetic # Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE
+1BEA..1BEC ; Other_Alphabetic # Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O
+1BED ; Other_Alphabetic # Mn BATAK VOWEL SIGN KARO O
+1BEE ; Other_Alphabetic # Mc BATAK VOWEL SIGN U
+1BEF..1BF1 ; Other_Alphabetic # Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H
+1C24..1C2B ; Other_Alphabetic # Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU
+1C2C..1C33 ; Other_Alphabetic # Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T
+1C34..1C35 ; Other_Alphabetic # Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG
+1CF2 ; Other_Alphabetic # Mc VEDIC SIGN ARDHAVISARGA
+24B6..24E9 ; Other_Alphabetic # So [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z
+2DE0..2DFF ; Other_Alphabetic # Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
+A823..A824 ; Other_Alphabetic # Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
+A825..A826 ; Other_Alphabetic # Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
+A827 ; Other_Alphabetic # Mc SYLOTI NAGRI VOWEL SIGN OO
+A880..A881 ; Other_Alphabetic # Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA
+A8B4..A8C3 ; Other_Alphabetic # Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU
+A926..A92A ; Other_Alphabetic # Mn [5] KAYAH LI VOWEL UE..KAYAH LI VOWEL O
+A947..A951 ; Other_Alphabetic # Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R
+A952 ; Other_Alphabetic # Mc REJANG CONSONANT SIGN H
+A980..A982 ; Other_Alphabetic # Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR
+A983 ; Other_Alphabetic # Mc JAVANESE SIGN WIGNYAN
+A9B4..A9B5 ; Other_Alphabetic # Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG
+A9B6..A9B9 ; Other_Alphabetic # Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT
+A9BA..A9BB ; Other_Alphabetic # Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE
+A9BC ; Other_Alphabetic # Mn JAVANESE VOWEL SIGN PEPET
+A9BD..A9BF ; Other_Alphabetic # Mc [3] JAVANESE CONSONANT SIGN KERET..JAVANESE CONSONANT SIGN CAKRA
+AA29..AA2E ; Other_Alphabetic # Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE
+AA2F..AA30 ; Other_Alphabetic # Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI
+AA31..AA32 ; Other_Alphabetic # Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE
+AA33..AA34 ; Other_Alphabetic # Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA
+AA35..AA36 ; Other_Alphabetic # Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA
+AA43 ; Other_Alphabetic # Mn CHAM CONSONANT SIGN FINAL NG
+AA4C ; Other_Alphabetic # Mn CHAM CONSONANT SIGN FINAL M
+AA4D ; Other_Alphabetic # Mc CHAM CONSONANT SIGN FINAL H
+AAB0 ; Other_Alphabetic # Mn TAI VIET MAI KANG
+AAB2..AAB4 ; Other_Alphabetic # Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U
+AAB7..AAB8 ; Other_Alphabetic # Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA
+AABE ; Other_Alphabetic # Mn TAI VIET VOWEL AM
+ABE3..ABE4 ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP
+ABE5 ; Other_Alphabetic # Mn MEETEI MAYEK VOWEL SIGN ANAP
+ABE6..ABE7 ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP
+ABE8 ; Other_Alphabetic # Mn MEETEI MAYEK VOWEL SIGN UNAP
+ABE9..ABEA ; Other_Alphabetic # Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG
+FB1E ; Other_Alphabetic # Mn HEBREW POINT JUDEO-SPANISH VARIKA
+10A01..10A03 ; Other_Alphabetic # Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R
+10A05..10A06 ; Other_Alphabetic # Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O
+10A0C..10A0F ; Other_Alphabetic # Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA
+11000 ; Other_Alphabetic # Mc BRAHMI SIGN CANDRABINDU
+11001 ; Other_Alphabetic # Mn BRAHMI SIGN ANUSVARA
+11002 ; Other_Alphabetic # Mc BRAHMI SIGN VISARGA
+11038..11045 ; Other_Alphabetic # Mn [14] BRAHMI VOWEL SIGN AA..BRAHMI VOWEL SIGN AU
+11082 ; Other_Alphabetic # Mc KAITHI SIGN VISARGA
+110B0..110B2 ; Other_Alphabetic # Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II
+110B3..110B6 ; Other_Alphabetic # Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI
+110B7..110B8 ; Other_Alphabetic # Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU
+
+# Total code points: 795
+
+# ================================================
+
+3006 ; Ideographic # Lo IDEOGRAPHIC CLOSING MARK
+3007 ; Ideographic # Nl IDEOGRAPHIC NUMBER ZERO
+3021..3029 ; Ideographic # Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE
+3038..303A ; Ideographic # Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
+3400..4DB5 ; Ideographic # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
+4E00..9FCB ; Ideographic # Lo [20940] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCB
+F900..FA2D ; Ideographic # Lo [302] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA2D
+FA30..FA6D ; Ideographic # Lo [62] CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPATIBILITY IDEOGRAPH-FA6D
+FA70..FAD9 ; Ideographic # Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
+20000..2A6D6 ; Ideographic # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
+2A700..2B734 ; Ideographic # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
+2B740..2B81D ; Ideographic # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+2F800..2FA1D ; Ideographic # Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
+
+# Total code points: 75630
+
+# ================================================
+
+005E ; Diacritic # Sk CIRCUMFLEX ACCENT
+0060 ; Diacritic # Sk GRAVE ACCENT
+00A8 ; Diacritic # Sk DIAERESIS
+00AF ; Diacritic # Sk MACRON
+00B4 ; Diacritic # Sk ACUTE ACCENT
+00B7 ; Diacritic # Po MIDDLE DOT
+00B8 ; Diacritic # Sk CEDILLA
+02B0..02C1 ; Diacritic # Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP
+02C2..02C5 ; Diacritic # Sk [4] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD
+02C6..02D1 ; Diacritic # Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON
+02D2..02DF ; Diacritic # Sk [14] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER CROSS ACCENT
+02E0..02E4 ; Diacritic # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+02E5..02EB ; Diacritic # Sk [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK
+02EC ; Diacritic # Lm MODIFIER LETTER VOICING
+02ED ; Diacritic # Sk MODIFIER LETTER UNASPIRATED
+02EE ; Diacritic # Lm MODIFIER LETTER DOUBLE APOSTROPHE
+02EF..02FF ; Diacritic # Sk [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW
+0300..034E ; Diacritic # Mn [79] COMBINING GRAVE ACCENT..COMBINING UPWARDS ARROW BELOW
+0350..0357 ; Diacritic # Mn [8] COMBINING RIGHT ARROWHEAD ABOVE..COMBINING RIGHT HALF RING ABOVE
+035D..0362 ; Diacritic # Mn [6] COMBINING DOUBLE BREVE..COMBINING DOUBLE RIGHTWARDS ARROW BELOW
+0374 ; Diacritic # Lm GREEK NUMERAL SIGN
+0375 ; Diacritic # Sk GREEK LOWER NUMERAL SIGN
+037A ; Diacritic # Lm GREEK YPOGEGRAMMENI
+0384..0385 ; Diacritic # Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS
+0483..0487 ; Diacritic # Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE
+0559 ; Diacritic # Lm ARMENIAN MODIFIER LETTER LEFT HALF RING
+0591..05A1 ; Diacritic # Mn [17] HEBREW ACCENT ETNAHTA..HEBREW ACCENT PAZER
+05A3..05BD ; Diacritic # Mn [27] HEBREW ACCENT MUNAH..HEBREW POINT METEG
+05BF ; Diacritic # Mn HEBREW POINT RAFE
+05C1..05C2 ; Diacritic # Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
+05C4 ; Diacritic # Mn HEBREW MARK UPPER DOT
+064B..0652 ; Diacritic # Mn [8] ARABIC FATHATAN..ARABIC SUKUN
+0657..0658 ; Diacritic # Mn [2] ARABIC INVERTED DAMMA..ARABIC MARK NOON GHUNNA
+06DF..06E0 ; Diacritic # Mn [2] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH UPRIGHT RECTANGULAR ZERO
+06E5..06E6 ; Diacritic # Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH
+06EA..06EC ; Diacritic # Mn [3] ARABIC EMPTY CENTRE LOW STOP..ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE
+0730..074A ; Diacritic # Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH
+07A6..07B0 ; Diacritic # Mn [11] THAANA ABAFILI..THAANA SUKUN
+07EB..07F3 ; Diacritic # Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
+07F4..07F5 ; Diacritic # Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
+0818..0819 ; Diacritic # Mn [2] SAMARITAN MARK OCCLUSION..SAMARITAN MARK DAGESH
+093C ; Diacritic # Mn DEVANAGARI SIGN NUKTA
+094D ; Diacritic # Mn DEVANAGARI SIGN VIRAMA
+0951..0954 ; Diacritic # Mn [4] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI ACUTE ACCENT
+0971 ; Diacritic # Lm DEVANAGARI SIGN HIGH SPACING DOT
+09BC ; Diacritic # Mn BENGALI SIGN NUKTA
+09CD ; Diacritic # Mn BENGALI SIGN VIRAMA
+0A3C ; Diacritic # Mn GURMUKHI SIGN NUKTA
+0A4D ; Diacritic # Mn GURMUKHI SIGN VIRAMA
+0ABC ; Diacritic # Mn GUJARATI SIGN NUKTA
+0ACD ; Diacritic # Mn GUJARATI SIGN VIRAMA
+0B3C ; Diacritic # Mn ORIYA SIGN NUKTA
+0B4D ; Diacritic # Mn ORIYA SIGN VIRAMA
+0BCD ; Diacritic # Mn TAMIL SIGN VIRAMA
+0C4D ; Diacritic # Mn TELUGU SIGN VIRAMA
+0CBC ; Diacritic # Mn KANNADA SIGN NUKTA
+0CCD ; Diacritic # Mn KANNADA SIGN VIRAMA
+0D4D ; Diacritic # Mn MALAYALAM SIGN VIRAMA
+0DCA ; Diacritic # Mn SINHALA SIGN AL-LAKUNA
+0E47..0E4C ; Diacritic # Mn [6] THAI CHARACTER MAITAIKHU..THAI CHARACTER THANTHAKHAT
+0E4E ; Diacritic # Mn THAI CHARACTER YAMAKKAN
+0EC8..0ECC ; Diacritic # Mn [5] LAO TONE MAI EK..LAO CANCELLATION MARK
+0F18..0F19 ; Diacritic # Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
+0F35 ; Diacritic # Mn TIBETAN MARK NGAS BZUNG NYI ZLA
+0F37 ; Diacritic # Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS
+0F39 ; Diacritic # Mn TIBETAN MARK TSA -PHRU
+0F3E..0F3F ; Diacritic # Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES
+0F82..0F84 ; Diacritic # Mn [3] TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HALANTA
+0F86..0F87 ; Diacritic # Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
+0FC6 ; Diacritic # Mn TIBETAN SYMBOL PADMA GDAN
+1037 ; Diacritic # Mn MYANMAR SIGN DOT BELOW
+1039..103A ; Diacritic # Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT
+1087..108C ; Diacritic # Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3
+108D ; Diacritic # Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
+108F ; Diacritic # Mc MYANMAR SIGN RUMAI PALAUNG TONE-5
+109A..109B ; Diacritic # Mc [2] MYANMAR SIGN KHAMTI TONE-1..MYANMAR SIGN KHAMTI TONE-3
+17C9..17D3 ; Diacritic # Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT
+17DD ; Diacritic # Mn KHMER SIGN ATTHACAN
+1939..193B ; Diacritic # Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I
+1A75..1A7C ; Diacritic # Mn [8] TAI THAM SIGN TONE-1..TAI THAM SIGN KHUEN-LUE KARAN
+1A7F ; Diacritic # Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT
+1B34 ; Diacritic # Mn BALINESE SIGN REREKAN
+1B44 ; Diacritic # Mc BALINESE ADEG ADEG
+1B6B..1B73 ; Diacritic # Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG
+1BAA ; Diacritic # Mc SUNDANESE SIGN PAMAAEH
+1C36..1C37 ; Diacritic # Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA
+1C78..1C7D ; Diacritic # Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD
+1CD0..1CD2 ; Diacritic # Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA
+1CD3 ; Diacritic # Po VEDIC SIGN NIHSHVASA
+1CD4..1CE0 ; Diacritic # Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA
+1CE1 ; Diacritic # Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA
+1CE2..1CE8 ; Diacritic # Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL
+1CED ; Diacritic # Mn VEDIC SIGN TIRYAK
+1D2C..1D61 ; Diacritic # Lm [54] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI
+1D62..1D6A ; Diacritic # L& [9] LATIN SUBSCRIPT SMALL LETTER I..GREEK SUBSCRIPT SMALL LETTER CHI
+1DC4..1DCF ; Diacritic # Mn [12] COMBINING MACRON-ACUTE..COMBINING ZIGZAG BELOW
+1DFD..1DFF ; Diacritic # Mn [3] COMBINING ALMOST EQUAL TO BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
+1FBD ; Diacritic # Sk GREEK KORONIS
+1FBF..1FC1 ; Diacritic # Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
+1FCD..1FCF ; Diacritic # Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
+1FDD..1FDF ; Diacritic # Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
+1FED..1FEF ; Diacritic # Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
+1FFD..1FFE ; Diacritic # Sk [2] GREEK OXIA..GREEK DASIA
+2CEF..2CF1 ; Diacritic # Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS
+2E2F ; Diacritic # Lm VERTICAL TILDE
+302A..302F ; Diacritic # Mn [6] IDEOGRAPHIC LEVEL TONE MARK..HANGUL DOUBLE DOT TONE MARK
+3099..309A ; Diacritic # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+309B..309C ; Diacritic # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+30FC ; Diacritic # Lm KATAKANA-HIRAGANA PROLONGED SOUND MARK
+A66F ; Diacritic # Mn COMBINING CYRILLIC VZMET
+A67C..A67D ; Diacritic # Mn [2] COMBINING CYRILLIC KAVYKA..COMBINING CYRILLIC PAYEROK
+A67F ; Diacritic # Lm CYRILLIC PAYEROK
+A6F0..A6F1 ; Diacritic # Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS
+A717..A71F ; Diacritic # Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK
+A720..A721 ; Diacritic # Sk [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE
+A788 ; Diacritic # Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT
+A8C4 ; Diacritic # Mn SAURASHTRA SIGN VIRAMA
+A8E0..A8F1 ; Diacritic # Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA
+A92B..A92D ; Diacritic # Mn [3] KAYAH LI TONE PLOPHU..KAYAH LI TONE CALYA PLOPHU
+A92E ; Diacritic # Po KAYAH LI SIGN CWI
+A953 ; Diacritic # Mc REJANG VIRAMA
+A9B3 ; Diacritic # Mn JAVANESE SIGN CECAK TELU
+A9C0 ; Diacritic # Mc JAVANESE PANGKON
+AA7B ; Diacritic # Mc MYANMAR SIGN PAO KAREN TONE
+AABF ; Diacritic # Mn TAI VIET TONE MAI EK
+AAC0 ; Diacritic # Lo TAI VIET TONE MAI NUENG
+AAC1 ; Diacritic # Mn TAI VIET TONE MAI THO
+AAC2 ; Diacritic # Lo TAI VIET TONE MAI SONG
+ABEC ; Diacritic # Mc MEETEI MAYEK LUM IYEK
+ABED ; Diacritic # Mn MEETEI MAYEK APUN IYEK
+FB1E ; Diacritic # Mn HEBREW POINT JUDEO-SPANISH VARIKA
+FE20..FE26 ; Diacritic # Mn [7] COMBINING LIGATURE LEFT HALF..COMBINING CONJOINING MACRON
+FF3E ; Diacritic # Sk FULLWIDTH CIRCUMFLEX ACCENT
+FF40 ; Diacritic # Sk FULLWIDTH GRAVE ACCENT
+FF70 ; Diacritic # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+FF9E..FF9F ; Diacritic # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+FFE3 ; Diacritic # Sk FULLWIDTH MACRON
+110B9..110BA ; Diacritic # Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA
+1D167..1D169 ; Diacritic # Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3
+1D16D..1D172 ; Diacritic # Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5
+1D17B..1D182 ; Diacritic # Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE
+1D185..1D18B ; Diacritic # Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE
+1D1AA..1D1AD ; Diacritic # Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
+
+# Total code points: 639
+
+# ================================================
+
+00B7 ; Extender # Po MIDDLE DOT
+02D0..02D1 ; Extender # Lm [2] MODIFIER LETTER TRIANGULAR COLON..MODIFIER LETTER HALF TRIANGULAR COLON
+0640 ; Extender # Lm ARABIC TATWEEL
+07FA ; Extender # Lm NKO LAJANYALAN
+0E46 ; Extender # Lm THAI CHARACTER MAIYAMOK
+0EC6 ; Extender # Lm LAO KO LA
+1843 ; Extender # Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN
+1AA7 ; Extender # Lm TAI THAM SIGN MAI YAMOK
+1C36 ; Extender # Mn LEPCHA SIGN RAN
+1C7B ; Extender # Lm OL CHIKI RELAA
+3005 ; Extender # Lm IDEOGRAPHIC ITERATION MARK
+3031..3035 ; Extender # Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF
+309D..309E ; Extender # Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK
+30FC..30FE ; Extender # Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK
+A015 ; Extender # Lm YI SYLLABLE WU
+A60C ; Extender # Lm VAI SYLLABLE LENGTHENER
+A9CF ; Extender # Lm JAVANESE PANGRANGKEP
+AA70 ; Extender # Lm MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION
+AADD ; Extender # Lm TAI VIET SYMBOL SAM
+FF70 ; Extender # Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+
+# Total code points: 28
+
+# ================================================
+
+02B0..02B8 ; Other_Lowercase # Lm [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y
+02C0..02C1 ; Other_Lowercase # Lm [2] MODIFIER LETTER GLOTTAL STOP..MODIFIER LETTER REVERSED GLOTTAL STOP
+02E0..02E4 ; Other_Lowercase # Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
+0345 ; Other_Lowercase # Mn COMBINING GREEK YPOGEGRAMMENI
+037A ; Other_Lowercase # Lm GREEK YPOGEGRAMMENI
+1D2C..1D61 ; Other_Lowercase # Lm [54] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL CHI
+1D78 ; Other_Lowercase # Lm MODIFIER LETTER CYRILLIC EN
+1D9B..1DBF ; Other_Lowercase # Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
+2090..2094 ; Other_Lowercase # Lm [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
+2170..217F ; Other_Lowercase # Nl [16] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND
+24D0..24E9 ; Other_Lowercase # So [26] CIRCLED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z
+2C7D ; Other_Lowercase # Lm MODIFIER LETTER CAPITAL V
+A770 ; Other_Lowercase # Lm MODIFIER LETTER US
+
+# Total code points: 159
+
+# ================================================
+
+2160..216F ; Other_Uppercase # Nl [16] ROMAN NUMERAL ONE..ROMAN NUMERAL ONE THOUSAND
+24B6..24CF ; Other_Uppercase # So [26] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN CAPITAL LETTER Z
+
+# Total code points: 42
+
+# ================================================
+
+FDD0..FDEF ; Noncharacter_Code_Point # Cn [32] <noncharacter-FDD0>..<noncharacter-FDEF>
+FFFE..FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-FFFE>..<noncharacter-FFFF>
+1FFFE..1FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-1FFFE>..<noncharacter-1FFFF>
+2FFFE..2FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-2FFFE>..<noncharacter-2FFFF>
+3FFFE..3FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-3FFFE>..<noncharacter-3FFFF>
+4FFFE..4FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-4FFFE>..<noncharacter-4FFFF>
+5FFFE..5FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-5FFFE>..<noncharacter-5FFFF>
+6FFFE..6FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-6FFFE>..<noncharacter-6FFFF>
+7FFFE..7FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-7FFFE>..<noncharacter-7FFFF>
+8FFFE..8FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-8FFFE>..<noncharacter-8FFFF>
+9FFFE..9FFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-9FFFE>..<noncharacter-9FFFF>
+AFFFE..AFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-AFFFE>..<noncharacter-AFFFF>
+BFFFE..BFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-BFFFE>..<noncharacter-BFFFF>
+CFFFE..CFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-CFFFE>..<noncharacter-CFFFF>
+DFFFE..DFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-DFFFE>..<noncharacter-DFFFF>
+EFFFE..EFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-EFFFE>..<noncharacter-EFFFF>
+FFFFE..FFFFF ; Noncharacter_Code_Point # Cn [2] <noncharacter-FFFFE>..<noncharacter-FFFFF>
+10FFFE..10FFFF; Noncharacter_Code_Point # Cn [2] <noncharacter-10FFFE>..<noncharacter-10FFFF>
+
+# Total code points: 66
+
+# ================================================
+
+09BE ; Other_Grapheme_Extend # Mc BENGALI VOWEL SIGN AA
+09D7 ; Other_Grapheme_Extend # Mc BENGALI AU LENGTH MARK
+0B3E ; Other_Grapheme_Extend # Mc ORIYA VOWEL SIGN AA
+0B57 ; Other_Grapheme_Extend # Mc ORIYA AU LENGTH MARK
+0BBE ; Other_Grapheme_Extend # Mc TAMIL VOWEL SIGN AA
+0BD7 ; Other_Grapheme_Extend # Mc TAMIL AU LENGTH MARK
+0CC2 ; Other_Grapheme_Extend # Mc KANNADA VOWEL SIGN UU
+0CD5..0CD6 ; Other_Grapheme_Extend # Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
+0D3E ; Other_Grapheme_Extend # Mc MALAYALAM VOWEL SIGN AA
+0D57 ; Other_Grapheme_Extend # Mc MALAYALAM AU LENGTH MARK
+0DCF ; Other_Grapheme_Extend # Mc SINHALA VOWEL SIGN AELA-PILLA
+0DDF ; Other_Grapheme_Extend # Mc SINHALA VOWEL SIGN GAYANUKITTA
+200C..200D ; Other_Grapheme_Extend # Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
+FF9E..FF9F ; Other_Grapheme_Extend # Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+1D165 ; Other_Grapheme_Extend # Mc MUSICAL SYMBOL COMBINING STEM
+1D16E..1D172 ; Other_Grapheme_Extend # Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5
+
+# Total code points: 23
+
+# ================================================
+
+2FF0..2FF1 ; IDS_Binary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO BELOW
+2FF4..2FFB ; IDS_Binary_Operator # So [8] IDEOGRAPHIC DESCRIPTION CHARACTER FULL SURROUND..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID
+
+# Total code points: 10
+
+# ================================================
+
+2FF2..2FF3 ; IDS_Trinary_Operator # So [2] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO MIDDLE AND RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER ABOVE TO MIDDLE AND BELOW
+
+# Total code points: 2
+
+# ================================================
+
+2E80..2E99 ; Radical # So [26] CJK RADICAL REPEAT..CJK RADICAL RAP
+2E9B..2EF3 ; Radical # So [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE
+2F00..2FD5 ; Radical # So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
+
+# Total code points: 329
+
+# ================================================
+
+3400..4DB5 ; Unified_Ideograph # Lo [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
+4E00..9FCB ; Unified_Ideograph # Lo [20940] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FCB
+FA0E..FA0F ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPATIBILITY IDEOGRAPH-FA0F
+FA11 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA11
+FA13..FA14 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPATIBILITY IDEOGRAPH-FA14
+FA1F ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA1F
+FA21 ; Unified_Ideograph # Lo CJK COMPATIBILITY IDEOGRAPH-FA21
+FA23..FA24 ; Unified_Ideograph # Lo [2] CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPATIBILITY IDEOGRAPH-FA24
+FA27..FA29 ; Unified_Ideograph # Lo [3] CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPATIBILITY IDEOGRAPH-FA29
+20000..2A6D6 ; Unified_Ideograph # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
+2A700..2B734 ; Unified_Ideograph # Lo [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
+2B740..2B81D ; Unified_Ideograph # Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
+
+# Total code points: 74616
+
+# ================================================
+
+034F ; Other_Default_Ignorable_Code_Point # Mn COMBINING GRAPHEME JOINER
+115F..1160 ; Other_Default_Ignorable_Code_Point # Lo [2] HANGUL CHOSEONG FILLER..HANGUL JUNGSEONG FILLER
+2065..2069 ; Other_Default_Ignorable_Code_Point # Cn [5] <reserved-2065>..<reserved-2069>
+3164 ; Other_Default_Ignorable_Code_Point # Lo HANGUL FILLER
+FFA0 ; Other_Default_Ignorable_Code_Point # Lo HALFWIDTH HANGUL FILLER
+FFF0..FFF8 ; Other_Default_Ignorable_Code_Point # Cn [9] <reserved-FFF0>..<reserved-FFF8>
+E0000 ; Other_Default_Ignorable_Code_Point # Cn <reserved-E0000>
+E0002..E001F ; Other_Default_Ignorable_Code_Point # Cn [30] <reserved-E0002>..<reserved-E001F>
+E0080..E00FF ; Other_Default_Ignorable_Code_Point # Cn [128] <reserved-E0080>..<reserved-E00FF>
+E01F0..E0FFF ; Other_Default_Ignorable_Code_Point # Cn [3600] <reserved-E01F0>..<reserved-E0FFF>
+
+# Total code points: 3778
+
+# ================================================
+
+0149 ; Deprecated # L& LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
+0673 ; Deprecated # Lo ARABIC LETTER ALEF WITH WAVY HAMZA BELOW
+0F77 ; Deprecated # Mn TIBETAN VOWEL SIGN VOCALIC RR
+0F79 ; Deprecated # Mn TIBETAN VOWEL SIGN VOCALIC LL
+17A3..17A4 ; Deprecated # Lo [2] KHMER INDEPENDENT VOWEL QAQ..KHMER INDEPENDENT VOWEL QAA
+206A..206F ; Deprecated # Cf [6] INHIBIT SYMMETRIC SWAPPING..NOMINAL DIGIT SHAPES
+2329 ; Deprecated # Ps LEFT-POINTING ANGLE BRACKET
+232A ; Deprecated # Pe RIGHT-POINTING ANGLE BRACKET
+E0001 ; Deprecated # Cf LANGUAGE TAG
+E0020..E007F ; Deprecated # Cf [96] TAG SPACE..CANCEL TAG
+
+# Total code points: 111
+
+# ================================================
+
+0069..006A ; Soft_Dotted # L& [2] LATIN SMALL LETTER I..LATIN SMALL LETTER J
+012F ; Soft_Dotted # L& LATIN SMALL LETTER I WITH OGONEK
+0249 ; Soft_Dotted # L& LATIN SMALL LETTER J WITH STROKE
+0268 ; Soft_Dotted # L& LATIN SMALL LETTER I WITH STROKE
+029D ; Soft_Dotted # L& LATIN SMALL LETTER J WITH CROSSED-TAIL
+02B2 ; Soft_Dotted # Lm MODIFIER LETTER SMALL J
+03F3 ; Soft_Dotted # L& GREEK LETTER YOT
+0456 ; Soft_Dotted # L& CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+0458 ; Soft_Dotted # L& CYRILLIC SMALL LETTER JE
+1D62 ; Soft_Dotted # L& LATIN SUBSCRIPT SMALL LETTER I
+1D96 ; Soft_Dotted # L& LATIN SMALL LETTER I WITH RETROFLEX HOOK
+1DA4 ; Soft_Dotted # Lm MODIFIER LETTER SMALL I WITH STROKE
+1DA8 ; Soft_Dotted # Lm MODIFIER LETTER SMALL J WITH CROSSED-TAIL
+1E2D ; Soft_Dotted # L& LATIN SMALL LETTER I WITH TILDE BELOW
+1ECB ; Soft_Dotted # L& LATIN SMALL LETTER I WITH DOT BELOW
+2071 ; Soft_Dotted # Lm SUPERSCRIPT LATIN SMALL LETTER I
+2148..2149 ; Soft_Dotted # L& [2] DOUBLE-STRUCK ITALIC SMALL I..DOUBLE-STRUCK ITALIC SMALL J
+2C7C ; Soft_Dotted # L& LATIN SUBSCRIPT SMALL LETTER J
+1D422..1D423 ; Soft_Dotted # L& [2] MATHEMATICAL BOLD SMALL I..MATHEMATICAL BOLD SMALL J
+1D456..1D457 ; Soft_Dotted # L& [2] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL ITALIC SMALL J
+1D48A..1D48B ; Soft_Dotted # L& [2] MATHEMATICAL BOLD ITALIC SMALL I..MATHEMATICAL BOLD ITALIC SMALL J
+1D4BE..1D4BF ; Soft_Dotted # L& [2] MATHEMATICAL SCRIPT SMALL I..MATHEMATICAL SCRIPT SMALL J
+1D4F2..1D4F3 ; Soft_Dotted # L& [2] MATHEMATICAL BOLD SCRIPT SMALL I..MATHEMATICAL BOLD SCRIPT SMALL J
+1D526..1D527 ; Soft_Dotted # L& [2] MATHEMATICAL FRAKTUR SMALL I..MATHEMATICAL FRAKTUR SMALL J
+1D55A..1D55B ; Soft_Dotted # L& [2] MATHEMATICAL DOUBLE-STRUCK SMALL I..MATHEMATICAL DOUBLE-STRUCK SMALL J
+1D58E..1D58F ; Soft_Dotted # L& [2] MATHEMATICAL BOLD FRAKTUR SMALL I..MATHEMATICAL BOLD FRAKTUR SMALL J
+1D5C2..1D5C3 ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF SMALL I..MATHEMATICAL SANS-SERIF SMALL J
+1D5F6..1D5F7 ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF BOLD SMALL I..MATHEMATICAL SANS-SERIF BOLD SMALL J
+1D62A..1D62B ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF ITALIC SMALL I..MATHEMATICAL SANS-SERIF ITALIC SMALL J
+1D65E..1D65F ; Soft_Dotted # L& [2] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J
+1D692..1D693 ; Soft_Dotted # L& [2] MATHEMATICAL MONOSPACE SMALL I..MATHEMATICAL MONOSPACE SMALL J
+
+# Total code points: 46
+
+# ================================================
+
+0E40..0E44 ; Logical_Order_Exception # Lo [5] THAI CHARACTER SARA E..THAI CHARACTER SARA AI MAIMALAI
+0EC0..0EC4 ; Logical_Order_Exception # Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI
+AAB5..AAB6 ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL E..TAI VIET VOWEL O
+AAB9 ; Logical_Order_Exception # Lo TAI VIET VOWEL UEA
+AABB..AABC ; Logical_Order_Exception # Lo [2] TAI VIET VOWEL AUE..TAI VIET VOWEL AY
+
+# Total code points: 15
+
+# ================================================
+
+2118 ; Other_ID_Start # Sm SCRIPT CAPITAL P
+212E ; Other_ID_Start # So ESTIMATED SYMBOL
+309B..309C ; Other_ID_Start # Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+
+# Total code points: 4
+
+# ================================================
+
+00B7 ; Other_ID_Continue # Po MIDDLE DOT
+0387 ; Other_ID_Continue # Po GREEK ANO TELEIA
+1369..1371 ; Other_ID_Continue # No [9] ETHIOPIC DIGIT ONE..ETHIOPIC DIGIT NINE
+19DA ; Other_ID_Continue # No NEW TAI LUE THAM DIGIT ONE
+
+# Total code points: 12
+
+# ================================================
+
+0021 ; STerm # Po EXCLAMATION MARK
+002E ; STerm # Po FULL STOP
+003F ; STerm # Po QUESTION MARK
+055C ; STerm # Po ARMENIAN EXCLAMATION MARK
+055E ; STerm # Po ARMENIAN QUESTION MARK
+0589 ; STerm # Po ARMENIAN FULL STOP
+061F ; STerm # Po ARABIC QUESTION MARK
+06D4 ; STerm # Po ARABIC FULL STOP
+0700..0702 ; STerm # Po [3] SYRIAC END OF PARAGRAPH..SYRIAC SUBLINEAR FULL STOP
+07F9 ; STerm # Po NKO EXCLAMATION MARK
+0964..0965 ; STerm # Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
+104A..104B ; STerm # Po [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION
+1362 ; STerm # Po ETHIOPIC FULL STOP
+1367..1368 ; STerm # Po [2] ETHIOPIC QUESTION MARK..ETHIOPIC PARAGRAPH SEPARATOR
+166E ; STerm # Po CANADIAN SYLLABICS FULL STOP
+1735..1736 ; STerm # Po [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION
+1803 ; STerm # Po MONGOLIAN FULL STOP
+1809 ; STerm # Po MONGOLIAN MANCHU FULL STOP
+1944..1945 ; STerm # Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
+1AA8..1AAB ; STerm # Po [4] TAI THAM SIGN KAAN..TAI THAM SIGN SATKAANKUU
+1B5A..1B5B ; STerm # Po [2] BALINESE PANTI..BALINESE PAMADA
+1B5E..1B5F ; STerm # Po [2] BALINESE CARIK SIKI..BALINESE CARIK PAREREN
+1C3B..1C3C ; STerm # Po [2] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION NYET THYOOM TA-ROL
+1C7E..1C7F ; STerm # Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD
+203C..203D ; STerm # Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG
+2047..2049 ; STerm # Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK
+2E2E ; STerm # Po REVERSED QUESTION MARK
+3002 ; STerm # Po IDEOGRAPHIC FULL STOP
+A4FF ; STerm # Po LISU PUNCTUATION FULL STOP
+A60E..A60F ; STerm # Po [2] VAI FULL STOP..VAI QUESTION MARK
+A6F3 ; STerm # Po BAMUM FULL STOP
+A6F7 ; STerm # Po BAMUM QUESTION MARK
+A876..A877 ; STerm # Po [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD
+A8CE..A8CF ; STerm # Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
+A92F ; STerm # Po KAYAH LI SIGN SHYA
+A9C8..A9C9 ; STerm # Po [2] JAVANESE PADA LINGSA..JAVANESE PADA LUNGSI
+AA5D..AA5F ; STerm # Po [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA
+ABEB ; STerm # Po MEETEI MAYEK CHEIKHEI
+FE52 ; STerm # Po SMALL FULL STOP
+FE56..FE57 ; STerm # Po [2] SMALL QUESTION MARK..SMALL EXCLAMATION MARK
+FF01 ; STerm # Po FULLWIDTH EXCLAMATION MARK
+FF0E ; STerm # Po FULLWIDTH FULL STOP
+FF1F ; STerm # Po FULLWIDTH QUESTION MARK
+FF61 ; STerm # Po HALFWIDTH IDEOGRAPHIC FULL STOP
+10A56..10A57 ; STerm # Po [2] KHAROSHTHI PUNCTUATION DANDA..KHAROSHTHI PUNCTUATION DOUBLE DANDA
+11047..11048 ; STerm # Po [2] BRAHMI DANDA..BRAHMI DOUBLE DANDA
+110BE..110C1 ; STerm # Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA
+
+# Total code points: 76
+
+# ================================================
+
+180B..180D ; Variation_Selector # Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE
+FE00..FE0F ; Variation_Selector # Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
+E0100..E01EF ; Variation_Selector # Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256
+
+# Total code points: 259
+
+# ================================================
+
+0009..000D ; Pattern_White_Space # Cc [5] <control-0009>..<control-000D>
+0020 ; Pattern_White_Space # Zs SPACE
+0085 ; Pattern_White_Space # Cc <control-0085>
+200E..200F ; Pattern_White_Space # Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK
+2028 ; Pattern_White_Space # Zl LINE SEPARATOR
+2029 ; Pattern_White_Space # Zp PARAGRAPH SEPARATOR
+
+# Total code points: 11
+
+# ================================================
+
+0021..0023 ; Pattern_Syntax # Po [3] EXCLAMATION MARK..NUMBER SIGN
+0024 ; Pattern_Syntax # Sc DOLLAR SIGN
+0025..0027 ; Pattern_Syntax # Po [3] PERCENT SIGN..APOSTROPHE
+0028 ; Pattern_Syntax # Ps LEFT PARENTHESIS
+0029 ; Pattern_Syntax # Pe RIGHT PARENTHESIS
+002A ; Pattern_Syntax # Po ASTERISK
+002B ; Pattern_Syntax # Sm PLUS SIGN
+002C ; Pattern_Syntax # Po COMMA
+002D ; Pattern_Syntax # Pd HYPHEN-MINUS
+002E..002F ; Pattern_Syntax # Po [2] FULL STOP..SOLIDUS
+003A..003B ; Pattern_Syntax # Po [2] COLON..SEMICOLON
+003C..003E ; Pattern_Syntax # Sm [3] LESS-THAN SIGN..GREATER-THAN SIGN
+003F..0040 ; Pattern_Syntax # Po [2] QUESTION MARK..COMMERCIAL AT
+005B ; Pattern_Syntax # Ps LEFT SQUARE BRACKET
+005C ; Pattern_Syntax # Po REVERSE SOLIDUS
+005D ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET
+005E ; Pattern_Syntax # Sk CIRCUMFLEX ACCENT
+0060 ; Pattern_Syntax # Sk GRAVE ACCENT
+007B ; Pattern_Syntax # Ps LEFT CURLY BRACKET
+007C ; Pattern_Syntax # Sm VERTICAL LINE
+007D ; Pattern_Syntax # Pe RIGHT CURLY BRACKET
+007E ; Pattern_Syntax # Sm TILDE
+00A1 ; Pattern_Syntax # Po INVERTED EXCLAMATION MARK
+00A2..00A5 ; Pattern_Syntax # Sc [4] CENT SIGN..YEN SIGN
+00A6..00A7 ; Pattern_Syntax # So [2] BROKEN BAR..SECTION SIGN
+00A9 ; Pattern_Syntax # So COPYRIGHT SIGN
+00AB ; Pattern_Syntax # Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+00AC ; Pattern_Syntax # Sm NOT SIGN
+00AE ; Pattern_Syntax # So REGISTERED SIGN
+00B0 ; Pattern_Syntax # So DEGREE SIGN
+00B1 ; Pattern_Syntax # Sm PLUS-MINUS SIGN
+00B6 ; Pattern_Syntax # So PILCROW SIGN
+00BB ; Pattern_Syntax # Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+00BF ; Pattern_Syntax # Po INVERTED QUESTION MARK
+00D7 ; Pattern_Syntax # Sm MULTIPLICATION SIGN
+00F7 ; Pattern_Syntax # Sm DIVISION SIGN
+2010..2015 ; Pattern_Syntax # Pd [6] HYPHEN..HORIZONTAL BAR
+2016..2017 ; Pattern_Syntax # Po [2] DOUBLE VERTICAL LINE..DOUBLE LOW LINE
+2018 ; Pattern_Syntax # Pi LEFT SINGLE QUOTATION MARK
+2019 ; Pattern_Syntax # Pf RIGHT SINGLE QUOTATION MARK
+201A ; Pattern_Syntax # Ps SINGLE LOW-9 QUOTATION MARK
+201B..201C ; Pattern_Syntax # Pi [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK
+201D ; Pattern_Syntax # Pf RIGHT DOUBLE QUOTATION MARK
+201E ; Pattern_Syntax # Ps DOUBLE LOW-9 QUOTATION MARK
+201F ; Pattern_Syntax # Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK
+2020..2027 ; Pattern_Syntax # Po [8] DAGGER..HYPHENATION POINT
+2030..2038 ; Pattern_Syntax # Po [9] PER MILLE SIGN..CARET
+2039 ; Pattern_Syntax # Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+203A ; Pattern_Syntax # Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+203B..203E ; Pattern_Syntax # Po [4] REFERENCE MARK..OVERLINE
+2041..2043 ; Pattern_Syntax # Po [3] CARET INSERTION POINT..HYPHEN BULLET
+2044 ; Pattern_Syntax # Sm FRACTION SLASH
+2045 ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH QUILL
+2046 ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH QUILL
+2047..2051 ; Pattern_Syntax # Po [11] DOUBLE QUESTION MARK..TWO ASTERISKS ALIGNED VERTICALLY
+2052 ; Pattern_Syntax # Sm COMMERCIAL MINUS SIGN
+2053 ; Pattern_Syntax # Po SWUNG DASH
+2055..205E ; Pattern_Syntax # Po [10] FLOWER PUNCTUATION MARK..VERTICAL FOUR DOTS
+2190..2194 ; Pattern_Syntax # Sm [5] LEFTWARDS ARROW..LEFT RIGHT ARROW
+2195..2199 ; Pattern_Syntax # So [5] UP DOWN ARROW..SOUTH WEST ARROW
+219A..219B ; Pattern_Syntax # Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
+219C..219F ; Pattern_Syntax # So [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW
+21A0 ; Pattern_Syntax # Sm RIGHTWARDS TWO HEADED ARROW
+21A1..21A2 ; Pattern_Syntax # So [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL
+21A3 ; Pattern_Syntax # Sm RIGHTWARDS ARROW WITH TAIL
+21A4..21A5 ; Pattern_Syntax # So [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR
+21A6 ; Pattern_Syntax # Sm RIGHTWARDS ARROW FROM BAR
+21A7..21AD ; Pattern_Syntax # So [7] DOWNWARDS ARROW FROM BAR..LEFT RIGHT WAVE ARROW
+21AE ; Pattern_Syntax # Sm LEFT RIGHT ARROW WITH STROKE
+21AF..21CD ; Pattern_Syntax # So [31] DOWNWARDS ZIGZAG ARROW..LEFTWARDS DOUBLE ARROW WITH STROKE
+21CE..21CF ; Pattern_Syntax # Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
+21D0..21D1 ; Pattern_Syntax # So [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW
+21D2 ; Pattern_Syntax # Sm RIGHTWARDS DOUBLE ARROW
+21D3 ; Pattern_Syntax # So DOWNWARDS DOUBLE ARROW
+21D4 ; Pattern_Syntax # Sm LEFT RIGHT DOUBLE ARROW
+21D5..21F3 ; Pattern_Syntax # So [31] UP DOWN DOUBLE ARROW..UP DOWN WHITE ARROW
+21F4..22FF ; Pattern_Syntax # Sm [268] RIGHT ARROW WITH SMALL CIRCLE..Z NOTATION BAG MEMBERSHIP
+2300..2307 ; Pattern_Syntax # So [8] DIAMETER SIGN..WAVY LINE
+2308..230B ; Pattern_Syntax # Sm [4] LEFT CEILING..RIGHT FLOOR
+230C..231F ; Pattern_Syntax # So [20] BOTTOM RIGHT CROP..BOTTOM RIGHT CORNER
+2320..2321 ; Pattern_Syntax # Sm [2] TOP HALF INTEGRAL..BOTTOM HALF INTEGRAL
+2322..2328 ; Pattern_Syntax # So [7] FROWN..KEYBOARD
+2329 ; Pattern_Syntax # Ps LEFT-POINTING ANGLE BRACKET
+232A ; Pattern_Syntax # Pe RIGHT-POINTING ANGLE BRACKET
+232B..237B ; Pattern_Syntax # So [81] ERASE TO THE LEFT..NOT CHECK MARK
+237C ; Pattern_Syntax # Sm RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW
+237D..239A ; Pattern_Syntax # So [30] SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL
+239B..23B3 ; Pattern_Syntax # Sm [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM
+23B4..23DB ; Pattern_Syntax # So [40] TOP SQUARE BRACKET..FUSE
+23DC..23E1 ; Pattern_Syntax # Sm [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET
+23E2..23F3 ; Pattern_Syntax # So [18] WHITE TRAPEZIUM..HOURGLASS WITH FLOWING SAND
+23F4..23FF ; Pattern_Syntax # Cn [12] <reserved-23F4>..<reserved-23FF>
+2400..2426 ; Pattern_Syntax # So [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO
+2427..243F ; Pattern_Syntax # Cn [25] <reserved-2427>..<reserved-243F>
+2440..244A ; Pattern_Syntax # So [11] OCR HOOK..OCR DOUBLE BACKSLASH
+244B..245F ; Pattern_Syntax # Cn [21] <reserved-244B>..<reserved-245F>
+2500..25B6 ; Pattern_Syntax # So [183] BOX DRAWINGS LIGHT HORIZONTAL..BLACK RIGHT-POINTING TRIANGLE
+25B7 ; Pattern_Syntax # Sm WHITE RIGHT-POINTING TRIANGLE
+25B8..25C0 ; Pattern_Syntax # So [9] BLACK RIGHT-POINTING SMALL TRIANGLE..BLACK LEFT-POINTING TRIANGLE
+25C1 ; Pattern_Syntax # Sm WHITE LEFT-POINTING TRIANGLE
+25C2..25F7 ; Pattern_Syntax # So [54] BLACK LEFT-POINTING SMALL TRIANGLE..WHITE CIRCLE WITH UPPER RIGHT QUADRANT
+25F8..25FF ; Pattern_Syntax # Sm [8] UPPER LEFT TRIANGLE..LOWER RIGHT TRIANGLE
+2600..266E ; Pattern_Syntax # So [111] BLACK SUN WITH RAYS..MUSIC NATURAL SIGN
+266F ; Pattern_Syntax # Sm MUSIC SHARP SIGN
+2670..26FF ; Pattern_Syntax # So [144] WEST SYRIAC CROSS..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE
+2700 ; Pattern_Syntax # Cn <reserved-2700>
+2701..2767 ; Pattern_Syntax # So [103] UPPER BLADE SCISSORS..ROTATED FLORAL HEART BULLET
+2768 ; Pattern_Syntax # Ps MEDIUM LEFT PARENTHESIS ORNAMENT
+2769 ; Pattern_Syntax # Pe MEDIUM RIGHT PARENTHESIS ORNAMENT
+276A ; Pattern_Syntax # Ps MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT
+276B ; Pattern_Syntax # Pe MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT
+276C ; Pattern_Syntax # Ps MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
+276D ; Pattern_Syntax # Pe MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
+276E ; Pattern_Syntax # Ps HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT
+276F ; Pattern_Syntax # Pe HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT
+2770 ; Pattern_Syntax # Ps HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT
+2771 ; Pattern_Syntax # Pe HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT
+2772 ; Pattern_Syntax # Ps LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT
+2773 ; Pattern_Syntax # Pe LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT
+2774 ; Pattern_Syntax # Ps MEDIUM LEFT CURLY BRACKET ORNAMENT
+2775 ; Pattern_Syntax # Pe MEDIUM RIGHT CURLY BRACKET ORNAMENT
+2794..27BF ; Pattern_Syntax # So [44] HEAVY WIDE-HEADED RIGHTWARDS ARROW..DOUBLE CURLY LOOP
+27C0..27C4 ; Pattern_Syntax # Sm [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET
+27C5 ; Pattern_Syntax # Ps LEFT S-SHAPED BAG DELIMITER
+27C6 ; Pattern_Syntax # Pe RIGHT S-SHAPED BAG DELIMITER
+27C7..27CA ; Pattern_Syntax # Sm [4] OR WITH DOT INSIDE..VERTICAL BAR WITH HORIZONTAL STROKE
+27CB ; Pattern_Syntax # Cn <reserved-27CB>
+27CC ; Pattern_Syntax # Sm LONG DIVISION
+27CD ; Pattern_Syntax # Cn <reserved-27CD>
+27CE..27E5 ; Pattern_Syntax # Sm [24] SQUARED LOGICAL AND..WHITE SQUARE WITH RIGHTWARDS TICK
+27E6 ; Pattern_Syntax # Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET
+27E7 ; Pattern_Syntax # Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET
+27E8 ; Pattern_Syntax # Ps MATHEMATICAL LEFT ANGLE BRACKET
+27E9 ; Pattern_Syntax # Pe MATHEMATICAL RIGHT ANGLE BRACKET
+27EA ; Pattern_Syntax # Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
+27EB ; Pattern_Syntax # Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
+27EC ; Pattern_Syntax # Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
+27ED ; Pattern_Syntax # Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
+27EE ; Pattern_Syntax # Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS
+27EF ; Pattern_Syntax # Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+27F0..27FF ; Pattern_Syntax # Sm [16] UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW
+2800..28FF ; Pattern_Syntax # So [256] BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678
+2900..2982 ; Pattern_Syntax # Sm [131] RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..Z NOTATION TYPE COLON
+2983 ; Pattern_Syntax # Ps LEFT WHITE CURLY BRACKET
+2984 ; Pattern_Syntax # Pe RIGHT WHITE CURLY BRACKET
+2985 ; Pattern_Syntax # Ps LEFT WHITE PARENTHESIS
+2986 ; Pattern_Syntax # Pe RIGHT WHITE PARENTHESIS
+2987 ; Pattern_Syntax # Ps Z NOTATION LEFT IMAGE BRACKET
+2988 ; Pattern_Syntax # Pe Z NOTATION RIGHT IMAGE BRACKET
+2989 ; Pattern_Syntax # Ps Z NOTATION LEFT BINDING BRACKET
+298A ; Pattern_Syntax # Pe Z NOTATION RIGHT BINDING BRACKET
+298B ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH UNDERBAR
+298C ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH UNDERBAR
+298D ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
+298E ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+298F ; Pattern_Syntax # Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+2990 ; Pattern_Syntax # Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
+2991 ; Pattern_Syntax # Ps LEFT ANGLE BRACKET WITH DOT
+2992 ; Pattern_Syntax # Pe RIGHT ANGLE BRACKET WITH DOT
+2993 ; Pattern_Syntax # Ps LEFT ARC LESS-THAN BRACKET
+2994 ; Pattern_Syntax # Pe RIGHT ARC GREATER-THAN BRACKET
+2995 ; Pattern_Syntax # Ps DOUBLE LEFT ARC GREATER-THAN BRACKET
+2996 ; Pattern_Syntax # Pe DOUBLE RIGHT ARC LESS-THAN BRACKET
+2997 ; Pattern_Syntax # Ps LEFT BLACK TORTOISE SHELL BRACKET
+2998 ; Pattern_Syntax # Pe RIGHT BLACK TORTOISE SHELL BRACKET
+2999..29D7 ; Pattern_Syntax # Sm [63] DOTTED FENCE..BLACK HOURGLASS
+29D8 ; Pattern_Syntax # Ps LEFT WIGGLY FENCE
+29D9 ; Pattern_Syntax # Pe RIGHT WIGGLY FENCE
+29DA ; Pattern_Syntax # Ps LEFT DOUBLE WIGGLY FENCE
+29DB ; Pattern_Syntax # Pe RIGHT DOUBLE WIGGLY FENCE
+29DC..29FB ; Pattern_Syntax # Sm [32] INCOMPLETE INFINITY..TRIPLE PLUS
+29FC ; Pattern_Syntax # Ps LEFT-POINTING CURVED ANGLE BRACKET
+29FD ; Pattern_Syntax # Pe RIGHT-POINTING CURVED ANGLE BRACKET
+29FE..2AFF ; Pattern_Syntax # Sm [258] TINY..N-ARY WHITE VERTICAL BAR
+2B00..2B2F ; Pattern_Syntax # So [48] NORTH EAST WHITE ARROW..WHITE VERTICAL ELLIPSE
+2B30..2B44 ; Pattern_Syntax # Sm [21] LEFT ARROW WITH SMALL CIRCLE..RIGHTWARDS ARROW THROUGH SUPERSET
+2B45..2B46 ; Pattern_Syntax # So [2] LEFTWARDS QUADRUPLE ARROW..RIGHTWARDS QUADRUPLE ARROW
+2B47..2B4C ; Pattern_Syntax # Sm [6] REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR
+2B4D..2B4F ; Pattern_Syntax # Cn [3] <reserved-2B4D>..<reserved-2B4F>
+2B50..2B59 ; Pattern_Syntax # So [10] WHITE MEDIUM STAR..HEAVY CIRCLED SALTIRE
+2B5A..2BFF ; Pattern_Syntax # Cn [166] <reserved-2B5A>..<reserved-2BFF>
+2E00..2E01 ; Pattern_Syntax # Po [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
+2E02 ; Pattern_Syntax # Pi LEFT SUBSTITUTION BRACKET
+2E03 ; Pattern_Syntax # Pf RIGHT SUBSTITUTION BRACKET
+2E04 ; Pattern_Syntax # Pi LEFT DOTTED SUBSTITUTION BRACKET
+2E05 ; Pattern_Syntax # Pf RIGHT DOTTED SUBSTITUTION BRACKET
+2E06..2E08 ; Pattern_Syntax # Po [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER
+2E09 ; Pattern_Syntax # Pi LEFT TRANSPOSITION BRACKET
+2E0A ; Pattern_Syntax # Pf RIGHT TRANSPOSITION BRACKET
+2E0B ; Pattern_Syntax # Po RAISED SQUARE
+2E0C ; Pattern_Syntax # Pi LEFT RAISED OMISSION BRACKET
+2E0D ; Pattern_Syntax # Pf RIGHT RAISED OMISSION BRACKET
+2E0E..2E16 ; Pattern_Syntax # Po [9] EDITORIAL CORONIS..DOTTED RIGHT-POINTING ANGLE
+2E17 ; Pattern_Syntax # Pd DOUBLE OBLIQUE HYPHEN
+2E18..2E19 ; Pattern_Syntax # Po [2] INVERTED INTERROBANG..PALM BRANCH
+2E1A ; Pattern_Syntax # Pd HYPHEN WITH DIAERESIS
+2E1B ; Pattern_Syntax # Po TILDE WITH RING ABOVE
+2E1C ; Pattern_Syntax # Pi LEFT LOW PARAPHRASE BRACKET
+2E1D ; Pattern_Syntax # Pf RIGHT LOW PARAPHRASE BRACKET
+2E1E..2E1F ; Pattern_Syntax # Po [2] TILDE WITH DOT ABOVE..TILDE WITH DOT BELOW
+2E20 ; Pattern_Syntax # Pi LEFT VERTICAL BAR WITH QUILL
+2E21 ; Pattern_Syntax # Pf RIGHT VERTICAL BAR WITH QUILL
+2E22 ; Pattern_Syntax # Ps TOP LEFT HALF BRACKET
+2E23 ; Pattern_Syntax # Pe TOP RIGHT HALF BRACKET
+2E24 ; Pattern_Syntax # Ps BOTTOM LEFT HALF BRACKET
+2E25 ; Pattern_Syntax # Pe BOTTOM RIGHT HALF BRACKET
+2E26 ; Pattern_Syntax # Ps LEFT SIDEWAYS U BRACKET
+2E27 ; Pattern_Syntax # Pe RIGHT SIDEWAYS U BRACKET
+2E28 ; Pattern_Syntax # Ps LEFT DOUBLE PARENTHESIS
+2E29 ; Pattern_Syntax # Pe RIGHT DOUBLE PARENTHESIS
+2E2A..2E2E ; Pattern_Syntax # Po [5] TWO DOTS OVER ONE DOT PUNCTUATION..REVERSED QUESTION MARK
+2E2F ; Pattern_Syntax # Lm VERTICAL TILDE
+2E30..2E31 ; Pattern_Syntax # Po [2] RING POINT..WORD SEPARATOR MIDDLE DOT
+2E32..2E7F ; Pattern_Syntax # Cn [78] <reserved-2E32>..<reserved-2E7F>
+3001..3003 ; Pattern_Syntax # Po [3] IDEOGRAPHIC COMMA..DITTO MARK
+3008 ; Pattern_Syntax # Ps LEFT ANGLE BRACKET
+3009 ; Pattern_Syntax # Pe RIGHT ANGLE BRACKET
+300A ; Pattern_Syntax # Ps LEFT DOUBLE ANGLE BRACKET
+300B ; Pattern_Syntax # Pe RIGHT DOUBLE ANGLE BRACKET
+300C ; Pattern_Syntax # Ps LEFT CORNER BRACKET
+300D ; Pattern_Syntax # Pe RIGHT CORNER BRACKET
+300E ; Pattern_Syntax # Ps LEFT WHITE CORNER BRACKET
+300F ; Pattern_Syntax # Pe RIGHT WHITE CORNER BRACKET
+3010 ; Pattern_Syntax # Ps LEFT BLACK LENTICULAR BRACKET
+3011 ; Pattern_Syntax # Pe RIGHT BLACK LENTICULAR BRACKET
+3012..3013 ; Pattern_Syntax # So [2] POSTAL MARK..GETA MARK
+3014 ; Pattern_Syntax # Ps LEFT TORTOISE SHELL BRACKET
+3015 ; Pattern_Syntax # Pe RIGHT TORTOISE SHELL BRACKET
+3016 ; Pattern_Syntax # Ps LEFT WHITE LENTICULAR BRACKET
+3017 ; Pattern_Syntax # Pe RIGHT WHITE LENTICULAR BRACKET
+3018 ; Pattern_Syntax # Ps LEFT WHITE TORTOISE SHELL BRACKET
+3019 ; Pattern_Syntax # Pe RIGHT WHITE TORTOISE SHELL BRACKET
+301A ; Pattern_Syntax # Ps LEFT WHITE SQUARE BRACKET
+301B ; Pattern_Syntax # Pe RIGHT WHITE SQUARE BRACKET
+301C ; Pattern_Syntax # Pd WAVE DASH
+301D ; Pattern_Syntax # Ps REVERSED DOUBLE PRIME QUOTATION MARK
+301E..301F ; Pattern_Syntax # Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK
+3020 ; Pattern_Syntax # So POSTAL MARK FACE
+3030 ; Pattern_Syntax # Pd WAVY DASH
+FD3E ; Pattern_Syntax # Ps ORNATE LEFT PARENTHESIS
+FD3F ; Pattern_Syntax # Pe ORNATE RIGHT PARENTHESIS
+FE45..FE46 ; Pattern_Syntax # Po [2] SESAME DOT..WHITE SESAME DOT
+
+# Total code points: 2760
+
+# EOF
--- a/jdk/test/java/lang/Double/ParseDouble.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/lang/Double/ParseDouble.java Tue May 03 22:16:58 2011 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4160406 4705734 4707389 4826774 4895911 4421494 7021568
+ * @bug 4160406 4705734 4707389 4826774 4895911 4421494 7021568 7039369
* @summary Test for Double.parseDouble method and acceptance regex
*/
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java Tue May 03 22:16:58 2011 -0700
@@ -26,7 +26,7 @@
* @bug 4199068 4738465 4937983 4930681 4926230 4931433 4932663 4986689
* 5026830 5023243 5070673 4052517 4811767 6192449 6397034 6413313
* 6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958
- * 4947220 7018606
+ * 4947220 7018606 7034570
* @summary Basic tests for Process and Environment Variable code
* @run main/othervm/timeout=300 Basic
* @author Martin Buchholz
@@ -1440,11 +1440,12 @@
// Check for sort order of environment variables on Windows.
//----------------------------------------------------------------
try {
+ String systemRoot = "SystemRoot=" + System.getenv("SystemRoot");
// '+' < 'A' < 'Z' < '_' < 'a' < 'z' < '~'
String[]envp = {"FOO=BAR","BAZ=GORP","QUUX=",
- "+=+", "_=_", "~=~"};
+ "+=+", "_=_", "~=~", systemRoot};
String output = nativeEnv(envp);
- String expected = "+=+\nBAZ=GORP\nFOO=BAR\nQUUX=\n_=_\n~=~\n";
+ String expected = "+=+\nBAZ=GORP\nFOO=BAR\nQUUX=\n"+systemRoot+"\n_=_\n~=~\n";
// On Windows, Java must keep the environment sorted.
// Order is random on Unix, so this test does the sort.
if (! Windows.is())
@@ -1453,6 +1454,21 @@
} catch (Throwable t) { unexpected(t); }
//----------------------------------------------------------------
+ // Test Runtime.exec(...envp...)
+ // and check SystemRoot gets set automatically on Windows
+ //----------------------------------------------------------------
+ try {
+ if (Windows.is()) {
+ String systemRoot = "SystemRoot=" + System.getenv("SystemRoot");
+ String[]envp = {"FOO=BAR","BAZ=GORP","QUUX=",
+ "+=+", "_=_", "~=~"};
+ String output = nativeEnv(envp);
+ String expected = "+=+\nBAZ=GORP\nFOO=BAR\nQUUX=\n"+systemRoot+"\n_=_\n~=~\n";
+ equal(output, expected);
+ }
+ } catch (Throwable t) { unexpected(t); }
+
+ //----------------------------------------------------------------
// System.getenv() must be consistent with System.getenv(String)
//----------------------------------------------------------------
try {
--- a/jdk/test/java/lang/Throwable/ChainedExceptions.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/lang/Throwable/ChainedExceptions.java Tue May 03 22:16:58 2011 -0700
@@ -13,28 +13,28 @@
StackTraceElement[] highTrace = e.getStackTrace();
int depthTrim = highTrace.length - 2;
- check(highTrace[0], "a", 48);
- check(highTrace[1], "main", 11);
+ check(e, highTrace[0], "a", 48);
+ check(e, highTrace[1], "main", 11);
Throwable mid = e.getCause();
StackTraceElement[] midTrace = mid.getStackTrace();
if (midTrace.length - depthTrim != 4)
throw new RuntimeException("Mid depth");
- check(midTrace[0], "c", 58);
- check(midTrace[1], "b", 52);
- check(midTrace[2], "a", 46);
- check(midTrace[3], "main", 11);
+ check(mid, midTrace[0], "c", 58);
+ check(mid, midTrace[1], "b", 52);
+ check(mid, midTrace[2], "a", 46);
+ check(mid, midTrace[3], "main", 11);
Throwable low = mid.getCause();
StackTraceElement[] lowTrace = low.getStackTrace();
if (lowTrace.length - depthTrim != 6)
throw new RuntimeException("Low depth");
- check(lowTrace[0], "e", 65);
- check(lowTrace[1], "d", 62);
- check(lowTrace[2], "c", 56);
- check(lowTrace[3], "b", 52);
- check(lowTrace[4], "a", 46);
- check(lowTrace[5], "main", 11);
+ check(low, lowTrace[0], "e", 65);
+ check(low, lowTrace[1], "d", 62);
+ check(low, lowTrace[2], "c", 56);
+ check(low, lowTrace[3], "b", 52);
+ check(low, lowTrace[4], "a", 46);
+ check(low, lowTrace[5], "main", 11);
if (low.getCause() != null)
throw new RuntimeException("Low cause != null");
@@ -68,15 +68,15 @@
private static final String OUR_CLASS = ChainedExceptions.class.getName();
private static final String OUR_FILE_NAME = "ChainedExceptions.java";
- private static void check(StackTraceElement e, String methodName, int n) {
+ private static void check(Throwable t, StackTraceElement e, String methodName, int n) {
if (!e.getClassName().equals(OUR_CLASS))
- throw new RuntimeException("Class: " + e);
+ throw new RuntimeException("Class: " + e, t);
if (!e.getMethodName().equals(methodName))
- throw new RuntimeException("Method name: " + e);
+ throw new RuntimeException("Method name: " + e, t);
if (!e.getFileName().equals(OUR_FILE_NAME))
- throw new RuntimeException("File name: " + e);
+ throw new RuntimeException("File name: " + e, t);
if (e.getLineNumber() != n)
- throw new RuntimeException("Line number: " + e);
+ throw new RuntimeException("Line number: " + e, t);
}
}
--- a/jdk/test/java/lang/Throwable/StackTraceSerialization.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/lang/Throwable/StackTraceSerialization.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -26,7 +26,7 @@
/*
* @test
- * @bug 4202914 4363318 6991528
+ * @bug 4202914 4363318 6991528 6998871
* @summary Basic test of serialization of stack trace information
* @author Josh Bloch
*/
@@ -37,14 +37,52 @@
testWithFillInStackTrace();
}
- private static void testWithSetStackTrace() throws Exception {
- Throwable t = new Throwable();
+ private static void testWithSetStackTrace() {
+ StackTraceElement[] stackTrace = {new StackTraceElement("foo", "bar", "baz", -1)};
+
+ Throwable t = new TestThrowable(true, false); // Immutable and empty stack
+ assertEmptyStackTrace(t);
+
+ // Verify fillInStackTrace is now a no-op.
+ t.fillInStackTrace();
+ assertEmptyStackTrace(t);
+
+ // Verify setStackTrace is now a no-op.
+ t.setStackTrace(stackTrace);
+ assertEmptyStackTrace(t);
- t.setStackTrace(new StackTraceElement[]
- {new StackTraceElement("foo", "bar", "baz", -1)});
+ // Verify null-handling
+ try {
+ t.setStackTrace(null);
+ throw new RuntimeException("No NPE on a null stack trace.");
+ } catch(NullPointerException npe) {
+ assertEmptyStackTrace(t);
+ }
+
+ try {
+ t.setStackTrace(new StackTraceElement[]{null});
+ throw new RuntimeException("No NPE on a null stack trace element.");
+ } catch(NullPointerException npe) {
+ assertEmptyStackTrace(t);
+ }
if (!equal(t, reconstitute(t)))
- throw new Exception("Unequal Throwables with set stacktrace");
+ throw new RuntimeException("Unequal Throwables with set stacktrace");
+
+ Throwable t2 = new Throwable();
+ t2.setStackTrace(stackTrace);
+ if (!equal(t2, reconstitute(t2)))
+ throw new RuntimeException("Unequal Throwables with set stacktrace");
+
+ }
+
+ private static class TestThrowable extends Throwable {
+ public TestThrowable(boolean enableSuppression,
+ boolean writableStackTrace) {
+ super("the medium", null,
+ enableSuppression,
+ writableStackTrace);
+ }
}
private static void assertEmptyStackTrace(Throwable t) {
@@ -52,7 +90,7 @@
throw new AssertionError("Nonempty stacktrace.");
}
- private static void testWithFillInStackTrace() throws Exception {
+ private static void testWithFillInStackTrace() {
Throwable original = null;
try {
a();
@@ -61,16 +99,14 @@
}
if (!equal(original, reconstitute(original)))
- throw new Exception("Unequal Throwables with filled-in stacktrace");
+ throw new RuntimeException("Unequal Throwables with filled-in stacktrace");
}
-
/**
* Serialize the argument and return the deserialized result.
*/
- private static Throwable reconstitute(Throwable t) throws Exception {
+ private static Throwable reconstitute(Throwable t) {
Throwable result = null;
-
try(ByteArrayOutputStream bout = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bout)) {
out.writeObject(t);
@@ -80,8 +116,9 @@
ObjectInputStream in = new ObjectInputStream(bin)) {
result = (Throwable) in.readObject();
}
+ } catch(IOException | ClassNotFoundException e) {
+ throw new RuntimeException(e);
}
-
return result;
}
--- a/jdk/test/java/lang/Throwable/SuppressedExceptions.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/lang/Throwable/SuppressedExceptions.java Tue May 03 22:16:58 2011 -0700
@@ -193,6 +193,7 @@
// Make sure addSuppressed(null) throws an NPE
try {
t.addSuppressed(null);
+ throw new RuntimeException("NPE not thrown!");
} catch(NullPointerException e) {
; // Expected
}
@@ -204,7 +205,7 @@
private static class NoSuppression extends Throwable {
public NoSuppression(boolean enableSuppression) {
- super("The medium.", null, enableSuppression);
+ super("The medium.", null, enableSuppression, true);
}
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/StandardCharset/Standard.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4884238
+ * @summary Test standard charset name constants.
+ * @author Mike Duigou
+ * @run main Standard
+ */
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.io.*;
+import java.nio.charset.*;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public class Standard {
+
+ private final static String standardCharsets[] = {
+ "US-ASCII", "ISO-8859-1", "UTF-8",
+ "UTF-16BE", "UTF-16LE", "UTF-16" };
+
+ public static void realMain(String[] args) {
+ check(StandardCharset.US_ASCII instanceof Charset);
+ check(StandardCharset.ISO_8859_1 instanceof Charset);
+ check(StandardCharset.UTF_8 instanceof Charset);
+ check(StandardCharset.UTF_16BE instanceof Charset);
+ check(StandardCharset.UTF_16LE instanceof Charset);
+ check(StandardCharset.UTF_16 instanceof Charset);
+
+ check("US-ASCII".equals(StandardCharset.US_ASCII.name()));
+ check("ISO-8859-1".equals(StandardCharset.ISO_8859_1.name()));
+ check("UTF-8".equals(StandardCharset.UTF_8.name()));
+ check("UTF-16BE".equals(StandardCharset.UTF_16BE.name()));
+ check("UTF-16LE".equals(StandardCharset.UTF_16LE.name()));
+ check("UTF-16".equals(StandardCharset.UTF_16.name()));
+
+ Set<String> charsets = new HashSet<>();
+ Field standardCharsetFields[] = StandardCharset.class.getFields();
+
+ for(Field charsetField : standardCharsetFields) {
+ check(StandardCharset.class == charsetField.getDeclaringClass());
+ check(Modifier.isFinal(charsetField.getModifiers()));
+ check(Modifier.isStatic(charsetField.getModifiers()));
+ check(Modifier.isPublic(charsetField.getModifiers()));
+ Object value;
+ try {
+ value = charsetField.get(null);
+ } catch(IllegalAccessException failure) {
+ unexpected(failure);
+ continue;
+ }
+ check(value instanceof Charset);
+ charsets.add(((Charset)value).name());
+ }
+
+ check(charsets.containsAll(Arrays.asList(standardCharsets)));
+ charsets.removeAll(Arrays.asList(standardCharsets));
+ check(charsets.isEmpty());
+ }
+
+ //--------------------- Infrastructure ---------------------------
+ static volatile int passed = 0, failed = 0;
+ static void pass() { passed++; }
+ static void fail() { failed++; Thread.dumpStack(); }
+ static void fail(String msg) { System.out.println(msg); fail(); }
+ static void unexpected(Throwable t) { failed++; t.printStackTrace(); }
+ static void check(boolean cond) { if (cond) pass(); else fail(); }
+ static void equal(Object x, Object y) {
+ if (x == null ? y == null : x.equals(y)) pass();
+ else {System.out.println(x + " not equal to " + y); fail();}}
+ static void equal2(Object x, Object y) {equal(x, y); equal(y, x);}
+ public static void main(String[] args) throws Throwable {
+ try { realMain(args); } catch (Throwable t) { unexpected(t); }
+
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new Exception("Some tests failed");
+ }
+ private static abstract class Fun {abstract void f() throws Throwable;}
+ private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
+ for (Fun f : fs)
+ try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
+ catch (Throwable t) {
+ if (k.isAssignableFrom(t.getClass())) pass();
+ else unexpected(t);}}
+ static byte[] serializedForm(Object obj) {
+ try {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ new ObjectOutputStream(baos).writeObject(obj);
+ return baos.toByteArray();
+ } catch (IOException e) { throw new Error(e); }}
+ static Object readObject(byte[] bytes)
+ throws IOException, ClassNotFoundException {
+ InputStream is = new ByteArrayInputStream(bytes);
+ return new ObjectInputStream(is).readObject();}
+ @SuppressWarnings("unchecked")
+ static <T> T serialClone(T obj) {
+ try { return (T) readObject(serializedForm(obj)); }
+ catch (Exception e) { throw new Error(e); }}
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/regex/POSIX_ASCII.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+final class POSIX_ASCII {
+
+ static final int UPPER = 0x00000100;
+
+ static final int LOWER = 0x00000200;
+
+ static final int DIGIT = 0x00000400;
+
+ static final int SPACE = 0x00000800;
+
+ static final int PUNCT = 0x00001000;
+
+ static final int CNTRL = 0x00002000;
+
+ static final int BLANK = 0x00004000;
+
+ static final int HEX = 0x00008000;
+
+ static final int UNDER = 0x00010000;
+
+ static final int ASCII = 0x0000FF00;
+
+ static final int ALPHA = (UPPER|LOWER);
+
+ static final int ALNUM = (UPPER|LOWER|DIGIT);
+
+ static final int GRAPH = (PUNCT|UPPER|LOWER|DIGIT);
+
+ static final int WORD = (UPPER|LOWER|UNDER|DIGIT);
+
+ static final int XDIGIT = (HEX);
+
+ private static final int[] ctype = new int[] {
+ CNTRL, /* 00 (NUL) */
+ CNTRL, /* 01 (SOH) */
+ CNTRL, /* 02 (STX) */
+ CNTRL, /* 03 (ETX) */
+ CNTRL, /* 04 (EOT) */
+ CNTRL, /* 05 (ENQ) */
+ CNTRL, /* 06 (ACK) */
+ CNTRL, /* 07 (BEL) */
+ CNTRL, /* 08 (BS) */
+ SPACE+CNTRL+BLANK, /* 09 (HT) */
+ SPACE+CNTRL, /* 0A (LF) */
+ SPACE+CNTRL, /* 0B (VT) */
+ SPACE+CNTRL, /* 0C (FF) */
+ SPACE+CNTRL, /* 0D (CR) */
+ CNTRL, /* 0E (SI) */
+ CNTRL, /* 0F (SO) */
+ CNTRL, /* 10 (DLE) */
+ CNTRL, /* 11 (DC1) */
+ CNTRL, /* 12 (DC2) */
+ CNTRL, /* 13 (DC3) */
+ CNTRL, /* 14 (DC4) */
+ CNTRL, /* 15 (NAK) */
+ CNTRL, /* 16 (SYN) */
+ CNTRL, /* 17 (ETB) */
+ CNTRL, /* 18 (CAN) */
+ CNTRL, /* 19 (EM) */
+ CNTRL, /* 1A (SUB) */
+ CNTRL, /* 1B (ESC) */
+ CNTRL, /* 1C (FS) */
+ CNTRL, /* 1D (GS) */
+ CNTRL, /* 1E (RS) */
+ CNTRL, /* 1F (US) */
+ SPACE+BLANK, /* 20 SPACE */
+ PUNCT, /* 21 ! */
+ PUNCT, /* 22 " */
+ PUNCT, /* 23 # */
+ PUNCT, /* 24 $ */
+ PUNCT, /* 25 % */
+ PUNCT, /* 26 & */
+ PUNCT, /* 27 ' */
+ PUNCT, /* 28 ( */
+ PUNCT, /* 29 ) */
+ PUNCT, /* 2A * */
+ PUNCT, /* 2B + */
+ PUNCT, /* 2C , */
+ PUNCT, /* 2D - */
+ PUNCT, /* 2E . */
+ PUNCT, /* 2F / */
+ DIGIT+HEX+0, /* 30 0 */
+ DIGIT+HEX+1, /* 31 1 */
+ DIGIT+HEX+2, /* 32 2 */
+ DIGIT+HEX+3, /* 33 3 */
+ DIGIT+HEX+4, /* 34 4 */
+ DIGIT+HEX+5, /* 35 5 */
+ DIGIT+HEX+6, /* 36 6 */
+ DIGIT+HEX+7, /* 37 7 */
+ DIGIT+HEX+8, /* 38 8 */
+ DIGIT+HEX+9, /* 39 9 */
+ PUNCT, /* 3A : */
+ PUNCT, /* 3B ; */
+ PUNCT, /* 3C < */
+ PUNCT, /* 3D = */
+ PUNCT, /* 3E > */
+ PUNCT, /* 3F ? */
+ PUNCT, /* 40 @ */
+ UPPER+HEX+10, /* 41 A */
+ UPPER+HEX+11, /* 42 B */
+ UPPER+HEX+12, /* 43 C */
+ UPPER+HEX+13, /* 44 D */
+ UPPER+HEX+14, /* 45 E */
+ UPPER+HEX+15, /* 46 F */
+ UPPER+16, /* 47 G */
+ UPPER+17, /* 48 H */
+ UPPER+18, /* 49 I */
+ UPPER+19, /* 4A J */
+ UPPER+20, /* 4B K */
+ UPPER+21, /* 4C L */
+ UPPER+22, /* 4D M */
+ UPPER+23, /* 4E N */
+ UPPER+24, /* 4F O */
+ UPPER+25, /* 50 P */
+ UPPER+26, /* 51 Q */
+ UPPER+27, /* 52 R */
+ UPPER+28, /* 53 S */
+ UPPER+29, /* 54 T */
+ UPPER+30, /* 55 U */
+ UPPER+31, /* 56 V */
+ UPPER+32, /* 57 W */
+ UPPER+33, /* 58 X */
+ UPPER+34, /* 59 Y */
+ UPPER+35, /* 5A Z */
+ PUNCT, /* 5B [ */
+ PUNCT, /* 5C \ */
+ PUNCT, /* 5D ] */
+ PUNCT, /* 5E ^ */
+ PUNCT|UNDER, /* 5F _ */
+ PUNCT, /* 60 ` */
+ LOWER+HEX+10, /* 61 a */
+ LOWER+HEX+11, /* 62 b */
+ LOWER+HEX+12, /* 63 c */
+ LOWER+HEX+13, /* 64 d */
+ LOWER+HEX+14, /* 65 e */
+ LOWER+HEX+15, /* 66 f */
+ LOWER+16, /* 67 g */
+ LOWER+17, /* 68 h */
+ LOWER+18, /* 69 i */
+ LOWER+19, /* 6A j */
+ LOWER+20, /* 6B k */
+ LOWER+21, /* 6C l */
+ LOWER+22, /* 6D m */
+ LOWER+23, /* 6E n */
+ LOWER+24, /* 6F o */
+ LOWER+25, /* 70 p */
+ LOWER+26, /* 71 q */
+ LOWER+27, /* 72 r */
+ LOWER+28, /* 73 s */
+ LOWER+29, /* 74 t */
+ LOWER+30, /* 75 u */
+ LOWER+31, /* 76 v */
+ LOWER+32, /* 77 w */
+ LOWER+33, /* 78 x */
+ LOWER+34, /* 79 y */
+ LOWER+35, /* 7A z */
+ PUNCT, /* 7B { */
+ PUNCT, /* 7C | */
+ PUNCT, /* 7D } */
+ PUNCT, /* 7E ~ */
+ CNTRL, /* 7F (DEL) */
+ };
+
+ static int getType(int ch) {
+ return ((ch & 0xFFFFFF80) == 0 ? ctype[ch] : 0);
+ }
+
+ static boolean isType(int ch, int type) {
+ return (getType(ch) & type) != 0;
+ }
+
+ static boolean isAscii(int ch) {
+ return ((ch & 0xFFFFFF80) == 0);
+ }
+
+ static boolean isAlpha(int ch) {
+ return isType(ch, ALPHA);
+ }
+
+ static boolean isDigit(int ch) {
+ return ((ch-'0')|('9'-ch)) >= 0;
+ }
+
+ static boolean isAlnum(int ch) {
+ return isType(ch, ALNUM);
+ }
+
+ static boolean isGraph(int ch) {
+ return isType(ch, GRAPH);
+ }
+
+ static boolean isPrint(int ch) {
+ return ((ch-0x20)|(0x7E-ch)) >= 0;
+ }
+
+ static boolean isPunct(int ch) {
+ return isType(ch, PUNCT);
+ }
+
+ static boolean isSpace(int ch) {
+ return isType(ch, SPACE);
+ }
+
+ static boolean isHexDigit(int ch) {
+ return isType(ch, HEX);
+ }
+
+ static boolean isCntrl(int ch) {
+ return isType(ch, CNTRL);
+ }
+
+ static boolean isLower(int ch) {
+ return ((ch-'a')|('z'-ch)) >= 0;
+ }
+
+ static boolean isUpper(int ch) {
+ return ((ch-'A')|('Z'-ch)) >= 0;
+ }
+
+ static boolean isWord(int ch) {
+ return isType(ch, WORD);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/regex/POSIX_Unicode.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.HashMap;
+import java.util.Locale;
+
+final public class POSIX_Unicode {
+
+ public static boolean isAlpha(int ch) {
+ return Character.isAlphabetic(ch);
+ }
+
+ public static boolean isLower(int ch) {
+ return Character.isLowerCase(ch);
+ }
+
+ public static boolean isUpper(int ch) {
+ return Character.isUpperCase(ch);
+ }
+
+ // \p{Whitespace}
+ public static boolean isSpace(int ch) {
+ return ((((1 << Character.SPACE_SEPARATOR) |
+ (1 << Character.LINE_SEPARATOR) |
+ (1 << Character.PARAGRAPH_SEPARATOR)) >> Character.getType(ch)) & 1)
+ != 0 ||
+ (ch >= 0x9 && ch <= 0xd) ||
+ (ch == 0x85);
+ }
+
+ // \p{gc=Control}
+ public static boolean isCntrl(int ch) {
+ return Character.getType(ch) == Character.CONTROL;
+ }
+
+ // \p{gc=Punctuation}
+ public static boolean isPunct(int ch) {
+ return ((((1 << Character.CONNECTOR_PUNCTUATION) |
+ (1 << Character.DASH_PUNCTUATION) |
+ (1 << Character.START_PUNCTUATION) |
+ (1 << Character.END_PUNCTUATION) |
+ (1 << Character.OTHER_PUNCTUATION) |
+ (1 << Character.INITIAL_QUOTE_PUNCTUATION) |
+ (1 << Character.FINAL_QUOTE_PUNCTUATION)) >> Character.getType(ch)) & 1)
+ != 0;
+ }
+
+ // \p{gc=Decimal_Number}
+ // \p{Hex_Digit} -> PropList.txt: Hex_Digit
+ public static boolean isHexDigit(int ch) {
+ return Character.isDigit(ch) ||
+ (ch >= 0x0030 && ch <= 0x0039) ||
+ (ch >= 0x0041 && ch <= 0x0046) ||
+ (ch >= 0x0061 && ch <= 0x0066) ||
+ (ch >= 0xFF10 && ch <= 0xFF19) ||
+ (ch >= 0xFF21 && ch <= 0xFF26) ||
+ (ch >= 0xFF41 && ch <= 0xFF46);
+ }
+
+ // \p{gc=Decimal_Number}
+ public static boolean isDigit(int ch) {
+ return Character.isDigit(ch);
+ };
+
+ // \p{alpha}
+ // \p{digit}
+ public static boolean isAlnum(int ch) {
+ return Character.isAlphabetic(ch) || Character.isDigit(ch);
+ }
+
+ // \p{Whitespace} --
+ // [\N{LF} \N{VT} \N{FF} \N{CR} \N{NEL} -> 0xa, 0xb, 0xc, 0xd, 0x85
+ // \p{gc=Line_Separator}
+ // \p{gc=Paragraph_Separator}]
+ public static boolean isBlank(int ch) {
+ int type = Character.getType(ch);
+ return isSpace(ch) &&
+ ch != 0xa & ch != 0xb && ch !=0xc && ch != 0xd && ch != 0x85 &&
+ type != Character.LINE_SEPARATOR &&
+ type != Character.PARAGRAPH_SEPARATOR;
+ }
+
+ // [^
+ // \p{space}
+ // \p{gc=Control}
+ // \p{gc=Surrogate}
+ // \p{gc=Unassigned}]
+ public static boolean isGraph(int ch) {
+ int type = Character.getType(ch);
+ return !(isSpace(ch) ||
+ Character.CONTROL == type ||
+ Character.SURROGATE == type ||
+ Character.UNASSIGNED == type);
+ }
+
+ // \p{graph}
+ // \p{blank}
+ // -- \p{cntrl}
+ public static boolean isPrint(int ch) {
+ return (isGraph(ch) || isBlank(ch)) && !isCntrl(ch);
+ }
+
+ // PropList.txt:Noncharacter_Code_Point
+ public static boolean isNoncharacterCodePoint(int ch) {
+ return (ch & 0xfffe) == 0xfffe || (ch >= 0xfdd0 && ch <= 0xfdef);
+ }
+
+ // \p{alpha}
+ // \p{gc=Mark}
+ // \p{digit}
+ // \p{gc=Connector_Punctuation}
+ public static boolean isWord(int ch) {
+ return isAlpha(ch) ||
+ ((((1 << Character.NON_SPACING_MARK) |
+ (1 << Character.ENCLOSING_MARK) |
+ (1 << Character.COMBINING_SPACING_MARK) |
+ (1 << Character.CONNECTOR_PUNCTUATION)) >> Character.getType(ch)) & 1)
+ != 0 ||
+ isDigit(ch);
+ }
+}
--- a/jdk/test/java/util/regex/RegExTest.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/java/util/regex/RegExTest.java Tue May 03 22:16:58 2011 -0700
@@ -32,7 +32,7 @@
* 4872664 4803179 4892980 4900747 4945394 4938995 4979006 4994840 4997476
* 5013885 5003322 4988891 5098443 5110268 6173522 4829857 5027748 6376940
* 6358731 6178785 6284152 6231989 6497148 6486934 6233084 6504326 6635133
- * 6350801 6676425 6878475 6919132 6931676 6948903 7014645
+ * 6350801 6676425 6878475 6919132 6931676 6948903 7014645 7039066
*/
import java.util.regex.*;
@@ -137,6 +137,7 @@
nonBmpClassComplementTest();
unicodePropertiesTest();
unicodeHexNotationTest();
+ unicodeClassesTest();
if (failure)
throw new RuntimeException("Failure in the RE handling.");
else
@@ -3656,5 +3657,146 @@
failCount++;
}
report("unicodeHexNotation");
- }
+ }
+
+ private static void unicodeClassesTest() throws Exception {
+
+ Matcher lower = Pattern.compile("\\p{Lower}").matcher("");
+ Matcher upper = Pattern.compile("\\p{Upper}").matcher("");
+ Matcher ASCII = Pattern.compile("\\p{ASCII}").matcher("");
+ Matcher alpha = Pattern.compile("\\p{Alpha}").matcher("");
+ Matcher digit = Pattern.compile("\\p{Digit}").matcher("");
+ Matcher alnum = Pattern.compile("\\p{Alnum}").matcher("");
+ Matcher punct = Pattern.compile("\\p{Punct}").matcher("");
+ Matcher graph = Pattern.compile("\\p{Graph}").matcher("");
+ Matcher print = Pattern.compile("\\p{Print}").matcher("");
+ Matcher blank = Pattern.compile("\\p{Blank}").matcher("");
+ Matcher cntrl = Pattern.compile("\\p{Cntrl}").matcher("");
+ Matcher xdigit = Pattern.compile("\\p{XDigit}").matcher("");
+ Matcher space = Pattern.compile("\\p{Space}").matcher("");
+ Matcher bound = Pattern.compile("\\b").matcher("");
+ Matcher word = Pattern.compile("\\w++").matcher("");
+ // UNICODE_CHARACTER_CLASS
+ Matcher lowerU = Pattern.compile("\\p{Lower}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher upperU = Pattern.compile("\\p{Upper}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher ASCIIU = Pattern.compile("\\p{ASCII}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher alphaU = Pattern.compile("\\p{Alpha}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher digitU = Pattern.compile("\\p{Digit}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher alnumU = Pattern.compile("\\p{Alnum}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher punctU = Pattern.compile("\\p{Punct}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher graphU = Pattern.compile("\\p{Graph}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher printU = Pattern.compile("\\p{Print}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher blankU = Pattern.compile("\\p{Blank}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher cntrlU = Pattern.compile("\\p{Cntrl}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher xdigitU = Pattern.compile("\\p{XDigit}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher spaceU = Pattern.compile("\\p{Space}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher boundU = Pattern.compile("\\b", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher wordU = Pattern.compile("\\w", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ // embedded flag (?U)
+ Matcher lowerEU = Pattern.compile("(?U)\\p{Lower}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher graphEU = Pattern.compile("(?U)\\p{Graph}", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher wordEU = Pattern.compile("(?U)\\w", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+
+ Matcher bwb = Pattern.compile("\\b\\w\\b").matcher("");
+ Matcher bwbU = Pattern.compile("\\b\\w++\\b", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ Matcher bwbEU = Pattern.compile("(?U)\\b\\w++\\b", Pattern.UNICODE_CHARACTER_CLASS).matcher("");
+ // properties
+ Matcher lowerP = Pattern.compile("\\p{IsLowerCase}").matcher("");
+ Matcher upperP = Pattern.compile("\\p{IsUpperCase}").matcher("");
+ Matcher titleP = Pattern.compile("\\p{IsTitleCase}").matcher("");
+ Matcher letterP = Pattern.compile("\\p{IsLetter}").matcher("");
+ Matcher alphaP = Pattern.compile("\\p{IsAlphabetic}").matcher("");
+ Matcher ideogP = Pattern.compile("\\p{IsIdeographic}").matcher("");
+ Matcher cntrlP = Pattern.compile("\\p{IsControl}").matcher("");
+ Matcher spaceP = Pattern.compile("\\p{IsWhiteSpace}").matcher("");
+ Matcher definedP = Pattern.compile("\\p{IsAssigned}").matcher("");
+ Matcher nonCCPP = Pattern.compile("\\p{IsNoncharacterCodePoint}").matcher("");
+
+ // javaMethod
+ Matcher lowerJ = Pattern.compile("\\p{javaLowerCase}").matcher("");
+ Matcher upperJ = Pattern.compile("\\p{javaUpperCase}").matcher("");
+ Matcher alphaJ = Pattern.compile("\\p{javaAlphabetic}").matcher("");
+ Matcher ideogJ = Pattern.compile("\\p{javaIdeographic}").matcher("");
+
+ for (int cp = 1; cp < 0x30000; cp++) {
+ String str = new String(Character.toChars(cp));
+ int type = Character.getType(cp);
+ if (// lower
+ POSIX_ASCII.isLower(cp) != lower.reset(str).matches() ||
+ Character.isLowerCase(cp) != lowerU.reset(str).matches() ||
+ Character.isLowerCase(cp) != lowerP.reset(str).matches() ||
+ Character.isLowerCase(cp) != lowerEU.reset(str).matches()||
+ Character.isLowerCase(cp) != lowerJ.reset(str).matches()||
+ // upper
+ POSIX_ASCII.isUpper(cp) != upper.reset(str).matches() ||
+ POSIX_Unicode.isUpper(cp) != upperU.reset(str).matches() ||
+ Character.isUpperCase(cp) != upperP.reset(str).matches() ||
+ Character.isUpperCase(cp) != upperJ.reset(str).matches() ||
+ // alpha
+ POSIX_ASCII.isAlpha(cp) != alpha.reset(str).matches() ||
+ POSIX_Unicode.isAlpha(cp) != alphaU.reset(str).matches() ||
+ Character.isAlphabetic(cp)!= alphaP.reset(str).matches() ||
+ Character.isAlphabetic(cp)!= alphaJ.reset(str).matches() ||
+ // digit
+ POSIX_ASCII.isDigit(cp) != digit.reset(str).matches() ||
+ Character.isDigit(cp) != digitU.reset(str).matches() ||
+ // alnum
+ POSIX_ASCII.isAlnum(cp) != alnum.reset(str).matches() ||
+ POSIX_Unicode.isAlnum(cp) != alnumU.reset(str).matches() ||
+ // punct
+ POSIX_ASCII.isPunct(cp) != punct.reset(str).matches() ||
+ POSIX_Unicode.isPunct(cp) != punctU.reset(str).matches() ||
+ // graph
+ POSIX_ASCII.isGraph(cp) != graph.reset(str).matches() ||
+ POSIX_Unicode.isGraph(cp) != graphU.reset(str).matches() ||
+ POSIX_Unicode.isGraph(cp) != graphEU.reset(str).matches()||
+ // blank
+ POSIX_ASCII.isType(cp, POSIX_ASCII.BLANK)
+ != blank.reset(str).matches() ||
+ POSIX_Unicode.isBlank(cp) != blankU.reset(str).matches() ||
+ // print
+ POSIX_ASCII.isPrint(cp) != print.reset(str).matches() ||
+ POSIX_Unicode.isPrint(cp) != printU.reset(str).matches() ||
+ // cntrl
+ POSIX_ASCII.isCntrl(cp) != cntrl.reset(str).matches() ||
+ POSIX_Unicode.isCntrl(cp) != cntrlU.reset(str).matches() ||
+ (Character.CONTROL == type) != cntrlP.reset(str).matches() ||
+ // hexdigit
+ POSIX_ASCII.isHexDigit(cp) != xdigit.reset(str).matches() ||
+ POSIX_Unicode.isHexDigit(cp) != xdigitU.reset(str).matches() ||
+ // space
+ POSIX_ASCII.isSpace(cp) != space.reset(str).matches() ||
+ POSIX_Unicode.isSpace(cp) != spaceU.reset(str).matches() ||
+ POSIX_Unicode.isSpace(cp) != spaceP.reset(str).matches() ||
+ // word
+ POSIX_ASCII.isWord(cp) != word.reset(str).matches() ||
+ POSIX_Unicode.isWord(cp) != wordU.reset(str).matches() ||
+ POSIX_Unicode.isWord(cp) != wordEU.reset(str).matches()||
+ // bwordb
+ POSIX_ASCII.isWord(cp) != bwb.reset(str).matches() ||
+ POSIX_Unicode.isWord(cp) != bwbU.reset(str).matches() ||
+ // properties
+ Character.isTitleCase(cp) != titleP.reset(str).matches() ||
+ Character.isLetter(cp) != letterP.reset(str).matches()||
+ Character.isIdeographic(cp) != ideogP.reset(str).matches() ||
+ Character.isIdeographic(cp) != ideogJ.reset(str).matches() ||
+ (Character.UNASSIGNED == type) == definedP.reset(str).matches() ||
+ POSIX_Unicode.isNoncharacterCodePoint(cp) != nonCCPP.reset(str).matches())
+ failCount++;
+ }
+
+ // bounds/word align
+ twoFindIndexes(" \u0180sherman\u0400 ", bound, 1, 10);
+ if (!bwbU.reset("\u0180sherman\u0400").matches())
+ failCount++;
+ twoFindIndexes(" \u0180sh\u0345erman\u0400 ", bound, 1, 11);
+ if (!bwbU.reset("\u0180sh\u0345erman\u0400").matches())
+ failCount++;
+ twoFindIndexes(" \u0724\u0739\u0724 ", bound, 1, 4);
+ if (!bwbU.reset("\u0724\u0739\u0724").matches())
+ failCount++;
+ if (!bwbEU.reset("\u0724\u0739\u0724").matches())
+ failCount++;
+ report("unicodePredefinedClasses");
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/nio/cs/StrCodingBenchmarkUTF8.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class StrCodingBenchmarkUTF8 {
+
+ public static void main(String[] args) throws Throwable {
+
+ final int itrs = Integer.getInteger("iterations", 100000);
+ final int size = 2048;
+ final int subsize = Integer.getInteger("subsize", 128);
+ final Random rnd = new Random();
+ final int maxchar = 0x7f;
+
+ Charset charset = Charset.forName("UTF-8");
+ final String csn = charset.name();
+ final Charset cs = charset;
+
+ int[] starts = new int[] { 0, 0x80, 0x800, 0x10000};
+ for (int nb = 1; nb <= 4; nb++) {
+
+ final CharsetEncoder enc = cs.newEncoder();
+
+ char[] cc = new char[size];
+ int i = 0;
+ while (i < size - 3) {
+ i += Character.toChars(starts[nb - 1] + rnd.nextInt(maxchar), cc, i);
+ }
+
+ final String string = new String(cc);
+ final byte[] bytes = string.getBytes(cs);
+
+ System.out.printf("%n--------%s[nb=%d]---------%n", csn, nb);
+ int sz = 12;
+ while (sz < size) {
+ System.out.printf(" [len=%d]%n", sz);
+ final byte[] bs = Arrays.copyOf(bytes, sz);
+ final String str = new String(bs, csn);
+ StrCodingBenchmark.Job[] jobs = {
+ new StrCodingBenchmark.Job("String decode: csn") {
+ public void work() throws Throwable {
+ for (int i = 0; i < itrs; i++)
+ new String(bs, csn);
+ }},
+
+ new StrCodingBenchmark.Job("String decode: cs") {
+ public void work() throws Throwable {
+ for (int i = 0; i < itrs; i++)
+ new String(bs, cs);
+ }},
+
+ new StrCodingBenchmark.Job("String encode: csn") {
+ public void work() throws Throwable {
+ for (int i = 0; i < itrs; i++)
+ str.getBytes(csn);
+ }},
+
+ new StrCodingBenchmark.Job("String encode: cs") {
+ public void work() throws Throwable {
+ for (int i = 0; i < itrs; i++)
+ str.getBytes(cs);
+ }},
+ };
+ StrCodingBenchmark.time(StrCodingBenchmark.filter(null, jobs));
+ sz <<= 1;
+ }
+ }
+ }
+}
--- a/jdk/test/sun/nio/cs/TestStringCoding.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/nio/cs/TestStringCoding.java Tue May 03 22:16:58 2011 -0700
@@ -24,7 +24,7 @@
*/
/* @test
- @bug 6636323 6636319
+ @bug 6636323 6636319 7040220
@summary Test if StringCoding and NIO result have the same de/encoding result
* @run main/othervm/timeout=2000 TestStringCoding
*/
@@ -111,6 +111,8 @@
//encode unmappable surrogates
if (enc instanceof sun.nio.cs.ArrayEncoder &&
cs.contains(Charset.forName("ASCII"))) {
+ if (cs.name().equals("UTF-8")) // utf8 handles surrogates
+ return;
enc.replaceWith(new byte[] { (byte)'A'});
sun.nio.cs.ArrayEncoder cae = (sun.nio.cs.ArrayEncoder)enc;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/nio/cs/TestStringCodingUTF8.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ @bug 7040220
+ @summary Test if StringCoding and NIO result have the same de/encoding result for UTF-8
+ * @run main/othervm/timeout=2000 TestStringCodingUTF8
+ */
+
+import java.util.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class TestStringCodingUTF8 {
+ public static void main(String[] args) throws Throwable {
+ test();
+ // security manager on
+ System.setSecurityManager(new PermissiveSecurityManger());
+ test();
+ }
+
+ static void test() throws Throwable {
+ Charset cs = Charset.forName("UTF-8");
+ char[] bmp = new char[0x10000];
+ for (int i = 0; i < 0x10000; i++) {
+ bmp[i] = (char)i;
+ }
+ test(cs, bmp, 0, bmp.length);
+
+ ArrayList<Integer> list = new ArrayList<>(0x20000);
+ for (int i = 0; i < 0x20000; i++) {
+ list.add(i, i);
+ }
+ Collections.shuffle(list);
+ int j = 0;
+ char[] bmpsupp = new char[0x30000];
+ for (int i = 0; i < 0x20000; i++) {
+ j += Character.toChars(list.get(i), bmpsupp, j);
+ }
+ assert (j == bmpsupp.length);
+ test(cs, bmpsupp, 0, bmpsupp.length);
+
+ // randomed "off" and "len" on shuffled data
+ Random rnd = new Random();
+ int maxlen = 1000;
+ int itr = 5000;
+ for (int i = 0; i < itr; i++) {
+ int off = rnd.nextInt(bmpsupp.length - maxlen);
+ int len = rnd.nextInt(maxlen);
+ test(cs, bmpsupp, off, len);
+ }
+
+ // random length of bytes, test the edge corner case
+ for (int i = 0; i < itr; i++) {
+ byte[] ba = new byte[rnd.nextInt(maxlen)];
+ rnd.nextBytes(ba);
+ //new String(csn);
+ if (!new String(ba, cs.name()).equals(
+ new String(decode(cs, ba, 0, ba.length))))
+ throw new RuntimeException("new String(csn) failed");
+ //new String(cs);
+ if (!new String(ba, cs).equals(
+ new String(decode(cs, ba, 0, ba.length))))
+ throw new RuntimeException("new String(cs) failed");
+ }
+ System.out.println("done!");
+ }
+
+ static void test(Charset cs, char[] ca, int off, int len) throws Throwable {
+ String str = new String(ca, off, len);
+ byte[] ba = encode(cs, ca, off, len);
+
+ //getBytes(csn);
+ byte[] baStr = str.getBytes(cs.name());
+ if (!Arrays.equals(ba, baStr))
+ throw new RuntimeException("getBytes(csn) failed");
+
+ //getBytes(cs);
+ baStr = str.getBytes(cs);
+ if (!Arrays.equals(ba, baStr))
+ throw new RuntimeException("getBytes(cs) failed");
+
+ //new String(csn);
+ if (!new String(ba, cs.name()).equals(new String(decode(cs, ba, 0, ba.length))))
+ throw new RuntimeException("new String(csn) failed");
+
+ //new String(cs);
+ if (!new String(ba, cs).equals(new String(decode(cs, ba, 0, ba.length))))
+ throw new RuntimeException("new String(cs) failed");
+ }
+
+ // copy/paste of the StringCoding.decode()
+ static char[] decode(Charset cs, byte[] ba, int off, int len) {
+ CharsetDecoder cd = cs.newDecoder();
+ int en = (int)(len * cd.maxCharsPerByte());
+ char[] ca = new char[en];
+ if (len == 0)
+ return ca;
+ cd.onMalformedInput(CodingErrorAction.REPLACE)
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .reset();
+
+ ByteBuffer bb = ByteBuffer.wrap(ba, off, len);
+ CharBuffer cb = CharBuffer.wrap(ca);
+ try {
+ CoderResult cr = cd.decode(bb, cb, true);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ cr = cd.flush(cb);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ } catch (CharacterCodingException x) {
+ throw new Error(x);
+ }
+ return Arrays.copyOf(ca, cb.position());
+ }
+
+ // copy/paste of the StringCoding.encode()
+ static byte[] encode(Charset cs, char[] ca, int off, int len) {
+ CharsetEncoder ce = cs.newEncoder();
+ int en = (int)(len * ce.maxBytesPerChar());
+ byte[] ba = new byte[en];
+ if (len == 0)
+ return ba;
+ ce.onMalformedInput(CodingErrorAction.REPLACE)
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .reset();
+ ByteBuffer bb = ByteBuffer.wrap(ba);
+ CharBuffer cb = CharBuffer.wrap(ca, off, len);
+ try {
+ CoderResult cr = ce.encode(cb, bb, true);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ cr = ce.flush(bb);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ } catch (CharacterCodingException x) {
+ throw new Error(x);
+ }
+ return Arrays.copyOf(ba, bb.position());
+ }
+
+ static class PermissiveSecurityManger extends SecurityManager {
+ @Override public void checkPermission(java.security.Permission p) {}
+ }
+}
--- a/jdk/test/sun/nio/cs/TestUTF8.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/nio/cs/TestUTF8.java Tue May 03 22:16:58 2011 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4486841
+ * @bug 4486841 7040220
* @summary Test UTF-8 charset
*/
@@ -70,6 +70,32 @@
return dec.decode(bbf, cbf, true);
}
+ // copy/paste of the StringCoding.decode()
+ static char[] decode(Charset cs, byte[] ba, int off, int len) {
+ CharsetDecoder cd = cs.newDecoder();
+ int en = (int)(len * cd.maxCharsPerByte());
+ char[] ca = new char[en];
+ if (len == 0)
+ return ca;
+ cd.onMalformedInput(CodingErrorAction.REPLACE)
+ .onUnmappableCharacter(CodingErrorAction.REPLACE)
+ .reset();
+
+ ByteBuffer bb = ByteBuffer.wrap(ba, off, len);
+ CharBuffer cb = CharBuffer.wrap(ca);
+ try {
+ CoderResult cr = cd.decode(bb, cb, true);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ cr = cd.flush(cb);
+ if (!cr.isUnderflow())
+ cr.throwException();
+ } catch (CharacterCodingException x) {
+ throw new Error(x);
+ }
+ return Arrays.copyOf(ca, cb.position());
+ }
+
static byte[] encode(char[] cc, String csn, boolean testDirect)
throws Exception {
ByteBuffer bbf;
@@ -142,7 +168,14 @@
bb = encode(cc, csn, true);
ccO = decode(bb, csn, true);
if (!Arrays.equals(cc, ccO)) {
- System.out.printf(" (direct) failed");
+ System.out.print(" (direct) failed");
+ }
+ // String.getBytes()/toCharArray() goes to ArrayDe/Encoder path
+ if (!Arrays.equals(bb, new String(cc).getBytes(csn))) {
+ System.out.printf(" String.getBytes() failed");
+ }
+ if (!Arrays.equals(cc, new String(bb, csn).toCharArray())) {
+ System.out.printf(" String.toCharArray() failed");
}
System.out.println();
}
@@ -168,6 +201,12 @@
if (!Arrays.equals(cc, ccO)) {
System.out.printf(" decoding(direct) failed%n");
}
+ // new String(bb, csn).getBytes(csn) will not return
+ // the 6 bytes surrogates as in bb, so only test
+ // toCharArray() here.
+ if (!Arrays.equals(cc, new String(bb, csn).toCharArray())) {
+ System.out.printf(" String.toCharArray() failed");
+ }
}
static void compare(String csn1, String csn2) throws Exception {
@@ -274,6 +313,7 @@
static void checkMalformed(String csn) throws Exception {
boolean failed = false;
System.out.printf(" Check malformed <%s>...%n", csn);
+ Charset cs = Charset.forName(csn);
for (boolean direct: new boolean[] {false, true}) {
for (byte[] bins : malformed) {
int mlen = bins[0];
@@ -285,10 +325,15 @@
ashex += Integer.toBinaryString((int)bin[i] & 0xff);
}
if (!cr.isMalformed()) {
- System.out.printf(" FAIL(direct=%b): [%s] not malformed.\n", direct, ashex);
+ System.out.printf(" FAIL(direct=%b): [%s] not malformed.%n", direct, ashex);
failed = true;
} else if (cr.length() != mlen) {
- System.out.printf(" FAIL(direct=%b): [%s] malformed[len=%d].\n", direct, ashex, cr.length());
+ System.out.printf(" FAIL(direct=%b): [%s] malformed[len=%d].%n", direct, ashex, cr.length());
+ failed = true;
+ }
+ if (!Arrays.equals(decode(cs, bin, 0, bin.length),
+ new String(bin, csn).toCharArray())) {
+ System.out.printf(" FAIL(new String(bb, %s)) failed%n", csn);
failed = true;
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/jgss/spnego/NegTokenTargFields.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7040151
+ * @summary SPNEGO GSS code does not parse tokens in accordance to RFC 2478
+ * @compile -XDignore.symbol.file NegTokenTargFields.java
+ * @run main NegTokenTargFields nomech
+ * @run main/fail NegTokenTargFields badorder
+ */
+
+import sun.security.jgss.spnego.NegTokenTarg;
+
+public class NegTokenTargFields {
+
+ // A hand-crafted NegTokenTarg with negResult and responseToken only
+ public static byte[] nomech = {
+ (byte)0xA1, (byte)0x0F, (byte)0x30, (byte)0x0D,
+ (byte)0xA0, (byte)0x03, (byte)0x0A, (byte)0x01,
+ (byte)0x02, (byte)0xA2, (byte)0x02, (byte)0x04,
+ (byte)0x00, (byte)0xA3, (byte)0x02, (byte)0x04,
+ (byte)0x00,
+ };
+
+ // A hand-crafted NegTokenTarg with negResult and supportedMech in wrong order
+ public static byte[] badorder = {
+ (byte)0xA1, (byte)0x1E, (byte)0x30, (byte)0x1C,
+ (byte)0xA1, (byte)0x0B, (byte)0x06, (byte)0x09,
+ (byte)0x2A, (byte)0x86, (byte)0x48, (byte)0x86,
+ (byte)0xF7, (byte)0x12, (byte)0x01, (byte)0x02,
+ (byte)0x02, (byte)0xA0, (byte)0x03, (byte)0x0A,
+ (byte)0x01, (byte)0x00, (byte)0xA2, (byte)0x03,
+ (byte)0x04, (byte)0x01, (byte)0x00, (byte)0xA3,
+ (byte)0x03, (byte)0x04, (byte)0x01, (byte)0x00,
+ };
+
+ public static void main(String[] args) throws Exception {
+ byte[] buf = (byte[])NegTokenTargFields.class.getField(args[0]).get(null);
+ new NegTokenTarg(buf);
+ }
+}
--- a/jdk/test/sun/security/krb5/auto/BadKdc.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/auto/BadKdc.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, 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
@@ -22,8 +22,14 @@
*/
import java.io.*;
+import java.net.BindException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import javax.security.auth.login.LoginException;
+import sun.security.krb5.Asn1Exception;
import sun.security.krb5.Config;
public class BadKdc {
@@ -34,8 +40,51 @@
static final Pattern re = Pattern.compile(
">>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " +
"timeout=(\\d)000,");
+
+ /*
+ * There are several cases this test fails:
+ *
+ * 1. The random selected port is used by another process. No good way to
+ * prevent this happening, coz krb5.conf must be written before KDC starts.
+ * There are two different outcomes:
+ *
+ * a. Cannot start the KDC. A BindException thrown.
+ * b. When trying to access a non-existing KDC, a response is received!
+ * Most likely a Asn1Exception thrown
+ *
+ * 2. Even if a KDC is started, and more than 20 seconds pass by, a timeout
+ * can still happens for the first UDP request. In fact, the KDC did not
+ * received it at all. This happens on almost all platforms, especially
+ * solaris-i586 and solaris-x64.
+ *
+ * To avoid them:
+ *
+ * 1. Catch those exceptions and ignore
+ *
+ * 2. a. Make the timeout longer? useless
+ * b. Read the output carefully, if there is a timeout, it's OK.
+ * Just make sure the retries times and KDCs are correct.
+ * This is tough.
+ * c. Feed the KDC a UDP packet first. The current "solution".
+ */
public static void go(int[]... expected)
throws Exception {
+ try {
+ go0(expected);
+ } catch (BindException be) {
+ System.out.println("The random port is used by another process");
+ } catch (LoginException le) {
+ Throwable cause = le.getCause();
+ if (cause instanceof Asn1Exception) {
+ System.out.println("Bad packet possibly from another process");
+ return;
+ }
+ throw le;
+ }
+ }
+
+ public static void go0(int[]... expected)
+ throws Exception {
System.setProperty("sun.security.krb5.debug", "true");
// Make sure KDCs' ports starts with 1 and 2 and 3,
@@ -78,20 +127,39 @@
KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, p, true);
k.addPrincipal(OneKDC.USER, OneKDC.PASS);
k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM);
+ // Feed a packet to newly started KDC to warm it up
+ System.err.println("-------- IGNORE THIS ERROR MESSAGE --------");
+ new DatagramSocket().send(
+ new DatagramPacket("Hello".getBytes(), 5,
+ InetAddress.getByName(OneKDC.KDCHOST), p));
return k;
}
+ private static void test(int... expected) throws Exception {
+ ByteArrayOutputStream bo = new ByteArrayOutputStream();
+ try {
+ test0(bo, expected);
+ } catch (Exception e) {
+ System.out.println("----------------- ERROR -----------------");
+ System.out.println(new String(bo.toByteArray()));
+ System.out.println("--------------- ERROR END ---------------");
+ throw e;
+ }
+ }
+
/**
* One round of test for max_retries and timeout.
- * @param timeout the expected timeout
* @param expected the expected kdc# timeout kdc# timeout...
*/
- private static void test(int... expected) throws Exception {
- ByteArrayOutputStream bo = new ByteArrayOutputStream();
+ private static void test0(ByteArrayOutputStream bo, int... expected)
+ throws Exception {
PrintStream oldout = System.out;
System.setOut(new PrintStream(bo));
- Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
- System.setOut(oldout);
+ try {
+ Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ } finally {
+ System.setOut(oldout);
+ }
String[] lines = new String(bo.toByteArray()).split("\n");
System.out.println("----------------- TEST -----------------");
--- a/jdk/test/sun/security/krb5/auto/Context.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/auto/Context.java Tue May 03 22:16:58 2011 -0700
@@ -44,6 +44,7 @@
import com.sun.security.jgss.AuthorizationDataEntry;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import javax.security.auth.kerberos.KeyTab;
/**
* Context of a JGSS subject, encapsulating Subject and GSSContext.
@@ -107,15 +108,19 @@
return out;
}
+ public static Context fromUserPass(
+ String user, char[] pass, boolean storeKey) throws Exception {
+ return fromUserPass(null, user, pass, storeKey);
+ }
/**
* Logins with a username and a password, using Krb5LoginModule directly
* @param storeKey true if key should be saved, used on acceptor side
*/
- public static Context fromUserPass(String user, char[] pass, boolean storeKey)
- throws Exception {
+ public static Context fromUserPass(Subject s,
+ String user, char[] pass, boolean storeKey) throws Exception {
Context out = new Context();
out.name = user;
- out.s = new Subject();
+ out.s = s == null ? new Subject() : s;
Krb5LoginModule krb5 = new Krb5LoginModule();
Map<String, String> map = new HashMap<>();
Map<String, Object> shared = new HashMap<>();
@@ -198,12 +203,25 @@
* @throws java.lang.Exception
*/
public void startAsServer(final Oid mech) throws Exception {
+ startAsServer(null, mech);
+ }
+
+ /**
+ * Starts as a server with the specified service name
+ * @param name the service name
+ * @param mech GSS mech
+ * @throws java.lang.Exception
+ */
+ public void startAsServer(final String name, final Oid mech) throws Exception {
doAs(new Action() {
@Override
public byte[] run(Context me, byte[] dummy) throws Exception {
GSSManager m = GSSManager.getInstance();
me.x = (ExtendedGSSContext)m.createContext(m.createCredential(
- null,
+ name == null ? null :
+ (name.indexOf('@') < 0 ?
+ m.createName(name, null) :
+ m.createName(name, GSSName.NT_HOSTBASED_SERVICE)),
GSSCredential.INDEFINITE_LIFETIME,
mech,
GSSCredential.ACCEPT_ONLY));
@@ -230,6 +248,14 @@
}
/**
+ * Accesses the internal subject.
+ * @return the subject
+ */
+ public Subject s() {
+ return s;
+ }
+
+ /**
* Disposes the GSSContext within
* @throws org.ietf.jgss.GSSException
*/
@@ -297,7 +323,7 @@
} catch (Exception e) {
;// Don't care
}
- System.out.println("=====================================");
+ System.out.println("====== Private Credentials Set ======");
for (Object o : s.getPrivateCredentials()) {
System.out.println(" " + o.getClass());
if (o instanceof KerberosTicket) {
@@ -315,6 +341,8 @@
for (Object k : map.keySet()) {
System.out.println(" " + k + ": " + map.get(k));
}
+ } else {
+ System.out.println(" " + o);
}
}
if (x != null && x instanceof ExtendedGSSContext) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/DynamicKeytab.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6894072
+ * @run main/othervm DynamicKeytab
+ * @summary always refresh keytab
+ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import org.ietf.jgss.GSSException;
+import sun.security.jgss.GSSUtil;
+import sun.security.krb5.KrbException;
+import sun.security.krb5.internal.Krb5;
+
+public class DynamicKeytab {
+
+ Context c, s;
+ public static void main(String[] args)
+ throws Exception {
+ new DynamicKeytab().go();
+ }
+
+ void go() throws Exception {
+ OneKDC k = new OneKDC(null);
+ k.writeJAASConf();
+
+ Files.delete(Paths.get(OneKDC.KTAB));
+
+ // Starts with no keytab
+ c = Context.fromJAAS("client");
+ s = Context.fromJAAS("com.sun.security.jgss.krb5.accept");
+
+ // Test 1: read new key 1 from keytab
+ k.addPrincipal(OneKDC.SERVER, "pass1".toCharArray());
+ k.writeKtab(OneKDC.KTAB);
+ connect();
+
+ // Test 2: service key cached, find 1 in keytab (now contains 1 and 2)
+ k.addPrincipal(OneKDC.SERVER, "pass2".toCharArray());
+ k.appendKtab(OneKDC.KTAB);
+ connect();
+
+ // Test 3: re-login. Now find 2 in keytab
+ c = Context.fromJAAS("client");
+ connect();
+
+ // Test 4: re-login, KDC use 3 this time.
+ c = Context.fromJAAS("client");
+ // Put 3 and 4 into keytab but keep the real key back to 3.
+ k.addPrincipal(OneKDC.SERVER, "pass3".toCharArray());
+ k.appendKtab(OneKDC.KTAB);
+ k.addPrincipal(OneKDC.SERVER, "pass4".toCharArray());
+ k.appendKtab(OneKDC.KTAB);
+ k.addPrincipal(OneKDC.SERVER, "pass3".toCharArray());
+ connect();
+
+ // Test 5: invalid keytab file, should ignore
+ try (FileOutputStream fos = new FileOutputStream(OneKDC.KTAB)) {
+ fos.write("BADBADBAD".getBytes());
+ }
+ connect();
+
+ // Test 6: delete keytab file, identical to revoke all
+ Files.delete(Paths.get(OneKDC.KTAB));
+ try {
+ connect();
+ throw new Exception("Should not success");
+ } catch (GSSException gsse) {
+ System.out.println(gsse);
+ KrbException ke = (KrbException)gsse.getCause();
+ // KrbApReq.authenticate(*) if (dkey == null)...
+ // This should have been Krb5.KRB_AP_ERR_NOKEY
+ if (ke.returnCode() != Krb5.API_INVALID_ARG) {
+ throw new Exception("Not expected failure code: " +
+ ke.returnCode());
+ }
+ }
+
+ // Test 7: 3 revoked, should fail (now contains only 5)
+ k.addPrincipal(OneKDC.SERVER, "pass5".toCharArray());
+ k.writeKtab(OneKDC.KTAB); // overwrite keytab, which means
+ // old key is revoked
+ try {
+ connect();
+ throw new Exception("Should not success");
+ } catch (GSSException gsse) {
+ System.out.println(gsse);
+ KrbException ke = (KrbException)gsse.getCause();
+ if (ke.returnCode() != Krb5.KRB_AP_ERR_BADKEYVER) {
+ throw new Exception("Not expected failure code: " +
+ ke.returnCode());
+ }
+ }
+
+ // Test 8: an empty KDC means revoke all
+ KDC.create("EMPTY.REALM").writeKtab(OneKDC.KTAB);
+ try {
+ connect();
+ throw new Exception("Should not success");
+ } catch (GSSException gsse) {
+ System.out.println(gsse);
+ KrbException ke = (KrbException)gsse.getCause();
+ // KrbApReq.authenticate(*) if (dkey == null)...
+ // This should have been Krb5.KRB_AP_ERR_NOKEY
+ if (ke.returnCode() != Krb5.API_INVALID_ARG) {
+ throw new Exception("Not expected failure code: " +
+ ke.returnCode());
+ }
+ }
+ }
+
+ void connect() throws Exception {
+ Thread.sleep(2000); // make sure ktab timestamp is different
+ c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+ s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
+ Context.handshake(c, s);
+ }
+}
--- a/jdk/test/sun/security/krb5/auto/KDC.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/auto/KDC.java Tue May 03 22:16:58 2011 -0700
@@ -228,7 +228,33 @@
}
/**
- * Write all principals' keys from multiple KDCsinto one keytab file.
+ * Writes or appends KDC keys into a keytab. See doc for writeMultiKtab.
+ * @param append true if append, otherwise, overwrite.
+ */
+ private static void writeKtab0(String tab, boolean append, KDC... kdcs)
+ throws IOException, KrbException {
+ KeyTab ktab = append ? KeyTab.getInstance(tab) : KeyTab.create(tab);
+ for (KDC kdc: kdcs) {
+ for (String name : kdc.passwords.keySet()) {
+ char[] pass = kdc.passwords.get(name);
+ int kvno = 0;
+ if (Character.isDigit(pass[pass.length-1])) {
+ kvno = pass[pass.length-1] - '0';
+ }
+ ktab.addEntry(new PrincipalName(name,
+ name.indexOf('/') < 0 ?
+ PrincipalName.KRB_NT_UNKNOWN :
+ PrincipalName.KRB_NT_SRV_HST),
+ pass,
+ kvno,
+ true);
+ }
+ }
+ ktab.save();
+ }
+
+ /**
+ * Writes all principals' keys from multiple KDCs into one keytab file.
* Note that the keys for the krbtgt principals will not be written.
* <p>
* Attention: This method references krb5.conf settings. If you need to
@@ -252,17 +278,16 @@
*/
public static void writeMultiKtab(String tab, KDC... kdcs)
throws IOException, KrbException {
- KeyTab ktab = KeyTab.create(tab);
- for (KDC kdc: kdcs) {
- for (String name : kdc.passwords.keySet()) {
- ktab.addEntry(new PrincipalName(name,
- name.indexOf('/') < 0 ?
- PrincipalName.KRB_NT_UNKNOWN :
- PrincipalName.KRB_NT_SRV_HST),
- kdc.passwords.get(name), -1, true);
- }
- }
- ktab.save();
+ writeKtab0(tab, false, kdcs);
+ }
+
+ /**
+ * Appends all principals' keys from multiple KDCs to one keytab file.
+ * See writeMultiKtab for details.
+ */
+ public static void appendMultiKtab(String tab, KDC... kdcs)
+ throws IOException, KrbException {
+ writeKtab0(tab, true, kdcs);
}
/**
@@ -273,6 +298,13 @@
}
/**
+ * Appends keys in this KDC to a ktab.
+ */
+ public void appendKtab(String tab) throws IOException, KrbException {
+ KDC.appendMultiKtab(tab, this);
+ }
+
+ /**
* Adds a new principal to this realm with a given password.
* @param user the principal's name. For a service principal, use the
* form of host/f.q.d.n
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/KeyTabCompat.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6894072
+ * @compile -XDignore.symbol.file KeyTabCompat.java
+ * @run main/othervm KeyTabCompat
+ * @summary always refresh keytab
+ */
+
+import javax.security.auth.kerberos.KerberosKey;
+import sun.security.jgss.GSSUtil;
+
+/*
+ * There are 2 compat issues to check:
+ *
+ * 1. If there is only KerberosKeys in private credential set and no
+ * KerberosPrincipal. JAAS login should go on.
+ * 2. Even if KeyTab is used, user can still get KerberosKeys from
+ * private credentials set.
+ */
+public class KeyTabCompat {
+
+ public static void main(String[] args)
+ throws Exception {
+ OneKDC kdc = new OneKDC("aes128-cts");
+ kdc.writeJAASConf();
+ kdc.addPrincipal(OneKDC.SERVER, "pass1".toCharArray());
+ kdc.writeKtab(OneKDC.KTAB);
+
+ Context c, s;
+
+ // Part 1
+ c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ s = Context.fromUserPass(OneKDC.USER2, OneKDC.PASS2, true);
+
+ s.s().getPrincipals().clear();
+
+ c.startAsClient(OneKDC.USER2, GSSUtil.GSS_KRB5_MECH_OID);
+ s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
+
+ Context.handshake(c, s);
+
+ // Part 2
+ c = Context.fromJAAS("client");
+ s = Context.fromJAAS("server");
+
+ c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+ s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
+ s.status();
+
+ if (s.s().getPrivateCredentials(KerberosKey.class).size() != 1) {
+ throw new Exception("There should be one KerberosKey");
+ }
+
+ Thread.sleep(2000); // make sure ktab timestamp is different
+
+ kdc.addPrincipal(OneKDC.SERVER, "pass2".toCharArray());
+ kdc.writeKtab(OneKDC.KTAB);
+
+ Context.handshake(c, s);
+ s.status();
+
+ if (s.s().getPrivateCredentials(KerberosKey.class).size() != 1) {
+ throw new Exception("There should be only one KerberosKey");
+ }
+
+ }
+}
--- a/jdk/test/sun/security/krb5/auto/LoginModuleOptions.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/auto/LoginModuleOptions.java Tue May 03 22:16:58 2011 -0700
@@ -28,7 +28,6 @@
* @summary Krb5LoginModule a little too restrictive, and the doc is not clear.
*/
import com.sun.security.auth.module.Krb5LoginModule;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.security.auth.Subject;
@@ -36,7 +35,6 @@
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
public class LoginModuleOptions {
@@ -61,10 +59,12 @@
// 1. ccache -> keytab
login(null, "useTicketCache", "true", "ticketCache", "krbcc_non_exists",
"useKeyTab", "true", "principal", "dummy");
+
// 2. keytab -> shared
login(null, "useKeyTab", "true", "principal", "dummy",
"keyTab", "ktab_non_exist",
"tryFirstPass", "true", NAME, OneKDC.USER, PWD, OneKDC.PASS);
+
// 3. shared -> callback
// 3.1. useFirstPass, no callback
boolean failed = false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/SPNEGO.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7040151
+ * @summary SPNEGO GSS code does not parse tokens in accordance to RFC 2478
+ * @compile -XDignore.symbol.file SPNEGO.java
+ * @run main/othervm SPNEGO
+ */
+
+import sun.security.jgss.GSSUtil;
+
+// The basic krb5 test skeleton you can copy from
+public class SPNEGO {
+
+ public static void main(String[] args) throws Exception {
+
+ new OneKDC(null).writeJAASConf();
+
+ Context c, s;
+ c = Context.fromJAAS("client");
+ s = Context.fromJAAS("server");
+
+ c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_SPNEGO_MECH_OID);
+ s.startAsServer(GSSUtil.GSS_SPNEGO_MECH_OID);
+
+ Context.handshake(c, s);
+
+ Context.transmit("i say high --", c, s);
+ Context.transmit(" you say low", s, c);
+
+ s.dispose();
+ c.dispose();
+ }
+}
--- a/jdk/test/sun/security/krb5/auto/SSL.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/auto/SSL.java Tue May 03 22:16:58 2011 -0700
@@ -48,7 +48,7 @@
public class SSL {
private static String krb5Cipher;
- private static final int LOOP_LIMIT = 1;
+ private static final int LOOP_LIMIT = 3;
private static int loopCount = 0;
private static volatile String server;
private static volatile int port;
@@ -98,13 +98,13 @@
fos.close();
f.deleteOnExit();
- final Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ Context c;
final Context s = Context.fromJAAS("ssl");
- c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
+ // There's no keytab file when server starts.
s.startAsServer(GSSUtil.GSS_KRB5_MECH_OID);
- new Thread(new Runnable() {
+ Thread server = new Thread(new Runnable() {
public void run() {
try {
s.doAs(new JsseServerAction(), null);
@@ -112,12 +112,57 @@
e.printStackTrace();
}
}
- }).start();
+ });
+ server.setDaemon(true);
+ server.start();
// Warm the server
Thread.sleep(2000);
+ // Now create the keytab
+
+ /*
+ // Add 3 versions of keys into keytab
+ KeyTab ktab = KeyTab.create(OneKDC.KTAB);
+ PrincipalName service = new PrincipalName(
+ "host/" + server, PrincipalName.KRB_NT_SRV_HST);
+ ktab.addEntry(service, "pass1".toCharArray(), 1);
+ ktab.addEntry(service, "pass2".toCharArray(), 2);
+ ktab.addEntry(service, "pass3".toCharArray(), 3);
+ ktab.save();
+
+ // and use the middle one as the real key
+ kdc.addPrincipal("host/" + server, "pass2".toCharArray());
+ */
+ c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
c.doAs(new JsseClientAction(), null);
+
+ // Add another version of key, make sure it can be loaded
+ Thread.sleep(2000);
+ ktab = KeyTab.getInstance(OneKDC.KTAB);
+ ktab.addEntry(service, "pass4".toCharArray(), 4, true);
+ ktab.save();
+ kdc.addPrincipal("host/" + server, "pass4".toCharArray());
+
+ c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
+ c.doAs(new JsseClientAction(), null);
+
+ // Revoke the old key
+ /*Thread.sleep(2000);
+ ktab = KeyTab.create(OneKDC.KTAB);
+ ktab.addEntry(service, "pass5".toCharArray(), 5, false);
+ ktab.save();
+
+ c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+ c.startAsClient("host/" + server, GSSUtil.GSS_KRB5_MECH_OID);
+ try {
+ c.doAs(new JsseClientAction(), null);
+ throw new Exception("Should fail this time.");
+ } catch (SSLException e) {
+ // Correct behavior.
+ }*/
}
// Following codes copied from
@@ -126,6 +171,7 @@
public byte[] run(Context s, byte[] input) throws Exception {
SSLSocketFactory sslsf =
(SSLSocketFactory) SSLSocketFactory.getDefault();
+ System.out.println("Connecting " + server + ":" + port);
SSLSocket sslSocket = (SSLSocket) sslsf.createSocket(server, port);
// Enable only a KRB5 cipher suite.
@@ -154,6 +200,9 @@
System.out.println("Server is: " + peer.toString());
sslSocket.close();
+ // This line should not be needed. It's the server's duty to
+ // forget the old key
+ //sslSocket.getSession().invalidate();
return null;
}
}
@@ -165,6 +214,7 @@
SSLServerSocket sslServerSocket =
(SSLServerSocket) sslssf.createServerSocket(0); // any port
port = sslServerSocket.getLocalPort();
+ System.out.println("Listening on " + port);
// Enable only a KRB5 cipher suite.
String enabledSuites[] = {krb5Cipher};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/TwoPrinces.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6894072
+ * @compile -XDignore.symbol.file TwoPrinces.java
+ * @run main/othervm TwoPrinces
+ * @summary always refresh keytab
+ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import sun.security.jgss.GSSUtil;
+import sun.security.krb5.Config;
+
+public class TwoPrinces {
+
+ public static void main(String[] args)
+ throws Exception {
+
+ KDC k1 = KDC.create("R1");
+ k1.addPrincipal("u1", "hello".toCharArray());
+ k1.addPrincipalRandKey("krbtgt/R1");
+ k1.addPrincipalRandKey("host/same.host");
+
+ KDC k2 = KDC.create("R2");
+ k2.addPrincipal("u2", "hello".toCharArray());
+ k2.addPrincipalRandKey("krbtgt/R2");
+ k2.addPrincipalRandKey("host/same.host");
+
+ System.setProperty("java.security.krb5.conf", "krb5.conf");
+
+ // R1 is the default realm now
+ KDC.saveConfig("krb5.conf", k1, k2);
+ Config.refresh();
+
+ k1.writeKtab("ktab1");
+ k2.writeKtab("ktab2");
+
+ // A JAAS config file with 2 Krb5LoginModules, after commit, the
+ // subject with have principals and keytabs from both sides
+ System.setProperty("java.security.auth.login.config", "jaas.conf");
+ File f = new File("jaas.conf");
+ FileOutputStream fos = new FileOutputStream(f);
+ fos.write((
+ "me {\n"
+ + " com.sun.security.auth.module.Krb5LoginModule required"
+ + " isInitiator=true principal=\"host/same.host@R1\""
+ + " useKeyTab=true keyTab=ktab1 storeKey=true;\n"
+ + " com.sun.security.auth.module.Krb5LoginModule required"
+ + " isInitiator=true principal=\"host/same.host@R2\""
+ + " useKeyTab=true keyTab=ktab2 storeKey=true;\n"
+ + "};\n"
+ ).getBytes());
+ fos.close();
+
+ /*
+ * This server side context will be able to act as services in both
+ * realms. Please note that we still don't support a single instance
+ * of server to accept connections from two realms at the same time.
+ * Therefore, we must call startAsServer in a given realm to start
+ * working there. The same Subject never changes anyway.
+ */
+ Context s = Context.fromJAAS("me");
+
+ // Default realm still R1
+ s.startAsServer("host@same.host", GSSUtil.GSS_KRB5_MECH_OID);
+ Context c1 = Context.fromUserPass("u1", "hello".toCharArray(), false);
+ c1.startAsClient("host@same.host", GSSUtil.GSS_KRB5_MECH_OID);
+ Context.handshake(c1, s);
+
+ KDC.saveConfig("krb5.conf", k2, k1);
+ Config.refresh();
+
+ // Default realm now R2
+ s.startAsServer("host@same.host", GSSUtil.GSS_KRB5_MECH_OID);
+ Context c2 = Context.fromUserPass("u2", "hello".toCharArray(), false);
+ c2.startAsClient("host@same.host", GSSUtil.GSS_KRB5_MECH_OID);
+ Context.handshake(c2, s);
+ }
+}
--- a/jdk/test/sun/security/krb5/ktab/KeyTabIndex.java Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/krb5/ktab/KeyTabIndex.java Tue May 03 22:16:58 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, 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
@@ -44,7 +44,6 @@
KeyTab.getInstance("ktab").getClass();
}
};
- KeyTab.refresh();
for (int i=0; i<10; i++) {
new Thread(t).start();
}
--- a/jdk/test/sun/security/mscapi/AccessKeyStore.sh Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/mscapi/AccessKeyStore.sh Tue May 03 22:16:58 2011 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -25,11 +25,9 @@
# @test
-# @bug 6324295
+# @bug 6324295 6931562
# @run shell AccessKeyStore.sh
# @summary Confirm that permission must be granted to access keystores.
-#
-# Run only on non-64-bit Windows platform.
OS=`uname -s`
case "$OS" in
--- a/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.sh Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.sh Tue May 03 22:16:58 2011 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -25,11 +25,9 @@
# @test
-# @bug 6318171
+# @bug 6318171 6931562
# @run shell IsSunMSCAPIAvailable.sh
# @summary Basic test of the Microsoft CryptoAPI provider.
-#
-# Run only on non-64-bit Windows platform.
OS=`uname -s`
case "$OS" in
--- a/jdk/test/sun/security/mscapi/KeyStoreCompatibilityMode.sh Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/mscapi/KeyStoreCompatibilityMode.sh Tue May 03 22:16:58 2011 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, 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
@@ -25,12 +25,10 @@
# @test
-# @bug 6324294
+# @bug 6324294 6931562
# @run shell KeyStoreCompatibilityMode.sh
# @summary Confirm that a null stream or password is not permitted when
# compatibility mode is enabled (and vice versa).
-#
-# Run only on non-64-bit Windows platform.
OS=`uname -s`
case "$OS" in
--- a/jdk/test/sun/security/mscapi/KeytoolChangeAlias.sh Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/mscapi/KeytoolChangeAlias.sh Tue May 03 22:16:58 2011 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2011, 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
@@ -25,11 +25,9 @@
# @test
-# @bug 6415696
+# @bug 6415696 6931562
# @run shell KeytoolChangeAlias.sh
# @summary Test "keytool -changealias" using the Microsoft CryptoAPI provider.
-#
-# Run only on non-64-bit Windows platform.
# set a few environment variables so that the shell-script can run stand-alone
# in the source directory
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/PublicKeyInterop.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @see PublicKeyInterop.sh
+ */
+
+import java.security.*;
+import java.util.*;
+import javax.crypto.*;
+
+import sun.misc.HexDumpEncoder;
+
+/*
+ * Confirm interoperability of RSA public keys between SunMSCAPI and SunJCE
+ * security providers.
+ */
+public class PublicKeyInterop {
+
+ public static void main(String[] arg) throws Exception {
+ PrivateKey privKey = null;
+ Certificate cert = null;
+ KeyStore ks = KeyStore.getInstance("Windows-MY");
+ ks.load(null, null);
+ System.out.println("Loaded keystore: Windows-MY");
+
+ PublicKey myPuKey =
+ (PublicKey) ks.getCertificate("6888925").getPublicKey();
+ System.out.println("Public key is a " + myPuKey.getClass().getName());
+ PrivateKey myPrKey = (PrivateKey) ks.getKey("6888925", null);
+ System.out.println("Private key is a " + myPrKey.getClass().getName());
+ System.out.println();
+
+ byte[] plain = new byte[] {0x01, 0x02, 0x03, 0x04, 0x05};
+ HexDumpEncoder hde = new HexDumpEncoder();
+ System.out.println("Plaintext:\n" + hde.encode(plain) + "\n");
+
+ Cipher rsa = Cipher.getInstance("RSA/ECB/PKCS1Padding");
+ rsa.init(Cipher.ENCRYPT_MODE, myPuKey);
+ byte[] encrypted = rsa.doFinal(plain);
+ System.out.println("Encrypted plaintext using RSA Cipher from " +
+ rsa.getProvider().getName() + " JCE provider\n");
+ System.out.println(hde.encode(encrypted) + "\n");
+
+ Cipher rsa2 = Cipher.getInstance("RSA/ECB/PKCS1Padding", "SunMSCAPI");
+ rsa2.init(Cipher.ENCRYPT_MODE, myPuKey);
+ byte[] encrypted2 = rsa2.doFinal(plain);
+ System.out.println("Encrypted plaintext using RSA Cipher from " +
+ rsa2.getProvider().getName() + " JCE provider\n");
+ System.out.println(hde.encode(encrypted2) + "\n");
+
+ Cipher rsa3 = Cipher.getInstance("RSA/ECB/PKCS1Padding", "SunMSCAPI");
+ rsa3.init(Cipher.DECRYPT_MODE, myPrKey);
+ byte[] decrypted = rsa3.doFinal(encrypted);
+ System.out.println("Decrypted first ciphertext using RSA Cipher from " +
+ rsa3.getProvider().getName() + " JCE provider\n");
+ System.out.println(hde.encode(decrypted) + "\n");
+ if (! Arrays.equals(plain, decrypted)) {
+ throw new Exception("First decrypted ciphertext does not match " +
+ "original plaintext");
+ }
+
+ decrypted = rsa3.doFinal(encrypted2);
+ System.out.println("Decrypted second ciphertext using RSA Cipher from "
+ + rsa3.getProvider().getName() + " JCE provider\n");
+ System.out.println(hde.encode(decrypted) + "\n");
+ if (! Arrays.equals(plain, decrypted)) {
+ throw new Exception("Second decrypted ciphertext does not match " +
+ "original plaintext");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/PublicKeyInterop.sh Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 6888925
+# @run shell PublicKeyInterop.sh
+# @summary SunMSCAPI's Cipher can't use RSA public keys obtained from other
+# sources.
+#
+
+# set a few environment variables so that the shell-script can run stand-alone
+# in the source directory
+if [ "${TESTSRC}" = "" ] ; then
+ TESTSRC="."
+fi
+
+if [ "${TESTCLASSES}" = "" ] ; then
+ TESTCLASSES="."
+fi
+
+if [ "${TESTJAVA}" = "" ] ; then
+ echo "TESTJAVA not set. Test cannot execute."
+ echo "FAILED!!!"
+ exit 1
+fi
+
+OS=`uname -s`
+case "$OS" in
+ Windows* | CYGWIN* )
+
+ echo "Creating a temporary RSA keypair in the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -genkeypair \
+ -storetype Windows-My \
+ -keyalg RSA \
+ -alias 6888925 \
+ -dname "cn=6888925,c=US" \
+ -noprompt
+
+ echo
+ echo "Running the test..."
+ ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\PublicKeyInterop.java
+ ${TESTJAVA}/bin/java PublicKeyInterop
+
+ rc=$?
+
+ echo
+ echo "Removing the temporary RSA keypair from the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -delete \
+ -storetype Windows-My \
+ -alias 6888925
+
+ echo done.
+ exit $rc
+ ;;
+
+ * )
+ echo "This test is not intended for '$OS' - passing test"
+ exit 0
+ ;;
+esac
--- a/jdk/test/sun/security/mscapi/RSAEncryptDecrypt.sh Tue May 03 22:14:39 2011 -0700
+++ b/jdk/test/sun/security/mscapi/RSAEncryptDecrypt.sh Tue May 03 22:16:58 2011 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2011, 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
@@ -24,13 +24,11 @@
#
# @test
-# @bug 6457422
+# @bug 6457422 6931562
# @run shell RSAEncryptDecrypt.sh
# @summary Confirm that plaintext can be encrypted and then decrypted using the
# RSA cipher in the SunMSCAPI crypto provider. NOTE: The RSA cipher is
# absent from the SunMSCAPI provider in OpenJDK builds.
-#
-# Run only on non-64-bit Windows platform.
# set a few environment variables so that the shell-script can run stand-alone
# in the source directory
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @see SignUsingNONEwithRSA.sh
+ */
+
+import java.security.*;
+import java.util.*;
+
+public class SignUsingNONEwithRSA {
+
+ private static final List<byte[]> precomputedHashes = Arrays.asList(
+ // A MD5 hash
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16
+ },
+ // A SHA-1 hash
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20
+ },
+ // A concatenation of SHA-1 and MD5 hashes (used during SSL handshake)
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20,
+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36
+ },
+ // A SHA-256 hash
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20,
+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30,
+ 0x31, 0x32
+ },
+ // A SHA-384 hash
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20,
+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40,
+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48
+ },
+ // A SHA-512 hash
+ new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10,
+ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x20,
+ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40,
+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x50,
+ 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x60,
+ 0x61, 0x62, 0x63, 0x64
+ });
+
+ private static List<byte[]> generatedSignatures = new ArrayList<>();
+
+ public static void main(String[] args) throws Exception {
+
+ Provider[] providers = Security.getProviders("Signature.NONEwithRSA");
+ if (providers == null) {
+ System.out.println("No JCE providers support the " +
+ "'Signature.NONEwithRSA' algorithm");
+ System.out.println("Skipping this test...");
+ return;
+
+ } else {
+ System.out.println("The following JCE providers support the " +
+ "'Signature.NONEwithRSA' algorithm: ");
+ for (Provider provider : providers) {
+ System.out.println(" " + provider.getName());
+ }
+ }
+ System.out.println("-------------------------------------------------");
+
+ KeyPair keys = getKeysFromKeyStore();
+ signAllUsing("SunMSCAPI", keys.getPrivate());
+ System.out.println("-------------------------------------------------");
+
+ verifyAllUsing("SunMSCAPI", keys.getPublic());
+ System.out.println("-------------------------------------------------");
+
+ verifyAllUsing("SunJCE", keys.getPublic());
+ System.out.println("-------------------------------------------------");
+
+ keys = generateKeys();
+ signAllUsing("SunJCE", keys.getPrivate());
+ System.out.println("-------------------------------------------------");
+
+ verifyAllUsing("SunMSCAPI", keys.getPublic());
+ System.out.println("-------------------------------------------------");
+
+ }
+
+ private static KeyPair getKeysFromKeyStore() throws Exception {
+ KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
+ ks.load(null, null);
+ System.out.println("Loaded keystore: Windows-MY");
+
+ Enumeration e = ks.aliases();
+ PrivateKey privateKey = null;
+ PublicKey publicKey = null;
+
+ while (e.hasMoreElements()) {
+ String alias = (String) e.nextElement();
+ if (alias.equals("6578658")) {
+ System.out.println("Loaded entry: " + alias);
+ privateKey = (PrivateKey) ks.getKey(alias, null);
+ publicKey = (PublicKey) ks.getCertificate(alias).getPublicKey();
+ }
+ }
+ if (privateKey == null || publicKey == null) {
+ throw new Exception("Cannot load the keys need to run this test");
+ }
+
+ return new KeyPair(publicKey, privateKey);
+ }
+
+
+ private static KeyPair generateKeys() throws Exception {
+ KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
+ keyGen.initialize(1024, null);
+ KeyPair pair = keyGen.generateKeyPair();
+ PrivateKey privateKey = pair.getPrivate();
+ PublicKey publicKey = pair.getPublic();
+
+ if (privateKey == null || publicKey == null) {
+ throw new Exception("Cannot load the keys need to run this test");
+ }
+
+ return new KeyPair(publicKey, privateKey);
+ }
+
+ private static void signAllUsing(String providerName, PrivateKey privateKey)
+ throws Exception {
+ Signature sig1 = Signature.getInstance("NONEwithRSA", providerName);
+ if (sig1 == null) {
+ throw new Exception("'NONEwithRSA' is not supported");
+ }
+ if (sig1.getProvider() != null) {
+ System.out.println("Using NONEwithRSA signer from the " +
+ sig1.getProvider().getName() + " JCE provider");
+ } else {
+ System.out.println(
+ "Using NONEwithRSA signer from the internal JCE provider");
+ }
+
+ System.out.println("Using key: " + privateKey);
+ generatedSignatures.clear();
+ for (byte[] hash : precomputedHashes) {
+ sig1.initSign(privateKey);
+ sig1.update(hash);
+
+ try {
+
+ byte [] sigBytes = sig1.sign();
+ System.out.println("\nGenerated RSA signature over a " +
+ hash.length + "-byte hash (signature length: " +
+ sigBytes.length * 8 + " bits)");
+ System.out.println(String.format("0x%0" +
+ (sigBytes.length * 2) + "x",
+ new java.math.BigInteger(1, sigBytes)));
+ generatedSignatures.add(sigBytes);
+
+ } catch (SignatureException se) {
+ System.out.println("Error generating RSA signature: " + se);
+ }
+ }
+ }
+
+ private static void verifyAllUsing(String providerName, PublicKey publicKey)
+ throws Exception {
+ Signature sig1 = Signature.getInstance("NONEwithRSA", providerName);
+ if (sig1.getProvider() != null) {
+ System.out.println("\nUsing NONEwithRSA verifier from the " +
+ sig1.getProvider().getName() + " JCE provider");
+ } else {
+ System.out.println(
+ "\nUsing NONEwithRSA verifier from the internal JCE provider");
+ }
+
+ System.out.println("Using key: " + publicKey);
+
+ int i = 0;
+ for (byte[] hash : precomputedHashes) {
+
+ byte[] sigBytes = generatedSignatures.get(i++);
+ System.out.println("\nVerifying RSA Signature over a " +
+ hash.length + "-byte hash (signature length: " +
+ sigBytes.length * 8 + " bits)");
+ System.out.println(String.format("0x%0" +
+ (sigBytes.length * 2) + "x",
+ new java.math.BigInteger(1, sigBytes)));
+
+ sig1.initVerify(publicKey);
+ sig1.update(hash);
+ if (sig1.verify(sigBytes)) {
+ System.out.println("Verify PASSED");
+ } else {
+ throw new Exception("Verify FAILED");
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.sh Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+# @test
+# @bug 6578658
+# @run shell SignUsingNONEwithRSA.sh
+# @summary Sign using the NONEwithRSA signature algorithm from SunMSCAPI
+
+# set a few environment variables so that the shell-script can run stand-alone
+# in the source directory
+if [ "${TESTSRC}" = "" ] ; then
+ TESTSRC="."
+fi
+
+if [ "${TESTCLASSES}" = "" ] ; then
+ TESTCLASSES="."
+fi
+
+if [ "${TESTJAVA}" = "" ] ; then
+ echo "TESTJAVA not set. Test cannot execute."
+ echo "FAILED!!!"
+ exit 1
+fi
+
+OS=`uname -s`
+case "$OS" in
+ Windows* | CYGWIN* )
+
+ echo "Creating a temporary RSA keypair in the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -genkeypair \
+ -storetype Windows-My \
+ -keyalg RSA \
+ -alias 6578658 \
+ -dname "cn=6578658,c=US" \
+ -noprompt
+
+ echo
+ echo "Running the test..."
+ ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\SignUsingNONEwithRSA.java
+ ${TESTJAVA}/bin/java SignUsingNONEwithRSA
+
+ rc=$?
+
+ echo
+ echo "Removing the temporary RSA keypair from the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -delete \
+ -storetype Windows-My \
+ -alias 6578658
+
+ echo done.
+ exit $rc
+ ;;
+
+ * )
+ echo "This test is not intended for '$OS' - passing test"
+ exit 0
+ ;;
+esac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.java Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @see SignUsingSHA2withRSA.sh
+ */
+
+import java.security.*;
+import java.util.*;
+
+public class SignUsingSHA2withRSA {
+
+ private static final byte[] toBeSigned = new byte[] {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10
+ };
+
+ private static List<byte[]> generatedSignatures = new ArrayList<>();
+
+ public static void main(String[] args) throws Exception {
+
+ Provider[] providers = Security.getProviders("Signature.SHA256withRSA");
+ if (providers == null) {
+ System.out.println("No JCE providers support the " +
+ "'Signature.SHA256withRSA' algorithm");
+ System.out.println("Skipping this test...");
+ return;
+
+ } else {
+ System.out.println("The following JCE providers support the " +
+ "'Signature.SHA256withRSA' algorithm: ");
+ for (Provider provider : providers) {
+ System.out.println(" " + provider.getName());
+ }
+ }
+ System.out.println("-------------------------------------------------");
+
+ KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
+ ks.load(null, null);
+ System.out.println("Loaded keystore: Windows-MY");
+
+ Enumeration e = ks.aliases();
+ PrivateKey privateKey = null;
+ PublicKey publicKey = null;
+
+ while (e.hasMoreElements()) {
+ String alias = (String) e.nextElement();
+ if (alias.equals("6753664")) {
+ System.out.println("Loaded entry: " + alias);
+ privateKey = (PrivateKey) ks.getKey(alias, null);
+ publicKey = (PublicKey) ks.getCertificate(alias).getPublicKey();
+ }
+ }
+ if (privateKey == null || publicKey == null) {
+ throw new Exception("Cannot load the keys need to run this test");
+ }
+ System.out.println("-------------------------------------------------");
+
+ generatedSignatures.add(signUsing("SHA256withRSA", privateKey));
+ generatedSignatures.add(signUsing("SHA384withRSA", privateKey));
+ generatedSignatures.add(signUsing("SHA512withRSA", privateKey));
+
+ System.out.println("-------------------------------------------------");
+
+ verifyUsing("SHA256withRSA", publicKey, generatedSignatures.get(0));
+ verifyUsing("SHA384withRSA", publicKey, generatedSignatures.get(1));
+ verifyUsing("SHA512withRSA", publicKey, generatedSignatures.get(2));
+
+ System.out.println("-------------------------------------------------");
+ }
+
+ private static byte[] signUsing(String signAlgorithm,
+ PrivateKey privateKey) throws Exception {
+
+ // Must explicitly specify the SunMSCAPI JCE provider
+ // (otherwise SunJCE is chosen because it appears earlier in the list)
+ Signature sig1 = Signature.getInstance(signAlgorithm, "SunMSCAPI");
+ if (sig1 == null) {
+ throw new Exception("'" + signAlgorithm + "' is not supported");
+ }
+ System.out.println("Using " + signAlgorithm + " signer from the " +
+ sig1.getProvider().getName() + " JCE provider");
+
+ System.out.println("Using key: " + privateKey);
+ sig1.initSign(privateKey);
+ sig1.update(toBeSigned);
+ byte [] sigBytes = null;
+
+ try {
+ sigBytes = sig1.sign();
+ System.out.println("Generated RSA signature over a " +
+ toBeSigned.length + "-byte data (signature length: " +
+ sigBytes.length * 8 + " bits)");
+ System.out.println(String.format("0x%0" +
+ (sigBytes.length * 2) + "x",
+ new java.math.BigInteger(1, sigBytes)));
+
+ } catch (SignatureException se) {
+ System.out.println("Error generating RSA signature: " + se);
+ }
+
+ return sigBytes;
+ }
+
+ private static void verifyUsing(String signAlgorithm, PublicKey publicKey,
+ byte[] signature) throws Exception {
+
+ // Must explicitly specify the SunMSCAPI JCE provider
+ // (otherwise SunJCE is chosen because it appears earlier in the list)
+ Signature sig1 = Signature.getInstance(signAlgorithm, "SunMSCAPI");
+ if (sig1 == null) {
+ throw new Exception("'" + signAlgorithm + "' is not supported");
+ }
+ System.out.println("Using " + signAlgorithm + " verifier from the "
+ + sig1.getProvider().getName() + " JCE provider");
+
+ System.out.println("Using key: " + publicKey);
+
+ System.out.println("\nVerifying RSA Signature over a " +
+ toBeSigned.length + "-byte data (signature length: " +
+ signature.length * 8 + " bits)");
+ System.out.println(String.format("0x%0" + (signature.length * 2) +
+ "x", new java.math.BigInteger(1, signature)));
+
+ sig1.initVerify(publicKey);
+ sig1.update(toBeSigned);
+
+ if (sig1.verify(signature)) {
+ System.out.println("Verify PASSED\n");
+ } else {
+ throw new Exception("Verify FAILED");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh Tue May 03 22:16:58 2011 -0700
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+
+# @test
+# @bug 6753664
+# @run shell SignUsingSHA2withRSA.sh
+# @summary Support SHA256 (and higher) in SunMSCAPI
+
+# set a few environment variables so that the shell-script can run stand-alone
+# in the source directory
+if [ "${TESTSRC}" = "" ] ; then
+ TESTSRC="."
+fi
+
+if [ "${TESTCLASSES}" = "" ] ; then
+ TESTCLASSES="."
+fi
+
+if [ "${TESTJAVA}" = "" ] ; then
+ echo "TESTJAVA not set. Test cannot execute."
+ echo "FAILED!!!"
+ exit 1
+fi
+
+OS=`uname -s`
+case "$OS" in
+ Windows* | CYGWIN* )
+
+ echo "Creating a temporary RSA keypair in the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -genkeypair \
+ -storetype Windows-My \
+ -keyalg RSA \
+ -alias 6753664 \
+ -dname "cn=6753664,c=US" \
+ -noprompt
+
+ echo
+ echo "Running the test..."
+ ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\SignUsingSHA2withRSA.java
+ ${TESTJAVA}/bin/java SignUsingSHA2withRSA
+
+ rc=$?
+
+ echo
+ echo "Removing the temporary RSA keypair from the Windows-My store..."
+ ${TESTJAVA}/bin/keytool \
+ -delete \
+ -storetype Windows-My \
+ -alias 6753664
+
+ echo done.
+ exit $rc
+ ;;
+
+ * )
+ echo "This test is not intended for '$OS' - passing test"
+ exit 0
+ ;;
+esac