Merge
authoryan
Sun, 04 May 2008 07:05:42 -0700
changeset 451 59439733e87a
parent 450 be95c1c0efcf (current diff)
parent 408 cc1aa0299d0d (diff)
child 452 deabc19e963e
child 634 34d4a2d5b8cb
Merge
hotspot/src/share/vm/memory/allocationStats.cpp
hotspot/src/share/vm/memory/allocationStats.hpp
jdk/make/tools/winver/bin/winver.exe
langtools/src/share/opensource/javac/Makefile
langtools/src/share/opensource/javac/README-template.html
langtools/src/share/opensource/javac/build.properties
langtools/src/share/opensource/javac/build.xml
langtools/src/share/opensource/javac/doc/document.css
langtools/src/share/opensource/javac/doc/javac_lifecycle/Context.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/Enter.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/JavaCompiler.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/Main.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/ToDo.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/contents.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/index.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/packages.html
langtools/src/share/opensource/javac/doc/javac_lifecycle/style.css
langtools/src/share/opensource/javac/nbproject/project.xml
langtools/src/share/opensource/javac/src/bin/javac.sh
langtools/test/tools/javac/expression/ObjectAppend.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+1cc8dd79fd1cd13d36b385196271a29632c67c3b jdk7-b24
+bf2517e15f0c0f950e5b3143c4ca11e2df73dcc1 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags-top-repo	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+cfeea66a3fa8ca3686a7cfa2d0ce8ab0169f168d jdk7-b24
+cbc8ad9dd0e085a607427ea35411990982f19a36 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -23,25 +23,25 @@
 # have any questions.
 #
 
+BUILD_PARENT_DIRECTORY=.
+
 ifndef TOPDIR
-  TOPDIR:=$(shell \
-    if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \
-      echo "."; \
-    else \
-      echo "../.."; \
-    fi)
+  TOPDIR:=.
 endif
 
 ifndef CONTROL_TOPDIR
-  CONTROL_TOPDIR=$(TOPDIR)/control
-  CONTROL_TOPDIR:=$(shell \
-    if [ -r $(TOPDIR)/control/make/Makefile ]; then \
-      echo "$(TOPDIR)/control"; \
-    else \
-      echo "$(TOPDIR)"; \
-    fi)
+  CONTROL_TOPDIR=$(TOPDIR)
 endif
 
+# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
+OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
+OPENJDK_BUILDDIR:=$(shell \
+  if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
+    echo "$(OPENJDK_SOURCETREE)"; \
+  else \
+    echo "."; \
+  fi)
+
 ifndef JDK_TOPDIR
   JDK_TOPDIR=$(TOPDIR)/jdk
 endif
@@ -55,6 +55,7 @@
 
 all::
 	@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
+	$(MKDIR) -p $(OUTPUTDIR)
 
 # Rules for sanity checks
 include ./make/sanity-rules.gmk
@@ -81,11 +82,24 @@
 
 all:: setup build
 
-setup:
+setup: openjdk_check
 	$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
-	$(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image
-	$(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image
-	$(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image
+
+# Check on whether we really can build the openjdk, need source etc.
+openjdk_check: FRC
+ifneq ($(SKIP_OPENJDK_BUILD), true)
+	@$(ECHO) " "
+	@$(ECHO) "================================================="
+	@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
+	    $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
+	    exit 1; \
+	else \
+	    $(ECHO) "OpenJDK will be built after JDK is built"; \
+	    $(ECHO) "  OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
+	fi
+	@$(ECHO) "================================================="
+	@$(ECHO) " "
+endif
 
 build:: sanity 
 
@@ -143,7 +157,7 @@
 
 COMMON_DEBUG_FLAGS= \
 	DEBUG_NAME=$(DEBUG_NAME) \
-	ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) \
+	ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
 	NO_DOCS=true
 
 product_build: setup
@@ -190,46 +204,64 @@
   all :: compare-image
 endif
 
-ifeq ($(SKIP_OPENJDK_BUILD), false)
+ifneq ($(SKIP_OPENJDK_BUILD), true)
+  all :: openjdk_build
+endif
+
+# If we have bundle rules, we have a chance here to do a complete cycle
+#   build, of production and open build.
+# FIXUP: We should create the openjdk source bundle and build that?
+#   But how do we reliable create or get at a formal openjdk source tree?
+#   The one we have needs to be trimmed of built bits and closed dirs.
+#   The repositories might not be available.
+#   The openjdk source bundle is probably not available.
+
+ifneq ($(SKIP_OPENJDK_BUILD), true)
   ifeq ($(BUILD_JDK), true)
     ifeq ($(BUNDLE_RULES_AVAILABLE), true)
-      # If we have bundle rules, we have a chance here to do a complete cycle
-      #   build, of closed and open build.
-      # FIXUP: We should create the openjdk source bundle and build that?
-      ABS_OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
-      ABS_OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/openjdk
-      OPENJDK_BUILD_NAME_PREFIX \
-	= $(J2SDK_NAME)-$(JDK_MKTG_UNDERSCORE_VERSION)-$(MILESTONE)
-      OPENJDK_BUILD_NAME_SUFFIX \
-	= $(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
-      OPENJDK_BUILD_NAME \
-	= $(OPENJDK_BUILD_NAME_PREFIX)-openjdk-$(OPENJDK_BUILD_NAME_SUFFIX)
-      OPENJDK_BUILD_BINARY_ZIP \
-	= $(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
-  all :: openjdk-build
-  openjdk-build:
+
+OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
+OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
+OPENJDK_BUILD_NAME \
+  = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
+OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
+BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
+ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
+  OPENJDK_BOOTDIR=$(BOOTDIR)
+  OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
+else
+  OPENJDK_BOOTDIR=$(BUILT_IMAGE)
+  OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
+endif
+
+openjdk_build:
 	@$(ECHO) " "
 	@$(ECHO) "================================================="
 	@$(ECHO) "Starting openjdk build"
+	@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
 	@$(ECHO) "================================================="
 	@$(ECHO) " "
-	$(RM) -r $(ABS_OPENJDK_OUTPUTDIR)
-	$(MKDIR) -p $(ABS_OPENJDK_OUTPUTDIR)
-	$(MAKE) OPENJDK=true \
-	  BUILD_LANGTOOLS=$(BUILD_LANGTOOLS) \
-	  BUILD_CORBA=$(BUILD_CORBA) \
-	  BUILD_JAXP=$(BUILD_JAXP) \
-	  BUILD_JAXWS=$(BUILD_JAXWS) \
-	  BUILD_HOTSPOT=$(BUILD_HOTSPOT) \
-	  ALT_OUTPUTDIR=$(ABS_OPENJDK_OUTPUTDIR) \
-	  ALT_BINARY_PLUGS_PATH=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) \
-	  ALT_BOOTDIR=$(ABS_OUTPUTDIR)/j2sdk-image \
-	  ALT_JDK_IMPORT_PATH=$(ABS_OUTPUTDIR)/j2sdk-image \
-		product_build
+	$(RM) -r $(OPENJDK_OUTPUTDIR)
+	$(MKDIR) -p $(OPENJDK_OUTPUTDIR)
+	($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
+	  OPENJDK=true \
+	  ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
+	  ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
+	  ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
+	  ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
+	  ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
+		product_build )
 	$(RM) $(OPENJDK_BUILD_BINARY_ZIP)
-	( $(CD) $(ABS_OPENJDK_OUTPUTDIR)/j2sdk-image && \
+	( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
 	  $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
-	$(RM) -r $(ABS_OPENJDK_OUTPUTDIR)
+	$(RM) -r $(OPENJDK_OUTPUTDIR)
+	@$(ECHO) " "
+	@$(ECHO) "================================================="
+	@$(ECHO) "Finished openjdk build"
+	@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
+	@$(ECHO) "================================================="
+	@$(ECHO) " "
+    
     endif
   endif
 endif
@@ -432,11 +464,11 @@
 # Cycle build. Build the jdk, use it to build the jdk again.
 ################################################################
   
-ABS_BOOTJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
+ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
   
 boot_cycle:
-	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTJDK_OUTPUTDIR) product_build
-	$(MAKE) ALT_BOOTDIR=$(ABS_BOOTJDK_OUTPUTDIR)/j2sdk-image product_build
+	$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
+	$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
 
 ################################################################
 # JPRT rule to build
@@ -452,7 +484,6 @@
 	fastdebug_build debug_build product_build setup \
         dev dev-build dev-sanity dev-clobber
 
-# FIXUP: Old j2se targets
-j2se_fastdebug_only: jdk_fastdebug_only
-j2se_only: jdk_only
+# Force target
+FRC:
 
--- a/README-builds.html	Wed Apr 23 14:35:26 2008 +0400
+++ b/README-builds.html	Sun May 04 07:05:42 2008 -0700
@@ -342,32 +342,29 @@
 
 <blockquote>
     <p>
-    The source code for the 
-    OpenJDK is
-    delivered in <i>3</i> sibling directories:
+    The source code for the OpenJDK is delivered in a set of
+    directories:
     <tt>hotspot</tt>, 
     <tt>langtools</tt>, 
     <tt>corba</tt>, 
     <tt>jaxws</tt>, 
     <tt>jaxp</tt>, 
-    <tt>jdk</tt>
     and
+    <tt>jdk</tt>.
     The <tt>hotspot</tt> directory contains the source code and make
-    files for
-    building the 
-    OpenJDK
-    Hotspot Virtual Machine. 
-    The <tt>jdk</tt>
-    directory contains the source code and make files for
-    building the 
-    OpenJDK
-    runtime libraries, tools and demos. 
-    The top level Makefile is used to build the complete OpenJDK 
-    release including building the hotspot
-    VM, staging the VM binaries, and building the 
-    OpenJDK 
-    runtime libraries,
-    tools and demos.
+    files for building the OpenJDK Hotspot Virtual Machine. 
+    The <tt>langtools</tt> directory contains the source code and make
+    files for building the OpenJDK javac and language tools.
+    The <tt>corba</tt> directory contains the source code and make
+    files for building the OpenJDK Corba files.
+    The <tt>jaxws</tt> directory contains the source code and make
+    files for building the OpenJDK JAXWS files.
+    The <tt>jaxp</tt> directory contains the source code and make
+    files for building the OpenJDK JAXP files.
+    The <tt>jdk</tt> directory contains the source code and make files for
+    building the OpenJDK runtime libraries and misc files.
+    The top level <tt>Makefile</tt>
+    is used to build the entire OpenJDK.
 </blockquote>
 
 <!-- ------------------------------------------------------ -->
@@ -730,17 +727,15 @@
         under an open-source license.
         In order to build an OpenJDK binary from source code,
         you must first download and install the appropriate
-        binary plug bundles from the OpenJDK Download area.
+	binary plug bundles from the OpenJDK, go to the
+	<a href="http://openjdk.java.net">OpenJDK</a> site and select
+	the "<b>Bundles(7)</b>" link.
         During the OpenJDK build process these "binary plugs"
         for the encumbered components will be copied into your
         resulting OpenJDK binary build image.
         These binary plug files are only for the purpose of
         building an OpenJDK binary.
-        Download the Binary Plugs by selecting the <b>Downloads</b>
-        link at
-        <a href="http://openjdk.java.net/">the OpenJDK site</a>,
-        install the bundle,
-        and make sure you set
+        Make sure you set
         <tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
         to the root of this installation.
     </blockquote>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/corba/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+55540e827aef970ecc010b7e06b912d991c8e3ce jdk7-b24
+5e61d5df62586474414d1058e9186441aa908f51 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/corba/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/corba/make/common/shared/Defs.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/corba/make/common/shared/Defs.gmk	Sun May 04 07:05:42 2008 -0700
@@ -281,6 +281,13 @@
 # Get platform specific settings
 include $(BUILDDIR)/common/shared/Defs-$(PLATFORM).gmk
 
+# Components
+ifdef ALT_LANGTOOLS_DIST
+  LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
+else
+  LANGTOOLS_DIST =
+endif
+
 # These are the same on all platforms but require the above platform include 1st
 
 # BOOTDIR: Bootstrap JDK, previous released JDK.
--- a/corba/src/share/classes/com/sun/corba/se/impl/corba/orb_config_design.txt	Wed Apr 23 14:35:26 2008 +0400
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/orb_config_design.txt	Sun May 04 07:05:42 2008 -0700
@@ -318,7 +318,7 @@
 
 11. RequestHandler and ORB
 
-    The RH interface is currently implemented in the ORB class, but migūt better be a separate
+    The RH interface is currently implemented in the ORB class, but might better be a separate
     class.  The API is currently almost the same as a ServerSubcontract.  Should we regularize
     this?  Also, the API would need to be extended to handle shutdown properly.
 
--- a/corba/src/share/classes/org/omg/CORBA/ir.idl	Wed Apr 23 14:35:26 2008 +0400
+++ b/corba/src/share/classes/org/omg/CORBA/ir.idl	Sun May 04 07:05:42 2008 -0700
@@ -774,18 +774,18 @@
     
     // orbos 98-01-18: Objects By Value -- end
 
-    enum TCKind {
-        tk_null, tk_void,
+    enum TCKind {
+        tk_null, tk_void,
         tk_short, tk_long, tk_ushort, tk_ulong,
-        tk_float, tk_double, tk_boolean, tk_char,
-        tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
-        tk_struct, tk_union, tk_enum, tk_string,
-        tk_sequence, tk_array, tk_alias, tk_except,
-        tk_longlong, tk_ulonglong, tk_longdouble,
-        tk_wchar, tk_wstring, tk_fixed,
-        tk_value, tk_value_box,
-        tk_native,
-        tk_abstract_interface
+        tk_float, tk_double, tk_boolean, tk_char,
+        tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
+        tk_struct, tk_union, tk_enum, tk_string,
+        tk_sequence, tk_array, tk_alias, tk_except,
+        tk_longlong, tk_ulonglong, tk_longdouble,
+        tk_wchar, tk_wstring, tk_fixed,
+        tk_value, tk_value_box,
+        tk_native,
+        tk_abstract_interface
     };
 
     interface NativeDef : TypedefDef {
--- a/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl	Wed Apr 23 14:35:26 2008 +0400
+++ b/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl	Sun May 04 07:05:42 2008 -0700
@@ -1042,24 +1042,24 @@
     /**
     * DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
     */
-    interface DynValueCommon : DynAny {
+    interface DynValueCommon : DynAny {
         /**
         * Returns true if the DynValueCommon represents a null value type.
         */
-        boolean is_null();
+        boolean is_null();
 
         /**
         * Changes the representation of a DynValueCommon to a null value type.
         */
-        void set_to_null();
+        void set_to_null();
 
         /**
         * Replaces a null value type with a newly constructed value. Its components are initialized
         * to default values as in DynAnyFactory.create_dyn_any_from_type_code.
         * If the DynValueCommon represents a non-null value type, then this operation has no effect. 
         */
-        void set_to_value();
-    }; 
+        void set_to_value();
+    }; 
 
     /**
     * DynValue objects support the manipulation of IDL non-boxed value types.
@@ -1164,14 +1164,14 @@
     * of the boxed type. A DynValueBox representing a null value type has no components
     * and a current position of -1.
     */
-    interface DynValueBox : DynValueCommon {
+    interface DynValueBox : DynValueCommon {
 
         /**
         * Returns the boxed value as an Any.
         *
         * @exception InvalidValue if this object represents a null value box type
         */
-        any get_boxed_value()
+        any get_boxed_value()
             raises(InvalidValue);
 
         /**
@@ -1189,7 +1189,7 @@
         *
         * @exception InvalidValue if this object represents a null value box type
         */
-        DynAny get_boxed_value_as_dyn_any()
+        DynAny get_boxed_value_as_dyn_any()
             raises(InvalidValue);
 
         /**
@@ -1199,7 +1199,7 @@
         * @exception TypeMismatch if this object represents a non-null value box type and the type
         *            of the parameter is not matching the current boxed value type.
         */
-        void set_boxed_value_as_dyn_any(in DynAny boxed)
+        void set_boxed_value_as_dyn_any(in DynAny boxed)
             raises(TypeMismatch);
     };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+a61af66fc99eb5ec9d50c05b0c599757b1289ceb jdk7-b24
+7836be3e92d0a4f9ee7566f602c91f5609534e66 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/hotspot/agent/src/os/linux/ps_core.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/agent/src/os/linux/ps_core.c	Sun May 04 07:05:42 2008 -0700
@@ -518,10 +518,10 @@
 }
 
 static ps_prochandle_ops core_ops = {
-   release:  core_release,
-   p_pread:  core_read_data,
-   p_pwrite: core_write_data,
-   get_lwp_regs: core_get_lwp_regs
+   .release=  core_release,
+   .p_pread=  core_read_data,
+   .p_pwrite= core_write_data,
+   .get_lwp_regs= core_get_lwp_regs
 };
 
 // read regs and create thread from NT_PRSTATUS entries from core file
--- a/hotspot/agent/src/os/linux/ps_proc.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/agent/src/os/linux/ps_proc.c	Sun May 04 07:05:42 2008 -0700
@@ -291,10 +291,10 @@
 }
 
 static ps_prochandle_ops process_ops = {
-  release:  process_cleanup,
-  p_pread:  process_read_data,
-  p_pwrite: process_write_data,
-  get_lwp_regs: process_get_lwp_regs
+  .release=  process_cleanup,
+  .p_pread=  process_read_data,
+  .p_pwrite= process_write_data,
+  .get_lwp_regs= process_get_lwp_regs
 };
 
 // attach to the process. One and only one exposed stuff
--- a/hotspot/build/linux/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/build/linux/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -80,6 +80,11 @@
   MFLAGS += " LP64=1 "
 endif
 
+# pass USE_SUNCC further, through MFLAGS
+ifdef USE_SUNCC
+  MFLAGS += " USE_SUNCC=1 "
+endif
+
 # The following renders pathnames in generated Makefiles valid on
 # machines other than the machine containing the build tree.
 #
--- a/hotspot/build/linux/makefiles/amd64.make	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/build/linux/makefiles/amd64.make	Sun May 04 07:05:42 2008 -0700
@@ -35,6 +35,8 @@
 CFLAGS += -D_LP64=1
 
 # The serviceability agent relies on frame pointer (%rbp) to walk thread stack
-CFLAGS += -fno-omit-frame-pointer
+ifndef USE_SUNCC
+  CFLAGS += -fno-omit-frame-pointer
+endif
 
 OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/hotspot/build/linux/makefiles/buildtree.make	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/build/linux/makefiles/buildtree.make	Sun May 04 07:05:42 2008 -0700
@@ -63,7 +63,11 @@
 # For now, until the compiler is less wobbly:
 TESTFLAGS	= -Xbatch -showversion
 
-PLATFORM_FILE	= $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH)
+ifdef USE_SUNCC
+PLATFORM_FILE	= $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
+else
+PLATFORM_FILE   = $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH)
+endif
 
 ifdef FORCE_TIERED
 ifeq		($(VARIANT),tiered)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/build/linux/makefiles/sparcWorks.make	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,93 @@
+#
+# Copyright 1999-2007 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#  
+#
+
+#------------------------------------------------------------------------
+# CC, CPP & AS
+
+CPP = CC
+CC  = cc
+AS  = $(CC) -c
+
+ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+ARCHFLAG/i486    = -m32
+ARCHFLAG/amd64   = -m64
+
+CFLAGS     += $(ARCHFLAG)
+AOUT_FLAGS += $(ARCHFLAG)
+LFLAGS     += $(ARCHFLAG)
+ASFLAGS    += $(ARCHFLAG)
+
+#------------------------------------------------------------------------
+# Compiler flags
+
+# position-independent code
+PICFLAG = -KPIC
+
+CFLAGS += $(PICFLAG)
+# no more exceptions
+CFLAGS += -features=no%except
+# Reduce code bloat by reverting back to 5.0 behavior for static initializers
+CFLAGS += -features=no%split_init
+# allow zero sized arrays
+CFLAGS += -features=zla
+
+# Use C++ Interpreter
+ifdef CC_INTERP
+  CFLAGS += -DCC_INTERP
+endif
+
+# We don't need libCstd.so and librwtools7.so, only libCrun.so
+CFLAGS += -library=Crun
+LIBS += -lCrun
+
+CFLAGS += -mt
+LFLAGS += -mt
+
+# Compiler warnings are treated as errors
+#WARNINGS_ARE_ERRORS = -errwarn=%all
+CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) 
+# Special cases
+CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
+
+# The flags to use for an Optimized build
+OPT_CFLAGS+=-xO4
+OPT_CFLAGS/NOOPT=-xO0
+
+#------------------------------------------------------------------------
+# Linker flags
+
+# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
+MAPFLAG = -Wl,--version-script=FILENAME
+
+# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
+SONAMEFLAG = -h SONAME
+
+# Build shared library
+SHARED_FLAG = -G
+
+#------------------------------------------------------------------------
+# Debug flags
+DEBUG_CFLAGS += -g
+FASTDEBUG_CFLAGS = -g0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/build/linux/platform_amd64.suncc	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,17 @@
+os_family = linux
+
+arch = x86
+
+arch_model = x86_64
+
+os_arch = linux_x86
+
+os_arch_model = linux_x86_64
+
+lib_arch = amd64
+
+compiler = sparcWorks
+
+gnu_dis_arch = amd64
+
+sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DAMD64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/build/linux/platform_i486.suncc	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,17 @@
+os_family = linux
+
+arch = x86
+
+arch_model = x86_32
+
+os_arch = linux_x86
+
+os_arch_model = linux_x86_32
+
+lib_arch = i386
+
+compiler = sparcWorks
+
+gnu_dis_arch = i386
+
+sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
--- a/hotspot/build/solaris/makefiles/amd64.make	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/build/solaris/makefiles/amd64.make	Sun May 04 07:05:42 2008 -0700
@@ -19,7 +19,7 @@
 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
-#  
+#
 #
 
 # Must also specify if CPU is little endian
@@ -45,6 +45,10 @@
 OPT_CFLAGS/generateOptoStub.o = -xO2
 OPT_CFLAGS/thread.o = -xO2
 
+# Work around for 6624782
+OPT_CFLAGS/instanceKlass.o = -Qoption ube -no_a2lf
+OPT_CFLAGS/objArrayKlass.o = -Qoption ube -no_a2lf
+
 else
 
 ifeq ("${Platform_compiler}", "gcc")
@@ -58,6 +62,6 @@
 # error
 _JUNK2_ := $(shell echo >&2 \
        "*** ERROR: this compiler is not yet supported by this code base!")
-	@exit 1
+       @exit 1
 endif
 endif
--- a/hotspot/build/windows/makefiles/compile.make	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/build/windows/makefiles/compile.make	Sun May 04 07:05:42 2008 -0700
@@ -44,6 +44,10 @@
 #   /Od       Disable all optimizations
 #
 # NOTE: Normally following any of the above with a '-' will turn off that flag
+#
+# 6655385: For VS2003/2005 we now specify /Oy- (disable frame pointer
+# omission.)  This has little to no effect on performance while vastly
+# improving the quality of crash log stack traces involving jvm.dll.
 
 # These are always used in all compiles
 CPP_FLAGS=/nologo /W3 /WX
@@ -141,14 +145,14 @@
 !endif
 
 !if "$(COMPILER_NAME)" == "VS2003"
-PRODUCT_OPT_OPTION   = /O2
-FASTDEBUG_OPT_OPTION = /O2
+PRODUCT_OPT_OPTION   = /O2 /Oy-
+FASTDEBUG_OPT_OPTION = /O2 /Oy-
 DEBUG_OPT_OPTION     = /Od
 !endif
 
 !if "$(COMPILER_NAME)" == "VS2005"
-PRODUCT_OPT_OPTION   = /O2
-FASTDEBUG_OPT_OPTION = /O2
+PRODUCT_OPT_OPTION   = /O2 /Oy-
+FASTDEBUG_OPT_OPTION = /O2 /Oy-
 DEBUG_OPT_OPTION     = /Od
 GX_OPTION = /EHsc
 # This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib 
@@ -165,8 +169,8 @@
 
 # Compile for space above time.
 !if "$(Variant)" == "kernel"
-PRODUCT_OPT_OPTION   = /O1
-FASTDEBUG_OPT_OPTION = /O1
+PRODUCT_OPT_OPTION   = /O1 /Oy-
+FASTDEBUG_OPT_OPTION = /O1 /Oy-
 DEBUG_OPT_OPTION     = /Od
 !endif
 
--- a/hotspot/make/hotspot_version	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/make/hotspot_version	Sun May 04 07:05:42 2008 -0700
@@ -35,7 +35,7 @@
 
 HS_MAJOR_VER=12
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=01
+HS_BUILD_NUMBER=03
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=7
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -2037,7 +2037,7 @@
 
 
 int LIR_Assembler::shift_amount(BasicType t) {
-  int elem_size = type2aelembytes[t];
+  int elem_size = type2aelembytes(t);
   switch (elem_size) {
     case 1 : return 0;
     case 2 : return 1;
@@ -2360,7 +2360,7 @@
                       op->tmp2()->as_register(),
                       op->tmp3()->as_register(),
                       arrayOopDesc::header_size(op->type()),
-                      type2aelembytes[op->type()],
+                      type2aelembytes(op->type()),
                       op->klass()->as_register(),
                       *op->stub()->entry());
   }
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -179,7 +179,7 @@
 
 LIR_Address* LIRGenerator::emit_array_address(LIR_Opr array_opr, LIR_Opr index_opr,
                                               BasicType type, bool needs_card_mark) {
-  int elem_size = type2aelembytes[type];
+  int elem_size = type2aelembytes(type);
   int shift = exact_log2(elem_size);
 
   LIR_Opr base_opr;
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Sun May 04 07:05:42 2008 -0700
@@ -6023,7 +6023,7 @@
   ins_pipe(ialu_imm);
 %}
 
-instruct cmovII_U_reg(cmpOp cmp, flagsRegU icc, iRegI dst, iRegI src) %{
+instruct cmovII_U_reg(cmpOpU cmp, flagsRegU icc, iRegI dst, iRegI src) %{
   match(Set dst (CMoveI (Binary cmp icc) (Binary dst src)));
   ins_cost(150);
   size(4);
@@ -6032,7 +6032,7 @@
   ins_pipe(ialu_reg);
 %}
 
-instruct cmovII_U_imm(cmpOp cmp, flagsRegU icc, iRegI dst, immI11 src) %{
+instruct cmovII_U_imm(cmpOpU cmp, flagsRegU icc, iRegI dst, immI11 src) %{
   match(Set dst (CMoveI (Binary cmp icc) (Binary dst src)));
   ins_cost(140);
   size(4);
--- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -2911,6 +2911,7 @@
 
     // These entry points require SharedInfo::stack0 to be set up in non-core builds
     StubRoutines::_throw_AbstractMethodError_entry         = generate_throw_exception("AbstractMethodError throw_exception",          CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError),  false);
+    StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError),  false);
     StubRoutines::_throw_ArithmeticException_entry         = generate_throw_exception("ArithmeticException throw_exception",          CAST_FROM_FN_PTR(address, SharedRuntime::throw_ArithmeticException),  true);
     StubRoutines::_throw_NullPointerException_entry        = generate_throw_exception("NullPointerException throw_exception",         CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException), true);
     StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call), false);
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -28,6 +28,12 @@
 int VM_Version::_features = VM_Version::unknown_m;
 const char* VM_Version::_features_str = "";
 
+bool VM_Version::is_niagara1_plus() {
+  // This is a placeholder until the real test is determined.
+  return is_niagara1() &&
+    (os::processor_count() > maximum_niagara1_processor_count());
+}
+
 void VM_Version::initialize() {
   _features = determine_features();
   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
@@ -160,3 +166,13 @@
 void VM_Version::revert() {
   _features = saved_features;
 }
+
+unsigned int VM_Version::calc_parallel_worker_threads() {
+  unsigned int result;
+  if (is_niagara1_plus()) {
+    result = nof_parallel_worker_threads(5, 16, 8);
+  } else {
+    result = nof_parallel_worker_threads(5, 8, 8);
+  }
+  return result;
+}
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp	Sun May 04 07:05:42 2008 -0700
@@ -64,6 +64,11 @@
 
   static bool is_niagara1(int features) { return (features & niagara1_m) == niagara1_m; }
 
+  static int maximum_niagara1_processor_count() { return 32; }
+  // Returns true if the platform is in the niagara line and
+  // newer than the niagara1.
+  static bool is_niagara1_plus();
+
 public:
   // Initialization
   static void initialize();
@@ -129,4 +134,7 @@
 
   // Override the Abstract_VM_Version implementation.
   static uint page_size_count() { return is_sun4v() ? 4 : 2; }
+
+  // Calculates the number of parallel threads
+  static unsigned int calc_parallel_worker_threads();
 };
--- a/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -175,17 +175,12 @@
   // %%%% Could load both offset and interface in one ldx, if they were
   // in the opposite order.  This would save a load.
   __ ld_ptr(L0, base + itableOffsetEntry::interface_offset_in_bytes(), L1);
-#ifdef ASSERT
-  Label ok;
-  // Check that entry is non-null and an Oop
-  __ bpr(Assembler::rc_nz, false, Assembler::pt, L1, ok);
-  __ delayed()->nop();
-  __ stop("null entry point found in itable's offset table");
-  __ bind(ok);
-  __ verify_oop(L1);
-#endif // ASSERT
 
-  __ cmp(G5_interface, L1);
+  // If the entry is NULL then we've reached the end of the table
+  // without finding the expected interface, so throw an exception
+  Label throw_icce;
+  __ bpr(Assembler::rc_z, false, Assembler::pn, L1, throw_icce);
+  __ delayed()->cmp(G5_interface, L1);
   __ brx(Assembler::notEqual, true, Assembler::pn, search);
   __ delayed()->add(L0, itableOffsetEntry::size() * wordSize, L0);
 
@@ -223,24 +218,30 @@
   __ JMP(G3_scratch, 0);
   __ delayed()->nop();
 
+  __ bind(throw_icce);
+  Address icce(G3_scratch, StubRoutines::throw_IncompatibleClassChangeError_entry());
+  __ jump_to(icce, 0);
+  __ delayed()->restore();
+
   masm->flush();
+
+  guarantee(__ pc() <= s->code_end(), "overflowed buffer");
+
   s->set_exception_points(npe_addr, ame_addr);
   return s;
 }
 
 
 int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
-  if (TraceJumps || DebugVtables || CountCompiledCalls || VerifyOops) return 999;
+  if (TraceJumps || DebugVtables || CountCompiledCalls || VerifyOops) return 1000;
   else {
     const int slop = 2*BytesPerInstWord; // sethi;add  (needed for long offsets)
     if (is_vtable_stub) {
       const int basic = 5*BytesPerInstWord; // ld;ld;ld,jmp,nop
       return basic + slop;
     } else {
-#ifdef ASSERT
-      return 999;
-#endif // ASSERT
-      const int basic = 17*BytesPerInstWord; // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore
+      // save, ld, ld, sll, and, add, add, ld, cmp, br, add, ld, add, ld, ld, jmp, restore, sethi, jmpl, restore
+      const int basic = (20 LP64_ONLY(+ 6)) * BytesPerInstWord;
       return (basic + slop);
     }
   }
@@ -252,29 +253,3 @@
   const unsigned int icache_line_size = 32;
   return icache_line_size;
 }
-
-
-//Reconciliation History
-// 1.2 97/12/09 17:13:31 vtableStubs_i486.cpp
-// 1.4 98/01/21 19:18:37 vtableStubs_i486.cpp
-// 1.5 98/02/13 16:33:55 vtableStubs_i486.cpp
-// 1.7 98/03/05 17:17:28 vtableStubs_i486.cpp
-// 1.9 98/05/18 09:26:17 vtableStubs_i486.cpp
-// 1.10 98/05/26 16:28:13 vtableStubs_i486.cpp
-// 1.11 98/05/27 08:51:35 vtableStubs_i486.cpp
-// 1.12 98/06/15 15:04:12 vtableStubs_i486.cpp
-// 1.13 98/07/28 18:44:22 vtableStubs_i486.cpp
-// 1.15 98/08/28 11:31:19 vtableStubs_i486.cpp
-// 1.16 98/09/02 12:58:31 vtableStubs_i486.cpp
-// 1.17 98/09/04 12:15:52 vtableStubs_i486.cpp
-// 1.18 98/11/19 11:55:24 vtableStubs_i486.cpp
-// 1.19 99/01/12 14:57:56 vtableStubs_i486.cpp
-// 1.20 99/01/19 17:42:52 vtableStubs_i486.cpp
-// 1.22 99/01/21 10:29:25 vtableStubs_i486.cpp
-// 1.30 99/06/02 15:27:39 vtableStubs_i486.cpp
-// 1.26 99/06/24 14:25:07 vtableStubs_i486.cpp
-// 1.23 99/02/22 14:37:52 vtableStubs_i486.cpp
-// 1.28 99/06/29 18:06:17 vtableStubs_i486.cpp
-// 1.29 99/07/22 17:03:44 vtableStubs_i486.cpp
-// 1.30 99/08/11 09:33:27 vtableStubs_i486.cpp
-//End
--- a/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_32.cpp	Sun May 04 07:05:42 2008 -0700
@@ -2672,6 +2672,22 @@
   emit_sse_operand(dst, src);
 }
 
+void Assembler::cvtdq2pd(XMMRegister dst, XMMRegister src) {
+  assert(VM_Version::supports_sse2(), "");
+
+  emit_byte(0xF3);
+  emit_byte(0x0F);
+  emit_byte(0xE6);
+  emit_sse_operand(dst, src);
+}
+
+void Assembler::cvtdq2ps(XMMRegister dst, XMMRegister src) {
+  assert(VM_Version::supports_sse2(), "");
+
+  emit_byte(0x0F);
+  emit_byte(0x5B);
+  emit_sse_operand(dst, src);
+}
 
 emit_sse_instruction(andps,  sse,  0,    0x54, XMMRegister, XMMRegister);
 emit_sse_instruction(andpd,  sse2, 0x66, 0x54, XMMRegister, XMMRegister);
--- a/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_32.hpp	Sun May 04 07:05:42 2008 -0700
@@ -901,6 +901,8 @@
   void cvtss2sd(XMMRegister dst, XMMRegister src);
   void cvtsd2ss(XMMRegister dst, Address src);   // Convert Scalar Double-Precision Floating-Point Value to Scalar Single-Precision Floating-Point Value
   void cvtsd2ss(XMMRegister dst, XMMRegister src);
+  void cvtdq2pd(XMMRegister dst, XMMRegister src);
+  void cvtdq2ps(XMMRegister dst, XMMRegister src);
 
   void cvtsi2ss(XMMRegister dst, Address src);   // Convert Doubleword Integer to Scalar Single-Precision Floating-Point Value
   void cvtsi2ss(XMMRegister dst, Register src);
--- a/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_64.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1304,7 +1304,7 @@
   emit_operand(src, dst);
 }
 
-void Assembler::mov64(Register dst, int64_t imm64) {
+void Assembler::mov64(Register dst, intptr_t imm64) {
   InstructionMark im(this);
   int encode = prefixq_and_encode(dst->encoding());
   emit_byte(0xB8 | encode);
@@ -1331,7 +1331,7 @@
   emit_operand(dst, src);
 }
 
-void Assembler::mov64(Address dst, int64_t imm32) {
+void Assembler::mov64(Address dst, intptr_t imm32) {
   assert(is_simm32(imm32), "lost bits");
   InstructionMark im(this);
   prefixq(dst);
@@ -3372,6 +3372,21 @@
   emit_byte(0xC0 | encode);
 }
 
+void Assembler::cvtdq2pd(XMMRegister dst, XMMRegister src) {
+  emit_byte(0xF3);
+  int encode = prefix_and_encode(dst->encoding(), src->encoding());
+  emit_byte(0x0F);
+  emit_byte(0xE6);
+  emit_byte(0xC0 | encode);
+}
+
+void Assembler::cvtdq2ps(XMMRegister dst, XMMRegister src) {
+  int encode = prefix_and_encode(dst->encoding(), src->encoding());
+  emit_byte(0x0F);
+  emit_byte(0x5B);
+  emit_byte(0xC0 | encode);
+}
+
 void Assembler::cvtsd2ss(XMMRegister dst, XMMRegister src) {
   emit_byte(0xF2);
   int encode = prefix_and_encode(dst->encoding(), src->encoding());
--- a/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/assembler_x86_64.hpp	Sun May 04 07:05:42 2008 -0700
@@ -922,6 +922,8 @@
   void cvttsd2siq(Register dst, XMMRegister src); // truncates
   void cvtss2sd(XMMRegister dst, XMMRegister src);
   void cvtsd2ss(XMMRegister dst, XMMRegister src);
+  void cvtdq2pd(XMMRegister dst, XMMRegister src);
+  void cvtdq2ps(XMMRegister dst, XMMRegister src);
 
   void pxor(XMMRegister dst, Address src);       // Xor Packed Byte Integer Values
   void pxor(XMMRegister dst, XMMRegister src);   // Xor Packed Byte Integer Values
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Sun May 04 07:05:42 2008 -0700
@@ -546,8 +546,8 @@
   // set rsi.edi to the end of the arrays (arrays have same length)
   // negate the index
 
-  __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes[T_CHAR]));
-  __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes[T_CHAR]));
+  __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes(T_CHAR)));
+  __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes(T_CHAR)));
   __ negl(rax);
 
   // compare the strings in a loop
@@ -1232,7 +1232,7 @@
 
 NEEDS_CLEANUP; // This could be static?
 Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const {
-  int elem_size = type2aelembytes[type];
+  int elem_size = type2aelembytes(type);
   switch (elem_size) {
     case 1: return Address::times_1;
     case 2: return Address::times_2;
@@ -2739,7 +2739,7 @@
 
   assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
 
-  int elem_size = type2aelembytes[basic_type];
+  int elem_size = type2aelembytes(basic_type);
   int shift_amount;
   Address::ScaleFactor scale;
 
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp	Sun May 04 07:05:42 2008 -0700
@@ -151,7 +151,7 @@
 
   LIR_Address* addr;
   if (index_opr->is_constant()) {
-    int elem_size = type2aelembytes[type];
+    int elem_size = type2aelembytes(type);
     addr = new LIR_Address(array_opr,
                            offset_in_bytes + index_opr->as_jint() * elem_size, type);
   } else {
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1416,8 +1416,8 @@
     // ======== end loop ========
 
     // It was a real error; we must depend on the caller to finish the job.
-    // Register rdx = -1 * number of *remaining* oops, r14 = *total* oops.
-    // Emit GC store barriers for the oops we have copied (r14 + rdx),
+    // Register "count" = -1 * number of *remaining* oops, length_arg = *total* oops.
+    // Emit GC store barriers for the oops we have copied (length_arg + count),
     // and report their number to the caller.
     __ addl(count, length_arg);         // transfers = (length - remaining)
     __ movl(rax, count);                // save the value
@@ -1430,6 +1430,7 @@
     // Come here on success only.
     __ BIND(L_do_card_marks);
     __ movl(count, length_arg);
+    __ movl(to, to_arg);                // reload
     gen_write_ref_array_post_barrier(to, count);
     __ xorl(rax, rax);                  // return 0 on success
 
@@ -2151,6 +2152,7 @@
     // These entry points require SharedInfo::stack0 to be set up in non-core builds
     // and need to be relocatable, so they each fabricate a RuntimeStub internally.
     StubRoutines::_throw_AbstractMethodError_entry         = generate_throw_exception("AbstractMethodError throw_exception",          CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError),  false);
+    StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError),  false);
     StubRoutines::_throw_ArithmeticException_entry         = generate_throw_exception("ArithmeticException throw_exception",          CAST_FROM_FN_PTR(address, SharedRuntime::throw_ArithmeticException),  true);
     StubRoutines::_throw_NullPointerException_entry        = generate_throw_exception("NullPointerException throw_exception",         CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException), true);
     StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call), false);
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Sun May 04 07:05:42 2008 -0700
@@ -2832,6 +2832,13 @@
                                                 throw_AbstractMethodError),
                                false);
 
+    StubRoutines::_throw_IncompatibleClassChangeError_entry =
+      generate_throw_exception("IncompatibleClassChangeError throw_exception",
+                               CAST_FROM_FN_PTR(address,
+                                                SharedRuntime::
+                                                throw_IncompatibleClassChangeError),
+                               false);
+
     StubRoutines::_throw_ArithmeticException_entry =
       generate_throw_exception("ArithmeticException throw_exception",
                                CAST_FROM_FN_PTR(address,
--- a/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86_32.cpp	Sun May 04 07:05:42 2008 -0700
@@ -321,6 +321,20 @@
         UseXmmRegToRegMoveAll = false;
       }
     }
+    if( FLAG_IS_DEFAULT(UseXmmI2F) ) {
+      if( supports_sse4a() ) {
+        UseXmmI2F = true;
+      } else {
+        UseXmmI2F = false;
+      }
+    }
+    if( FLAG_IS_DEFAULT(UseXmmI2D) ) {
+      if( supports_sse4a() ) {
+        UseXmmI2D = true;
+      } else {
+        UseXmmI2D = false;
+      }
+    }
   }
 
   if( is_intel() ) { // Intel cpus specific settings
--- a/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86_64.cpp	Sun May 04 07:05:42 2008 -0700
@@ -265,6 +265,20 @@
         UseXmmRegToRegMoveAll = false;
       }
     }
+    if( FLAG_IS_DEFAULT(UseXmmI2F) ) {
+      if( supports_sse4a() ) {
+        UseXmmI2F = true;
+      } else {
+        UseXmmI2F = false;
+      }
+    }
+    if( FLAG_IS_DEFAULT(UseXmmI2D) ) {
+      if( supports_sse4a() ) {
+        UseXmmI2D = true;
+      } else {
+        UseXmmI2D = false;
+      }
+    }
   }
 
   if( is_intel() ) { // Intel cpus specific settings
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp	Sun May 04 07:05:42 2008 -0700
@@ -138,29 +138,21 @@
     __ round_to(rbx, BytesPerLong);
   }
 
-  Label hit, next, entry;
+  Label hit, next, entry, throw_icce;
 
-  __ jmp(entry);
+  __ jmpb(entry);
 
   __ bind(next);
   __ addl(rbx, itableOffsetEntry::size() * wordSize);
 
   __ bind(entry);
 
-#ifdef ASSERT
-    // Check that the entry is non-null
-  if (DebugVtables) {
-    Label L;
-    __ pushl(rbx);
-    __ movl(rbx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
-    __ testl(rbx, rbx);
-    __ jcc(Assembler::notZero, L);
-    __ stop("null entry point found in itable's offset table");
-    __ bind(L);
-    __ popl(rbx);
-  }
-#endif
-  __ cmpl(rax, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
+  // If the entry is NULL then we've reached the end of the table
+  // without finding the expected interface, so throw an exception
+  __ movl(rdx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
+  __ testl(rdx, rdx);
+  __ jcc(Assembler::zero, throw_icce);
+  __ cmpl(rax, rdx);
   __ jcc(Assembler::notEqual, next);
 
   // We found a hit, move offset into rbx,
@@ -194,7 +186,15 @@
   address ame_addr = __ pc();
   __ jmp(Address(method, methodOopDesc::from_compiled_offset()));
 
+  __ bind(throw_icce);
+  // Restore saved register
+  __ popl(rdx);
+  __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
+
   masm->flush();
+
+  guarantee(__ pc() <= s->code_end(), "overflowed buffer");
+
   s->set_exception_points(npe_addr, ame_addr);
   return s;
 }
@@ -207,7 +207,7 @@
     return (DebugVtables ? 210 : 16) + (CountCompiledCalls ? 6 : 0);
   } else {
     // Itable stub size
-    return (DebugVtables ? 140 : 55) + (CountCompiledCalls ? 6 : 0);
+    return (DebugVtables ? 144 : 64) + (CountCompiledCalls ? 6 : 0);
   }
 }
 
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Sun May 04 07:05:42 2008 -0700
@@ -153,7 +153,7 @@
     // Round up to align_object_offset boundary
     __ round_to_q(rbx, BytesPerLong);
   }
-  Label hit, next, entry;
+  Label hit, next, entry, throw_icce;
 
   __ jmpb(entry);
 
@@ -162,22 +162,13 @@
 
   __ bind(entry);
 
-#ifdef ASSERT
-    // Check that the entry is non-null
-  if (DebugVtables) {
-    Label L;
-    __ pushq(rbx);
-    __ movq(rbx, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
-    __ testq(rbx, rbx);
-    __ jcc(Assembler::notZero, L);
-    __ stop("null entry point found in itable's offset table");
-    __ bind(L);
-    __ popq(rbx);
-  }
-#endif
-
-  __ cmpq(rax, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
-  __ jcc(Assembler::notEqual, next);
+  // If the entry is NULL then we've reached the end of the table
+  // without finding the expected interface, so throw an exception
+  __ movq(j_rarg1, Address(rbx, itableOffsetEntry::interface_offset_in_bytes()));
+  __ testq(j_rarg1, j_rarg1);
+  __ jcc(Assembler::zero, throw_icce);
+  __ cmpq(rax, j_rarg1);
+  __ jccb(Assembler::notEqual, next);
 
   // We found a hit, move offset into j_rarg1
   __ movl(j_rarg1, Address(rbx, itableOffsetEntry::offset_offset_in_bytes()));
@@ -203,23 +194,31 @@
 
 
 #ifdef ASSERT
-    if (DebugVtables) {
-      Label L2;
-      __ cmpq(method, (int)NULL);
-      __ jcc(Assembler::equal, L2);
-      __ cmpq(Address(method, methodOopDesc::from_compiled_offset()), (int)NULL_WORD);
-      __ jcc(Assembler::notZero, L2);
-      __ stop("compiler entrypoint is null");
-      __ bind(L2);
-    }
+  if (DebugVtables) {
+    Label L2;
+    __ cmpq(method, (int)NULL);
+    __ jcc(Assembler::equal, L2);
+    __ cmpq(Address(method, methodOopDesc::from_compiled_offset()), (int)NULL_WORD);
+    __ jcc(Assembler::notZero, L2);
+    __ stop("compiler entrypoint is null");
+    __ bind(L2);
+  }
 #endif // ASSERT
 
-    // rbx: methodOop
-    // j_rarg0: receiver
-    address ame_addr = __ pc();
-    __ jmp(Address(method, methodOopDesc::from_compiled_offset()));
+  // rbx: methodOop
+  // j_rarg0: receiver
+  address ame_addr = __ pc();
+  __ jmp(Address(method, methodOopDesc::from_compiled_offset()));
+
+  __ bind(throw_icce);
+  // Restore saved register
+  __ popq(j_rarg1);
+  __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
 
   __ flush();
+
+  guarantee(__ pc() <= s->code_end(), "overflowed buffer");
+
   s->set_exception_points(npe_addr, ame_addr);
   return s;
 }
@@ -230,7 +229,7 @@
     return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0);
   } else {
     // Itable stub size
-    return (DebugVtables ? 636 : 64) + (CountCompiledCalls ? 13 : 0);
+    return (DebugVtables ? 636 : 72) + (CountCompiledCalls ? 13 : 0);
   }
 }
 
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Sun May 04 07:05:42 2008 -0700
@@ -10970,7 +10970,7 @@
 %}
 
 instruct convI2XD_reg(regXD dst, eRegI src) %{
-  predicate( UseSSE>=2 );
+  predicate( UseSSE>=2 && !UseXmmI2D );
   match(Set dst (ConvI2D src));
   format %{ "CVTSI2SD $dst,$src" %}
   opcode(0xF2, 0x0F, 0x2A);
@@ -10987,6 +10987,20 @@
   ins_pipe( pipe_slow );
 %}
 
+instruct convXI2XD_reg(regXD dst, eRegI src)
+%{
+  predicate( UseSSE>=2 && UseXmmI2D );
+  match(Set dst (ConvI2D src));
+
+  format %{ "MOVD  $dst,$src\n\t"
+            "CVTDQ2PD $dst,$dst\t# i2d" %}
+  ins_encode %{
+    __ movd($dst$$XMMRegister, $src$$Register);
+    __ cvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister);
+  %}
+  ins_pipe(pipe_slow); // XXX
+%}
+
 instruct convI2D_mem(regD dst, memory mem) %{
   predicate( UseSSE<=1 && !Compile::current()->select_24_bit_instr());
   match(Set dst (ConvI2D (LoadI mem)));
@@ -11062,7 +11076,7 @@
 
 // Convert an int to a float in xmm; no rounding step needed.
 instruct convI2X_reg(regX dst, eRegI src) %{
-  predicate(UseSSE>=1);
+  predicate( UseSSE==1 || UseSSE>=2 && !UseXmmI2F );
   match(Set dst (ConvI2F src));
   format %{ "CVTSI2SS $dst, $src" %}
 
@@ -11071,6 +11085,20 @@
   ins_pipe( pipe_slow );
 %}
 
+ instruct convXI2X_reg(regX dst, eRegI src)
+%{
+  predicate( UseSSE>=2 && UseXmmI2F );
+  match(Set dst (ConvI2F src));
+
+  format %{ "MOVD  $dst,$src\n\t"
+            "CVTDQ2PS $dst,$dst\t# i2f" %}
+  ins_encode %{
+    __ movd($dst$$XMMRegister, $src$$Register);
+    __ cvtdq2ps($dst$$XMMRegister, $dst$$XMMRegister);
+  %}
+  ins_pipe(pipe_slow); // XXX
+%}
+
 instruct convI2L_reg( eRegL dst, eRegI src, eFlagsReg cr) %{
   match(Set dst (ConvI2L src));
   effect(KILL cr);
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Sun May 04 07:05:42 2008 -0700
@@ -10098,6 +10098,7 @@
 
 instruct convI2F_reg_reg(regF dst, rRegI src)
 %{
+  predicate(!UseXmmI2F);
   match(Set dst (ConvI2F src));
 
   format %{ "cvtsi2ssl $dst, $src\t# i2f" %}
@@ -10118,6 +10119,7 @@
 
 instruct convI2D_reg_reg(regD dst, rRegI src)
 %{
+  predicate(!UseXmmI2D);
   match(Set dst (ConvI2D src));
 
   format %{ "cvtsi2sdl $dst, $src\t# i2d" %}
@@ -10136,6 +10138,34 @@
   ins_pipe(pipe_slow); // XXX
 %}
 
+instruct convXI2F_reg(regF dst, rRegI src)
+%{
+  predicate(UseXmmI2F);
+  match(Set dst (ConvI2F src));
+
+  format %{ "movdl $dst, $src\n\t"
+            "cvtdq2psl $dst, $dst\t# i2f" %}
+  ins_encode %{
+    __ movdl($dst$$XMMRegister, $src$$Register);
+    __ cvtdq2ps($dst$$XMMRegister, $dst$$XMMRegister);
+  %}
+  ins_pipe(pipe_slow); // XXX
+%}
+
+instruct convXI2D_reg(regD dst, rRegI src)
+%{
+  predicate(UseXmmI2D);
+  match(Set dst (ConvI2D src));
+
+  format %{ "movdl $dst, $src\n\t"
+            "cvtdq2pdl $dst, $dst\t# i2d" %}
+  ins_encode %{
+    __ movdl($dst$$XMMRegister, $src$$Register);
+    __ cvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister);
+  %}
+  ins_pipe(pipe_slow); // XXX
+%}
+
 instruct convL2F_reg_reg(regF dst, rRegL src)
 %{
   match(Set dst (ConvL2F src));
--- a/hotspot/src/os/linux/vm/attachListener_linux.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp	Sun May 04 07:05:42 2008 -0700
@@ -232,7 +232,7 @@
   // where <ver> is the protocol version (1), <cmd> is the command
   // name ("load", "datadump", ...), and <arg> is an argument
   int expected_str_count = 2 + AttachOperation::arg_count_max;
-  int max_len = (strlen(ver_str) + 1) + (AttachOperation::name_length_max + 1) +
+  const int max_len = (sizeof(ver_str) + 1) + (AttachOperation::name_length_max + 1) +
     AttachOperation::arg_count_max*(AttachOperation::arg_length_max + 1);
 
   char buf[max_len];
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Sun May 04 07:05:42 2008 -0700
@@ -116,6 +116,20 @@
   return Linux::physical_memory();
 }
 
+julong os::allocatable_physical_memory(julong size) {
+#ifdef _LP64
+  return size;
+#else
+  julong result = MIN2(size, (julong)3800*M);
+   if (!is_allocatable(result)) {
+     // See comments under solaris for alignment considerations
+     julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
+     result =  MIN2(size, reasonable_size);
+   }
+   return result;
+#endif // _LP64
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // environment support
 
@@ -1247,19 +1261,13 @@
   return (1000 * 1000);
 }
 
-jlong os::timeofday() {
+jlong os::javaTimeMillis() {
   timeval time;
   int status = gettimeofday(&time, NULL);
   assert(status != -1, "linux error");
   return jlong(time.tv_sec) * 1000  +  jlong(time.tv_usec / 1000);
 }
 
-// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
-// _use_global_time is only set if CacheTimeMillis is true
-jlong os::javaTimeMillis() {
-  return (_use_global_time ? read_global_time() : timeofday());
-}
-
 #ifndef CLOCK_MONOTONIC
 #define CLOCK_MONOTONIC (1)
 #endif
@@ -2472,6 +2480,10 @@
   return false;
 }
 
+bool os::can_execute_large_page_memory() {
+  return false;
+}
+
 // Reserve memory at an arbitrary address, only if that area is
 // available (and not reserved for something else).
 
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1691,19 +1691,14 @@
   return (jlong)(nanotime / NANOSECS_PER_MILLISECS);
 }
 
-jlong os::timeofday() {
+// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
+jlong os::javaTimeMillis() {
   timeval t;
   if (gettimeofday( &t, NULL) == -1)
-    fatal1("timeofday: gettimeofday (%s)", strerror(errno));
+    fatal1("os::javaTimeMillis: gettimeofday (%s)", strerror(errno));
   return jlong(t.tv_sec) * 1000  +  jlong(t.tv_usec) / 1000;
 }
 
-// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
-// _use_global_time is only set if CacheTimeMillis is true
-jlong os::javaTimeMillis() {
-  return (_use_global_time ? read_global_time() : timeofday());
-}
-
 jlong os::javaTimeNanos() {
   return (jlong)getTimeNanos();
 }
@@ -2785,16 +2780,15 @@
   return b;
 }
 
-char*
-os::reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) {
-  char* addr = NULL;
-  int   flags;
-
-  flags = MAP_PRIVATE | MAP_NORESERVE;
-  if (requested_addr != NULL) {
-      flags |= MAP_FIXED;
-      addr = requested_addr;
-  } else if (has_map_align && alignment_hint > (size_t) vm_page_size()) {
+char* os::Solaris::anon_mmap(char* requested_addr, size_t bytes, size_t alignment_hint, bool fixed) {
+  char* addr = requested_addr;
+  int flags = MAP_PRIVATE | MAP_NORESERVE;
+
+  assert(!(fixed && (alignment_hint > 0)), "alignment hint meaningless with fixed mmap");
+
+  if (fixed) {
+    flags |= MAP_FIXED;
+  } else if (has_map_align && (alignment_hint > (size_t) vm_page_size())) {
     flags |= MAP_ALIGN;
     addr = (char*) alignment_hint;
   }
@@ -2802,11 +2796,14 @@
   // Map uncommitted pages PROT_NONE so we fail early if we touch an
   // uncommitted page. Otherwise, the read/write might succeed if we
   // have enough swap space to back the physical page.
-  addr = Solaris::mmap_chunk(addr, bytes, flags, PROT_NONE);
+  return mmap_chunk(addr, bytes, flags, PROT_NONE);
+}
+
+char* os::reserve_memory(size_t bytes, char* requested_addr, size_t alignment_hint) {
+  char* addr = Solaris::anon_mmap(requested_addr, bytes, alignment_hint, (requested_addr != NULL));
 
   guarantee(requested_addr == NULL || requested_addr == addr,
             "OS failed to return requested mmap address.");
-
   return addr;
 }
 
@@ -2832,6 +2829,31 @@
   // in one of the methods further up the call chain.  See bug 5044738.
   assert(bytes % os::vm_page_size() == 0, "reserving unexpected size block");
 
+  // Since snv_84, Solaris attempts to honor the address hint - see 5003415.
+  // Give it a try, if the kernel honors the hint we can return immediately.
+  char* addr = Solaris::anon_mmap(requested_addr, bytes, 0, false);
+  volatile int err = errno;
+  if (addr == requested_addr) {
+    return addr;
+  } else if (addr != NULL) {
+    unmap_memory(addr, bytes);
+  }
+
+  if (PrintMiscellaneous && Verbose) {
+    char buf[256];
+    buf[0] = '\0';
+    if (addr == NULL) {
+      jio_snprintf(buf, sizeof(buf), ": %s", strerror(err));
+    }
+    warning("attempt_reserve_memory_at: couldn't reserve %d bytes at "
+            PTR_FORMAT ": reserve_memory_helper returned " PTR_FORMAT
+            "%s", bytes, requested_addr, addr, buf);
+  }
+
+  // Address hint method didn't work.  Fall back to the old method.
+  // In theory, once SNV becomes our oldest supported platform, this
+  // code will no longer be needed.
+  //
   // Repeatedly allocate blocks until the block is allocated at the
   // right spot. Give up after max_tries.
   int i;
@@ -3067,6 +3089,8 @@
   if (UseISM) {
     // ISM disables MPSS to be compatible with old JDK behavior
     UseMPSS = false;
+    _page_sizes[0] = _large_page_size;
+    _page_sizes[1] = vm_page_size();
   }
 
   UseMPSS = UseMPSS &&
@@ -3156,6 +3180,10 @@
   return UseISM ? false : true;
 }
 
+bool os::can_execute_large_page_memory() {
+  return UseISM ? false : true;
+}
+
 static int os_sleep(jlong millis, bool interruptible) {
   const jlong limit = INT_MAX;
   jlong prevtime;
--- a/hotspot/src/os/solaris/vm/os_solaris.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os/solaris/vm/os_solaris.hpp	Sun May 04 07:05:42 2008 -0700
@@ -156,6 +156,7 @@
   static int get_dev_zero_fd() { return _dev_zero_fd; }
   static void set_dev_zero_fd(int fd) { _dev_zero_fd = fd; }
   static char* mmap_chunk(char *addr, size_t size, int flags, int prot);
+  static char* anon_mmap(char* requested_addr, size_t bytes, size_t alignment_hint, bool fixed);
   static bool mpss_sanity_check(bool warn, size_t * page_size);
   static bool ism_sanity_check (bool warn, size_t * page_size);
 
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Sun May 04 07:05:42 2008 -0700
@@ -621,7 +621,12 @@
 }
 
 julong os::allocatable_physical_memory(julong size) {
+#ifdef _LP64
+  return size;
+#else
+  // Limit to 1400m because of the 2gb address space wall
   return MIN2(size, (julong)1400*M);
+#endif
 }
 
 // VC6 lacks DWORD_PTR
@@ -732,20 +737,13 @@
   return result;
 }
 
-jlong os::timeofday() {
-  FILETIME wt;
-  GetSystemTimeAsFileTime(&wt);
-  return windows_to_java_time(wt);
-}
-
-
-// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
-// _use_global_time is only set if CacheTimeMillis is true
 jlong os::javaTimeMillis() {
   if (UseFakeTimers) {
     return fake_time++;
   } else {
-    return (_use_global_time ? read_global_time() : timeofday());
+    FILETIME wt;
+    GetSystemTimeAsFileTime(&wt);
+    return windows_to_java_time(wt);
   }
 }
 
@@ -2518,9 +2516,13 @@
   return false;
 }
 
+bool os::can_execute_large_page_memory() {
+  return true;
+}
+
 char* os::reserve_memory_special(size_t bytes) {
   DWORD flag = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES;
-  char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_READWRITE);
+  char * res = (char *)VirtualAlloc(NULL, bytes, flag, PAGE_EXECUTE_READWRITE);
   return res;
 }
 
--- a/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/bytes_linux_x86.inline.hpp	Sun May 04 07:05:42 2008 -0700
@@ -60,7 +60,18 @@
 
 #ifdef AMD64
 inline u8 Bytes::swap_u8(u8 x) {
+#ifdef SPARC_WORKS
+  // workaround for SunStudio12 CR6615391
+  __asm__ __volatile__ (
+    "bswapq %0"
+    :"=r" (x)        // output : register 0 => x
+    :"0"  (x)        // input  : x => register 0
+    :"0"             // clobbered register
+  );
+  return x;
+#else
   return bswap_64(x);
+#endif
 }
 #else
 // Helper function for swap_u8
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Sun May 04 07:05:42 2008 -0700
@@ -62,8 +62,14 @@
 #endif // AMD64
 
 address os::current_stack_pointer() {
+#ifdef SPARC_WORKS
+  register void *esp;
+  __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
+  return (address) ((char*)esp + sizeof(long)*2);
+#else
   register void *esp __asm__ (SPELL_REG_SP);
   return (address) esp;
+#endif
 }
 
 char* os::non_memory_address_word() {
@@ -139,7 +145,12 @@
 }
 
 intptr_t* _get_previous_fp() {
+#ifdef SPARC_WORKS
+  register intptr_t **ebp;
+  __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
+#else
   register intptr_t **ebp __asm__ (SPELL_REG_FP);
+#endif
   return (intptr_t*) *ebp;   // we want what it points to.
 }
 
@@ -157,23 +168,8 @@
   }
 }
 
-
 // Utility functions
 
-julong os::allocatable_physical_memory(julong size) {
-#ifdef AMD64
-  return size;
-#else
-  julong result = MIN2(size, (julong)3800*M);
-   if (!is_allocatable(result)) {
-     // See comments under solaris for alignment considerations
-     julong reasonable_size = (julong)2*G - 2 * os::vm_page_size();
-     result =  MIN2(size, reasonable_size);
-   }
-   return result;
-#endif // AMD64
-}
-
 // From IA32 System Programming Guide
 enum {
   trap_page_fault = 0xE
@@ -575,7 +571,9 @@
 #else
 size_t os::Linux::min_stack_allowed  =  (48 DEBUG_ONLY(+4))*K;
 
+#ifdef __GNUC__
 #define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
+#endif
 
 // Test if pthread library can support variable thread stack size. LinuxThreads
 // in fixed stack mode allocates 2M fixed slot for each thread. LinuxThreads
@@ -606,7 +604,11 @@
     // return true and skip _thread_safety_check(), so we may not be able to
     // detect stack-heap collisions. But otherwise it's harmless.
     //
+#ifdef __GNUC__
     return (GET_GS() != 0);
+#else
+    return false;
+#endif
   }
 }
 #endif // AMD64
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp	Sun May 04 07:05:42 2008 -0700
@@ -105,7 +105,7 @@
 
 
 LIR_Address::Scale LIR_Address::scale(BasicType type) {
-  int elem_size = type2aelembytes[type];
+  int elem_size = type2aelembytes(type);
   switch (elem_size) {
   case 1: return LIR_Address::times_1;
   case 2: return LIR_Address::times_2;
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp	Sun May 04 07:05:42 2008 -0700
@@ -104,7 +104,7 @@
 };
 
 void BCEscapeAnalyzer::set_returned(ArgumentMap vars) {
-  for (int i = 0; i <= _arg_size; i++) {
+  for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i))
       _arg_returned.set_bit(i);
   }
@@ -112,10 +112,9 @@
   _return_allocated = _return_allocated && vars.contains_allocated() && !(vars.contains_unknown() || vars.contains_vars());
 }
 
-
 // return true if any element of vars is an argument
 bool BCEscapeAnalyzer::is_argument(ArgumentMap vars) {
-  for (int i = 0; i <= _arg_size; i++) {
+  for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i))
       return true;
   }
@@ -126,7 +125,7 @@
 bool BCEscapeAnalyzer::is_arg_stack(ArgumentMap vars){
   if (_conservative)
     return true;
-  for (int i = 0; i <= _arg_size; i++) {
+  for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i) && _arg_stack.at(i))
       return true;
   }
@@ -134,12 +133,13 @@
 }
 
 void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, BitMap &bm) {
-  for (int i = 0; i <= _arg_size; i++) {
+  for (int i = 0; i < _arg_size; i++) {
     if (vars.contains(i)) {
       bm.clear_bit(i);
     }
   }
 }
+
 void BCEscapeAnalyzer::set_method_escape(ArgumentMap vars) {
   clear_bits(vars, _arg_local);
 }
@@ -155,6 +155,17 @@
   clear_bits(vars, _dirty);
 }
 
+void BCEscapeAnalyzer::set_modified(ArgumentMap vars, int offs, int size) {
+
+  for (int i = 0; i < _arg_size; i++) {
+    if (vars.contains(i)) {
+      set_arg_modified(i, offs, size);
+    }
+  }
+  if (vars.contains_unknown())
+    _unknown_modified = true;
+}
+
 bool BCEscapeAnalyzer::is_recursive_call(ciMethod* callee) {
   for (BCEscapeAnalyzer* scope = this; scope != NULL; scope = scope->_parent) {
     if (scope->method() == callee) {
@@ -164,6 +175,40 @@
   return false;
 }
 
+bool BCEscapeAnalyzer::is_arg_modified(int arg, int offset, int size_in_bytes) {
+  if (offset == OFFSET_ANY)
+    return _arg_modified[arg] != 0;
+  assert(arg >= 0 && arg < _arg_size, "must be an argument.");
+  bool modified = false;
+  int l = offset / HeapWordSize;
+  int h = round_to(offset + size_in_bytes, HeapWordSize) / HeapWordSize;
+  if (l > ARG_OFFSET_MAX)
+    l = ARG_OFFSET_MAX;
+  if (h > ARG_OFFSET_MAX+1)
+    h = ARG_OFFSET_MAX + 1;
+  for (int i = l; i < h; i++) {
+    modified = modified || (_arg_modified[arg] & (1 << i)) != 0;
+  }
+  return modified;
+}
+
+void BCEscapeAnalyzer::set_arg_modified(int arg, int offset, int size_in_bytes) {
+  if (offset == OFFSET_ANY) {
+    _arg_modified[arg] =  (uint) -1;
+    return;
+  }
+  assert(arg >= 0 && arg < _arg_size, "must be an argument.");
+  int l = offset / HeapWordSize;
+  int h = round_to(offset + size_in_bytes, HeapWordSize) / HeapWordSize;
+  if (l > ARG_OFFSET_MAX)
+    l = ARG_OFFSET_MAX;
+  if (h > ARG_OFFSET_MAX+1)
+    h = ARG_OFFSET_MAX + 1;
+  for (int i = l; i < h; i++) {
+    _arg_modified[arg] |= (1 << i);
+  }
+}
+
 void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod* target, ciKlass* holder) {
   int i;
 
@@ -197,6 +242,7 @@
     for (i = 0; i < arg_size; i++) {
       set_method_escape(state.raw_pop());
     }
+    _unknown_modified = true;  // assume the worst since we don't analyze the called method
     return;
   }
 
@@ -224,6 +270,11 @@
       ArgumentMap arg = state.raw_pop();
       if (!is_argument(arg))
         continue;
+      for (int j = 0; j < _arg_size; j++) {
+        if (arg.contains(j)) {
+          _arg_modified[j] |= analyzer._arg_modified[i];
+        }
+      }
       if (!is_arg_stack(arg)) {
         // arguments have already been recognized as escaping
       } else if (analyzer.is_arg_stack(i) && !analyzer.is_arg_returned(i)) {
@@ -233,6 +284,7 @@
         set_global_escape(arg);
       }
     }
+    _unknown_modified = _unknown_modified || analyzer.has_non_arg_side_affects();
 
     // record dependencies if at least one parameter retained stack-allocatable
     if (must_record_dependencies) {
@@ -250,8 +302,10 @@
       ArgumentMap arg = state.raw_pop();
       if (!is_argument(arg))
         continue;
+      set_modified(arg, OFFSET_ANY, type2size[T_INT]*HeapWordSize);
       set_global_escape(arg);
     }
+    _unknown_modified = true;  // assume the worst since we don't know the called method
   }
 }
 
@@ -421,6 +475,7 @@
         state.spop();
         ArgumentMap arr = state.apop();
         set_method_escape(arr);
+        set_modified(arr, OFFSET_ANY, type2size[T_INT]*HeapWordSize);
         break;
       }
       case Bytecodes::_lastore:
@@ -430,6 +485,7 @@
         state.spop();
         ArgumentMap arr = state.apop();
         set_method_escape(arr);
+        set_modified(arr, OFFSET_ANY, type2size[T_LONG]*HeapWordSize);
         break;
       }
       case Bytecodes::_aastore:
@@ -437,6 +493,7 @@
         set_global_escape(state.apop());
         state.spop();
         ArgumentMap arr = state.apop();
+        set_modified(arr, OFFSET_ANY, type2size[T_OBJECT]*HeapWordSize);
         break;
       }
       case Bytecodes::_pop:
@@ -762,6 +819,7 @@
           if (s.cur_bc() != Bytecodes::_putstatic) {
             ArgumentMap p = state.apop();
             set_method_escape(p);
+            set_modified(p, will_link ? field->offset() : OFFSET_ANY, type2size[field_type]*HeapWordSize);
           }
         }
         break;
@@ -872,7 +930,7 @@
 }
 
 void BCEscapeAnalyzer::merge_block_states(StateInfo *blockstates, ciBlock *dest, StateInfo *s_state) {
-  StateInfo *d_state = blockstates+dest->index();
+  StateInfo *d_state = blockstates + dest->index();
   int nlocals = _method->max_locals();
 
   // exceptions may cause transfer of control to handlers in the middle of a
@@ -916,6 +974,7 @@
     }
     for (int i = 0; i < s_state->_stack_height; i++) {
       ArgumentMap t;
+      //extra_vars |= !d_state->_vars[i] & s_state->_vars[i];
       t.clear();
       t = s_state->_stack[i];
       t.set_difference(d_state->_stack[i]);
@@ -933,7 +992,7 @@
 
   int datacount = (numblocks + 1) * (stkSize + numLocals);
   int datasize = datacount * sizeof(ArgumentMap);
-  StateInfo *blockstates = (StateInfo *) arena->Amalloc(_methodBlocks->num_blocks() * sizeof(StateInfo));
+  StateInfo *blockstates = (StateInfo *) arena->Amalloc(numblocks * sizeof(StateInfo));
   ArgumentMap *statedata  = (ArgumentMap *) arena->Amalloc(datasize);
   for (int i = 0; i < datacount; i++) ::new ((void*)&statedata[i]) ArgumentMap();
   ArgumentMap *dp = statedata;
@@ -961,33 +1020,35 @@
   ArgumentMap allVars;   // all oop arguments to method
   ciSignature* sig = method()->signature();
   int j = 0;
+  ciBlock* first_blk = _methodBlocks->block_containing(0);
+  int fb_i = first_blk->index();
   if (!method()->is_static()) {
     // record information for "this"
-    blockstates[0]._vars[j].set(j);
+    blockstates[fb_i]._vars[j].set(j);
     allVars.add(j);
     j++;
   }
   for (int i = 0; i < sig->count(); i++) {
     ciType* t = sig->type_at(i);
     if (!t->is_primitive_type()) {
-      blockstates[0]._vars[j].set(j);
+      blockstates[fb_i]._vars[j].set(j);
       allVars.add(j);
     }
     j += t->size();
   }
-  blockstates[0]._initialized = true;
+  blockstates[fb_i]._initialized = true;
   assert(j == _arg_size, "just checking");
 
   ArgumentMap unknown_map;
   unknown_map.add_unknown();
 
-  worklist.push(_methodBlocks->block_containing(0));
+  worklist.push(first_blk);
   while(worklist.length() > 0) {
     ciBlock *blk = worklist.pop();
-    StateInfo *blkState = blockstates+blk->index();
+    StateInfo *blkState = blockstates + blk->index();
     if (blk->is_handler() || blk->is_ret_target()) {
       // for an exception handler or a target of a ret instruction, we assume the worst case,
-      // that any variable or stack slot could contain any argument
+      // that any variable could contain any argument
       for (int i = 0; i < numLocals; i++) {
         state._vars[i] = allVars;
       }
@@ -997,6 +1058,7 @@
         state._stack_height = blkState->_stack_height;
       }
       for (int i = 0; i < state._stack_height; i++) {
+// ??? should this be unknown_map ???
         state._stack[i] = allVars;
       }
     } else {
@@ -1053,6 +1115,7 @@
   vmIntrinsics::ID iid = method()->intrinsic_id();
 
   if (iid == vmIntrinsics::_getClass ||
+      iid ==  vmIntrinsics::_fillInStackTrace ||
       iid == vmIntrinsics::_hashCode)
     return iid;
   else
@@ -1060,12 +1123,16 @@
 }
 
 bool BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
-  ArgumentMap empty;
-  empty.clear();
+  ArgumentMap arg;
+  arg.clear();
   switch (iid) {
   case vmIntrinsics::_getClass:
     _return_local = false;
     break;
+  case vmIntrinsics::_fillInStackTrace:
+    arg.set(0); // 'this'
+    set_returned(arg);
+    break;
   case vmIntrinsics::_hashCode:
     // initialized state is correct
     break;
@@ -1109,15 +1176,21 @@
     _return_allocated = true;
   }
   _allocated_escapes = false;
+  _unknown_modified = false;
 }
 
 void BCEscapeAnalyzer::clear_escape_info() {
   ciSignature* sig = method()->signature();
   int arg_count = sig->count();
   ArgumentMap var;
+  if (!method()->is_static()) {
+    arg_count++;  // allow for "this"
+  }
   for (int i = 0; i < arg_count; i++) {
+    set_arg_modified(i, OFFSET_ANY, 4);
     var.clear();
     var.set(i);
+    set_modified(var, OFFSET_ANY, 4);
     set_global_escape(var);
   }
   _arg_local.clear();
@@ -1126,6 +1199,7 @@
   _return_local = false;
   _return_allocated = false;
   _allocated_escapes = true;
+  _unknown_modified = true;
 }
 
 
@@ -1173,8 +1247,14 @@
 
   initialize();
 
-  // do not scan method if it has no object parameters
-  if (_arg_local.is_empty()) {
+  // Do not scan method if it has no object parameters and
+  // does not returns an object (_return_allocated is set in initialize()).
+  if (_arg_local.is_empty() && !_return_allocated) {
+    // Clear all info since method's bytecode was not analysed and
+    // set pessimistic escape information.
+    clear_escape_info();
+    methodData()->set_eflag(methodDataOopDesc::allocated_escapes);
+    methodData()->set_eflag(methodDataOopDesc::unknown_modified);
     methodData()->set_eflag(methodDataOopDesc::estimated);
     return;
   }
@@ -1185,36 +1265,8 @@
     success = do_analysis();
   }
 
-  // dump result of bytecode analysis
-#ifndef PRODUCT
-  if (BCEATraceLevel >= 3) {
-    tty->print("[EA] estimated escape information for");
-    if (iid != vmIntrinsics::_none)
-      tty->print(" intrinsic");
-    method()->print_short_name();
-    tty->print_cr(has_dependencies() ? " (not stored)" : "");
-    tty->print("     non-escaping args:      ");
-    _arg_local.print_on(tty);
-    tty->print("     stack-allocatable args: ");
-    _arg_stack.print_on(tty);
-    if (_return_local) {
-      tty->print("     returned args:          ");
-      _arg_returned.print_on(tty);
-    } else if (is_return_allocated()) {
-      tty->print_cr("     allocated return values");
-    } else {
-      tty->print_cr("     non-local return values");
-    }
-    tty->cr();
-    tty->print("     flags: ");
-    if (_return_allocated)
-      tty->print(" return_allocated");
-    tty->cr();
-  }
-
-#endif
-  // don't store interprocedural escape information if it introduces dependencies
-  // or if method data is empty
+  // don't store interprocedural escape information if it introduces
+  // dependencies or if method data is empty
   //
   if (!has_dependencies() && !methodData()->is_empty()) {
     for (i = 0; i < _arg_size; i++) {
@@ -1228,10 +1280,20 @@
       if (_arg_returned.at(i)) {
         methodData()->set_arg_returned(i);
       }
+      methodData()->set_arg_modified(i, _arg_modified[i]);
     }
     if (_return_local) {
       methodData()->set_eflag(methodDataOopDesc::return_local);
     }
+    if (_return_allocated) {
+      methodData()->set_eflag(methodDataOopDesc::return_allocated);
+    }
+    if (_allocated_escapes) {
+      methodData()->set_eflag(methodDataOopDesc::allocated_escapes);
+    }
+    if (_unknown_modified) {
+      methodData()->set_eflag(methodDataOopDesc::unknown_modified);
+    }
     methodData()->set_eflag(methodDataOopDesc::estimated);
   }
 }
@@ -1244,29 +1306,50 @@
     _arg_local.at_put(i, methodData()->is_arg_local(i));
     _arg_stack.at_put(i, methodData()->is_arg_stack(i));
     _arg_returned.at_put(i, methodData()->is_arg_returned(i));
+    _arg_modified[i] = methodData()->arg_modified(i);
   }
   _return_local = methodData()->eflag_set(methodDataOopDesc::return_local);
-
-  // dump result of loaded escape information
-#ifndef PRODUCT
-  if (BCEATraceLevel >= 4) {
-    tty->print("     non-escaping args:      ");
-    _arg_local.print_on(tty);
-    tty->print("     stack-allocatable args: ");
-    _arg_stack.print_on(tty);
-    if (_return_local) {
-      tty->print("     returned args:          ");
-      _arg_returned.print_on(tty);
-    } else {
-      tty->print_cr("     non-local return values");
-    }
-    tty->print("     modified args: ");
-    tty->cr();
-  }
-#endif
+  _return_allocated = methodData()->eflag_set(methodDataOopDesc::return_allocated);
+  _allocated_escapes = methodData()->eflag_set(methodDataOopDesc::allocated_escapes);
+  _unknown_modified = methodData()->eflag_set(methodDataOopDesc::unknown_modified);
 
 }
 
+#ifndef PRODUCT
+void BCEscapeAnalyzer::dump() {
+  tty->print("[EA] estimated escape information for");
+  method()->print_short_name();
+  tty->print_cr(has_dependencies() ? " (not stored)" : "");
+  tty->print("     non-escaping args:      ");
+  _arg_local.print_on(tty);
+  tty->print("     stack-allocatable args: ");
+  _arg_stack.print_on(tty);
+  if (_return_local) {
+    tty->print("     returned args:          ");
+    _arg_returned.print_on(tty);
+  } else if (is_return_allocated()) {
+    tty->print_cr("     return allocated value");
+  } else {
+    tty->print_cr("     return non-local value");
+  }
+  tty->print("     modified args: ");
+  for (int i = 0; i < _arg_size; i++) {
+    if (_arg_modified[i] == 0)
+      tty->print("    0");
+    else
+      tty->print("    0x%x", _arg_modified[i]);
+  }
+  tty->cr();
+  tty->print("     flags: ");
+  if (_return_allocated)
+    tty->print(" return_allocated");
+  if (_allocated_escapes)
+    tty->print(" allocated_escapes");
+  if (_unknown_modified)
+    tty->print(" unknown_modified");
+  tty->cr();
+}
+#endif
 
 BCEscapeAnalyzer::BCEscapeAnalyzer(ciMethod* method, BCEscapeAnalyzer* parent)
     : _conservative(method == NULL || !EstimateArgEscape)
@@ -1281,6 +1364,7 @@
     , _return_local(false)
     , _return_allocated(false)
     , _allocated_escapes(false)
+    , _unknown_modified(false)
     , _dependencies()
     , _parent(parent)
     , _level(parent == NULL ? 0 : parent->level() + 1) {
@@ -1290,6 +1374,8 @@
     _arg_returned.clear();
     _dirty.clear();
     Arena* arena = CURRENT_ENV->arena();
+    _arg_modified = (uint *) arena->Amalloc(_arg_size * sizeof(uint));
+    Copy::zero_to_bytes(_arg_modified, _arg_size * sizeof(uint));
 
     if (methodData() == NULL)
       return;
@@ -1307,6 +1393,12 @@
       compute_escape_info();
       methodData()->update_escape_info();
     }
+#ifndef PRODUCT
+    if (BCEATraceLevel >= 3) {
+      // dump escape information
+      dump();
+    }
+#endif
   }
 }
 
--- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.hpp	Sun May 04 07:05:42 2008 -0700
@@ -46,10 +46,13 @@
   BitMap            _arg_stack;
   BitMap            _arg_returned;
   BitMap            _dirty;
+  enum{ ARG_OFFSET_MAX = 31};
+  uint              *_arg_modified;
 
   bool              _return_local;
+  bool              _return_allocated;
   bool              _allocated_escapes;
-  bool              _return_allocated;
+  bool              _unknown_modified;
 
   ciObjectList     _dependencies;
 
@@ -80,6 +83,7 @@
   void set_method_escape(ArgumentMap vars);
   void set_global_escape(ArgumentMap vars);
   void set_dirty(ArgumentMap vars);
+  void set_modified(ArgumentMap vars, int offs, int size);
 
   bool is_recursive_call(ciMethod* callee);
   void add_dependence(ciKlass *klass, ciMethod *meth);
@@ -140,6 +144,18 @@
     return !_conservative && _return_allocated && !_allocated_escapes;
   }
 
+  // Tracking of argument modification
+
+  enum {OFFSET_ANY = -1};
+  bool is_arg_modified(int arg, int offset, int size_in_bytes);
+  void set_arg_modified(int arg, int offset, int size_in_bytes);
+  bool has_non_arg_side_affects()    { return _unknown_modified; }
+
   // Copy dependencies from this analysis into "deps"
   void copy_dependencies(Dependencies *deps);
+
+#ifndef PRODUCT
+  // dump escape information
+  void dump();
+#endif
 };
--- a/hotspot/src/share/vm/ci/ciField.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciField.hpp	Sun May 04 07:05:42 2008 -0700
@@ -102,7 +102,7 @@
   BasicType layout_type() { return type2field[(_type == NULL) ? T_OBJECT : _type->basic_type()]; }
 
   // How big is this field in memory?
-  int size_in_bytes() { return type2aelembytes[layout_type()]; }
+  int size_in_bytes() { return type2aelembytes(layout_type()); }
 
   // What is the offset of this field?
   int offset() {
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Sun May 04 07:05:42 2008 -0700
@@ -34,7 +34,9 @@
 // ciInstanceKlass::ciInstanceKlass
 //
 // Loaded instance klass.
-ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) : ciKlass(h_k) {
+ciInstanceKlass::ciInstanceKlass(KlassHandle h_k) :
+  ciKlass(h_k), _non_static_fields(NULL)
+{
   assert(get_Klass()->oop_is_instance(), "wrong type");
   instanceKlass* ik = get_instanceKlass();
 
@@ -335,6 +337,37 @@
   return field;
 }
 
+// ------------------------------------------------------------------
+// ciInstanceKlass::non_static_fields.
+
+class NonStaticFieldFiller: public FieldClosure {
+  GrowableArray<ciField*>* _arr;
+  ciEnv* _curEnv;
+public:
+  NonStaticFieldFiller(ciEnv* curEnv, GrowableArray<ciField*>* arr) :
+    _curEnv(curEnv), _arr(arr)
+  {}
+  void do_field(fieldDescriptor* fd) {
+    ciField* field = new (_curEnv->arena()) ciField(fd);
+    _arr->append(field);
+  }
+};
+
+GrowableArray<ciField*>* ciInstanceKlass::non_static_fields() {
+  if (_non_static_fields == NULL) {
+    VM_ENTRY_MARK;
+    ciEnv* curEnv = ciEnv::current();
+    instanceKlass* ik = get_instanceKlass();
+    int max_n_fields = ik->fields()->length()/instanceKlass::next_offset;
+
+    _non_static_fields =
+      new (curEnv->arena()) GrowableArray<ciField*>(max_n_fields);
+    NonStaticFieldFiller filler(curEnv, _non_static_fields);
+    ik->do_nonstatic_fields(&filler);
+  }
+  return _non_static_fields;
+}
+
 static int sort_field_by_offset(ciField** a, ciField** b) {
   return (*a)->offset_in_bytes() - (*b)->offset_in_bytes();
   // (no worries about 32-bit overflow...)
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.hpp	Sun May 04 07:05:42 2008 -0700
@@ -46,6 +46,7 @@
   bool                   _has_subklass;
   ciFlags                _flags;
   jint                   _nonstatic_field_size;
+  jint                   _nonstatic_oop_map_size;
 
   // Lazy fields get filled in only upon request.
   ciInstanceKlass*       _super;
@@ -58,6 +59,8 @@
   ciInstanceKlass*       _implementors[implementors_limit];
   jint                   _nof_implementors;
 
+  GrowableArray<ciField*>* _non_static_fields;
+
 protected:
   ciInstanceKlass(KlassHandle h_k);
   ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain);
@@ -129,6 +132,9 @@
   jint                   nonstatic_field_size()  {
     assert(is_loaded(), "must be loaded");
     return _nonstatic_field_size; }
+  jint                   nonstatic_oop_map_size()  {
+    assert(is_loaded(), "must be loaded");
+    return _nonstatic_oop_map_size; }
   ciInstanceKlass*       super();
   jint                   nof_implementors()  {
     assert(is_loaded(), "must be loaded");
@@ -138,6 +144,9 @@
 
   ciInstanceKlass* get_canonical_holder(int offset);
   ciField* get_field_by_offset(int field_offset, bool is_static);
+
+  GrowableArray<ciField*>* non_static_fields();
+
   // total number of nonstatic fields (including inherited):
   int nof_nonstatic_fields() {
     if (_nonstatic_fields == NULL)
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Sun May 04 07:05:42 2008 -0700
@@ -146,7 +146,7 @@
   memcpy(_code, me->code_base(), code_size());
 
   // Revert any breakpoint bytecodes in ci's copy
-  if (_is_compilable && me->number_of_breakpoints() > 0) {
+  if (me->number_of_breakpoints() > 0) {
     BreakpointInfo* bp = instanceKlass::cast(me->method_holder())->breakpoints();
     for (; bp != NULL; bp = bp->next()) {
       if (bp->match(me)) {
--- a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp	Sun May 04 07:05:42 2008 -0700
@@ -67,6 +67,14 @@
       break;
     }
   }
+  // Move an exception handler information if needed.
+  if (former_block->is_handler()) {
+    int ex_start = former_block->ex_start_bci();
+    int ex_end = former_block->ex_limit_bci();
+    new_block->set_exception_range(ex_start, ex_end);
+    // Clear information in former_block.
+    former_block->clear_exception_handler();
+  }
   return former_block;
 }
 
@@ -102,7 +110,7 @@
     // one and end the old one.
     assert(cur_block != NULL, "must always have a current block");
     ciBlock *new_block = block_containing(bci);
-    if (new_block == NULL) {
+    if (new_block == NULL || new_block == cur_block) {
       // We have not marked this bci as the start of a new block.
       // Keep interpreting the current_range.
       _bci_to_block[bci] = cur_block;
@@ -254,9 +262,33 @@
     for(ciExceptionHandlerStream str(meth); !str.is_done(); str.next()) {
       ciExceptionHandler* handler = str.handler();
       ciBlock *eb = make_block_at(handler->handler_bci());
-      eb->set_handler();
+      //
+      // Several exception handlers can have the same handler_bci:
+      //
+      //  try {
+      //    if (a.foo(b) < 0) {
+      //      return a.error();
+      //    }
+      //    return CoderResult.UNDERFLOW;
+      //  } finally {
+      //      a.position(b);
+      //  }
+      //
+      //  The try block above is divided into 2 exception blocks
+      //  separated by 'areturn' bci.
+      //
       int ex_start = handler->start();
       int ex_end = handler->limit();
+      if (eb->is_handler()) {
+        // Extend old handler exception range to cover additional range.
+        int old_ex_start = eb->ex_start_bci();
+        int old_ex_end   = eb->ex_limit_bci();
+        if (ex_start > old_ex_start)
+          ex_start = old_ex_start;
+        if (ex_end < old_ex_end)
+          ex_end = old_ex_end;
+        eb->clear_exception_handler(); // Reset exception information
+      }
       eb->set_exception_range(ex_start, ex_end);
       // ensure a block at the start of exception range and start of following code
       (void) make_block_at(ex_start);
@@ -312,9 +344,10 @@
 
 void ciBlock::set_exception_range(int start_bci, int limit_bci)  {
    assert(limit_bci >= start_bci, "valid range");
-   assert(is_handler(), "must be handler");
+   assert(!is_handler() && _ex_start_bci == -1 && _ex_limit_bci == -1, "must not be handler");
    _ex_start_bci = start_bci;
    _ex_limit_bci = limit_bci;
+   set_handler();
 }
 
 #ifndef PRODUCT
--- a/hotspot/src/share/vm/ci/ciMethodBlocks.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciMethodBlocks.hpp	Sun May 04 07:05:42 2008 -0700
@@ -110,9 +110,10 @@
   void  set_does_jsr()              { _flags |= DoesJsr; }
   void  clear_does_jsr()            { _flags &= ~DoesJsr; }
   void  set_does_ret()              { _flags |= DoesRet; }
-  void  clear_does_ret()            { _flags |= DoesRet; }
+  void  clear_does_ret()            { _flags &= ~DoesRet; }
   void  set_is_ret_target()         { _flags |= RetTarget; }
   void  set_has_handler()           { _flags |= HasHandler; }
+  void  clear_exception_handler()   { _flags &= ~Handler; _ex_start_bci = -1; _ex_limit_bci = -1; }
 #ifndef PRODUCT
   ciMethod *method() const          { return _method; }
   void dump();
--- a/hotspot/src/share/vm/ci/ciMethodData.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciMethodData.cpp	Sun May 04 07:05:42 2008 -0700
@@ -42,6 +42,8 @@
   // Set an initial hint. Don't use set_hint_di() because
   // first_di() may be out of bounds if data_size is 0.
   _hint_di = first_di();
+  // Initialize the escape information (to "don't know.");
+  _eflags = _arg_local = _arg_stack = _arg_returned = 0;
 }
 
 // ------------------------------------------------------------------
@@ -59,6 +61,8 @@
   // Set an initial hint. Don't use set_hint_di() because
   // first_di() may be out of bounds if data_size is 0.
   _hint_di = first_di();
+  // Initialize the escape information (to "don't know.");
+  _eflags = _arg_local = _arg_stack = _arg_returned = 0;
 }
 
 void ciMethodData::load_data() {
@@ -142,6 +146,8 @@
     return new ciBranchData(data_layout);
   case DataLayout::multi_branch_data_tag:
     return new ciMultiBranchData(data_layout);
+  case DataLayout::arg_info_data_tag:
+    return new ciArgInfoData(data_layout);
   };
 }
 
@@ -172,6 +178,9 @@
       _saw_free_extra_data = true;  // observed an empty slot (common case)
       return NULL;
     }
+    if (dp->tag() == DataLayout::arg_info_data_tag) {
+      break; // ArgInfoData is at the end of extra data section.
+    }
     if (dp->bci() == bci) {
       assert(dp->tag() == DataLayout::bit_data_tag, "sane");
       return new ciBitData(dp);
@@ -217,8 +226,14 @@
 void ciMethodData::clear_escape_info() {
   VM_ENTRY_MARK;
   methodDataOop mdo = get_methodDataOop();
-  if (mdo != NULL)
+  if (mdo != NULL) {
     mdo->clear_escape_info();
+    ArgInfoData *aid = arg_info();
+    int arg_count = (aid == NULL) ? 0 : aid->number_of_args();
+    for (int i = 0; i < arg_count; i++) {
+      set_arg_modified(i, 0);
+    }
+  }
   _eflags = _arg_local = _arg_stack = _arg_returned = 0;
 }
 
@@ -231,6 +246,10 @@
     mdo->set_arg_local(_arg_local);
     mdo->set_arg_stack(_arg_stack);
     mdo->set_arg_returned(_arg_returned);
+    int arg_count = mdo->method()->size_of_parameters();
+    for (int i = 0; i < arg_count; i++) {
+      mdo->set_arg_modified(i, arg_modified(i));
+    }
   }
 }
 
@@ -262,6 +281,14 @@
   set_nth_bit(_arg_returned, i);
 }
 
+void ciMethodData::set_arg_modified(int arg, uint val) {
+  ArgInfoData *aid = arg_info();
+  if (aid == NULL)
+    return;
+  assert(arg >= 0 && arg < aid->number_of_args(), "valid argument number");
+  aid->set_arg_modified(arg, val);
+}
+
 bool ciMethodData::is_arg_local(int i) const {
   return is_set_nth_bit(_arg_local, i);
 }
@@ -274,6 +301,14 @@
   return is_set_nth_bit(_arg_returned, i);
 }
 
+uint ciMethodData::arg_modified(int arg) const {
+  ArgInfoData *aid = arg_info();
+  if (aid == NULL)
+    return 0;
+  assert(arg >= 0 && arg < aid->number_of_args(), "valid argument number");
+  return aid->arg_modified(arg);
+}
+
 ByteSize ciMethodData::offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data) {
   // Get offset within methodDataOop of the data array
   ByteSize data_offset = methodDataOopDesc::data_offset();
@@ -287,6 +322,18 @@
   return in_ByteSize(offset);
 }
 
+ciArgInfoData *ciMethodData::arg_info() const {
+  // Should be last, have to skip all traps.
+  DataLayout* dp  = data_layout_at(data_size());
+  DataLayout* end = data_layout_at(data_size() + extra_data_size());
+  for (; dp < end; dp = methodDataOopDesc::next_extra(dp)) {
+    if (dp->tag() == DataLayout::arg_info_data_tag)
+      return new ciArgInfoData(dp);
+  }
+  return NULL;
+}
+
+
 // Implementation of the print method.
 void ciMethodData::print_impl(outputStream* st) {
   ciObject::print_impl(st);
@@ -305,6 +352,22 @@
     st->fill_to(6);
     data->print_data_on(st);
   }
+  st->print_cr("--- Extra data:");
+  DataLayout* dp  = data_layout_at(data_size());
+  DataLayout* end = data_layout_at(data_size() + extra_data_size());
+  for (; dp < end; dp = methodDataOopDesc::next_extra(dp)) {
+    if (dp->tag() == DataLayout::no_tag)  continue;
+    if (dp->tag() == DataLayout::bit_data_tag) {
+      data = new BitData(dp);
+    } else {
+      assert(dp->tag() == DataLayout::arg_info_data_tag, "must be BitData or ArgInfo");
+      data = new ciArgInfoData(dp);
+      dp = end; // ArgInfoData is at the end of extra data section.
+    }
+    st->print("%d", dp_to_di(data->dp()));
+    st->fill_to(6);
+    data->print_data_on(st);
+  }
 }
 
 void ciReceiverTypeData::print_receiver_data_on(outputStream* st) {
--- a/hotspot/src/share/vm/ci/ciMethodData.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciMethodData.hpp	Sun May 04 07:05:42 2008 -0700
@@ -30,6 +30,7 @@
 class ciBranchData;
 class ciArrayData;
 class ciMultiBranchData;
+class ciArgInfoData;
 
 typedef ProfileData ciProfileData;
 
@@ -121,6 +122,11 @@
   ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {};
 };
 
+class ciArgInfoData : public ArgInfoData {
+public:
+  ciArgInfoData(DataLayout* layout) : ArgInfoData(layout) {};
+};
+
 // ciMethodData
 //
 // This class represents a methodDataOop in the HotSpot virtual
@@ -163,9 +169,9 @@
   ciMethodData();
 
   // Accessors
-  int data_size() { return _data_size; }
-  int extra_data_size() { return _extra_data_size; }
-  intptr_t * data() { return _data; }
+  int data_size() const { return _data_size; }
+  int extra_data_size() const { return _extra_data_size; }
+  intptr_t * data() const { return _data; }
 
   methodDataOop get_methodDataOop() const {
     if (handle() == NULL) return NULL;
@@ -178,7 +184,7 @@
 
   void print_impl(outputStream* st);
 
-  DataLayout* data_layout_at(int data_index) {
+  DataLayout* data_layout_at(int data_index) const {
     assert(data_index % sizeof(intptr_t) == 0, "unaligned");
     return (DataLayout*) (((address)_data) + data_index);
   }
@@ -207,6 +213,8 @@
   // What is the index of the first data entry?
   int first_di() { return 0; }
 
+  ciArgInfoData *arg_info() const;
+
 public:
   bool is_method_data()  { return true; }
   bool is_empty() { return _state == empty_state; }
@@ -270,10 +278,12 @@
   void set_arg_local(int i);
   void set_arg_stack(int i);
   void set_arg_returned(int i);
+  void set_arg_modified(int arg, uint val);
 
   bool is_arg_local(int i) const;
   bool is_arg_stack(int i) const;
   bool is_arg_returned(int i) const;
+  uint arg_modified(int arg) const;
 
   // Code generation helper
   ByteSize offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/ci/ciObjArray.cpp	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1999-2007 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+#include "incls/_precompiled.incl"
+#include "incls/_ciObjArray.cpp.incl"
+
+// ciObjArray
+//
+// This class represents an objArrayOop in the HotSpot virtual
+// machine.
+
+ciObject* ciObjArray::obj_at(int index) {
+  VM_ENTRY_MARK;
+  objArrayOop array = get_objArrayOop();
+  if (index < 0 || index >= array->length()) return NULL;
+  oop o = array->obj_at(index);
+  if (o == NULL) {
+    return ciNullObject::make();
+  } else {
+    return CURRENT_ENV->get_object(o);
+  }
+}
--- a/hotspot/src/share/vm/ci/ciObjArray.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/ci/ciObjArray.hpp	Sun May 04 07:05:42 2008 -0700
@@ -43,4 +43,6 @@
 public:
   // What kind of ciObject is this?
   bool is_obj_array() { return true; }
+
+  ciObject* obj_at(int index);
 };
--- a/hotspot/src/share/vm/classfile/dictionary.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/dictionary.cpp	Sun May 04 07:05:42 2008 -0700
@@ -155,8 +155,8 @@
         for (int i = ik->previous_versions()->length() - 1; i >= 0; i--) {
           // check the previous versions array for GC'ed weak refs
           PreviousVersionNode * pv_node = ik->previous_versions()->at(i);
-          jweak cp_ref = pv_node->prev_constant_pool();
-          assert(cp_ref != NULL, "weak cp ref was unexpectedly cleared");
+          jobject cp_ref = pv_node->prev_constant_pool();
+          assert(cp_ref != NULL, "cp ref was unexpectedly cleared");
           if (cp_ref == NULL) {
             delete pv_node;
             ik->previous_versions()->remove_at(i);
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Sun May 04 07:05:42 2008 -0700
@@ -143,13 +143,43 @@
   jstring js = NULL;
   { JavaThread* thread = (JavaThread*)THREAD;
     assert(thread->is_Java_thread(), "must be java thread");
+    HandleMark hm(thread);
     ThreadToNativeFromVM ttn(thread);
-    HandleMark hm(thread);
     js = (_to_java_string_fn)(thread->jni_environment(), str);
   }
   return Handle(THREAD, JNIHandles::resolve(js));
 }
 
+// Converts a Java String to a native C string that can be used for
+// native OS calls.
+char* java_lang_String::as_platform_dependent_str(Handle java_string, TRAPS) {
+
+  typedef char* (*to_platform_string_fn_t)(JNIEnv*, jstring, bool*);
+  static to_platform_string_fn_t _to_platform_string_fn = NULL;
+
+  if (_to_platform_string_fn == NULL) {
+    void *lib_handle = os::native_java_library();
+    _to_platform_string_fn = CAST_TO_FN_PTR(to_platform_string_fn_t, hpi::dll_lookup(lib_handle, "GetStringPlatformChars"));
+    if (_to_platform_string_fn == NULL) {
+      fatal("GetStringPlatformChars missing");
+    }
+  }
+
+  char *native_platform_string;
+  { JavaThread* thread = (JavaThread*)THREAD;
+    assert(thread->is_Java_thread(), "must be java thread");
+    JNIEnv *env = thread->jni_environment();
+    jstring js = (jstring) JNIHandles::make_local(env, java_string());
+    bool is_copy;
+    HandleMark hm(thread);
+    ThreadToNativeFromVM ttn(thread);
+    native_platform_string = (_to_platform_string_fn)(env, js, &is_copy);
+    assert(is_copy == JNI_TRUE, "is_copy value changed");
+    JNIHandles::destroy_local(js);
+  }
+  return native_platform_string;
+}
+
 Handle java_lang_String::char_converter(Handle java_string, jchar from_char, jchar to_char, TRAPS) {
   oop          obj    = java_string();
   // Typical usage is to convert all '/' to '.' in string.
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp	Sun May 04 07:05:42 2008 -0700
@@ -96,6 +96,7 @@
   // String converters
   static char*  as_utf8_string(oop java_string);
   static char*  as_utf8_string(oop java_string, int start, int len);
+  static char*  as_platform_dependent_str(Handle java_string, TRAPS);
   static jchar* as_unicode_string(oop java_string, int& length);
 
   static bool equals(oop java_string, jchar* chars, int len);
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1242,7 +1242,9 @@
     oop obj = (oop) result.get_jobject();
     if (obj == NULL) { return nk; }
 
-    char* new_class_name = java_lang_String::as_utf8_string(obj);
+    Handle h_obj(THREAD, obj);
+    char* new_class_name = java_lang_String::as_platform_dependent_str(h_obj,
+                                                                  CHECK_(nk));
 
     // lock the loader
     // we use this lock because JVMTI does.
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp	Sun May 04 07:05:42 2008 -0700
@@ -318,6 +318,11 @@
   const int neg = JVM_ACC_SYNCHRONIZED;
   return (flags & (req | neg)) == req;
 }
+inline bool match_F_RNY(jshort flags) {
+  const int req = JVM_ACC_NATIVE | JVM_ACC_SYNCHRONIZED;
+  const int neg = JVM_ACC_STATIC;
+  return (flags & (req | neg)) == req;
+}
 
 // These are for forming case labels:
 #define ID3(x, y, z) (( jint)(z) +                                  \
@@ -359,6 +364,7 @@
   case F_RN: fname = "native ";        break;
   case F_SN: fname = "native static "; break;
   case F_S:  fname = "static ";        break;
+  case F_RNY:fname = "native synchronized "; break;
   }
   const char* kptr = strrchr(kname, '/');
   if (kptr != NULL)  kname = kptr + 1;
@@ -485,7 +491,7 @@
   if (PrintMiscellaneous && (WizardMode || Verbose)) {
     tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):",
                   declared_name, declared_id, actual_name, actual_id);
-    m->print_short_name(tty);
+    mh()->print_short_name(tty);
     tty->cr();
   }
 }
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Sun May 04 07:05:42 2008 -0700
@@ -58,12 +58,17 @@
   template(java_lang_ThreadDeath,                     "java/lang/ThreadDeath")                    \
   template(java_lang_Boolean,                         "java/lang/Boolean")                        \
   template(java_lang_Character,                       "java/lang/Character")                      \
+  template(java_lang_Character_CharacterCache,        "java/lang/Character$CharacterCache")       \
   template(java_lang_Float,                           "java/lang/Float")                          \
   template(java_lang_Double,                          "java/lang/Double")                         \
   template(java_lang_Byte,                            "java/lang/Byte")                           \
+  template(java_lang_Byte_Cache,                      "java/lang/Byte$ByteCache")                 \
   template(java_lang_Short,                           "java/lang/Short")                          \
+  template(java_lang_Short_ShortCache,                "java/lang/Short$ShortCache")               \
   template(java_lang_Integer,                         "java/lang/Integer")                        \
+  template(java_lang_Integer_IntegerCache,            "java/lang/Integer$IntegerCache")           \
   template(java_lang_Long,                            "java/lang/Long")                           \
+  template(java_lang_Long_LongCache,                  "java/lang/Long$LongCache")                 \
   template(java_lang_Shutdown,                        "java/lang/Shutdown")                       \
   template(java_lang_ref_Reference,                   "java/lang/ref/Reference")                  \
   template(java_lang_ref_SoftReference,               "java/lang/ref/SoftReference")              \
@@ -91,10 +96,11 @@
   template(java_util_Vector,                          "java/util/Vector")                         \
   template(java_util_AbstractList,                    "java/util/AbstractList")                   \
   template(java_util_Hashtable,                       "java/util/Hashtable")                      \
+  template(java_util_HashMap,                         "java/util/HashMap")                        \
   template(java_lang_Compiler,                        "java/lang/Compiler")                       \
   template(sun_misc_Signal,                           "sun/misc/Signal")                          \
   template(java_lang_AssertionStatusDirectives,       "java/lang/AssertionStatusDirectives")      \
-  template(sun_jkernel_DownloadManager,               "sun/jkernel/DownloadManager")                 \
+  template(sun_jkernel_DownloadManager,               "sun/jkernel/DownloadManager")              \
   template(getBootClassPathEntryForClass_name,        "getBootClassPathEntryForClass")            \
                                                                                                   \
   /* class file format tags */                                                                    \
@@ -274,7 +280,9 @@
   template(exclusive_owner_thread_name,               "exclusiveOwnerThread")                     \
   template(park_blocker_name,                         "parkBlocker")                              \
   template(park_event_name,                           "nativeParkEventPointer")                   \
+  template(cache_field_name,                          "cache")                                    \
   template(value_name,                                "value")                                    \
+  template(frontCacheEnabled_name,                    "frontCacheEnabled")                        \
                                                                                                   \
   /* non-intrinsic name/signature pairs: */                                                       \
   template(register_method_name,                      "register")                                 \
@@ -576,6 +584,8 @@
    do_name(     attemptUpdate_name,                                 "attemptUpdate")                                    \
    do_signature(attemptUpdate_signature,                            "(JJ)Z")                                            \
                                                                                                                         \
+  do_intrinsic(_fillInStackTrace,         java_lang_Throwable, fillInStackTrace_name, void_throwable_signature,  F_RNY) \
+                                                                                                                        \
   /* support for sun.misc.Unsafe */                                                                                     \
   do_class(sun_misc_Unsafe,               "sun/misc/Unsafe")                                                            \
                                                                                                                         \
@@ -863,7 +873,8 @@
     F_R,                        // !static        !synchronized (R="regular")
     F_S,                        //  static        !synchronized
     F_RN,                       // !static native !synchronized
-    F_SN                        //  static native !synchronized
+    F_SN,                       //  static native !synchronized
+    F_RNY                       // !static native  synchronized
   };
 
 public:
--- a/hotspot/src/share/vm/code/debugInfo.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/debugInfo.cpp	Sun May 04 07:05:42 2008 -0700
@@ -47,7 +47,8 @@
   }
 #endif
   ObjectValue* result = new ObjectValue(id);
-  _obj_pool->append(result);
+  // Cache the object since an object field could reference it.
+  _obj_pool->push(result);
   result->read_object(this);
   return result;
 }
@@ -56,9 +57,9 @@
   int id = read_int();
   assert(_obj_pool != NULL, "object pool does not exist");
   for (int i = _obj_pool->length() - 1; i >= 0; i--) {
-    ObjectValue* sv = (ObjectValue*) _obj_pool->at(i);
-    if (sv->id() == id) {
-      return sv;
+    ObjectValue* ov = (ObjectValue*) _obj_pool->at(i);
+    if (ov->id() == id) {
+      return ov;
     }
   }
   ShouldNotReachHere();
--- a/hotspot/src/share/vm/code/dependencies.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/dependencies.cpp	Sun May 04 07:05:42 2008 -0700
@@ -882,6 +882,14 @@
   // Must not move the class hierarchy during this check:
   assert_locked_or_safepoint(Compile_lock);
 
+  int nof_impls = instanceKlass::cast(context_type)->nof_implementors();
+  if (nof_impls > 1) {
+    // Avoid this case: *I.m > { A.m, C }; B.m > C
+    // %%% Until this is fixed more systematically, bail out.
+    // See corresponding comment in find_witness_anywhere.
+    return context_type;
+  }
+
   assert(!is_participant(new_type), "only old classes are participants");
   if (participants_hide_witnesses) {
     // If the new type is a subtype of a participant, we are done.
@@ -1491,9 +1499,12 @@
     // fall through:
     _change_type = Change_new_sub;
   case Change_new_sub:
-    _klass = instanceKlass::cast(_klass)->super();
-    if (_klass != NULL) {
-      return true;
+    // 6598190: brackets workaround Sun Studio C++ compiler bug 6629277
+    {
+      _klass = instanceKlass::cast(_klass)->super();
+      if (_klass != NULL) {
+        return true;
+      }
     }
     // else set up _ti_limit and fall through:
     _ti_limit = (_ti_base == NULL) ? 0 : _ti_base->length();
--- a/hotspot/src/share/vm/code/nmethod.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1971,7 +1971,7 @@
     if (ctxk != NULL) {
       Klass* k = Klass::cast(ctxk);
       if (k->oop_is_instance() && ((instanceKlass*)k)->is_dependent_nmethod(this)) {
-        tty->print("   [nmethod<=klass]%s", k->external_name());
+        tty->print_cr("   [nmethod<=klass]%s", k->external_name());
       }
     }
     deps.log_dependency();  // put it into the xml log also
--- a/hotspot/src/share/vm/code/scopeDesc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/scopeDesc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -91,7 +91,9 @@
   DebugInfoReadStream* stream = new DebugInfoReadStream(_code, decode_offset, result);
   int length = stream->read_int();
   for (int index = 0; index < length; index++) {
-    result->push(ScopeValue::read_from(stream));
+    // Objects values are pushed to 'result' array during read so that
+    // object's fields could reference it (OBJECT_ID_CODE).
+    (void)ScopeValue::read_from(stream);
   }
   assert(result->length() == length, "inconsistent debug information");
   return result;
--- a/hotspot/src/share/vm/code/vmreg.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/vmreg.cpp	Sun May 04 07:05:42 2008 -0700
@@ -36,16 +36,16 @@
 // Register names
 const char *VMRegImpl::regName[ConcreteRegisterImpl::number_of_registers];
 
-void VMRegImpl::print() {
 #ifndef PRODUCT
+void VMRegImpl::print_on(outputStream* st) const {
   if( is_reg() ) {
     assert( VMRegImpl::regName[value()], "" );
-    tty->print("%s",VMRegImpl::regName[value()]);
+    st->print("%s",VMRegImpl::regName[value()]);
   } else if (is_stack()) {
     int stk = value() - stack0->value();
-    tty->print("[%d]", stk*4);
+    st->print("[%d]", stk*4);
   } else {
-    tty->print("BAD!");
+    st->print("BAD!");
   }
+}
 #endif // PRODUCT
-}
--- a/hotspot/src/share/vm/code/vmreg.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/code/vmreg.hpp	Sun May 04 07:05:42 2008 -0700
@@ -66,9 +66,9 @@
     }
   }
   static VMReg Bad() { return (VMReg) (intptr_t) BAD; }
-  bool is_valid() { return ((intptr_t) this) != BAD; }
-  bool is_stack() { return (intptr_t) this >= (intptr_t) stack0; }
-  bool is_reg() { return is_valid() && !is_stack(); }
+  bool is_valid() const { return ((intptr_t) this) != BAD; }
+  bool is_stack() const { return (intptr_t) this >= (intptr_t) stack0; }
+  bool is_reg()   const { return is_valid() && !is_stack(); }
 
   // A concrete register is a value that returns true for is_reg() and is
   // also a register you could use in the assembler. On machines with
@@ -96,7 +96,8 @@
 
   intptr_t value() const         {return (intptr_t) this; }
 
-  void print();
+  void print_on(outputStream* st) const PRODUCT_RETURN;
+  void print() const { print_on(tty); }
 
   // bias a stack slot.
   // Typically used to adjust a virtual frame slots by amounts that are offset by
--- a/hotspot/src/share/vm/compiler/oopMap.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp	Sun May 04 07:05:42 2008 -0700
@@ -506,27 +506,27 @@
 }
 
 
-void print_register_type(OopMapValue::oop_types x, VMReg optional) {
+static void print_register_type(OopMapValue::oop_types x, VMReg optional, outputStream* st) {
   switch( x ) {
   case OopMapValue::oop_value:
-    tty->print("Oop");
+    st->print("Oop");
     break;
   case OopMapValue::value_value:
-    tty->print("Value" );
+    st->print("Value" );
     break;
   case OopMapValue::dead_value:
-    tty->print("Dead" );
+    st->print("Dead" );
     break;
   case OopMapValue::callee_saved_value:
-    tty->print("Callers_" );
-    optional->print();
+    st->print("Callers_" );
+    optional->print_on(st);
     break;
   case OopMapValue::derived_oop_value:
-    tty->print("Derived_oop_" );
-    optional->print();
+    st->print("Derived_oop_" );
+    optional->print_on(st);
     break;
   case OopMapValue::stack_obj:
-    tty->print("Stack");
+    st->print("Stack");
     break;
   default:
     ShouldNotReachHere();
@@ -534,11 +534,11 @@
 }
 
 
-void OopMapValue::print() const {
-  reg()->print();
-  tty->print("=");
-  print_register_type(type(),content_reg());
-  tty->print(" ");
+void OopMapValue::print_on(outputStream* st) const {
+  reg()->print_on(st);
+  st->print("=");
+  print_register_type(type(),content_reg(),st);
+  st->print(" ");
 }
 
 
--- a/hotspot/src/share/vm/compiler/oopMap.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/compiler/oopMap.hpp	Sun May 04 07:05:42 2008 -0700
@@ -129,7 +129,8 @@
     return reg()->reg2stack();
   }
 
-  void print( ) const PRODUCT_RETURN;
+  void print_on(outputStream* st) const PRODUCT_RETURN;
+  void print() const { print_on(tty); }
 };
 
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1071,85 +1071,56 @@
 // for each list in the tree.  Also print some summary
 // information.
 class printTreeCensusClosure : public AscendTreeCensusClosure {
+  int _print_line;
   size_t _totalFree;
-  AllocationStats _totals;
-  size_t _count;
+  FreeList _total;
 
  public:
   printTreeCensusClosure() {
+    _print_line = 0;
     _totalFree = 0;
-    _count = 0;
-    _totals.initialize();
   }
-  AllocationStats* totals() { return &_totals; }
-  size_t count() { return _count; }
-  void increment_count_by(size_t v) { _count += v; }
+  FreeList* total() { return &_total; }
   size_t totalFree() { return _totalFree; }
-  void increment_totalFree_by(size_t v) { _totalFree += v; }
   void do_list(FreeList* fl) {
-    bool nl = false; // "maybe this is not needed" isNearLargestChunk(fl->head());
-
-    gclog_or_tty->print("%c %4d\t\t" "%7d\t" "%7d\t"
-               "%7d\t"      "%7d\t" "%7d\t" "%7d\t"
-               "%7d\t"      "%7d\t" "%7d\t"
-               "%7d\t" "\n",
-               " n"[nl], fl->size(), fl->bfrSurp(), fl->surplus(),
-               fl->desired(), fl->prevSweep(), fl->beforeSweep(), fl->count(),
-               fl->coalBirths(), fl->coalDeaths(), fl->splitBirths(),
-               fl->splitDeaths());
-
-    increment_totalFree_by(fl->count() * fl->size());
-    increment_count_by(fl->count());
-    totals()->set_bfrSurp(totals()->bfrSurp() + fl->bfrSurp());
-    totals()->set_surplus(totals()->splitDeaths()     + fl->surplus());
-    totals()->set_prevSweep(totals()->prevSweep()   + fl->prevSweep());
-    totals()->set_beforeSweep(totals()->beforeSweep() + fl->beforeSweep());
-    totals()->set_coalBirths(totals()->coalBirths()  + fl->coalBirths());
-    totals()->set_coalDeaths(totals()->coalDeaths()  + fl->coalDeaths());
-    totals()->set_splitBirths(totals()->splitBirths() + fl->splitBirths());
-    totals()->set_splitDeaths(totals()->splitDeaths() + fl->splitDeaths());
+    if (++_print_line >= 40) {
+      FreeList::print_labels_on(gclog_or_tty, "size");
+      _print_line = 0;
+    }
+    fl->print_on(gclog_or_tty);
+    _totalFree +=            fl->count()            * fl->size()        ;
+    total()->set_count(      total()->count()       + fl->count()      );
+    total()->set_bfrSurp(    total()->bfrSurp()     + fl->bfrSurp()    );
+    total()->set_surplus(    total()->splitDeaths() + fl->surplus()    );
+    total()->set_desired(    total()->desired()     + fl->desired()    );
+    total()->set_prevSweep(  total()->prevSweep()   + fl->prevSweep()  );
+    total()->set_beforeSweep(total()->beforeSweep() + fl->beforeSweep());
+    total()->set_coalBirths( total()->coalBirths()  + fl->coalBirths() );
+    total()->set_coalDeaths( total()->coalDeaths()  + fl->coalDeaths() );
+    total()->set_splitBirths(total()->splitBirths() + fl->splitBirths());
+    total()->set_splitDeaths(total()->splitDeaths() + fl->splitDeaths());
   }
 };
 
 void BinaryTreeDictionary::printDictCensus(void) const {
 
   gclog_or_tty->print("\nBinaryTree\n");
-  gclog_or_tty->print(
-             "%4s\t\t" "%7s\t"   "%7s\t"    "%7s\t"    "%7s\t"    "%7s\t"
-             "%7s\t"   "%7s\t"   "%7s\t"    "%7s\t"    "%7s\t"     "\n",
-             "size",  "bfrsurp", "surplus", "desired", "prvSwep", "bfrSwep",
-             "count", "cBirths", "cDeaths", "sBirths", "sDeaths");
-
+  FreeList::print_labels_on(gclog_or_tty, "size");
   printTreeCensusClosure ptc;
   ptc.do_tree(root());
 
-  gclog_or_tty->print(
-             "\t\t"    "%7s\t"    "%7s\t"    "%7s\t"    "%7s\t"
-             "%7s\t"   "%7s\t"    "%7s\t"    "%7s\t"    "%7s\t"     "\n",
-                       "bfrsurp", "surplus", "prvSwep", "bfrSwep",
-             "count",  "cBirths", "cDeaths", "sBirths", "sDeaths");
+  FreeList* total = ptc.total();
+  FreeList::print_labels_on(gclog_or_tty, " ");
+  total->print_on(gclog_or_tty, "TOTAL\t");
   gclog_or_tty->print(
-             "%s\t\t"  "%7d\t"    "%7d\t"     "%7d\t"    "%7d\t"
-             "%7d\t"   "%7d\t"    "%7d\t"     "%7d\t"    "%7d\t"    "\n",
-             "totl",
-             ptc.totals()->bfrSurp(),
-             ptc.totals()->surplus(),
-             ptc.totals()->prevSweep(),
-             ptc.totals()->beforeSweep(),
-             ptc.count(),
-             ptc.totals()->coalBirths(),
-             ptc.totals()->coalDeaths(),
-             ptc.totals()->splitBirths(),
-             ptc.totals()->splitDeaths());
-  gclog_or_tty->print("totalFree(words): %7d growth: %8.5f  deficit: %8.5f\n",
+              "totalFree(words): " SIZE_FORMAT_W(16)
+              " growth: %8.5f  deficit: %8.5f\n",
               ptc.totalFree(),
-              (double)(ptc.totals()->splitBirths()+ptc.totals()->coalBirths()
-                       -ptc.totals()->splitDeaths()-ptc.totals()->coalDeaths())
-              /(ptc.totals()->prevSweep() != 0 ?
-                (double)ptc.totals()->prevSweep() : 1.0),
-             (double)(ptc.totals()->desired() - ptc.count())
-             /(ptc.totals()->desired() != 0 ?
-               (double)ptc.totals()->desired() : 1.0));
+              (double)(total->splitBirths() + total->coalBirths()
+                     - total->splitDeaths() - total->coalDeaths())
+              /(total->prevSweep() != 0 ? (double)total->prevSweep() : 1.0),
+             (double)(total->desired() - total->count())
+             /(total->desired() != 0 ? (double)total->desired() : 1.0));
 }
 
 // Verify the following tree invariants:
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1835,7 +1835,7 @@
   guarantee(false, "NYI");
 }
 
-bool CompactibleFreeListSpace::linearAllocationWouldFail() {
+bool CompactibleFreeListSpace::linearAllocationWouldFail() const {
   return _smallLinearAllocBlock._word_size == 0;
 }
 
@@ -1906,6 +1906,13 @@
   }
 }
 
+// Support for concurrent collection policy decisions.
+bool CompactibleFreeListSpace::should_concurrent_collect() const {
+  // In the future we might want to add in frgamentation stats --
+  // including erosion of the "mountain" into this decision as well.
+  return !adaptive_freelists() && linearAllocationWouldFail();
+}
+
 // Support for compaction
 
 void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
@@ -2013,11 +2020,11 @@
   }
 }
 
-void CompactibleFreeListSpace::endSweepFLCensus(int sweepCt) {
+void CompactibleFreeListSpace::endSweepFLCensus(size_t sweep_count) {
   setFLSurplus();
   setFLHints();
   if (PrintGC && PrintFLSCensus > 0) {
-    printFLCensus(sweepCt);
+    printFLCensus(sweep_count);
   }
   clearFLCensus();
   assert_locked();
@@ -2293,59 +2300,37 @@
 }
 #endif
 
-void CompactibleFreeListSpace::printFLCensus(int sweepCt) const {
+void CompactibleFreeListSpace::printFLCensus(size_t sweep_count) const {
   assert_lock_strong(&_freelistLock);
-  ssize_t bfrSurp     = 0;
-  ssize_t surplus     = 0;
-  ssize_t desired     = 0;
-  ssize_t prevSweep   = 0;
-  ssize_t beforeSweep = 0;
-  ssize_t count       = 0;
-  ssize_t coalBirths  = 0;
-  ssize_t coalDeaths  = 0;
-  ssize_t splitBirths = 0;
-  ssize_t splitDeaths = 0;
-  gclog_or_tty->print("end sweep# %d\n", sweepCt);
-  gclog_or_tty->print("%4s\t"    "%7s\t"      "%7s\t"      "%7s\t"      "%7s\t"
-             "%7s\t"    "%7s\t"      "%7s\t"      "%7s\t"      "%7s\t"
-             "%7s\t"    "\n",
-             "size",    "bfrsurp",   "surplus",   "desired",   "prvSwep",
-             "bfrSwep", "count",     "cBirths",   "cDeaths",   "sBirths",
-             "sDeaths");
-
+  FreeList total;
+  gclog_or_tty->print("end sweep# " SIZE_FORMAT "\n", sweep_count);
+  FreeList::print_labels_on(gclog_or_tty, "size");
   size_t totalFree = 0;
   for (size_t i = IndexSetStart; i < IndexSetSize; i += IndexSetStride) {
     const FreeList *fl = &_indexedFreeList[i];
-        totalFree += fl->count() * fl->size();
-
-    gclog_or_tty->print("%4d\t"          "%7d\t"             "%7d\t"        "%7d\t"
-               "%7d\t"          "%7d\t"             "%7d\t"        "%7d\t"
-               "%7d\t"          "%7d\t"             "%7d\t"        "\n",
-               fl->size(),       fl->bfrSurp(),     fl->surplus(), fl->desired(),
-               fl->prevSweep(),  fl->beforeSweep(), fl->count(),   fl->coalBirths(),
-               fl->coalDeaths(), fl->splitBirths(), fl->splitDeaths());
-    bfrSurp     += fl->bfrSurp();
-    surplus     += fl->surplus();
-    desired     += fl->desired();
-    prevSweep   += fl->prevSweep();
-    beforeSweep += fl->beforeSweep();
-    count       += fl->count();
-    coalBirths  += fl->coalBirths();
-    coalDeaths  += fl->coalDeaths();
-    splitBirths += fl->splitBirths();
-    splitDeaths += fl->splitDeaths();
+    totalFree += fl->count() * fl->size();
+    if (i % (40*IndexSetStride) == 0) {
+      FreeList::print_labels_on(gclog_or_tty, "size");
+    }
+    fl->print_on(gclog_or_tty);
+    total.set_bfrSurp(    total.bfrSurp()     + fl->bfrSurp()    );
+    total.set_surplus(    total.surplus()     + fl->surplus()    );
+    total.set_desired(    total.desired()     + fl->desired()    );
+    total.set_prevSweep(  total.prevSweep()   + fl->prevSweep()  );
+    total.set_beforeSweep(total.beforeSweep() + fl->beforeSweep());
+    total.set_count(      total.count()       + fl->count()      );
+    total.set_coalBirths( total.coalBirths()  + fl->coalBirths() );
+    total.set_coalDeaths( total.coalDeaths()  + fl->coalDeaths() );
+    total.set_splitBirths(total.splitBirths() + fl->splitBirths());
+    total.set_splitDeaths(total.splitDeaths() + fl->splitDeaths());
   }
-  gclog_or_tty->print("%4s\t"
-            "%7d\t"      "%7d\t"     "%7d\t"        "%7d\t"       "%7d\t"
-            "%7d\t"      "%7d\t"     "%7d\t"        "%7d\t"       "%7d\t" "\n",
-            "totl",
-            bfrSurp,     surplus,     desired,     prevSweep,     beforeSweep,
-            count,       coalBirths,  coalDeaths,  splitBirths,   splitDeaths);
-  gclog_or_tty->print_cr("Total free in indexed lists %d words", totalFree);
+  total.print_on(gclog_or_tty, "TOTAL");
+  gclog_or_tty->print_cr("Total free in indexed lists "
+                         SIZE_FORMAT " words", totalFree);
   gclog_or_tty->print("growth: %8.5f  deficit: %8.5f\n",
-    (double)(splitBirths+coalBirths-splitDeaths-coalDeaths)/
-            (prevSweep != 0 ? (double)prevSweep : 1.0),
-    (double)(desired - count)/(desired != 0 ? (double)desired : 1.0));
+    (double)(total.splitBirths()+total.coalBirths()-total.splitDeaths()-total.coalDeaths())/
+            (total.prevSweep() != 0 ? (double)total.prevSweep() : 1.0),
+    (double)(total.desired() - total.count())/(total.desired() != 0 ? (double)total.desired() : 1.0));
   _dictionary->printDictCensus();
 }
 
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Sun May 04 07:05:42 2008 -0700
@@ -418,7 +418,7 @@
   // chunk exists, return NULL.
   FreeChunk* find_chunk_at_end();
 
-  bool adaptive_freelists() { return _adaptive_freelists; }
+  bool adaptive_freelists() const { return _adaptive_freelists; }
 
   void set_collector(CMSCollector* collector) { _collector = collector; }
 
@@ -566,7 +566,7 @@
   FreeChunk* allocateScratch(size_t size);
 
   // returns true if either the small or large linear allocation buffer is empty.
-  bool       linearAllocationWouldFail();
+  bool       linearAllocationWouldFail() const;
 
   // Adjust the chunk for the minimum size.  This version is called in
   // most cases in CompactibleFreeListSpace methods.
@@ -585,6 +585,9 @@
   void      addChunkAndRepairOffsetTable(HeapWord* chunk, size_t size,
               bool coalesced);
 
+  // Support for decisions regarding concurrent collection policy
+  bool should_concurrent_collect() const;
+
   // Support for compaction
   void prepare_for_compaction(CompactPoint* cp);
   void adjust_pointers();
@@ -622,7 +625,7 @@
   // coalescing of chunks during the sweep of garbage.
 
   // Print the statistics for the free lists.
-  void printFLCensus(int sweepCt)         const;
+  void printFLCensus(size_t sweep_count) const;
 
   // Statistics functions
   // Initialize census for lists before the sweep.
@@ -635,12 +638,11 @@
   // Clear the census for each of the free lists.
   void clearFLCensus();
   // Perform functions for the census after the end of the sweep.
-  void endSweepFLCensus(int sweepCt);
+  void endSweepFLCensus(size_t sweep_count);
   // Return true if the count of free chunks is greater
   // than the desired number of free chunks.
   bool coalOverPopulated(size_t size);
 
-
 // Record (for each size):
 //
 //   split-births = #chunks added due to splits in (prev-sweep-end,
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Sun May 04 07:05:42 2008 -0700
@@ -3121,12 +3121,7 @@
   if (GCExpandToAllocateDelayMillis > 0) {
     os::sleep(Thread::current(), GCExpandToAllocateDelayMillis, false);
   }
-  size_t adj_word_sz = CompactibleFreeListSpace::adjustObjectSize(word_size);
-  if (parallel) {
-    return cmsSpace()->par_allocate(adj_word_sz);
-  } else {
-    return cmsSpace()->allocate(adj_word_sz);
-  }
+  return have_lock_and_allocate(word_size, tlab);
 }
 
 // YSR: All of this generation expansion/shrinking stuff is an exact copy of
@@ -5732,13 +5727,19 @@
   // in the perm_gen_verify_bit_map. In order to do that we traverse
   // all blocks in perm gen and mark all dead objects.
   if (verifying() && !cms_should_unload_classes()) {
-    CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
-                             bitMapLock());
     assert(perm_gen_verify_bit_map()->sizeInBits() != 0,
            "Should have already been allocated");
     MarkDeadObjectsClosure mdo(this, _permGen->cmsSpace(),
                                markBitMap(), perm_gen_verify_bit_map());
-    _permGen->cmsSpace()->blk_iterate(&mdo);
+    if (asynch) {
+      CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
+                               bitMapLock());
+      _permGen->cmsSpace()->blk_iterate(&mdo);
+    } else {
+      // In the case of synchronous sweep, we already have
+      // the requisite locks/tokens.
+      _permGen->cmsSpace()->blk_iterate(&mdo);
+    }
   }
 
   if (asynch) {
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp	Sun May 04 07:05:42 2008 -0700
@@ -302,3 +302,29 @@
 #endif
 }
 #endif
+
+// Print the "label line" for free list stats.
+void FreeList::print_labels_on(outputStream* st, const char* c) {
+  st->print("%16s\t", c);
+  st->print("%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"
+            "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "%14s\t"    "\n",
+            "bfrsurp", "surplus", "desired", "prvSwep", "bfrSwep",
+            "count",   "cBirths", "cDeaths", "sBirths", "sDeaths");
+}
+
+// Print the AllocationStats for the given free list. If the second argument
+// to the call is a non-null string, it is printed in the first column;
+// otherwise, if the argument is null (the default), then the size of the
+// (free list) block is printed in the first column.
+void FreeList::print_on(outputStream* st, const char* c) const {
+  if (c != NULL) {
+    st->print("%16s", c);
+  } else {
+    st->print(SIZE_FORMAT_W(16), size());
+  }
+  st->print("\t"
+           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t"
+           SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\n",
+           bfrSurp(),             surplus(),             desired(),             prevSweep(),           beforeSweep(),
+           count(),               coalBirths(),          coalDeaths(),          splitBirths(),         splitDeaths());
+}
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.hpp	Sun May 04 07:05:42 2008 -0700
@@ -38,6 +38,7 @@
 
 class FreeList VALUE_OBJ_CLASS_SPEC {
   friend class CompactibleFreeListSpace;
+  friend class printTreeCensusClosure;
   FreeChunk*    _head;          // List of free chunks
   FreeChunk*    _tail;          // Tail of list of free chunks
   size_t        _size;          // Size in Heap words of each chunks
@@ -63,10 +64,11 @@
  protected:
   void init_statistics();
   void set_count(ssize_t v) { _count = v;}
-  void increment_count() { _count++; }
+  void increment_count()    { _count++; }
   void decrement_count() {
     _count--;
-    assert(_count >= 0, "Count should not be negative"); }
+    assert(_count >= 0, "Count should not be negative");
+  }
 
  public:
   // Constructor
@@ -159,6 +161,10 @@
   ssize_t desired() const {
     return _allocation_stats.desired();
   }
+  void set_desired(ssize_t v) {
+    assert_proper_lock_protection();
+    _allocation_stats.set_desired(v);
+  }
   void compute_desired(float inter_sweep_current,
                        float inter_sweep_estimate) {
     assert_proper_lock_protection();
@@ -298,4 +304,8 @@
   // Verify that the chunk is in the list.
   // found.  Return NULL if "fc" is not found.
   bool verifyChunkInFreeLists(FreeChunk* fc) const;
+
+  // Printing support
+  static void print_labels_on(outputStream* st, const char* c);
+  void print_on(outputStream* st, const char* c = NULL) const;
 };
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared	Sun May 04 07:05:42 2008 -0700
@@ -19,15 +19,22 @@
 // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 // CA 95054 USA or visit www.sun.com if you need additional information or
 // have any questions.
-//  
+//
 //
 
 // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps!
 
-gcAdaptivePolicyCounters.hpp		adaptiveSizePolicy.hpp
-gcAdaptivePolicyCounters.hpp		gcPolicyCounters.hpp
+allocationStats.cpp                     allocationStats.hpp
+allocationStats.cpp                     ostream.hpp
 
-gcAdaptivePolicyCounters.cpp		resourceArea.hpp
+allocationStats.hpp                     allocation.hpp
+allocationStats.hpp                     gcUtil.hpp
+allocationStats.hpp                     globalDefinitions.hpp
+
+gcAdaptivePolicyCounters.hpp            adaptiveSizePolicy.hpp
+gcAdaptivePolicyCounters.hpp            gcPolicyCounters.hpp
+
+gcAdaptivePolicyCounters.cpp            resourceArea.hpp
 gcAdaptivePolicyCounters.cpp            gcAdaptivePolicyCounters.hpp
 
 gSpaceCounters.cpp                      generation.hpp
@@ -44,7 +51,7 @@
 
 isGCActiveMark.hpp                      parallelScavengeHeap.hpp
 
-markSweep.inline.hpp			psParallelCompact.hpp
+markSweep.inline.hpp                    psParallelCompact.hpp
 
 mutableNUMASpace.cpp                    mutableNUMASpace.hpp
 mutableNUMASpace.cpp                    sharedHeap.hpp
--- a/hotspot/src/share/vm/gc_implementation/parNew/asParNewGeneration.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parNew/asParNewGeneration.cpp	Sun May 04 07:05:42 2008 -0700
@@ -74,8 +74,8 @@
 #ifdef SHRINKS_AT_END_OF_EDEN
   size_t delta_in_survivor = 0;
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t space_alignment = heap->intra_generation_alignment();
-  const size_t gen_alignment = heap->generation_alignment();
+  const size_t space_alignment = heap->intra_heap_alignment();
+  const size_t gen_alignment = heap->object_heap_alignment();
 
   MutableSpace* space_shrinking = NULL;
   if (from_space()->end() > to_space()->end()) {
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	Sun May 04 07:05:42 2008 -0700
@@ -785,6 +785,9 @@
     swap_spaces();  // Make life simpler for CMS || rescan; see 6483690.
     from()->set_next_compaction_space(to());
     gch->set_incremental_collection_will_fail();
+
+    // Reset the PromotionFailureALot counters.
+    NOT_PRODUCT(Universe::heap()->reset_promotion_should_fail();)
   }
   // set new iteration safe limit for the survivor spaces
   from()->set_concurrent_iteration_safe_limit(from()->top());
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp	Sun May 04 07:05:42 2008 -0700
@@ -86,7 +86,7 @@
   if (eden_space()->is_empty()) {
     // Respect the minimum size for eden and for the young gen as a whole.
     ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-    const size_t eden_alignment = heap->intra_generation_alignment();
+    const size_t eden_alignment = heap->intra_heap_alignment();
     const size_t gen_alignment = heap->young_gen_alignment();
 
     assert(eden_space()->capacity_in_bytes() >= eden_alignment,
@@ -124,7 +124,7 @@
 // to_space can be.
 size_t ASPSYoungGen::available_to_live() {
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t alignment = heap->intra_generation_alignment();
+  const size_t alignment = heap->intra_heap_alignment();
 
   // Include any space that is committed but is not in eden.
   size_t available = pointer_delta(eden_space()->bottom(),
@@ -275,7 +275,7 @@
   assert(eden_start < from_start, "Cannot push into from_space");
 
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t alignment = heap->intra_generation_alignment();
+  const size_t alignment = heap->intra_heap_alignment();
 
   // Check whether from space is below to space
   if (from_start < to_start) {
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp	Sun May 04 07:05:42 2008 -0700
@@ -39,10 +39,10 @@
 
     // If the user hasn't explicitly set the number of worker
     // threads, set the count.
-    if (ParallelGCThreads == 0) {
-      assert(UseParallelGC, "Setting ParallelGCThreads without UseParallelGC");
-      ParallelGCThreads = os::active_processor_count();
-    }
+    assert(UseSerialGC ||
+           !FLAG_IS_DEFAULT(ParallelGCThreads) ||
+           (ParallelGCThreads > 0),
+           "ParallelGCThreads should be set before flag initialization");
 
     // The survivor ratio's are calculated "raw", unlike the
     // default gc, which adds 2 to the ratio value. We need to
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Sun May 04 07:05:42 2008 -0700
@@ -41,7 +41,7 @@
 
   const size_t rs_align = page_sz == (size_t) os::vm_page_size() ? 0 :
     MAX2(page_sz, granularity);
-  ReservedSpace rs(bytes, rs_align, false);
+  ReservedSpace rs(bytes, rs_align, rs_align > 0);
   os::trace_page_sizes("par bitmap", raw_bytes, raw_bytes, page_sz,
                        rs.base(), rs.size());
   _virtual_space = new PSVirtualSpace(rs, page_sz);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	Sun May 04 07:05:42 2008 -0700
@@ -173,7 +173,7 @@
     new PSAdaptiveSizePolicy(eden_capacity,
                              initial_promo_size,
                              young_gen()->to_space()->capacity_in_bytes(),
-                             intra_generation_alignment(),
+                             intra_heap_alignment(),
                              max_gc_pause_sec,
                              max_gc_minor_pause_sec,
                              GCTimeRatio
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp	Sun May 04 07:05:42 2008 -0700
@@ -58,9 +58,9 @@
 
  public:
   ParallelScavengeHeap() : CollectedHeap() {
-    set_alignment(_perm_gen_alignment, intra_generation_alignment());
-    set_alignment(_young_gen_alignment, intra_generation_alignment());
-    set_alignment(_old_gen_alignment, intra_generation_alignment());
+    set_alignment(_perm_gen_alignment, intra_heap_alignment());
+    set_alignment(_young_gen_alignment, intra_heap_alignment());
+    set_alignment(_old_gen_alignment, intra_heap_alignment());
   }
 
   // For use by VM operations
@@ -92,14 +92,14 @@
 
   void post_initialize();
   void update_counters();
-
   // The alignment used for the various generations.
   size_t perm_gen_alignment()  const { return _perm_gen_alignment; }
   size_t young_gen_alignment() const { return _young_gen_alignment; }
   size_t old_gen_alignment()  const { return _old_gen_alignment; }
 
-  // The alignment used for eden and survivors within the young gen.
-  size_t intra_generation_alignment() const { return 64 * K; }
+  // The alignment used for eden and survivors within the young gen
+  // and for boundary between young gen and old gen.
+  size_t intra_heap_alignment() const { return 64 * K; }
 
   size_t capacity() const;
   size_t used() const;
@@ -217,6 +217,6 @@
 inline size_t ParallelScavengeHeap::set_alignment(size_t& var, size_t val)
 {
   assert(is_power_of_2((intptr_t)val), "must be a power of 2");
-  var = round_to(val, intra_generation_alignment());
+  var = round_to(val, intra_heap_alignment());
   return var;
 }
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Sun May 04 07:05:42 2008 -0700
@@ -413,7 +413,7 @@
 
   const size_t rs_align = page_sz == (size_t) os::vm_page_size() ? 0 :
     MAX2(page_sz, granularity);
-  ReservedSpace rs(bytes, rs_align, false);
+  ReservedSpace rs(bytes, rs_align, rs_align > 0);
   os::trace_page_sizes("par compact", raw_bytes, raw_bytes, page_sz, rs.base(),
                        rs.size());
   PSVirtualSpace* vspace = new PSVirtualSpace(rs, page_sz);
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp	Sun May 04 07:05:42 2008 -0700
@@ -88,7 +88,7 @@
 
   // Compute maximum space sizes for performance counters
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  size_t alignment = heap->intra_generation_alignment();
+  size_t alignment = heap->intra_heap_alignment();
   size_t size = _virtual_space->reserved_size();
 
   size_t max_survivor_size;
@@ -141,7 +141,7 @@
   assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
 
   // Compute sizes
-  size_t alignment = heap->intra_generation_alignment();
+  size_t alignment = heap->intra_heap_alignment();
   size_t size = _virtual_space->committed_size();
 
   size_t survivor_size = size / InitialSurvivorRatio;
@@ -192,7 +192,7 @@
 #ifndef PRODUCT
 void PSYoungGen::space_invariants() {
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t alignment = heap->intra_generation_alignment();
+  const size_t alignment = heap->intra_heap_alignment();
 
   // Currently, our eden size cannot shrink to zero
   guarantee(eden_space()->capacity_in_bytes() >= alignment, "eden too small");
@@ -392,7 +392,7 @@
   char* to_end     = (char*)to_space()->end();
 
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t alignment = heap->intra_generation_alignment();
+  const size_t alignment = heap->intra_heap_alignment();
   const bool maintain_minimum =
     (requested_eden_size + 2 * requested_survivor_size) <= min_gen_size();
 
@@ -708,7 +708,7 @@
 size_t PSYoungGen::available_to_live() {
   size_t delta_in_survivor = 0;
   ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
-  const size_t space_alignment = heap->intra_generation_alignment();
+  const size_t space_alignment = heap->intra_heap_alignment();
   const size_t gen_alignment = heap->young_gen_alignment();
 
   MutableSpace* space_shrinking = NULL;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.cpp	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+# include "incls/_precompiled.incl"
+# include "incls/_allocationStats.cpp.incl"
+
+// Technically this should be derived from machine speed, and
+// ideally it would be dynamically adjusted.
+float AllocationStats::_threshold = ((float)CMS_SweepTimerThresholdMillis)/1000;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2001-2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+class AllocationStats VALUE_OBJ_CLASS_SPEC {
+  // A duration threshold (in ms) used to filter
+  // possibly unreliable samples.
+  static float _threshold;
+
+  // We measure the demand between the end of the previous sweep and
+  // beginning of this sweep:
+  //   Count(end_last_sweep) - Count(start_this_sweep)
+  //     + splitBirths(between) - splitDeaths(between)
+  // The above number divided by the time since the start [END???] of the
+  // previous sweep gives us a time rate of demand for blocks
+  // of this size. We compute a padded average of this rate as
+  // our current estimate for the time rate of demand for blocks
+  // of this size. Similarly, we keep a padded average for the time
+  // between sweeps. Our current estimate for demand for blocks of
+  // this size is then simply computed as the product of these two
+  // estimates.
+  AdaptivePaddedAverage _demand_rate_estimate;
+
+  ssize_t     _desired;          // Estimate computed as described above
+  ssize_t     _coalDesired;     // desired +/- small-percent for tuning coalescing
+
+  ssize_t     _surplus;         // count - (desired +/- small-percent),
+                                // used to tune splitting in best fit
+  ssize_t     _bfrSurp;         // surplus at start of current sweep
+  ssize_t     _prevSweep;       // count from end of previous sweep
+  ssize_t     _beforeSweep;     // count from before current sweep
+  ssize_t     _coalBirths;      // additional chunks from coalescing
+  ssize_t     _coalDeaths;      // loss from coalescing
+  ssize_t     _splitBirths;     // additional chunks from splitting
+  ssize_t     _splitDeaths;     // loss from splitting
+  size_t     _returnedBytes;    // number of bytes returned to list.
+ public:
+  void initialize() {
+    AdaptivePaddedAverage* dummy =
+      new (&_demand_rate_estimate) AdaptivePaddedAverage(CMS_FLSWeight,
+                                                         CMS_FLSPadding);
+    _desired = 0;
+    _coalDesired = 0;
+    _surplus = 0;
+    _bfrSurp = 0;
+    _prevSweep = 0;
+    _beforeSweep = 0;
+    _coalBirths = 0;
+    _coalDeaths = 0;
+    _splitBirths = 0;
+    _splitDeaths = 0;
+    _returnedBytes = 0;
+  }
+
+  AllocationStats() {
+    initialize();
+  }
+  // The rate estimate is in blocks per second.
+  void compute_desired(size_t count,
+                       float inter_sweep_current,
+                       float inter_sweep_estimate) {
+    // If the latest inter-sweep time is below our granularity
+    // of measurement, we may call in here with
+    // inter_sweep_current == 0. However, even for suitably small
+    // but non-zero inter-sweep durations, we may not trust the accuracy
+    // of accumulated data, since it has not been "integrated"
+    // (read "low-pass-filtered") long enough, and would be
+    // vulnerable to noisy glitches. In such cases, we
+    // ignore the current sample and use currently available
+    // historical estimates.
+    if (inter_sweep_current > _threshold) {
+      ssize_t demand = prevSweep() - count + splitBirths() - splitDeaths();
+      float rate = ((float)demand)/inter_sweep_current;
+      _demand_rate_estimate.sample(rate);
+      _desired = (ssize_t)(_demand_rate_estimate.padded_average()
+                           *inter_sweep_estimate);
+    }
+  }
+
+  ssize_t desired() const { return _desired; }
+  void set_desired(ssize_t v) { _desired = v; }
+
+  ssize_t coalDesired() const { return _coalDesired; }
+  void set_coalDesired(ssize_t v) { _coalDesired = v; }
+
+  ssize_t surplus() const { return _surplus; }
+  void set_surplus(ssize_t v) { _surplus = v; }
+  void increment_surplus() { _surplus++; }
+  void decrement_surplus() { _surplus--; }
+
+  ssize_t bfrSurp() const { return _bfrSurp; }
+  void set_bfrSurp(ssize_t v) { _bfrSurp = v; }
+  ssize_t prevSweep() const { return _prevSweep; }
+  void set_prevSweep(ssize_t v) { _prevSweep = v; }
+  ssize_t beforeSweep() const { return _beforeSweep; }
+  void set_beforeSweep(ssize_t v) { _beforeSweep = v; }
+
+  ssize_t coalBirths() const { return _coalBirths; }
+  void set_coalBirths(ssize_t v) { _coalBirths = v; }
+  void increment_coalBirths() { _coalBirths++; }
+
+  ssize_t coalDeaths() const { return _coalDeaths; }
+  void set_coalDeaths(ssize_t v) { _coalDeaths = v; }
+  void increment_coalDeaths() { _coalDeaths++; }
+
+  ssize_t splitBirths() const { return _splitBirths; }
+  void set_splitBirths(ssize_t v) { _splitBirths = v; }
+  void increment_splitBirths() { _splitBirths++; }
+
+  ssize_t splitDeaths() const { return _splitDeaths; }
+  void set_splitDeaths(ssize_t v) { _splitDeaths = v; }
+  void increment_splitDeaths() { _splitDeaths++; }
+
+  NOT_PRODUCT(
+    size_t returnedBytes() const { return _returnedBytes; }
+    void set_returnedBytes(size_t v) { _returnedBytes = v; }
+  )
+};
--- a/hotspot/src/share/vm/includeDB_compiler2	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/includeDB_compiler2	Sun May 04 07:05:42 2008 -0700
@@ -19,7 +19,7 @@
 // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 // CA 95054 USA or visit www.sun.com if you need additional information or
 // have any questions.
-//  
+//
 //
 
 ad_<arch_model>.cpp                     adGlobals_<arch_model>.hpp
@@ -164,6 +164,7 @@
 callGenerator.hpp                       type.hpp
 
 callnode.cpp                            callnode.hpp
+callnode.cpp                            bcEscapeAnalyzer.hpp
 callnode.cpp                            escape.hpp
 callnode.cpp                            locknode.hpp
 callnode.cpp                            machnode.hpp
@@ -176,7 +177,6 @@
 callnode.cpp                            runtime.hpp
 
 callnode.hpp                            connode.hpp
-callnode.hpp                            escape.hpp
 callnode.hpp                            mulnode.hpp
 callnode.hpp                            multnode.hpp
 callnode.hpp                            opcodes.hpp
@@ -347,7 +347,6 @@
 connode.cpp                             allocation.inline.hpp
 connode.cpp                             compile.hpp
 connode.cpp                             connode.hpp
-connode.cpp                             escape.hpp
 connode.cpp                             machnode.hpp
 connode.cpp                             matcher.hpp
 connode.cpp                             memnode.hpp
@@ -410,6 +409,7 @@
 
 escape.cpp                              allocation.hpp
 escape.cpp                              bcEscapeAnalyzer.hpp
+escape.cpp                              c2compiler.hpp
 escape.cpp                              callnode.hpp
 escape.cpp                              cfgnode.hpp
 escape.cpp                              compile.hpp
@@ -843,7 +843,6 @@
 phaseX.cpp                              callnode.hpp
 phaseX.cpp                              cfgnode.hpp
 phaseX.cpp                              connode.hpp
-phaseX.cpp                              escape.hpp
 phaseX.cpp                              loopnode.hpp
 phaseX.cpp                              machnode.hpp
 phaseX.cpp                              opcodes.hpp
@@ -990,6 +989,7 @@
 
 subnode.cpp                             addnode.hpp
 subnode.cpp                             allocation.inline.hpp
+subnode.cpp                             callnode.hpp
 subnode.cpp                             cfgnode.hpp
 subnode.cpp                             compileLog.hpp
 subnode.cpp                             connode.hpp
@@ -1086,7 +1086,7 @@
 idealGraphPrinter.hpp                   ostream.hpp
 
 idealGraphPrinter.cpp                   idealGraphPrinter.hpp
-idealGraphPrinter.cpp			chaitin.hpp
+idealGraphPrinter.cpp                   chaitin.hpp
 idealGraphPrinter.cpp                   machnode.hpp
 idealGraphPrinter.cpp                   parse.hpp
 idealGraphPrinter.cpp                   threadCritical.hpp
@@ -1098,4 +1098,4 @@
 parse1.cpp                              idealGraphPrinter.hpp
 matcher.cpp                             idealGraphPrinter.hpp
 loopnode.cpp                            idealGraphPrinter.hpp
-chaitin.cpp				idealGraphPrinter.hpp
+chaitin.cpp                             idealGraphPrinter.hpp
--- a/hotspot/src/share/vm/includeDB_core	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/includeDB_core	Sun May 04 07:05:42 2008 -0700
@@ -19,7 +19,7 @@
 // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 // CA 95054 USA or visit www.sun.com if you need additional information or
 // have any questions.
-//  
+//
 //
 
 // NOTE: DO NOT CHANGE THIS COPYRIGHT TO NEW STYLE - IT WILL BREAK makeDeps!
@@ -46,13 +46,13 @@
 // as dependencies.  Header files named H.inline.hpp generally contain
 // bodies for inline functions declared in H.hpp.
 //
-// NOTE: Files that use the token "generate_platform_dependent_include" 
+// NOTE: Files that use the token "generate_platform_dependent_include"
 // are expected to contain macro references like <os>, <arch_model>, ... and
 // makedeps has a dependency on these platform files looking like:
-// foo_<macro>.trailing_string 
+// foo_<macro>.trailing_string
 // (where "trailing_string" can be any legal filename strings but typically
 // is "hpp" or "inline.hpp").
-// 
+//
 // The dependency in makedeps (and enforced) is that an underscore
 // will precedure the macro invocation. Note that this restriction
 // is only enforced on filenames that have the dependency token
@@ -148,12 +148,6 @@
 
 allocation.inline.hpp                   os.hpp
 
-allocationStats.cpp                     allocationStats.hpp
-
-allocationStats.hpp                     allocation.hpp
-allocationStats.hpp                     gcUtil.hpp
-allocationStats.hpp                     globalDefinitions.hpp
-
 aprofiler.cpp                           aprofiler.hpp
 aprofiler.cpp                           collectedHeap.inline.hpp
 aprofiler.cpp                           oop.inline.hpp
@@ -720,6 +714,11 @@
 ciObjArray.hpp                          ciClassList.hpp
 ciObjArray.hpp                          objArrayOop.hpp
 
+ciObjArray.cpp                          ciObjArray.hpp
+ciObjArray.cpp                          ciNullObject.hpp
+ciObjArray.cpp                          ciUtilities.hpp
+ciObjArray.cpp                          objArrayOop.hpp
+
 ciObjArrayKlass.cpp                     ciInstanceKlass.hpp
 ciObjArrayKlass.cpp                     ciObjArrayKlass.hpp
 ciObjArrayKlass.cpp                     ciObjArrayKlassKlass.hpp
@@ -1935,7 +1934,7 @@
 
 init.cpp                                bytecodes.hpp
 init.cpp                                collectedHeap.hpp
-init.cpp				handles.inline.hpp
+init.cpp                                handles.inline.hpp
 init.cpp                                icBuffer.hpp
 init.cpp                                icache.hpp
 init.cpp                                init.hpp
@@ -3068,6 +3067,7 @@
 
 oopMapCache.cpp                         allocation.inline.hpp
 oopMapCache.cpp                         handles.inline.hpp
+oopMapCache.cpp                         jvmtiRedefineClassesTrace.hpp
 oopMapCache.cpp                         oop.inline.hpp
 oopMapCache.cpp                         oopMapCache.hpp
 oopMapCache.cpp                         resourceArea.hpp
--- a/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Sun May 04 07:05:42 2008 -0700
@@ -532,6 +532,10 @@
     if (!_array[i].is_empty() && _array[i].method()->is_old()) {
       // Cache entry is occupied by an old redefined method and we don't want
       // to pin it down so flush the entry.
+      RC_TRACE(0x08000000, ("flush: %s(%s): cached entry @%d",
+        _array[i].method()->name()->as_C_string(),
+        _array[i].method()->signature()->as_C_string(), i));
+
       _array[i].flush();
     }
 }
@@ -577,6 +581,15 @@
   // Entry is not in hashtable.
   // Compute entry and return it
 
+  if (method->should_not_be_cached()) {
+    // It is either not safe or not a good idea to cache this methodOop
+    // at this time. We give the caller of lookup() a copy of the
+    // interesting info via parameter entry_for, but we don't add it to
+    // the cache. See the gory details in methodOop.cpp.
+    compute_one_oop_map(method, bci, entry_for);
+    return;
+  }
+
   // First search for an empty slot
   for(i = 0; i < _probe_depth; i++) {
     entry  = entry_at(probe + i);
@@ -584,12 +597,6 @@
       entry->fill(method, bci);
       entry_for->resource_copy(entry);
       assert(!entry_for->is_empty(), "A non-empty oop map should be returned");
-      if (method->is_old()) {
-        // The caller of lookup() will receive a copy of the interesting
-        // info via entry_for, but we don't keep an old redefined method in
-        // the cache to avoid pinning down the method.
-        entry->flush();
-      }
       return;
     }
   }
@@ -623,13 +630,6 @@
   }
   assert(!entry_for->is_empty(), "A non-empty oop map should be returned");
 
-  if (method->is_old()) {
-    // The caller of lookup() will receive a copy of the interesting
-    // info via entry_for, but we don't keep an old redefined method in
-    // the cache to avoid pinning down the method.
-    entry->flush();
-  }
-
   return;
 }
 
--- a/hotspot/src/share/vm/memory/allocationStats.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- */
-
-# include "incls/_precompiled.incl"
-# include "incls/_allocationStats.cpp.incl"
-
-// Technically this should be derived from machine speed, and
-// ideally it would be dynamically adjusted.
-float AllocationStats::_threshold = ((float)CMS_SweepTimerThresholdMillis)/1000;
--- a/hotspot/src/share/vm/memory/allocationStats.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
- * Copyright 2001-2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- */
-
-class AllocationStats VALUE_OBJ_CLASS_SPEC {
-  // A duration threshold (in ms) used to filter
-  // possibly unreliable samples.
-  static float _threshold;
-
-  // We measure the demand between the end of the previous sweep and
-  // beginning of this sweep:
-  //   Count(end_last_sweep) - Count(start_this_sweep)
-  //     + splitBirths(between) - splitDeaths(between)
-  // The above number divided by the time since the start [END???] of the
-  // previous sweep gives us a time rate of demand for blocks
-  // of this size. We compute a padded average of this rate as
-  // our current estimate for the time rate of demand for blocks
-  // of this size. Similarly, we keep a padded average for the time
-  // between sweeps. Our current estimate for demand for blocks of
-  // this size is then simply computed as the product of these two
-  // estimates.
-  AdaptivePaddedAverage _demand_rate_estimate;
-
-  ssize_t     _desired;          // Estimate computed as described above
-  ssize_t     _coalDesired;     // desired +/- small-percent for tuning coalescing
-
-  ssize_t     _surplus;         // count - (desired +/- small-percent),
-                                // used to tune splitting in best fit
-  ssize_t     _bfrSurp;         // surplus at start of current sweep
-  ssize_t     _prevSweep;       // count from end of previous sweep
-  ssize_t     _beforeSweep;     // count from before current sweep
-  ssize_t     _coalBirths;      // additional chunks from coalescing
-  ssize_t     _coalDeaths;      // loss from coalescing
-  ssize_t     _splitBirths;     // additional chunks from splitting
-  ssize_t     _splitDeaths;     // loss from splitting
-  size_t     _returnedBytes;    // number of bytes returned to list.
- public:
-  void initialize() {
-    AdaptivePaddedAverage* dummy =
-      new (&_demand_rate_estimate) AdaptivePaddedAverage(CMS_FLSWeight,
-                                                         CMS_FLSPadding);
-    _desired = 0;
-    _coalDesired = 0;
-    _surplus = 0;
-    _bfrSurp = 0;
-    _prevSweep = 0;
-    _beforeSweep = 0;
-    _coalBirths = 0;
-    _coalDeaths = 0;
-    _splitBirths = 0;
-    _splitDeaths = 0;
-    _returnedBytes = 0;
-  }
-
-  AllocationStats() {
-    initialize();
-  }
-  // The rate estimate is in blocks per second.
-  void compute_desired(size_t count,
-                       float inter_sweep_current,
-                       float inter_sweep_estimate) {
-    // If the latest inter-sweep time is below our granularity
-    // of measurement, we may call in here with
-    // inter_sweep_current == 0. However, even for suitably small
-    // but non-zero inter-sweep durations, we may not trust the accuracy
-    // of accumulated data, since it has not been "integrated"
-    // (read "low-pass-filtered") long enough, and would be
-    // vulnerable to noisy glitches. In such cases, we
-    // ignore the current sample and use currently available
-    // historical estimates.
-    if (inter_sweep_current > _threshold) {
-      ssize_t demand = prevSweep() - count + splitBirths() - splitDeaths();
-      float rate = ((float)demand)/inter_sweep_current;
-      _demand_rate_estimate.sample(rate);
-      _desired = (ssize_t)(_demand_rate_estimate.padded_average()
-                           *inter_sweep_estimate);
-    }
-  }
-
-  ssize_t desired() const { return _desired; }
-  ssize_t coalDesired() const { return _coalDesired; }
-  void set_coalDesired(ssize_t v) { _coalDesired = v; }
-
-  ssize_t surplus() const { return _surplus; }
-  void set_surplus(ssize_t v) { _surplus = v; }
-  void increment_surplus() { _surplus++; }
-  void decrement_surplus() { _surplus--; }
-
-  ssize_t bfrSurp() const { return _bfrSurp; }
-  void set_bfrSurp(ssize_t v) { _bfrSurp = v; }
-  ssize_t prevSweep() const { return _prevSweep; }
-  void set_prevSweep(ssize_t v) { _prevSweep = v; }
-  ssize_t beforeSweep() const { return _beforeSweep; }
-  void set_beforeSweep(ssize_t v) { _beforeSweep = v; }
-
-  ssize_t coalBirths() const { return _coalBirths; }
-  void set_coalBirths(ssize_t v) { _coalBirths = v; }
-  void increment_coalBirths() { _coalBirths++; }
-
-  ssize_t coalDeaths() const { return _coalDeaths; }
-  void set_coalDeaths(ssize_t v) { _coalDeaths = v; }
-  void increment_coalDeaths() { _coalDeaths++; }
-
-  ssize_t splitBirths() const { return _splitBirths; }
-  void set_splitBirths(ssize_t v) { _splitBirths = v; }
-  void increment_splitBirths() { _splitBirths++; }
-
-  ssize_t splitDeaths() const { return _splitDeaths; }
-  void set_splitDeaths(ssize_t v) { _splitDeaths = v; }
-  void increment_splitDeaths() { _splitDeaths++; }
-
-  NOT_PRODUCT(
-    size_t returnedBytes() const { return _returnedBytes; }
-    void set_returnedBytes(size_t v) { _returnedBytes = v; }
-  )
-};
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp	Sun May 04 07:05:42 2008 -0700
@@ -51,7 +51,7 @@
   _whole_heap(whole_heap),
   _guard_index(cards_required(whole_heap.word_size()) - 1),
   _last_valid_index(_guard_index - 1),
-  _page_size(os::page_size_for_region(_guard_index + 1, _guard_index + 1, 1)),
+  _page_size(os::vm_page_size()),
   _byte_map_size(compute_byte_map_size())
 {
   _kind = BarrierSet::CardTableModRef;
@@ -196,8 +196,8 @@
   assert(_whole_heap.contains(new_region),
            "attempt to cover area not in reserved area");
   debug_only(verify_guard();)
-  int ind = find_covering_region_by_base(new_region.start());
-  MemRegion old_region = _covered[ind];
+  int const ind = find_covering_region_by_base(new_region.start());
+  MemRegion const old_region = _covered[ind];
   assert(old_region.start() == new_region.start(), "just checking");
   if (new_region.word_size() != old_region.word_size()) {
     // Commit new or uncommit old pages, if necessary.
@@ -205,21 +205,21 @@
     // Extend the end of this _commited region
     // to cover the end of any lower _committed regions.
     // This forms overlapping regions, but never interior regions.
-    HeapWord* max_prev_end = largest_prev_committed_end(ind);
+    HeapWord* const max_prev_end = largest_prev_committed_end(ind);
     if (max_prev_end > cur_committed.end()) {
       cur_committed.set_end(max_prev_end);
     }
     // Align the end up to a page size (starts are already aligned).
-    jbyte* new_end = byte_after(new_region.last());
-    HeapWord* new_end_aligned =
-      (HeapWord*)align_size_up((uintptr_t)new_end, _page_size);
+    jbyte* const new_end = byte_after(new_region.last());
+    HeapWord* const new_end_aligned =
+      (HeapWord*) align_size_up((uintptr_t)new_end, _page_size);
     assert(new_end_aligned >= (HeapWord*) new_end,
            "align up, but less");
     // The guard page is always committed and should not be committed over.
-    HeapWord* new_end_for_commit = MIN2(new_end_aligned, _guard_region.start());
+    HeapWord* const new_end_for_commit = MIN2(new_end_aligned, _guard_region.start());
     if (new_end_for_commit > cur_committed.end()) {
       // Must commit new pages.
-      MemRegion new_committed =
+      MemRegion const new_committed =
         MemRegion(cur_committed.end(), new_end_for_commit);
 
       assert(!new_committed.is_empty(), "Region should not be empty here");
@@ -233,7 +233,7 @@
     // the cur_committed region may include the guard region.
     } else if (new_end_aligned < cur_committed.end()) {
       // Must uncommit pages.
-      MemRegion uncommit_region =
+      MemRegion const uncommit_region =
         committed_unique_to_self(ind, MemRegion(new_end_aligned,
                                                 cur_committed.end()));
       if (!uncommit_region.is_empty()) {
@@ -257,7 +257,7 @@
     }
     assert(index_for(new_region.last()) < (int) _guard_index,
       "The guard card will be overwritten");
-    jbyte* end = byte_after(new_region.last());
+    jbyte* const end = byte_after(new_region.last());
     // do nothing if we resized downward.
     if (entry < end) {
       memset(entry, clean_card, pointer_delta(end, entry, sizeof(jbyte)));
--- a/hotspot/src/share/vm/memory/cardTableRS.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/cardTableRS.cpp	Sun May 04 07:05:42 2008 -0700
@@ -556,10 +556,16 @@
 }
 
 
-void CardTableRS::verify_empty(MemRegion mr) {
+void CardTableRS::verify_aligned_region_empty(MemRegion mr) {
   if (!mr.is_empty()) {
     jbyte* cur_entry = byte_for(mr.start());
     jbyte* limit = byte_after(mr.last());
+    // The region mr may not start on a card boundary so
+    // the first card may reflect a write to the space
+    // just prior to mr.
+    if (!is_aligned(mr.start())) {
+      cur_entry++;
+    }
     for (;cur_entry < limit; cur_entry++) {
       guarantee(*cur_entry == CardTableModRefBS::clean_card,
                 "Unexpected dirty card found");
--- a/hotspot/src/share/vm/memory/cardTableRS.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/cardTableRS.hpp	Sun May 04 07:05:42 2008 -0700
@@ -126,7 +126,7 @@
   }
 
   void verify();
-  void verify_empty(MemRegion mr);
+  void verify_aligned_region_empty(MemRegion mr);
 
   void clear(MemRegion mr) { _ct_bs.clear(mr); }
   void clear_into_younger(Generation* gen, bool clear_perm);
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp	Sun May 04 07:05:42 2008 -0700
@@ -57,45 +57,51 @@
   // User inputs from -mx and ms are aligned
   _initial_heap_byte_size = align_size_up(Arguments::initial_heap_size(),
                                           min_alignment());
-  _min_heap_byte_size = align_size_up(Arguments::min_heap_size(),
-                                          min_alignment());
-  _max_heap_byte_size = align_size_up(MaxHeapSize, max_alignment());
+  set_min_heap_byte_size(align_size_up(Arguments::min_heap_size(),
+                                          min_alignment()));
+  set_max_heap_byte_size(align_size_up(MaxHeapSize, max_alignment()));
 
   // Check validity of heap parameters from launcher
-  if (_initial_heap_byte_size == 0) {
-    _initial_heap_byte_size = NewSize + OldSize;
+  if (initial_heap_byte_size() == 0) {
+    set_initial_heap_byte_size(NewSize + OldSize);
   } else {
-    Universe::check_alignment(_initial_heap_byte_size, min_alignment(),
+    Universe::check_alignment(initial_heap_byte_size(), min_alignment(),
                             "initial heap");
   }
-  if (_min_heap_byte_size == 0) {
-    _min_heap_byte_size = NewSize + OldSize;
+  if (min_heap_byte_size() == 0) {
+    set_min_heap_byte_size(NewSize + OldSize);
   } else {
-    Universe::check_alignment(_min_heap_byte_size, min_alignment(),
+    Universe::check_alignment(min_heap_byte_size(), min_alignment(),
                             "initial heap");
   }
 
   // Check heap parameter properties
-  if (_initial_heap_byte_size < M) {
+  if (initial_heap_byte_size() < M) {
     vm_exit_during_initialization("Too small initial heap");
   }
   // Check heap parameter properties
-  if (_min_heap_byte_size < M) {
+  if (min_heap_byte_size() < M) {
     vm_exit_during_initialization("Too small minimum heap");
   }
-  if (_initial_heap_byte_size <= NewSize) {
+  if (initial_heap_byte_size() <= NewSize) {
      // make sure there is at least some room in old space
     vm_exit_during_initialization("Too small initial heap for new size specified");
   }
-  if (_max_heap_byte_size < _min_heap_byte_size) {
+  if (max_heap_byte_size() < min_heap_byte_size()) {
     vm_exit_during_initialization("Incompatible minimum and maximum heap sizes specified");
   }
-  if (_initial_heap_byte_size < _min_heap_byte_size) {
+  if (initial_heap_byte_size() < min_heap_byte_size()) {
     vm_exit_during_initialization("Incompatible minimum and initial heap sizes specified");
   }
-  if (_max_heap_byte_size < _initial_heap_byte_size) {
+  if (max_heap_byte_size() < initial_heap_byte_size()) {
     vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified");
   }
+
+  if (PrintGCDetails && Verbose) {
+    gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT "  Initial heap "
+      SIZE_FORMAT "  Maximum heap " SIZE_FORMAT,
+      min_heap_byte_size(), initial_heap_byte_size(), max_heap_byte_size());
+  }
 }
 
 void CollectorPolicy::initialize_perm_generation(PermGen::Name pgnm) {
@@ -128,10 +134,26 @@
 
 // GenCollectorPolicy methods.
 
+size_t GenCollectorPolicy::scale_by_NewRatio_aligned(size_t base_size) {
+  size_t x = base_size / (NewRatio+1);
+  size_t new_gen_size = x > min_alignment() ?
+                     align_size_down(x, min_alignment()) :
+                     min_alignment();
+  return new_gen_size;
+}
+
+size_t GenCollectorPolicy::bound_minus_alignment(size_t desired_size,
+                                                 size_t maximum_size) {
+  size_t alignment = min_alignment();
+  size_t max_minus = maximum_size - alignment;
+  return desired_size < max_minus ? desired_size : max_minus;
+}
+
+
 void GenCollectorPolicy::initialize_size_policy(size_t init_eden_size,
                                                 size_t init_promo_size,
                                                 size_t init_survivor_size) {
-  double max_gc_minor_pause_sec = ((double) MaxGCMinorPauseMillis)/1000.0;
+  const double max_gc_minor_pause_sec = ((double) MaxGCMinorPauseMillis)/1000.0;
   _size_policy = new AdaptiveSizePolicy(init_eden_size,
                                         init_promo_size,
                                         init_survivor_size,
@@ -210,74 +232,260 @@
   assert(MaxHeapSize % max_alignment() == 0, "maximum heap alignment");
 }
 
+// Values set on the command line win over any ergonomically
+// set command line parameters.
+// Ergonomic choice of parameters are done before this
+// method is called.  Values for command line parameters such as NewSize
+// and MaxNewSize feed those ergonomic choices into this method.
+// This method makes the final generation sizings consistent with
+// themselves and with overall heap sizings.
+// In the absence of explicitly set command line flags, policies
+// such as the use of NewRatio are used to size the generation.
 void GenCollectorPolicy::initialize_size_info() {
   CollectorPolicy::initialize_size_info();
 
-  // Minimum sizes of the generations may be different than
-  // the initial sizes.
-  if (!FLAG_IS_DEFAULT(NewSize)) {
-    _min_gen0_size = NewSize;
+  // min_alignment() is used for alignment within a generation.
+  // There is additional alignment done down stream for some
+  // collectors that sometimes causes unwanted rounding up of
+  // generations sizes.
+
+  // Determine maximum size of gen0
+
+  size_t max_new_size = 0;
+  if (FLAG_IS_CMDLINE(MaxNewSize)) {
+    if (MaxNewSize < min_alignment()) {
+      max_new_size = min_alignment();
+    } else if (MaxNewSize >= max_heap_byte_size()) {
+      max_new_size = align_size_down(max_heap_byte_size() - min_alignment(),
+                                     min_alignment());
+      warning("MaxNewSize (" SIZE_FORMAT "k) is equal to or "
+        "greater than the entire heap (" SIZE_FORMAT "k).  A "
+        "new generation size of " SIZE_FORMAT "k will be used.",
+        MaxNewSize/K, max_heap_byte_size()/K, max_new_size/K);
+    } else {
+      max_new_size = align_size_down(MaxNewSize, min_alignment());
+    }
+
+  // The case for FLAG_IS_ERGO(MaxNewSize) could be treated
+  // specially at this point to just use an ergonomically set
+  // MaxNewSize to set max_new_size.  For cases with small
+  // heaps such a policy often did not work because the MaxNewSize
+  // was larger than the entire heap.  The interpretation given
+  // to ergonomically set flags is that the flags are set
+  // by different collectors for their own special needs but
+  // are not allowed to badly shape the heap.  This allows the
+  // different collectors to decide what's best for themselves
+  // without having to factor in the overall heap shape.  It
+  // can be the case in the future that the collectors would
+  // only make "wise" ergonomics choices and this policy could
+  // just accept those choices.  The choices currently made are
+  // not always "wise".
   } else {
-    _min_gen0_size = align_size_down(_min_heap_byte_size / (NewRatio+1),
-                                     min_alignment());
-    // We bound the minimum size by NewSize below (since it historically
+    max_new_size = scale_by_NewRatio_aligned(max_heap_byte_size());
+    // Bound the maximum size by NewSize below (since it historically
     // would have been NewSize and because the NewRatio calculation could
     // yield a size that is too small) and bound it by MaxNewSize above.
-    // This is not always best.  The NewSize calculated by CMS (which has
-    // a fixed minimum of 16m) can sometimes be "too" large.  Consider
-    // the case where -Xmx32m.  The CMS calculated NewSize would be about
-    // half the entire heap which seems too large.  But the counter
-    // example is seen when the client defaults for NewRatio are used.
-    // An initial young generation size of 640k was observed
-    // with -Xmx128m -XX:MaxNewSize=32m when NewSize was not used
-    // as a lower bound as with
-    // _min_gen0_size = MIN2(_min_gen0_size, MaxNewSize);
-    // and 640k seemed too small a young generation.
-    _min_gen0_size = MIN2(MAX2(_min_gen0_size, NewSize), MaxNewSize);
+    // Ergonomics plays here by previously calculating the desired
+    // NewSize and MaxNewSize.
+    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
+  }
+  assert(max_new_size > 0, "All paths should set max_new_size");
+
+  // Given the maximum gen0 size, determine the initial and
+  // minimum sizes.
+
+  if (max_heap_byte_size() == min_heap_byte_size()) {
+    // The maximum and minimum heap sizes are the same so
+    // the generations minimum and initial must be the
+    // same as its maximum.
+    set_min_gen0_size(max_new_size);
+    set_initial_gen0_size(max_new_size);
+    set_max_gen0_size(max_new_size);
+  } else {
+    size_t desired_new_size = 0;
+    if (!FLAG_IS_DEFAULT(NewSize)) {
+      // If NewSize is set ergonomically (for example by cms), it
+      // would make sense to use it.  If it is used, also use it
+      // to set the initial size.  Although there is no reason
+      // the minimum size and the initial size have to be the same,
+      // the current implementation gets into trouble during the calculation
+      // of the tenured generation sizes if they are different.
+      // Note that this makes the initial size and the minimum size
+      // generally small compared to the NewRatio calculation.
+      _min_gen0_size = NewSize;
+      desired_new_size = NewSize;
+      max_new_size = MAX2(max_new_size, NewSize);
+    } else {
+      // For the case where NewSize is the default, use NewRatio
+      // to size the minimum and initial generation sizes.
+      // Use the default NewSize as the floor for these values.  If
+      // NewRatio is overly large, the resulting sizes can be too
+      // small.
+      _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()),
+                          NewSize);
+      desired_new_size =
+        MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()),
+             NewSize);
+    }
+
+    assert(_min_gen0_size > 0, "Sanity check");
+    set_initial_gen0_size(desired_new_size);
+    set_max_gen0_size(max_new_size);
+
+    // At this point the desirable initial and minimum sizes have been
+    // determined without regard to the maximum sizes.
+
+    // Bound the sizes by the corresponding overall heap sizes.
+    set_min_gen0_size(
+      bound_minus_alignment(_min_gen0_size, min_heap_byte_size()));
+    set_initial_gen0_size(
+      bound_minus_alignment(_initial_gen0_size, initial_heap_byte_size()));
+    set_max_gen0_size(
+      bound_minus_alignment(_max_gen0_size, max_heap_byte_size()));
+
+    // At this point all three sizes have been checked against the
+    // maximum sizes but have not been checked for consistency
+    // amoung the three.
+
+    // Final check min <= initial <= max
+    set_min_gen0_size(MIN2(_min_gen0_size, _max_gen0_size));
+    set_initial_gen0_size(
+      MAX2(MIN2(_initial_gen0_size, _max_gen0_size), _min_gen0_size));
+    set_min_gen0_size(MIN2(_min_gen0_size, _initial_gen0_size));
   }
 
-  // Parameters are valid, compute area sizes.
-  size_t max_new_size = align_size_down(_max_heap_byte_size / (NewRatio+1),
-                                        min_alignment());
-  max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), MaxNewSize);
+  if (PrintGCDetails && Verbose) {
+    gclog_or_tty->print_cr("Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
+      SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
+      min_gen0_size(), initial_gen0_size(), max_gen0_size());
+  }
+}
 
-  // desired_new_size is used to set the initial size.  The
-  // initial size must be greater than the minimum size.
-  size_t desired_new_size =
-    align_size_down(_initial_heap_byte_size / (NewRatio+1),
-                  min_alignment());
+// Call this method during the sizing of the gen1 to make
+// adjustments to gen0 because of gen1 sizing policy.  gen0 initially has
+// the most freedom in sizing because it is done before the
+// policy for gen1 is applied.  Once gen1 policies have been applied,
+// there may be conflicts in the shape of the heap and this method
+// is used to make the needed adjustments.  The application of the
+// policies could be more sophisticated (iterative for example) but
+// keeping it simple also seems a worthwhile goal.
+bool TwoGenerationCollectorPolicy::adjust_gen0_sizes(size_t* gen0_size_ptr,
+                                                     size_t* gen1_size_ptr,
+                                                     size_t heap_size,
+                                                     size_t min_gen0_size) {
+  bool result = false;
+  if ((*gen1_size_ptr + *gen0_size_ptr) > heap_size) {
+    if (((*gen0_size_ptr + OldSize) > heap_size) &&
+       (heap_size - min_gen0_size) >= min_alignment()) {
+      // Adjust gen0 down to accomodate OldSize
+      *gen0_size_ptr = heap_size - min_gen0_size;
+      *gen0_size_ptr =
+        MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()),
+             min_alignment());
+      assert(*gen0_size_ptr > 0, "Min gen0 is too large");
+      result = true;
+    } else {
+      *gen1_size_ptr = heap_size - *gen0_size_ptr;
+      *gen1_size_ptr =
+        MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()),
+                       min_alignment());
+    }
+  }
+  return result;
+}
 
-  size_t new_size = MIN2(MAX2(desired_new_size, _min_gen0_size), max_new_size);
-
-  _initial_gen0_size = new_size;
-  _max_gen0_size = max_new_size;
-}
+// Minimum sizes of the generations may be different than
+// the initial sizes.  An inconsistently is permitted here
+// in the total size that can be specified explicitly by
+// command line specification of OldSize and NewSize and
+// also a command line specification of -Xms.  Issue a warning
+// but allow the values to pass.
 
 void TwoGenerationCollectorPolicy::initialize_size_info() {
   GenCollectorPolicy::initialize_size_info();
 
-  // Minimum sizes of the generations may be different than
-  // the initial sizes.  An inconsistently is permitted here
-  // in the total size that can be specified explicitly by
-  // command line specification of OldSize and NewSize and
-  // also a command line specification of -Xms.  Issue a warning
-  // but allow the values to pass.
-  if (!FLAG_IS_DEFAULT(OldSize)) {
-    _min_gen1_size = OldSize;
+  // At this point the minimum, initial and maximum sizes
+  // of the overall heap and of gen0 have been determined.
+  // The maximum gen1 size can be determined from the maximum gen0
+  // and maximum heap size since not explicit flags exits
+  // for setting the gen1 maximum.
+  _max_gen1_size = max_heap_byte_size() - _max_gen0_size;
+  _max_gen1_size =
+    MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()),
+         min_alignment());
+  // If no explicit command line flag has been set for the
+  // gen1 size, use what is left for gen1.
+  if (FLAG_IS_DEFAULT(OldSize) || FLAG_IS_ERGO(OldSize)) {
+    // The user has not specified any value or ergonomics
+    // has chosen a value (which may or may not be consistent
+    // with the overall heap size).  In either case make
+    // the minimum, maximum and initial sizes consistent
+    // with the gen0 sizes and the overall heap sizes.
+    assert(min_heap_byte_size() > _min_gen0_size,
+      "gen0 has an unexpected minimum size");
+    set_min_gen1_size(min_heap_byte_size() - min_gen0_size());
+    set_min_gen1_size(
+      MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()),
+           min_alignment()));
+    set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size());
+    set_initial_gen1_size(
+      MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()),
+           min_alignment()));
+
+  } else {
+    // It's been explicitly set on the command line.  Use the
+    // OldSize and then determine the consequences.
+    set_min_gen1_size(OldSize);
+    set_initial_gen1_size(OldSize);
+
+    // If the user has explicitly set an OldSize that is inconsistent
+    // with other command line flags, issue a warning.
     // The generation minimums and the overall heap mimimum should
     // be within one heap alignment.
-    if ((_min_gen1_size + _min_gen0_size + max_alignment()) <
-         _min_heap_byte_size) {
+    if ((_min_gen1_size + _min_gen0_size + min_alignment()) <
+           min_heap_byte_size()) {
       warning("Inconsistency between minimum heap size and minimum "
-        "generation sizes: using min heap = " SIZE_FORMAT,
-        _min_heap_byte_size);
+          "generation sizes: using minimum heap = " SIZE_FORMAT,
+          min_heap_byte_size());
+    }
+    if ((OldSize > _max_gen1_size)) {
+      warning("Inconsistency between maximum heap size and maximum "
+          "generation sizes: using maximum heap = " SIZE_FORMAT
+          " -XX:OldSize flag is being ignored",
+          max_heap_byte_size());
+  }
+    // If there is an inconsistency between the OldSize and the minimum and/or
+    // initial size of gen0, since OldSize was explicitly set, OldSize wins.
+    if (adjust_gen0_sizes(&_min_gen0_size, &_min_gen1_size,
+                          min_heap_byte_size(), OldSize)) {
+      if (PrintGCDetails && Verbose) {
+        gclog_or_tty->print_cr("Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
+              SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
+              min_gen0_size(), initial_gen0_size(), max_gen0_size());
+      }
     }
-  } else {
-    _min_gen1_size = _min_heap_byte_size - _min_gen0_size;
+    // Initial size
+    if (adjust_gen0_sizes(&_initial_gen0_size, &_initial_gen1_size,
+                         initial_heap_byte_size(), OldSize)) {
+      if (PrintGCDetails && Verbose) {
+        gclog_or_tty->print_cr("Minimum gen0 " SIZE_FORMAT "  Initial gen0 "
+          SIZE_FORMAT "  Maximum gen0 " SIZE_FORMAT,
+          min_gen0_size(), initial_gen0_size(), max_gen0_size());
+      }
+    }
   }
+  // Enforce the maximum gen1 size.
+  set_min_gen1_size(MIN2(_min_gen1_size, _max_gen1_size));
 
-  _initial_gen1_size = _initial_heap_byte_size - _initial_gen0_size;
-  _max_gen1_size = _max_heap_byte_size - _max_gen0_size;
+  // Check that min gen1 <= initial gen1 <= max gen1
+  set_initial_gen1_size(MAX2(_initial_gen1_size, _min_gen1_size));
+  set_initial_gen1_size(MIN2(_initial_gen1_size, _max_gen1_size));
+
+  if (PrintGCDetails && Verbose) {
+    gclog_or_tty->print_cr("Minimum gen1 " SIZE_FORMAT "  Initial gen1 "
+      SIZE_FORMAT "  Maximum gen1 " SIZE_FORMAT,
+      min_gen1_size(), initial_gen1_size(), max_gen1_size());
+  }
 }
 
 HeapWord* GenCollectorPolicy::mem_allocate_work(size_t size,
--- a/hotspot/src/share/vm/memory/collectorPolicy.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/collectorPolicy.hpp	Sun May 04 07:05:42 2008 -0700
@@ -82,8 +82,11 @@
   size_t max_alignment()                       { return _max_alignment; }
 
   size_t initial_heap_byte_size() { return _initial_heap_byte_size; }
+  void set_initial_heap_byte_size(size_t v) { _initial_heap_byte_size = v; }
   size_t max_heap_byte_size()     { return _max_heap_byte_size; }
+  void set_max_heap_byte_size(size_t v) { _max_heap_byte_size = v; }
   size_t min_heap_byte_size()     { return _min_heap_byte_size; }
+  void set_min_heap_byte_size(size_t v) { _min_heap_byte_size = v; }
 
   enum Name {
     CollectorPolicyKind,
@@ -182,8 +185,24 @@
   // compute max heap alignment
   size_t compute_max_alignment();
 
+ // Scale the base_size by NewRation according to
+ //     result = base_size / (NewRatio + 1)
+ // and align by min_alignment()
+ size_t scale_by_NewRatio_aligned(size_t base_size);
+
+ // Bound the value by the given maximum minus the
+ // min_alignment.
+ size_t bound_minus_alignment(size_t desired_size, size_t maximum_size);
 
  public:
+  // Accessors
+  size_t min_gen0_size() { return _min_gen0_size; }
+  void set_min_gen0_size(size_t v) { _min_gen0_size = v; }
+  size_t initial_gen0_size() { return _initial_gen0_size; }
+  void set_initial_gen0_size(size_t v) { _initial_gen0_size = v; }
+  size_t max_gen0_size() { return _max_gen0_size; }
+  void set_max_gen0_size(size_t v) { _max_gen0_size = v; }
+
   virtual int number_of_generations() = 0;
 
   virtual GenerationSpec **generations()       {
@@ -236,6 +255,14 @@
   void initialize_generations()                { ShouldNotReachHere(); }
 
  public:
+  // Accessors
+  size_t min_gen1_size() { return _min_gen1_size; }
+  void set_min_gen1_size(size_t v) { _min_gen1_size = v; }
+  size_t initial_gen1_size() { return _initial_gen1_size; }
+  void set_initial_gen1_size(size_t v) { _initial_gen1_size = v; }
+  size_t max_gen1_size() { return _max_gen1_size; }
+  void set_max_gen1_size(size_t v) { _max_gen1_size = v; }
+
   // Inherited methods
   TwoGenerationCollectorPolicy* as_two_generation_policy() { return this; }
 
@@ -246,6 +273,10 @@
   virtual CollectorPolicy::Name kind() {
     return CollectorPolicy::TwoGenerationCollectorPolicyKind;
   }
+
+  // Returns true is gen0 sizes were adjusted
+  bool adjust_gen0_sizes(size_t* gen0_size_ptr, size_t* gen1_size_ptr,
+                               size_t heap_size, size_t min_gen1_size);
 };
 
 class MarkSweepPolicy : public TwoGenerationCollectorPolicy {
--- a/hotspot/src/share/vm/memory/compactingPermGenGen.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/compactingPermGenGen.cpp	Sun May 04 07:05:42 2008 -0700
@@ -26,9 +26,27 @@
 #include "incls/_compactingPermGenGen.cpp.incl"
 
 
-// Recursively adjust all pointers in an object and all objects by
-// referenced it.  Clear marks on objects in order to prevent visiting
-// any object twice.
+// An ObjectClosure helper: Recursively adjust all pointers in an object
+// and all objects by referenced it. Clear marks on objects in order to
+// prevent visiting any object twice. This helper is used when the
+// RedefineClasses() API has been called.
+
+class AdjustSharedObjectClosure : public ObjectClosure {
+public:
+  void do_object(oop obj) {
+    if (obj->is_shared_readwrite()) {
+      if (obj->mark()->is_marked()) {
+        obj->init_mark();         // Don't revisit this object.
+        obj->adjust_pointers();   // Adjust this object's references.
+      }
+    }
+  }
+};
+
+
+// An OopClosure helper: Recursively adjust all pointers in an object
+// and all objects by referenced it. Clear marks on objects in order
+// to prevent visiting any object twice.
 
 class RecursiveAdjustSharedObjectClosure : public OopClosure {
 public:
@@ -274,15 +292,34 @@
 // objects in the space will page in more objects than we need.
 // Instead, use the system dictionary as strong roots into the read
 // write space.
+//
+// If a RedefineClasses() call has been made, then we have to iterate
+// over the entire shared read-write space in order to find all the
+// objects that need to be forwarded. For example, it is possible for
+// an nmethod to be found and marked in GC phase-1 only for the nmethod
+// to be freed by the time we reach GC phase-3. The underlying method
+// is still marked, but we can't (easily) find it in GC phase-3 so we
+// blow up in GC phase-4. With RedefineClasses() we want replaced code
+// (EMCP or obsolete) to go away (i.e., be collectible) once it is no
+// longer being executed by any thread so we keep minimal attachments
+// to the replaced code. However, we can't guarantee when those EMCP
+// or obsolete methods will be collected so they may still be out there
+// even after we've severed our minimal attachments.
 
 void CompactingPermGenGen::pre_adjust_pointers() {
   if (spec()->enable_shared_spaces()) {
-    RecursiveAdjustSharedObjectClosure blk;
-    Universe::oops_do(&blk);
-    StringTable::oops_do(&blk);
-    SystemDictionary::always_strong_classes_do(&blk);
-    TraversePlaceholdersClosure tpc;
-    SystemDictionary::placeholders_do(&tpc);
+    if (JvmtiExport::has_redefined_a_class()) {
+      // RedefineClasses() requires a brute force approach
+      AdjustSharedObjectClosure blk;
+      rw_space()->object_iterate(&blk);
+    } else {
+      RecursiveAdjustSharedObjectClosure blk;
+      Universe::oops_do(&blk);
+      StringTable::oops_do(&blk);
+      SystemDictionary::always_strong_classes_do(&blk);
+      TraversePlaceholdersClosure tpc;
+      SystemDictionary::placeholders_do(&tpc);
+    }
   }
 }
 
--- a/hotspot/src/share/vm/memory/genRemSet.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/genRemSet.hpp	Sun May 04 07:05:42 2008 -0700
@@ -91,8 +91,15 @@
   virtual void verify() = 0;
 
   // Verify that the remembered set has no entries for
-  // the heap interval denoted by mr.
-  virtual void verify_empty(MemRegion mr) = 0;
+  // the heap interval denoted by mr.  If there are any
+  // alignment constraints on the remembered set, only the
+  // part of the region that is aligned is checked.
+  //
+  //   alignment boundaries
+  //   +--------+-------+--------+-------+
+  //         [ region mr              )
+  //            [ part checked   )
+  virtual void verify_aligned_region_empty(MemRegion mr) = 0;
 
   // If appropriate, print some information about the remset on "tty".
   virtual void print() {}
--- a/hotspot/src/share/vm/memory/heap.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/heap.cpp	Sun May 04 07:05:42 2008 -0700
@@ -102,8 +102,9 @@
   _log2_segment_size = exact_log2(segment_size);
 
   // Reserve and initialize space for _memory.
-  const size_t page_size = os::page_size_for_region(committed_size,
-                                                    reserved_size, 8);
+  const size_t page_size = os::can_execute_large_page_memory() ?
+          os::page_size_for_region(committed_size, reserved_size, 8) :
+          os::vm_page_size();
   const size_t granularity = os::vm_allocation_granularity();
   const size_t r_align = MAX2(page_size, granularity);
   const size_t r_size = align_size_up(reserved_size, r_align);
@@ -111,7 +112,7 @@
 
   const size_t rs_align = page_size == (size_t) os::vm_page_size() ? 0 :
     MAX2(page_size, granularity);
-  ReservedSpace rs(r_size, rs_align, false);
+  ReservedSpace rs(r_size, rs_align, rs_align > 0);
   os::trace_page_sizes("code heap", committed_size, reserved_size, page_size,
                        rs.base(), rs.size());
   if (!_memory.initialize(rs, c_size)) {
--- a/hotspot/src/share/vm/memory/heapInspection.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/heapInspection.cpp	Sun May 04 07:05:42 2008 -0700
@@ -65,7 +65,7 @@
       name = "<no name>";
   }
   // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
-  st->print_cr("%13" FORMAT64_MODIFIER "d  %13" FORMAT64_MODIFIER "u  %s",
+  st->print_cr(INT64_FORMAT_W(13) "  " UINT64_FORMAT_W(13) "  %s",
                (jlong)  _instance_count,
                (julong) _instance_words * HeapWordSize,
                name);
@@ -80,7 +80,10 @@
     elt = elt->next();
   }
   elt = new KlassInfoEntry(k, list());
-  set_list(elt);
+  // We may be out of space to allocate the new entry.
+  if (elt != NULL) {
+    set_list(elt);
+  }
   return elt;
 }
 
@@ -103,21 +106,25 @@
 }
 
 KlassInfoTable::KlassInfoTable(int size, HeapWord* ref) {
-  _size = size;
+  _size = 0;
   _ref = ref;
-  _buckets = NEW_C_HEAP_ARRAY(KlassInfoBucket, _size);
-
-  for (int index = 0; index < _size; index++) {
-    _buckets[index].initialize();
+  _buckets = NEW_C_HEAP_ARRAY(KlassInfoBucket, size);
+  if (_buckets != NULL) {
+    _size = size;
+    for (int index = 0; index < _size; index++) {
+      _buckets[index].initialize();
+    }
   }
 }
 
 KlassInfoTable::~KlassInfoTable() {
-  for (int index = 0; index < _size; index++) {
-    _buckets[index].empty();
+  if (_buckets != NULL) {
+    for (int index = 0; index < _size; index++) {
+      _buckets[index].empty();
+    }
+    FREE_C_HEAP_ARRAY(KlassInfoBucket, _buckets);
+    _size = 0;
   }
-  FREE_C_HEAP_ARRAY(KlassInfoBucket, _buckets);
-  _size = 0;
 }
 
 uint KlassInfoTable::hash(klassOop p) {
@@ -127,19 +134,32 @@
 
 KlassInfoEntry* KlassInfoTable::lookup(const klassOop k) {
   uint         idx = hash(k) % _size;
+  assert(_buckets != NULL, "Allocation failure should have been caught");
   KlassInfoEntry*  e   = _buckets[idx].lookup(k);
-  assert(k == e->klass(), "must be equal");
+  // Lookup may fail if this is a new klass for which we
+  // could not allocate space for an new entry.
+  assert(e == NULL || k == e->klass(), "must be equal");
   return e;
 }
 
-void KlassInfoTable::record_instance(const oop obj) {
+// Return false if the entry could not be recorded on account
+// of running out of space required to create a new entry.
+bool KlassInfoTable::record_instance(const oop obj) {
   klassOop      k = obj->klass();
   KlassInfoEntry* elt = lookup(k);
-  elt->set_count(elt->count() + 1);
-  elt->set_words(elt->words() + obj->size());
+  // elt may be NULL if it's a new klass for which we
+  // could not allocate space for a new entry in the hashtable.
+  if (elt != NULL) {
+    elt->set_count(elt->count() + 1);
+    elt->set_words(elt->words() + obj->size());
+    return true;
+  } else {
+    return false;
+  }
 }
 
 void KlassInfoTable::iterate(KlassInfoClosure* cic) {
+  assert(_size == 0 || _buckets != NULL, "Allocation failure should have been caught");
   for (int index = 0; index < _size; index++) {
     _buckets[index].iterate(cic);
   }
@@ -176,7 +196,7 @@
     total += elements()->at(i)->count();
     totalw += elements()->at(i)->words();
   }
-  st->print_cr("Total %13" FORMAT64_MODIFIER "d  %13" FORMAT64_MODIFIER "u",
+  st->print_cr("Total " INT64_FORMAT_W(13) "  " UINT64_FORMAT_W(13),
                total, totalw * HeapWordSize);
 }
 
@@ -199,12 +219,18 @@
 class RecordInstanceClosure : public ObjectClosure {
  private:
   KlassInfoTable* _cit;
+  size_t _missed_count;
  public:
-  RecordInstanceClosure(KlassInfoTable* cit) : _cit(cit) {}
+  RecordInstanceClosure(KlassInfoTable* cit) :
+    _cit(cit), _missed_count(0) {}
 
   void do_object(oop obj) {
-    _cit->record_instance(obj);
+    if (!_cit->record_instance(obj)) {
+      _missed_count++;
+    }
   }
+
+  size_t missed_count() { return _missed_count; }
 };
 
 void HeapInspection::heap_inspection(outputStream* st) {
@@ -230,21 +256,32 @@
       ShouldNotReachHere(); // Unexpected heap kind for this op
   }
   // Collect klass instance info
-
-  // Iterate over objects in the heap
   KlassInfoTable cit(KlassInfoTable::cit_size, ref);
-  RecordInstanceClosure ric(&cit);
-  Universe::heap()->object_iterate(&ric);
+  if (!cit.allocation_failed()) {
+    // Iterate over objects in the heap
+    RecordInstanceClosure ric(&cit);
+    Universe::heap()->object_iterate(&ric);
 
-  // Sort and print klass instance info
-  KlassInfoHisto histo("\n"
-                   " num     #instances         #bytes  class name\n"
-                   "----------------------------------------------",
-                   KlassInfoHisto::histo_initial_size);
-  HistoClosure hc(&histo);
-  cit.iterate(&hc);
-  histo.sort();
-  histo.print_on(st);
+    // Report if certain classes are not counted because of
+    // running out of C-heap for the histogram.
+    size_t missed_count = ric.missed_count();
+    if (missed_count != 0) {
+      st->print_cr("WARNING: Ran out of C-heap; undercounted " SIZE_FORMAT
+                   " total instances in data below",
+                   missed_count);
+    }
+    // Sort and print klass instance info
+    KlassInfoHisto histo("\n"
+                     " num     #instances         #bytes  class name\n"
+                     "----------------------------------------------",
+                     KlassInfoHisto::histo_initial_size);
+    HistoClosure hc(&histo);
+    cit.iterate(&hc);
+    histo.sort();
+    histo.print_on(st);
+  } else {
+    st->print_cr("WARNING: Ran out of C-heap; histogram not generated");
+  }
   st->flush();
 
   if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap) {
--- a/hotspot/src/share/vm/memory/heapInspection.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/heapInspection.hpp	Sun May 04 07:05:42 2008 -0700
@@ -98,8 +98,9 @@
   };
   KlassInfoTable(int size, HeapWord* ref);
   ~KlassInfoTable();
-  void record_instance(const oop obj);
+  bool record_instance(const oop obj);
   void iterate(KlassInfoClosure* cic);
+  bool allocation_failed() { return _buckets == NULL; }
 };
 
 class KlassInfoHisto : public StackObj {
--- a/hotspot/src/share/vm/memory/referenceProcessor.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp	Sun May 04 07:05:42 2008 -0700
@@ -85,7 +85,7 @@
   ReferenceProcessor* rp =
     new ReferenceProcessor(span, atomic_discovery,
                            mt_discovery, mt_degree,
-                           mt_processing);
+                           mt_processing && (parallel_gc_threads > 0));
   if (rp == NULL) {
     vm_exit_during_initialization("Could not allocate ReferenceProcessor object");
   }
--- a/hotspot/src/share/vm/memory/tenuredGeneration.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/memory/tenuredGeneration.cpp	Sun May 04 07:05:42 2008 -0700
@@ -409,10 +409,11 @@
 void TenuredGeneration::verify_alloc_buffers_clean() {
   if (UseParNewGC) {
     for (uint i = 0; i < ParallelGCThreads; i++) {
-      _rs->verify_empty(_alloc_buffers[i]->range());
+      _rs->verify_aligned_region_empty(_alloc_buffers[i]->range());
     }
   }
 }
+
 #else  // SERIALGC
 void TenuredGeneration::retire_alloc_buffers_before_full_gc() {}
 void TenuredGeneration::verify_alloc_buffers_clean() {}
--- a/hotspot/src/share/vm/oops/arrayOop.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/arrayOop.hpp	Sun May 04 07:05:42 2008 -0700
@@ -58,11 +58,11 @@
   // alignments.  It gets the scale from the type2aelembytes array.
   static int32_t max_array_length(BasicType type) {
     assert(type >= 0 && type < T_CONFLICT, "wrong type");
-    assert(type2aelembytes[type] != 0, "wrong type");
+    assert(type2aelembytes(type) != 0, "wrong type");
     // We use max_jint, since object_size is internally represented by an 'int'
     // This gives us an upper bound of max_jint words for the size of the oop.
     int32_t max_words = (max_jint - header_size(type) - 2);
-    int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes[type];
+    int elembytes = (type == T_OBJECT) ? T_OBJECT_aelem_bytes : type2aelembytes(type);
     jlong len = ((jlong)max_words * HeapWordSize) / elembytes;
     return (len > max_jint) ? max_jint : (int32_t)len;
   }
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Sun May 04 07:05:42 2008 -0700
@@ -791,17 +791,39 @@
 }
 
 
+static int compare_fields_by_offset(int* a, int* b) {
+  return a[0] - b[0];
+}
+
 void instanceKlass::do_nonstatic_fields(FieldClosure* cl) {
-  fieldDescriptor fd;
   instanceKlass* super = superklass();
   if (super != NULL) {
     super->do_nonstatic_fields(cl);
   }
+  fieldDescriptor fd;
   int length = fields()->length();
+  // In DebugInfo nonstatic fields are sorted by offset.
+  int* fields_sorted = NEW_C_HEAP_ARRAY(int, 2*(length+1));
+  int j = 0;
   for (int i = 0; i < length; i += next_offset) {
     fd.initialize(as_klassOop(), i);
-    if (!(fd.is_static())) cl->do_field(&fd);
+    if (!fd.is_static()) {
+      fields_sorted[j + 0] = fd.offset();
+      fields_sorted[j + 1] = i;
+      j += 2;
+    }
   }
+  if (j > 0) {
+    length = j;
+    // _sort_Fn is defined in growableArray.hpp.
+    qsort(fields_sorted, length/2, 2*sizeof(int), (_sort_Fn)compare_fields_by_offset);
+    for (int i = 0; i < length; i += 2) {
+      fd.initialize(as_klassOop(), fields_sorted[i + 1]);
+      assert(!fd.is_static() && fd.offset() == fields_sorted[i], "only nonstatic fields");
+      cl->do_field(&fd);
+    }
+  }
+  FREE_C_HEAP_ARRAY(int, fields_sorted);
 }
 
 
@@ -950,7 +972,6 @@
     // These allocations will have to be freed if they are unused.
 
     // Allocate a new array of methods.
-    jmethodID* to_dealloc_jmeths = NULL;
     jmethodID* new_jmeths = NULL;
     if (length <= idnum) {
       // A new array will be needed (unless some other thread beats us to it)
@@ -961,7 +982,6 @@
     }
 
     // Allocate a new method ID.
-    jmethodID to_dealloc_id = NULL;
     jmethodID new_id = NULL;
     if (method_h->is_old() && !method_h->is_obsolete()) {
       // The method passed in is old (but not obsolete), we need to use the current version
@@ -975,40 +995,51 @@
       new_id = JNIHandles::make_jmethod_id(method_h);
     }
 
-    {
+    if (Threads::number_of_threads() == 0 || SafepointSynchronize::is_at_safepoint()) {
+      // No need and unsafe to lock the JmethodIdCreation_lock at safepoint.
+      id = get_jmethod_id(ik_h, idnum, new_id, new_jmeths);
+    } else {
       MutexLocker ml(JmethodIdCreation_lock);
+      id = get_jmethod_id(ik_h, idnum, new_id, new_jmeths);
+    }
+  }
+  return id;
+}
 
-      // We must not go to a safepoint while holding this lock.
-      debug_only(No_Safepoint_Verifier nosafepoints;)
+
+jmethodID instanceKlass::get_jmethod_id(instanceKlassHandle ik_h, size_t idnum,
+                                        jmethodID new_id, jmethodID* new_jmeths) {
+  // Retry lookup after we got the lock or ensured we are at safepoint
+  jmethodID* jmeths = ik_h->methods_jmethod_ids_acquire();
+  jmethodID  id                = NULL;
+  jmethodID  to_dealloc_id     = NULL;
+  jmethodID* to_dealloc_jmeths = NULL;
+  size_t     length;
 
-      // Retry lookup after we got the lock
-      jmeths = ik_h->methods_jmethod_ids_acquire();
-      if (jmeths == NULL || (length = (size_t)jmeths[0]) <= idnum) {
-        if (jmeths != NULL) {
-          // We have grown the array: copy the existing entries, and delete the old array
-          for (size_t index = 0; index < length; index++) {
-            new_jmeths[index+1] = jmeths[index+1];
-          }
-          to_dealloc_jmeths = jmeths; // using the new jmeths, deallocate the old one
-        }
-        ik_h->release_set_methods_jmethod_ids(jmeths = new_jmeths);
-      } else {
-        id = jmeths[idnum+1];
-        to_dealloc_jmeths = new_jmeths; // using the old jmeths, deallocate the new one
+  if (jmeths == NULL || (length = (size_t)jmeths[0]) <= idnum) {
+    if (jmeths != NULL) {
+      // We have grown the array: copy the existing entries, and delete the old array
+      for (size_t index = 0; index < length; index++) {
+        new_jmeths[index+1] = jmeths[index+1];
       }
-      if (id == NULL) {
-        id = new_id;
-        jmeths[idnum+1] = id;  // install the new method ID
-      } else {
-        to_dealloc_id = new_id; // the new id wasn't used, mark it for deallocation
-      }
+      to_dealloc_jmeths = jmeths; // using the new jmeths, deallocate the old one
     }
+    ik_h->release_set_methods_jmethod_ids(jmeths = new_jmeths);
+  } else {
+    id = jmeths[idnum+1];
+    to_dealloc_jmeths = new_jmeths; // using the old jmeths, deallocate the new one
+  }
+  if (id == NULL) {
+    id = new_id;
+    jmeths[idnum+1] = id;  // install the new method ID
+  } else {
+    to_dealloc_id = new_id; // the new id wasn't used, mark it for deallocation
+  }
 
-    // Free up unneeded or no longer needed resources
-    FreeHeap(to_dealloc_jmeths);
-    if (to_dealloc_id != NULL) {
-      JNIHandles::destroy_jmethod_id(to_dealloc_id);
-    }
+  // Free up unneeded or no longer needed resources
+  FreeHeap(to_dealloc_jmeths);
+  if (to_dealloc_id != NULL) {
+    JNIHandles::destroy_jmethod_id(to_dealloc_id);
   }
   return id;
 }
@@ -2165,12 +2196,20 @@
   RC_TRACE(0x00000100, ("adding previous version ref for %s @%d, EMCP_cnt=%d",
     ikh->external_name(), _previous_versions->length(), emcp_method_count));
   constantPoolHandle cp_h(ikh->constants());
-  jweak cp_ref = JNIHandles::make_weak_global(cp_h);
+  jobject cp_ref;
+  if (cp_h->is_shared()) {
+    // a shared ConstantPool requires a regular reference; a weak
+    // reference would be collectible
+    cp_ref = JNIHandles::make_global(cp_h);
+  } else {
+    cp_ref = JNIHandles::make_weak_global(cp_h);
+  }
   PreviousVersionNode * pv_node = NULL;
   objArrayOop old_methods = ikh->methods();
 
   if (emcp_method_count == 0) {
-    pv_node = new PreviousVersionNode(cp_ref, NULL);
+    // non-shared ConstantPool gets a weak reference
+    pv_node = new PreviousVersionNode(cp_ref, !cp_h->is_shared(), NULL);
     RC_TRACE(0x00000400,
       ("add: all methods are obsolete; flushing any EMCP weak refs"));
   } else {
@@ -2190,7 +2229,8 @@
         }
       }
     }
-    pv_node = new PreviousVersionNode(cp_ref, method_refs);
+    // non-shared ConstantPool gets a weak reference
+    pv_node = new PreviousVersionNode(cp_ref, !cp_h->is_shared(), method_refs);
   }
 
   _previous_versions->append(pv_node);
@@ -2208,7 +2248,7 @@
     // check the previous versions array for a GC'ed weak refs
     pv_node = _previous_versions->at(i);
     cp_ref = pv_node->prev_constant_pool();
-    assert(cp_ref != NULL, "weak cp ref was unexpectedly cleared");
+    assert(cp_ref != NULL, "cp ref was unexpectedly cleared");
     if (cp_ref == NULL) {
       delete pv_node;
       _previous_versions->remove_at(i);
@@ -2281,7 +2321,7 @@
           // check the previous versions array for a GC'ed weak refs
           pv_node = _previous_versions->at(j);
           cp_ref = pv_node->prev_constant_pool();
-          assert(cp_ref != NULL, "weak cp ref was unexpectedly cleared");
+          assert(cp_ref != NULL, "cp ref was unexpectedly cleared");
           if (cp_ref == NULL) {
             delete pv_node;
             _previous_versions->remove_at(j);
@@ -2379,8 +2419,8 @@
     // been GC'ed
     PreviousVersionNode * pv_node = _previous_versions->at(i);
 
-    jweak cp_ref = pv_node->prev_constant_pool();
-    assert(cp_ref != NULL, "weak reference was unexpectedly cleared");
+    jobject cp_ref = pv_node->prev_constant_pool();
+    assert(cp_ref != NULL, "cp reference was unexpectedly cleared");
     if (cp_ref == NULL) {
       continue;  // robustness
     }
@@ -2440,10 +2480,11 @@
 
 // Construct a PreviousVersionNode entry for the array hung off
 // the instanceKlass.
-PreviousVersionNode::PreviousVersionNode(jweak prev_constant_pool,
-  GrowableArray<jweak>* prev_EMCP_methods) {
+PreviousVersionNode::PreviousVersionNode(jobject prev_constant_pool,
+  bool prev_cp_is_weak, GrowableArray<jweak>* prev_EMCP_methods) {
 
   _prev_constant_pool = prev_constant_pool;
+  _prev_cp_is_weak = prev_cp_is_weak;
   _prev_EMCP_methods = prev_EMCP_methods;
 }
 
@@ -2451,7 +2492,11 @@
 // Destroy a PreviousVersionNode
 PreviousVersionNode::~PreviousVersionNode() {
   if (_prev_constant_pool != NULL) {
-    JNIHandles::destroy_weak_global(_prev_constant_pool);
+    if (_prev_cp_is_weak) {
+      JNIHandles::destroy_weak_global(_prev_constant_pool);
+    } else {
+      JNIHandles::destroy_global(_prev_constant_pool);
+    }
   }
 
   if (_prev_EMCP_methods != NULL) {
@@ -2471,8 +2516,8 @@
   _prev_constant_pool_handle = constantPoolHandle();  // NULL handle
   _prev_EMCP_method_handles = NULL;
 
-  jweak cp_ref = pv_node->prev_constant_pool();
-  assert(cp_ref != NULL, "weak constant pool ref was unexpectedly cleared");
+  jobject cp_ref = pv_node->prev_constant_pool();
+  assert(cp_ref != NULL, "constant pool ref was unexpectedly cleared");
   if (cp_ref == NULL) {
     return;  // robustness
   }
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Sun May 04 07:05:42 2008 -0700
@@ -432,6 +432,8 @@
                                                         _enclosing_method_method_index = method_index; }
 
   // jmethodID support
+  static jmethodID get_jmethod_id(instanceKlassHandle ik_h, size_t idnum,
+                                  jmethodID new_id, jmethodID* new_jmeths);
   static jmethodID jmethod_id_for_impl(instanceKlassHandle ik_h, methodHandle method_h);
   jmethodID jmethod_id_or_null(methodOop method);
 
@@ -838,11 +840,20 @@
 // A collection point for interesting information about the previous
 // version(s) of an instanceKlass. This class uses weak references to
 // the information so that the information may be collected as needed
-// by the system. A GrowableArray of PreviousVersionNodes is attached
+// by the system. If the information is shared, then a regular
+// reference must be used because a weak reference would be seen as
+// collectible. A GrowableArray of PreviousVersionNodes is attached
 // to the instanceKlass as needed. See PreviousVersionWalker below.
 class PreviousVersionNode : public CHeapObj {
  private:
-  jweak _prev_constant_pool;
+  // A shared ConstantPool is never collected so we'll always have
+  // a reference to it so we can update items in the cache. We'll
+  // have a weak reference to a non-shared ConstantPool until all
+  // of the methods (EMCP or obsolete) have been collected; the
+  // non-shared ConstantPool becomes collectible at that point.
+  jobject _prev_constant_pool;  // regular or weak reference
+  bool    _prev_cp_is_weak;     // true if not a shared ConstantPool
+
   // If the previous version of the instanceKlass doesn't have any
   // EMCP methods, then _prev_EMCP_methods will be NULL. If all the
   // EMCP methods have been collected, then _prev_EMCP_methods can
@@ -850,10 +861,10 @@
   GrowableArray<jweak>* _prev_EMCP_methods;
 
 public:
-  PreviousVersionNode(jweak prev_constant_pool,
+  PreviousVersionNode(jobject prev_constant_pool, bool prev_cp_is_weak,
     GrowableArray<jweak>* prev_EMCP_methods);
   ~PreviousVersionNode();
-  jweak prev_constant_pool() const {
+  jobject prev_constant_pool() const {
     return _prev_constant_pool;
   }
   GrowableArray<jweak>* prev_EMCP_methods() const {
--- a/hotspot/src/share/vm/oops/klass.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/klass.cpp	Sun May 04 07:05:42 2008 -0700
@@ -182,7 +182,7 @@
   assert(etype >= T_BOOLEAN && etype <= T_OBJECT, "valid etype");
   // Note that T_ARRAY is not allowed here.
   int  hsize = arrayOopDesc::base_offset_in_bytes(etype);
-  int  esize = type2aelembytes[etype];
+  int  esize = type2aelembytes(etype);
   bool isobj = (etype == T_OBJECT);
   int  tag   =  isobj ? _lh_array_tag_obj_value : _lh_array_tag_type_value;
   int lh = array_layout_helper(tag, hsize, etype, exact_log2(esize));
--- a/hotspot/src/share/vm/oops/klassVtable.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/klassVtable.cpp	Sun May 04 07:05:42 2008 -0700
@@ -735,7 +735,7 @@
     }
   }
 
-  // This lenght of the itable was either zero, or it has not yet been initialized.
+  // The length of the itable was either zero, or it has not yet been initialized.
   _table_offset      = 0;
   _size_offset_table = 0;
   _size_method_table = 0;
@@ -870,16 +870,19 @@
 
 // Initialization
 void klassItable::initialize_itable(bool checkconstraints, TRAPS) {
-  // Cannot be setup doing bootstrapping
-  if (Universe::is_bootstrapping()) return;
+  // Cannot be setup doing bootstrapping, interfaces don't have
+  // itables, and klass with only ones entry have empty itables
+  if (Universe::is_bootstrapping() ||
+      _klass->is_interface() ||
+      _klass->itable_length() == itableOffsetEntry::size()) return;
 
-  int num_interfaces = nof_interfaces();
+  // There's alway an extra itable entry so we can null-terminate it.
+  guarantee(size_offset_table() >= 1, "too small");
+  int num_interfaces = size_offset_table() - 1;
   if (num_interfaces > 0) {
-    if (TraceItables) tty->print_cr("%3d: Initializing itables for %s", ++initialize_count, _klass->name()->as_C_string());
+    if (TraceItables) tty->print_cr("%3d: Initializing itables for %s", ++initialize_count,
+                                    _klass->name()->as_C_string());
 
-    // In debug mode, we got an extra NULL/NULL entry
-    debug_only(num_interfaces--);
-    assert(num_interfaces > 0, "to few interfaces in offset itable");
 
     // Interate through all interfaces
     int i;
@@ -890,12 +893,10 @@
       initialize_itable_for_interface(ioe->offset(), interf_h, checkconstraints, CHECK);
     }
 
-#ifdef ASSERT
-    // Check that the last entry is empty
-    itableOffsetEntry* ioe = offset_entry(i);
-    assert(ioe->interface_klass() == NULL && ioe->offset() == 0, "terminator entry missing");
-#endif
   }
+  // Check that the last entry is empty
+  itableOffsetEntry* ioe = offset_entry(size_offset_table() - 1);
+  guarantee(ioe->interface_klass() == NULL && ioe->offset() == 0, "terminator entry missing");
 }
 
 
@@ -972,7 +973,7 @@
   }
 }
 
-// Update entry for specic methodOop
+// Update entry for specific methodOop
 void klassItable::initialize_with_method(methodOop m) {
   itableMethodEntry* ime = method_entry(0);
   for(int i = 0; i < _size_method_table; i++) {
@@ -1085,12 +1086,8 @@
   CountInterfacesClosure cic;
   visit_all_interfaces(transitive_interfaces(), &cic);
 
-  // Add one extra entry in debug mode, so we can null-terminate the table
-  int nof_methods    = cic.nof_methods();
-  int nof_interfaces = cic.nof_interfaces();
-  debug_only(if (nof_interfaces > 0) nof_interfaces++);
-
-  int itable_size = calc_itable_size(nof_interfaces, nof_methods);
+  // There's alway an extra itable entry so we can null-terminate it.
+  int itable_size = calc_itable_size(cic.nof_interfaces() + 1, cic.nof_methods());
 
   // Statistics
   update_stats(itable_size * HeapWordSize);
@@ -1110,8 +1107,8 @@
   int nof_methods    = cic.nof_methods();
   int nof_interfaces = cic.nof_interfaces();
 
-  // Add one extra entry in debug mode, so we can null-terminate the table
-  debug_only(if (nof_interfaces > 0) nof_interfaces++);
+  // Add one extra entry so we can null-terminate the table
+  nof_interfaces++;
 
   assert(compute_itable_size(objArrayHandle(klass->transitive_interfaces())) ==
          calc_itable_size(nof_interfaces, nof_methods),
--- a/hotspot/src/share/vm/oops/klassVtable.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/klassVtable.hpp	Sun May 04 07:05:42 2008 -0700
@@ -259,7 +259,7 @@
   itableMethodEntry* method_entry(int i) { assert(0 <= i && i <= _size_method_table, "index out of bounds");
                                            return &((itableMethodEntry*)method_start())[i]; }
 
-  int nof_interfaces()                   { return _size_offset_table; }
+  int size_offset_table()                { return _size_offset_table; }
 
   // Initialization
   void initialize_itable(bool checkconstraints, TRAPS);
--- a/hotspot/src/share/vm/oops/markOop.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/markOop.cpp	Sun May 04 07:05:42 2008 -0700
@@ -37,3 +37,32 @@
     st->print("age %d)", age());
   }
 }
+
+
+// Give advice about whether the oop that contains this markOop
+// should be cached or not.
+bool markOopDesc::should_not_be_cached() const {
+  // the cast is because decode_pointer() isn't marked const
+  if (is_marked() && ((markOopDesc *)this)->decode_pointer() != NULL) {
+    // If the oop containing this markOop is being forwarded, then
+    // we are in the middle of GC and we do not want the containing
+    // oop to be added to a cache. We have no way of knowing whether
+    // the cache has already been visited by the current GC phase so
+    // we don't know whether the forwarded oop will be properly
+    // processed in this phase. If the forwarded oop is not properly
+    // processed, then we'll see strange crashes or asserts during
+    // the next GC run because the markOop will contain an unexpected
+    // value.
+    //
+    // This situation has been seen when we are GC'ing a methodOop
+    // because we use the methodOop while we're GC'ing it. Scary
+    // stuff. Some of the uses the methodOop cause the methodOop to
+    // be added to the OopMapCache in the instanceKlass as a side
+    // effect. This check lets the cache maintainer know when a
+    // cache addition would not be safe.
+    return true;
+  }
+
+  // caching the containing oop should be just fine
+  return false;
+}
--- a/hotspot/src/share/vm/oops/markOop.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/markOop.hpp	Sun May 04 07:05:42 2008 -0700
@@ -357,4 +357,7 @@
 
   // Recover address of oop from encoded form used in mark
   inline void* decode_pointer() { if (UseBiasedLocking && has_bias_pattern()) return NULL; return clear_lock_bits(); }
+
+  // see the definition in markOop.cpp for the gory details
+  bool should_not_be_cached() const;
 };
--- a/hotspot/src/share/vm/oops/methodDataOop.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/methodDataOop.cpp	Sun May 04 07:05:42 2008 -0700
@@ -32,7 +32,7 @@
 
 // Some types of data layouts need a length field.
 bool DataLayout::needs_array_len(u1 tag) {
-  return (tag == multi_branch_data_tag);
+  return (tag == multi_branch_data_tag) || (tag == arg_info_data_tag);
 }
 
 // Perform generic initialization of the data.  More specific
@@ -404,6 +404,17 @@
 }
 #endif
 
+#ifndef PRODUCT
+void ArgInfoData::print_data_on(outputStream* st) {
+  print_shared(st, "ArgInfoData");
+  int nargs = number_of_args();
+  for (int i = 0; i < nargs; i++) {
+    st->print("  0x%x", arg_modified(i));
+  }
+  st->cr();
+}
+
+#endif
 // ==================================================================
 // methodDataOop
 //
@@ -508,6 +519,9 @@
   int extra_data_count = compute_extra_data_count(data_size, empty_bc_count);
   object_size += extra_data_count * DataLayout::compute_size_in_bytes(0);
 
+  // Add a cell to record information about modified arguments.
+  int arg_size = method->size_of_parameters();
+  object_size += DataLayout::compute_size_in_bytes(arg_size+1);
   return object_size;
 }
 
@@ -626,6 +640,8 @@
     return new BranchData(data_layout);
   case DataLayout::multi_branch_data_tag:
     return new MultiBranchData(data_layout);
+  case DataLayout::arg_info_data_tag:
+    return new ArgInfoData(data_layout);
   };
 }
 
@@ -681,7 +697,17 @@
 
   // Add some extra DataLayout cells (at least one) to track stray traps.
   int extra_data_count = compute_extra_data_count(data_size, empty_bc_count);
-  object_size += extra_data_count * DataLayout::compute_size_in_bytes(0);
+  int extra_size = extra_data_count * DataLayout::compute_size_in_bytes(0);
+
+  // Add a cell to record information about modified arguments.
+  // Set up _args_modified array after traps cells so that
+  // the code for traps cells works.
+  DataLayout *dp = data_layout_at(data_size + extra_size);
+
+  int arg_size = method->size_of_parameters();
+  dp->initialize(DataLayout::arg_info_data_tag, 0, arg_size+1);
+
+  object_size += extra_size + DataLayout::compute_size_in_bytes(arg_size+1);
 
   // Set an initial hint. Don't use set_hint_di() because
   // first_di() may be out of bounds if data_size is 0.
@@ -764,6 +790,10 @@
     // No need for "OrderAccess::load_acquire" ops,
     // since the data structure is monotonic.
     if (dp->tag() == DataLayout::no_tag)  break;
+    if (dp->tag() == DataLayout::arg_info_data_tag) {
+      dp = end; // ArgInfoData is at the end of extra data section.
+      break;
+    }
     if (dp->bci() == bci) {
       assert(dp->tag() == DataLayout::bit_data_tag, "sane");
       return new BitData(dp);
@@ -785,6 +815,16 @@
   return NULL;
 }
 
+ArgInfoData *methodDataOopDesc::arg_info() {
+  DataLayout* dp    = extra_data_base();
+  DataLayout* end   = extra_data_limit();
+  for (; dp < end; dp = next_extra(dp)) {
+    if (dp->tag() == DataLayout::arg_info_data_tag)
+      return new ArgInfoData(dp);
+  }
+  return NULL;
+}
+
 #ifndef PRODUCT
 void methodDataOopDesc::print_data_on(outputStream* st) {
   ResourceMark rm;
@@ -794,15 +834,20 @@
     st->fill_to(6);
     data->print_data_on(st);
   }
+  st->print_cr("--- Extra data:");
   DataLayout* dp    = extra_data_base();
   DataLayout* end   = extra_data_limit();
   for (; dp < end; dp = next_extra(dp)) {
     // No need for "OrderAccess::load_acquire" ops,
     // since the data structure is monotonic.
-    if (dp->tag() == DataLayout::no_tag)  break;
-    if (dp == extra_data_base())
-      st->print_cr("--- Extra data:");
-    data = new BitData(dp);
+    if (dp->tag() == DataLayout::no_tag)  continue;
+    if (dp->tag() == DataLayout::bit_data_tag) {
+      data = new BitData(dp);
+    } else {
+      assert(dp->tag() == DataLayout::arg_info_data_tag, "must be BitData or ArgInfo");
+      data = new ArgInfoData(dp);
+      dp = end; // ArgInfoData is at the end of extra data section.
+    }
     st->print("%d", dp_to_di(data->dp()));
     st->fill_to(6);
     data->print_data_on(st);
--- a/hotspot/src/share/vm/oops/methodDataOop.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/methodDataOop.hpp	Sun May 04 07:05:42 2008 -0700
@@ -101,7 +101,8 @@
     virtual_call_data_tag,
     ret_data_tag,
     branch_data_tag,
-    multi_branch_data_tag
+    multi_branch_data_tag,
+    arg_info_data_tag
   };
 
   enum {
@@ -245,6 +246,7 @@
 class     BranchData;
 class   ArrayData;
 class     MultiBranchData;
+class     ArgInfoData;
 
 
 // ProfileData
@@ -376,6 +378,8 @@
   virtual bool is_BranchData()      { return false; }
   virtual bool is_ArrayData()       { return false; }
   virtual bool is_MultiBranchData() { return false; }
+  virtual bool is_ArgInfoData()     { return false; }
+
 
   BitData* as_BitData() {
     assert(is_BitData(), "wrong type");
@@ -413,6 +417,10 @@
     assert(is_MultiBranchData(), "wrong type");
     return is_MultiBranchData() ? (MultiBranchData*)this : NULL;
   }
+  ArgInfoData* as_ArgInfoData() {
+    assert(is_ArgInfoData(), "wrong type");
+    return is_ArgInfoData() ? (ArgInfoData*)this : NULL;
+  }
 
 
   // Subclass specific initialization
@@ -1047,6 +1055,33 @@
 #endif
 };
 
+class ArgInfoData : public ArrayData {
+
+public:
+  ArgInfoData(DataLayout* layout) : ArrayData(layout) {
+    assert(layout->tag() == DataLayout::arg_info_data_tag, "wrong type");
+  }
+
+  virtual bool is_ArgInfoData() { return true; }
+
+
+  int number_of_args() {
+    return array_len();
+  }
+
+  uint arg_modified(int arg) {
+    return array_uint_at(arg);
+  }
+
+  void set_arg_modified(int arg, uint val) {
+    array_set_int_at(arg, val);
+  }
+
+#ifndef PRODUCT
+  void print_data_on(outputStream* st);
+#endif
+};
+
 // methodDataOop
 //
 // A methodDataOop holds information which has been collected about
@@ -1183,6 +1218,9 @@
   // Find or create an extra ProfileData:
   ProfileData* bci_to_extra_data(int bci, bool create_if_missing);
 
+  // return the argument info cell
+  ArgInfoData *arg_info();
+
 public:
   static int header_size() {
     return sizeof(methodDataOopDesc)/wordSize;
@@ -1215,18 +1253,28 @@
   // Support for interprocedural escape analysis, from Thomas Kotzmann.
   enum EscapeFlag {
     estimated    = 1 << 0,
-    return_local = 1 << 1
+    return_local = 1 << 1,
+    return_allocated = 1 << 2,
+    allocated_escapes = 1 << 3,
+    unknown_modified = 1 << 4
   };
 
   intx eflags()                                  { return _eflags; }
   intx arg_local()                               { return _arg_local; }
   intx arg_stack()                               { return _arg_stack; }
   intx arg_returned()                            { return _arg_returned; }
+  uint arg_modified(int a)                       { ArgInfoData *aid = arg_info();
+                                                   assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
+                                                   return aid->arg_modified(a); }
 
   void set_eflags(intx v)                        { _eflags = v; }
   void set_arg_local(intx v)                     { _arg_local = v; }
   void set_arg_stack(intx v)                     { _arg_stack = v; }
   void set_arg_returned(intx v)                  { _arg_returned = v; }
+  void set_arg_modified(int a, uint v)           { ArgInfoData *aid = arg_info();
+                                                   assert(a >= 0 && a < aid->number_of_args(), "valid argument number");
+
+                                                   aid->set_arg_modified(a, v); }
 
   void clear_escape_info()                       { _eflags = _arg_local = _arg_stack = _arg_returned = 0; }
 
--- a/hotspot/src/share/vm/oops/methodOop.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/methodOop.cpp	Sun May 04 07:05:42 2008 -0700
@@ -765,6 +765,28 @@
 }
 
 
+// give advice about whether this methodOop should be cached or not
+bool methodOopDesc::should_not_be_cached() const {
+  if (is_old()) {
+    // This method has been redefined. It is either EMCP or obsolete
+    // and we don't want to cache it because that would pin the method
+    // down and prevent it from being collectible if and when it
+    // finishes executing.
+    return true;
+  }
+
+  if (mark()->should_not_be_cached()) {
+    // It is either not safe or not a good idea to cache this
+    // method at this time because of the state of the embedded
+    // markOop. See markOop.cpp for the gory details.
+    return true;
+  }
+
+  // caching this method should be just fine
+  return false;
+}
+
+
 methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_code, int new_code_length,
                                                 u_char* new_compressed_linenumber_table, int new_compressed_linenumber_size, TRAPS) {
   // Code below does not work for native methods - they should never get rewritten anyway
--- a/hotspot/src/share/vm/oops/methodOop.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/oops/methodOop.hpp	Sun May 04 07:05:42 2008 -0700
@@ -524,6 +524,8 @@
   void set_is_old()                                 { _access_flags.set_is_old(); }
   bool is_obsolete() const                          { return access_flags().is_obsolete(); }
   void set_is_obsolete()                            { _access_flags.set_is_obsolete(); }
+  // see the definition in methodOop.cpp for the gory details
+  bool should_not_be_cached() const;
 
   // JVMTI Native method prefixing support:
   bool is_prefixed_native() const                   { return access_flags().is_prefixed_native(); }
--- a/hotspot/src/share/vm/opto/addnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/addnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -505,15 +505,25 @@
       const Type *temp_t2 = phase->type( in(Offset) );
       if( temp_t2 == Type::TOP ) return NULL;
       const TypeX *t2 = temp_t2->is_intptr_t();
+      Node* address;
+      Node* offset;
       if( t2->is_con() ) {
         // The Add of the flattened expression
-        set_req(Address, addp->in(Address));
-        set_req(Offset , phase->MakeConX(t2->get_con() + t12->get_con()));
-        return this;                    // Made progress
+        address = addp->in(Address);
+        offset  = phase->MakeConX(t2->get_con() + t12->get_con());
+      } else {
+        // Else move the constant to the right.  ((A+con)+B) into ((A+B)+con)
+        address = phase->transform(new (phase->C, 4) AddPNode(in(Base),addp->in(Address),in(Offset)));
+        offset  = addp->in(Offset);
       }
-      // Else move the constant to the right.  ((A+con)+B) into ((A+B)+con)
-      set_req(Address, phase->transform(new (phase->C, 4) AddPNode(in(Base),addp->in(Address),in(Offset))));
-      set_req(Offset , addp->in(Offset));
+      PhaseIterGVN *igvn = phase->is_IterGVN();
+      if( igvn ) {
+        set_req_X(Address,address,igvn);
+        set_req_X(Offset,offset,igvn);
+      } else {
+        set_req(Address,address);
+        set_req(Offset,offset);
+      }
       return this;
     }
   }
@@ -608,6 +618,28 @@
   return NULL;
 }
 
+//------------------------------unpack_offsets----------------------------------
+// Collect the AddP offset values into the elements array, giving up
+// if there are more than length.
+int AddPNode::unpack_offsets(Node* elements[], int length) {
+  int count = 0;
+  Node* addr = this;
+  Node* base = addr->in(AddPNode::Base);
+  while (addr->is_AddP()) {
+    if (addr->in(AddPNode::Base) != base) {
+      // give up
+      return -1;
+    }
+    elements[count++] = addr->in(AddPNode::Offset);
+    if (count == length) {
+      // give up
+      return -1;
+    }
+    addr = addr->in(AddPNode::Address);
+  }
+  return count;
+}
+
 //------------------------------match_edge-------------------------------------
 // Do we Match on this edge index or not?  Do not match base pointer edge
 uint AddPNode::match_edge(uint idx) const {
--- a/hotspot/src/share/vm/opto/addnode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/addnode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -144,6 +144,11 @@
   static Node* Ideal_base_and_offset(Node* ptr, PhaseTransform* phase,
                                      // second return value:
                                      intptr_t& offset);
+
+  // Collect the AddP offset values into the elements array, giving up
+  // if there are more than length.
+  int unpack_offsets(Node* elements[], int length);
+
   // Do not match base-ptr edge
   virtual uint match_edge(uint idx) const;
   static const Type *mach_bottom_type(const MachNode* n);  // used by ad_<arch>.hpp
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Sun May 04 07:05:42 2008 -0700
@@ -79,8 +79,20 @@
   for (int i = depth; i != 0; --i) tty->print("  ");
 }
 
+static bool is_init_with_ea(ciMethod* callee_method,
+                            ciMethod* caller_method, Compile* C) {
+  // True when EA is ON and a java constructor is called or
+  // a super constructor is called from an inlined java constructor.
+  return DoEscapeAnalysis && EliminateAllocations &&
+         ( callee_method->is_initializer() ||
+           (caller_method->is_initializer() &&
+            caller_method != C->method() &&
+            caller_method->holder()->is_subclass_of(callee_method->holder()))
+         );
+}
+
 // positive filter: should send be inlined?  returns NULL, if yes, or rejection msg
-const char* InlineTree::shouldInline(ciMethod* callee_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const {
+const char* InlineTree::shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const {
   // Allows targeted inlining
   if(callee_method->should_inline()) {
     *wci_result = *(WarmCallInfo::always_hot());
@@ -97,7 +109,8 @@
   int size     = callee_method->code_size();
 
   // Check for too many throws (and not too huge)
-  if(callee_method->interpreter_throwout_count() > InlineThrowCount && size < InlineThrowMaxSize ) {
+  if(callee_method->interpreter_throwout_count() > InlineThrowCount &&
+     size < InlineThrowMaxSize ) {
     wci_result->set_profit(wci_result->profit() * 100);
     if (PrintInlining && Verbose) {
       print_indent(inline_depth());
@@ -114,8 +127,12 @@
   int invoke_count     = method()->interpreter_invocation_count();
   assert( invoke_count != 0, "Require invokation count greater than zero");
   int freq = call_site_count/invoke_count;
+
   // bump the max size if the call is frequent
-  if ((freq >= InlineFrequencyRatio) || (call_site_count >= InlineFrequencyCount)) {
+  if ((freq >= InlineFrequencyRatio) ||
+      (call_site_count >= InlineFrequencyCount) ||
+      is_init_with_ea(callee_method, caller_method, C)) {
+
     max_size = C->freq_inline_size();
     if (size <= max_size && TraceFrequencyInlining) {
       print_indent(inline_depth());
@@ -126,7 +143,8 @@
     }
   } else {
     // Not hot.  Check for medium-sized pre-existing nmethod at cold sites.
-    if (callee_method->has_compiled_code() && callee_method->instructions_size() > InlineSmallCode/4)
+    if (callee_method->has_compiled_code() &&
+        callee_method->instructions_size() > InlineSmallCode/4)
       return "already compiled into a medium method";
   }
   if (size > max_size) {
@@ -139,7 +157,7 @@
 
 
 // negative filter: should send NOT be inlined?  returns NULL, ok to inline, or rejection msg
-const char* InlineTree::shouldNotInline(ciMethod *callee_method, WarmCallInfo* wci_result) const {
+const char* InlineTree::shouldNotInline(ciMethod *callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const {
   // negative filter: should send NOT be inlined?  returns NULL (--> inline) or rejection msg
   if (!UseOldInlining) {
     const char* fail = NULL;
@@ -204,9 +222,23 @@
 
   // use frequency-based objections only for non-trivial methods
   if (callee_method->code_size() <= MaxTrivialSize) return NULL;
-  if (UseInterpreter && !CompileTheWorld) { // don't use counts with -Xcomp or CTW
-    if (!callee_method->has_compiled_code() && !callee_method->was_executed_more_than(0)) return "never executed";
-    if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold, CompileThreshold >> 1))) return "executed < MinInliningThreshold times";
+
+  // don't use counts with -Xcomp or CTW
+  if (UseInterpreter && !CompileTheWorld) {
+
+    if (!callee_method->has_compiled_code() &&
+        !callee_method->was_executed_more_than(0)) {
+      return "never executed";
+    }
+
+    if (is_init_with_ea(callee_method, caller_method, C)) {
+
+      // Escape Analysis: inline all executed constructors
+
+    } else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold,
+                                                           CompileThreshold >> 1))) {
+      return "executed < MinInliningThreshold times";
+    }
   }
 
   if (callee_method->should_not_inline()) {
@@ -219,8 +251,7 @@
 //-----------------------------try_to_inline-----------------------------------
 // return NULL if ok, reason for not inlining otherwise
 // Relocated from "InliningClosure::try_to_inline"
-const char* InlineTree::try_to_inline(ciMethod* callee_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) {
-  ciMethod* caller_method = method();
+const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) {
 
   // Old algorithm had funny accumulating BC-size counters
   if (UseOldInlining && ClipInlining
@@ -229,25 +260,47 @@
   }
 
   const char *msg = NULL;
-  if ((msg = shouldInline(callee_method, caller_bci, profile, wci_result)) != NULL) return msg;
-  if ((msg = shouldNotInline(callee_method,                   wci_result)) != NULL) return msg;
+  if ((msg = shouldInline(callee_method, caller_method, caller_bci,
+                          profile, wci_result)) != NULL) {
+    return msg;
+  }
+  if ((msg = shouldNotInline(callee_method, caller_method,
+                             wci_result)) != NULL) {
+    return msg;
+  }
 
   bool is_accessor = InlineAccessors && callee_method->is_accessor();
 
   // suppress a few checks for accessors and trivial methods
   if (!is_accessor && callee_method->code_size() > MaxTrivialSize) {
+
     // don't inline into giant methods
-    if (C->unique() > (uint)NodeCountInliningCutoff) return "NodeCountInliningCutoff";
+    if (C->unique() > (uint)NodeCountInliningCutoff) {
+      return "NodeCountInliningCutoff";
+    }
 
-    // don't inline unreached call sites
-    if (profile.count() == 0)                        return "call site not reached";
+    if ((!UseInterpreter || CompileTheWorld) &&
+        is_init_with_ea(callee_method, caller_method, C)) {
+
+      // Escape Analysis stress testing when running Xcomp or CTW:
+      // inline constructors even if they are not reached.
+
+    } else if (profile.count() == 0) {
+      // don't inline unreached call sites
+      return "call site not reached";
+    }
   }
 
-  if (!C->do_inlining() && InlineAccessors && !is_accessor) return "not an accessor";
-
-  if( inline_depth() > MaxInlineLevel )           return "inlining too deep";
+  if (!C->do_inlining() && InlineAccessors && !is_accessor) {
+    return "not an accessor";
+  }
+  if( inline_depth() > MaxInlineLevel ) {
+    return "inlining too deep";
+  }
   if( method() == callee_method &&
-      inline_depth() > MaxRecursiveInlineLevel )  return "recursively inlining too deep";
+      inline_depth() > MaxRecursiveInlineLevel ) {
+    return "recursively inlining too deep";
+  }
 
   int size = callee_method->code_size();
 
@@ -336,7 +389,7 @@
 
   // Check if inlining policy says no.
   WarmCallInfo wci = *(initial_wci);
-  failure_msg = try_to_inline(callee_method, caller_bci, profile, &wci);
+  failure_msg = try_to_inline(callee_method, caller_method, caller_bci, profile, &wci);
   if (failure_msg != NULL && C->log() != NULL) {
     C->log()->begin_elem("inline_fail reason='");
     C->log()->text("%s", failure_msg);
--- a/hotspot/src/share/vm/opto/c2_globals.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp	Sun May 04 07:05:42 2008 -0700
@@ -367,6 +367,12 @@
   notproduct(bool, PrintEliminateLocks, false,                              \
           "Print out when locks are eliminated")                            \
                                                                             \
+  diagnostic(bool, EliminateAutoBox, false,                                 \
+          "Private flag to control optimizations for autobox elimination")  \
+                                                                            \
+  product(intx, AutoBoxCacheMax, 128,                                       \
+          "Sets max value cached by the java.lang.Integer autobox cache")   \
+                                                                            \
   product(bool, DoEscapeAnalysis, false,                                    \
           "Perform escape analysis")                                        \
                                                                             \
@@ -376,6 +382,12 @@
   product(bool, EliminateAllocations, true,                                 \
           "Use escape analysis to eliminate allocations")                   \
                                                                             \
+  notproduct(bool, PrintEliminateAllocations, false,                        \
+          "Print out when allocations are eliminated")                      \
+                                                                            \
+  product(intx, EliminateAllocationArraySizeLimit, 64,                      \
+          "Array size (number of elements) limit for scalar replacement")   \
+                                                                            \
   product(intx, MaxLabelRootDepth, 1100,                                    \
           "Maximum times call Label_Root to prevent stack overflow")        \
 
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Sun May 04 07:05:42 2008 -0700
@@ -35,6 +35,9 @@
 const char* C2Compiler::retry_no_subsuming_loads() {
   return "retry without subsuming loads";
 }
+const char* C2Compiler::retry_no_escape_analysis() {
+  return "retry without escape analysis";
+}
 void C2Compiler::initialize_runtime() {
 
   // Check assumptions used while running ADLC
@@ -101,17 +104,23 @@
     initialize();
   }
   bool subsume_loads = true;
+  bool do_escape_analysis = DoEscapeAnalysis;
   while (!env->failing()) {
     // Attempt to compile while subsuming loads into machine instructions.
-    Compile C(env, this, target, entry_bci, subsume_loads);
+    Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis);
 
     // Check result and retry if appropriate.
     if (C.failure_reason() != NULL) {
-        if (C.failure_reason_is(retry_no_subsuming_loads())) {
+      if (C.failure_reason_is(retry_no_subsuming_loads())) {
         assert(subsume_loads, "must make progress");
         subsume_loads = false;
         continue;  // retry
       }
+      if (C.failure_reason_is(retry_no_escape_analysis())) {
+        assert(do_escape_analysis, "must make progress");
+        do_escape_analysis = false;
+        continue;  // retry
+      }
       // Pass any other failure reason up to the ciEnv.
       // Note that serious, irreversible failures are already logged
       // on the ciEnv via env->record_method_not_compilable().
--- a/hotspot/src/share/vm/opto/c2compiler.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/c2compiler.hpp	Sun May 04 07:05:42 2008 -0700
@@ -50,6 +50,7 @@
 
   // sentinel value used to trigger backtracking in compile_method().
   static const char* retry_no_subsuming_loads();
+  static const char* retry_no_escape_analysis();
 
   // Print compilation timers and statistics
   void print_timers();
--- a/hotspot/src/share/vm/opto/callnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/callnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -230,6 +230,7 @@
   _locoff = TypeFunc::Parms;
   _stkoff = _locoff + _method->max_locals();
   _monoff = _stkoff + _method->max_stack();
+  _scloff = _monoff;
   _endoff = _monoff;
   _sp = 0;
 }
@@ -242,6 +243,7 @@
   _locoff = TypeFunc::Parms;
   _stkoff = _locoff;
   _monoff = _stkoff + stack_size;
+  _scloff = _monoff;
   _endoff = _monoff;
   _sp = 0;
 }
@@ -297,12 +299,22 @@
   return total;
 }
 
+#ifndef PRODUCT
+
 //------------------------------format_helper----------------------------------
 // Given an allocation (a Chaitin object) and a Node decide if the Node carries
 // any defined value or not.  If it does, print out the register or constant.
-#ifndef PRODUCT
-static void format_helper( PhaseRegAlloc *regalloc, outputStream* st, Node *n, const char *msg, uint i ) {
+static void format_helper( PhaseRegAlloc *regalloc, outputStream* st, Node *n, const char *msg, uint i, GrowableArray<SafePointScalarObjectNode*> *scobjs ) {
   if (n == NULL) { st->print(" NULL"); return; }
+  if (n->is_SafePointScalarObject()) {
+    // Scalar replacement.
+    SafePointScalarObjectNode* spobj = n->as_SafePointScalarObject();
+    scobjs->append_if_missing(spobj);
+    int sco_n = scobjs->find(spobj);
+    assert(sco_n >= 0, "");
+    st->print(" %s%d]=#ScObj" INT32_FORMAT, msg, i, sco_n);
+    return;
+  }
   if( OptoReg::is_valid(regalloc->get_reg_first(n))) { // Check for undefined
     char buf[50];
     regalloc->dump_register(n,buf);
@@ -342,10 +354,8 @@
     }
   }
 }
-#endif
 
 //------------------------------format-----------------------------------------
-#ifndef PRODUCT
 void JVMState::format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st) const {
   st->print("        #");
   if( _method ) {
@@ -356,24 +366,25 @@
     return;
   }
   if (n->is_MachSafePoint()) {
+    GrowableArray<SafePointScalarObjectNode*> scobjs;
     MachSafePointNode *mcall = n->as_MachSafePoint();
     uint i;
     // Print locals
     for( i = 0; i < (uint)loc_size(); i++ )
-      format_helper( regalloc, st, mcall->local(this, i), "L[", i );
+      format_helper( regalloc, st, mcall->local(this, i), "L[", i, &scobjs );
     // Print stack
     for (i = 0; i < (uint)stk_size(); i++) {
       if ((uint)(_stkoff + i) >= mcall->len())
         st->print(" oob ");
       else
-       format_helper( regalloc, st, mcall->stack(this, i), "STK[", i );
+       format_helper( regalloc, st, mcall->stack(this, i), "STK[", i, &scobjs );
     }
     for (i = 0; (int)i < nof_monitors(); i++) {
       Node *box = mcall->monitor_box(this, i);
       Node *obj = mcall->monitor_obj(this, i);
       if ( OptoReg::is_valid(regalloc->get_reg_first(box)) ) {
         while( !box->is_BoxLock() )  box = box->in(1);
-        format_helper( regalloc, st, box, "MON-BOX[", i );
+        format_helper( regalloc, st, box, "MON-BOX[", i, &scobjs );
       } else {
         OptoReg::Name box_reg = BoxLockNode::stack_slot(box);
         st->print(" MON-BOX%d=%s+%d",
@@ -381,15 +392,71 @@
                    OptoReg::regname(OptoReg::c_frame_pointer),
                    regalloc->reg2offset(box_reg));
       }
-      format_helper( regalloc, st, obj, "MON-OBJ[", i );
+      format_helper( regalloc, st, obj, "MON-OBJ[", i, &scobjs );
+    }
+
+    for (i = 0; i < (uint)scobjs.length(); i++) {
+      // Scalar replaced objects.
+      st->print_cr("");
+      st->print("        # ScObj" INT32_FORMAT " ", i);
+      SafePointScalarObjectNode* spobj = scobjs.at(i);
+      ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass();
+      assert(cik->is_instance_klass() ||
+             cik->is_array_klass(), "Not supported allocation.");
+      ciInstanceKlass *iklass = NULL;
+      if (cik->is_instance_klass()) {
+        cik->print_name_on(st);
+        iklass = cik->as_instance_klass();
+      } else if (cik->is_type_array_klass()) {
+        cik->as_array_klass()->base_element_type()->print_name_on(st);
+        st->print("[%d]=", spobj->n_fields());
+      } else if (cik->is_obj_array_klass()) {
+        ciType* cie = cik->as_array_klass()->base_element_type();
+        int ndim = 1;
+        while (cie->is_obj_array_klass()) {
+          ndim += 1;
+          cie = cie->as_array_klass()->base_element_type();
+        }
+        cie->print_name_on(st);
+        while (ndim-- > 0) {
+          st->print("[]");
+        }
+        st->print("[%d]=", spobj->n_fields());
+      }
+      st->print("{");
+      uint nf = spobj->n_fields();
+      if (nf > 0) {
+        uint first_ind = spobj->first_index();
+        Node* fld_node = mcall->in(first_ind);
+        ciField* cifield;
+        if (iklass != NULL) {
+          st->print(" [");
+          cifield = iklass->nonstatic_field_at(0);
+          cifield->print_name_on(st);
+          format_helper( regalloc, st, fld_node, ":", 0, &scobjs );
+        } else {
+          format_helper( regalloc, st, fld_node, "[", 0, &scobjs );
+        }
+        for (uint j = 1; j < nf; j++) {
+          fld_node = mcall->in(first_ind+j);
+          if (iklass != NULL) {
+            st->print(", [");
+            cifield = iklass->nonstatic_field_at(j);
+            cifield->print_name_on(st);
+            format_helper( regalloc, st, fld_node, ":", j, &scobjs );
+          } else {
+            format_helper( regalloc, st, fld_node, ", [", j, &scobjs );
+          }
+        }
+      }
+      st->print(" }");
     }
   }
   st->print_cr("");
   if (caller() != NULL)  caller()->format(regalloc, n, st);
 }
-#endif
 
-#ifndef PRODUCT
+
 void JVMState::dump_spec(outputStream *st) const {
   if (_method != NULL) {
     bool printed = false;
@@ -419,9 +486,8 @@
   }
   if (caller() != NULL)  caller()->dump_spec(st);
 }
-#endif
 
-#ifndef PRODUCT
+
 void JVMState::dump_on(outputStream* st) const {
   if (_map && !((uintptr_t)_map & 1)) {
     if (_map->len() > _map->req()) {  // _map->has_exceptions()
@@ -434,8 +500,8 @@
     }
     _map->dump(2);
   }
-  st->print("JVMS depth=%d loc=%d stk=%d mon=%d end=%d mondepth=%d sp=%d bci=%d method=",
-             depth(), locoff(), stkoff(), monoff(), endoff(), monitor_depth(), sp(), bci());
+  st->print("JVMS depth=%d loc=%d stk=%d mon=%d scalar=%d end=%d mondepth=%d sp=%d bci=%d method=",
+             depth(), locoff(), stkoff(), monoff(), scloff(), endoff(), monitor_depth(), sp(), bci());
   if (_method == NULL) {
     st->print_cr("(none)");
   } else {
@@ -465,6 +531,7 @@
   n->set_locoff(_locoff);
   n->set_stkoff(_stkoff);
   n->set_monoff(_monoff);
+  n->set_scloff(_scloff);
   n->set_endoff(_endoff);
   n->set_sp(_sp);
   n->set_map(_map);
@@ -557,6 +624,107 @@
   return 0;
 }
 
+//
+// Determine whether the call could modify the field of the specified
+// instance at the specified offset.
+//
+bool CallNode::may_modify(const TypePtr *addr_t, PhaseTransform *phase) {
+  const TypeOopPtr *adrInst_t  = addr_t->isa_oopptr();
+
+  // if not an InstPtr or not an instance type, assume the worst
+  if (adrInst_t == NULL || !adrInst_t->is_instance_field()) {
+    return true;
+  }
+  Compile *C = phase->C;
+  int offset = adrInst_t->offset();
+  assert(offset >= 0, "should be valid offset");
+  ciKlass* adr_k = adrInst_t->klass();
+  assert(adr_k->is_loaded() &&
+         adr_k->is_java_klass() &&
+         !adr_k->is_interface(),
+         "only non-abstract classes are expected");
+
+  int base_idx = C->get_alias_index(adrInst_t);
+  int size = BytesPerLong; // If we don't know the size, assume largest.
+  if (adrInst_t->isa_instptr()) {
+    ciField* field = C->alias_type(base_idx)->field();
+    if (field != NULL) {
+      size = field->size_in_bytes();
+    }
+  } else {
+    assert(adrInst_t->isa_aryptr(), "only arrays are expected");
+    size = type2aelembytes(adr_k->as_array_klass()->element_type()->basic_type());
+  }
+
+  ciMethod * meth = is_CallStaticJava() ?  as_CallStaticJava()->method() : NULL;
+  BCEscapeAnalyzer *bcea = (meth != NULL) ? meth->get_bcea() : NULL;
+
+  const TypeTuple * d = tf()->domain();
+  for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
+    const Type* t = d->field_at(i);
+    Node *arg = in(i);
+    const Type *at = phase->type(arg);
+    if (at == TypePtr::NULL_PTR || at == Type::TOP)
+      continue;  // null can't affect anything
+
+    const TypeOopPtr *at_ptr = at->isa_oopptr();
+    if (!arg->is_top() && (t->isa_oopptr() != NULL ||
+                           t->isa_ptr() && at_ptr != NULL)) {
+      assert(at_ptr != NULL, "expecting an OopPtr");
+      ciKlass* at_k = at_ptr->klass();
+      if ((adrInst_t->base() == at_ptr->base()) &&
+          at_k->is_loaded() &&
+          at_k->is_java_klass() &&
+          !at_k->is_interface()) {
+        // If we have found an argument matching addr_t, check if the field
+        // at the specified offset is modified.
+        int at_idx = C->get_alias_index(at_ptr->add_offset(offset)->isa_oopptr());
+        if (base_idx == at_idx &&
+            (bcea == NULL ||
+             bcea->is_arg_modified(i - TypeFunc::Parms, offset, size))) {
+          return true;
+        }
+      }
+    }
+  }
+  return false;
+}
+
+// Does this call have a direct reference to n other than debug information?
+bool CallNode::has_non_debug_use(Node *n) {
+  const TypeTuple * d = tf()->domain();
+  for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
+    Node *arg = in(i);
+    if (arg == n) {
+      return true;
+    }
+  }
+  return false;
+}
+
+// Returns the unique CheckCastPP of a call
+// or 'this' if there are several CheckCastPP
+// or returns NULL if there is no one.
+Node *CallNode::result_cast() {
+  Node *cast = NULL;
+
+  Node *p = proj_out(TypeFunc::Parms);
+  if (p == NULL)
+    return NULL;
+
+  for (DUIterator_Fast imax, i = p->fast_outs(imax); i < imax; i++) {
+    Node *use = p->fast_out(i);
+    if (use->is_CheckCastPP()) {
+      if (cast != NULL) {
+        return this;  // more than 1 CheckCastPP
+      }
+      cast = use;
+    }
+  }
+  return cast;
+}
+
+
 //=============================================================================
 uint CallJavaNode::size_of() const { return sizeof(*this); }
 uint CallJavaNode::cmp( const Node &n ) const {
@@ -765,6 +933,7 @@
 void SafePointNode::grow_stack(JVMState* jvms, uint grow_by) {
   assert((int)grow_by > 0, "sanity");
   int monoff = jvms->monoff();
+  int scloff = jvms->scloff();
   int endoff = jvms->endoff();
   assert(endoff == (int)req(), "no other states or debug info after me");
   Node* top = Compile::current()->top();
@@ -772,6 +941,7 @@
     ins_req(monoff, top);
   }
   jvms->set_monoff(monoff + grow_by);
+  jvms->set_scloff(scloff + grow_by);
   jvms->set_endoff(endoff + grow_by);
 }
 
@@ -781,6 +951,7 @@
   const int MonitorEdges = 2;
   assert(JVMState::logMonitorEdges == exact_log2(MonitorEdges), "correct MonitorEdges");
   assert(req() == jvms()->endoff(), "correct sizing");
+  int nextmon = jvms()->scloff();
   if (GenerateSynchronizationCode) {
     add_req(lock->box_node());
     add_req(lock->obj_node());
@@ -788,6 +959,7 @@
     add_req(NULL);
     add_req(NULL);
   }
+  jvms()->set_scloff(nextmon+MonitorEdges);
   jvms()->set_endoff(req());
 }
 
@@ -795,10 +967,13 @@
   // Delete last monitor from debug info
   debug_only(int num_before_pop = jvms()->nof_monitors());
   const int MonitorEdges = (1<<JVMState::logMonitorEdges);
+  int scloff = jvms()->scloff();
   int endoff = jvms()->endoff();
+  int new_scloff = scloff - MonitorEdges;
   int new_endoff = endoff - MonitorEdges;
+  jvms()->set_scloff(new_scloff);
   jvms()->set_endoff(new_endoff);
-  while (endoff > new_endoff)  del_req(--endoff);
+  while (scloff > new_scloff)  del_req(--scloff);
   assert(jvms()->nof_monitors() == num_before_pop-1, "");
 }
 
@@ -822,6 +997,63 @@
   return (TypeFunc::Parms == idx);
 }
 
+//==============  SafePointScalarObjectNode  ==============
+
+SafePointScalarObjectNode::SafePointScalarObjectNode(const TypeOopPtr* tp,
+#ifdef ASSERT
+                                                     AllocateNode* alloc,
+#endif
+                                                     uint first_index,
+                                                     uint n_fields) :
+  TypeNode(tp, 1), // 1 control input -- seems required.  Get from root.
+#ifdef ASSERT
+  _alloc(alloc),
+#endif
+  _first_index(first_index),
+  _n_fields(n_fields)
+{
+  init_class_id(Class_SafePointScalarObject);
+}
+
+
+uint SafePointScalarObjectNode::ideal_reg() const {
+  return 0; // No matching to machine instruction
+}
+
+const RegMask &SafePointScalarObjectNode::in_RegMask(uint idx) const {
+  return *(Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()]);
+}
+
+const RegMask &SafePointScalarObjectNode::out_RegMask() const {
+  return RegMask::Empty;
+}
+
+uint SafePointScalarObjectNode::match_edge(uint idx) const {
+  return 0;
+}
+
+SafePointScalarObjectNode*
+SafePointScalarObjectNode::clone(int jvms_adj, Dict* sosn_map) const {
+  void* cached = (*sosn_map)[(void*)this];
+  if (cached != NULL) {
+    return (SafePointScalarObjectNode*)cached;
+  }
+  Compile* C = Compile::current();
+  SafePointScalarObjectNode* res = (SafePointScalarObjectNode*)Node::clone();
+  res->_first_index += jvms_adj;
+  sosn_map->Insert((void*)this, (void*)res);
+  return res;
+}
+
+
+#ifndef PRODUCT
+void SafePointScalarObjectNode::dump_spec(outputStream *st) const {
+  st->print(" # fields@[%d..%d]", first_index(),
+             first_index() + n_fields() - 1);
+}
+
+#endif
+
 //=============================================================================
 uint AllocateNode::size_of() const { return sizeof(*this); }
 
@@ -832,6 +1064,7 @@
 {
   init_class_id(Class_Allocate);
   init_flags(Flag_is_macro);
+  _is_scalar_replaceable = false;
   Node *topnode = C->top();
 
   init_req( TypeFunc::Control  , ctrl );
@@ -1151,7 +1384,7 @@
 //=============================================================================
 Node *LockNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
-  // perform any generic optimizations first
+  // perform any generic optimizations first (returns 'this' or NULL)
   Node *result = SafePointNode::Ideal(phase, can_reshape);
 
   // Now see if we can optimize away this lock.  We don't actually
@@ -1159,7 +1392,20 @@
   // prevents macro expansion from expanding the lock.  Since we don't
   // modify the graph, the value returned from this function is the
   // one computed above.
-  if (EliminateLocks && !is_eliminated()) {
+  if (result == NULL && can_reshape && EliminateLocks && !is_eliminated()) {
+    //
+    // If we are locking an unescaped object, the lock/unlock is unnecessary
+    //
+    ConnectionGraph *cgr = Compile::current()->congraph();
+    PointsToNode::EscapeState es = PointsToNode::GlobalEscape;
+    if (cgr != NULL)
+      es = cgr->escape_state(obj_node(), phase);
+    if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
+      // Mark it eliminated to update any counters
+      this->set_eliminated();
+      return result;
+    }
+
     //
     // Try lock coarsening
     //
@@ -1199,8 +1445,10 @@
           int unlocks = 0;
           for (int i = 0; i < lock_ops.length(); i++) {
             AbstractLockNode* lock = lock_ops.at(i);
-            if (lock->Opcode() == Op_Lock) locks++;
-            else                               unlocks++;
+            if (lock->Opcode() == Op_Lock)
+              locks++;
+            else
+              unlocks++;
             if (Verbose) {
               lock->dump(1);
             }
@@ -1237,7 +1485,7 @@
 //=============================================================================
 Node *UnlockNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
-  // perform any generic optimizations first
+  // perform any generic optimizations first (returns 'this' or NULL)
   Node * result = SafePointNode::Ideal(phase, can_reshape);
 
   // Now see if we can optimize away this unlock.  We don't actually
@@ -1245,66 +1493,18 @@
   // prevents macro expansion from expanding the unlock.  Since we don't
   // modify the graph, the value returned from this function is the
   // one computed above.
-  if (EliminateLocks && !is_eliminated()) {
+  // Escape state is defined after Parse phase.
+  if (result == NULL && can_reshape && EliminateLocks && !is_eliminated()) {
     //
-    // If we are unlocking an unescaped object, the lock/unlock is unnecessary
-    // We can eliminate them if there are no safepoints in the locked region.
+    // If we are unlocking an unescaped object, the lock/unlock is unnecessary.
     //
     ConnectionGraph *cgr = Compile::current()->congraph();
-    if (cgr != NULL && cgr->escape_state(obj_node(), phase) == PointsToNode::NoEscape) {
-      GrowableArray<AbstractLockNode*>   lock_ops;
-      LockNode *lock = find_matching_lock(this);
-      if (lock != NULL) {
-        lock_ops.append(this);
-        lock_ops.append(lock);
-        // find other unlocks which pair with the lock we found and add them
-        // to the list
-        Node * box = box_node();
-
-        for (DUIterator_Fast imax, i = box->fast_outs(imax); i < imax; i++) {
-          Node *use = box->fast_out(i);
-          if (use->is_Unlock() && use != this) {
-            UnlockNode *unlock1 = use->as_Unlock();
-            if (!unlock1->is_eliminated()) {
-              LockNode *lock1 = find_matching_lock(unlock1);
-              if (lock == lock1)
-                lock_ops.append(unlock1);
-              else if (lock1 == NULL) {
-               // we can't find a matching lock, we must assume the worst
-                lock_ops.trunc_to(0);
-                break;
-              }
-            }
-          }
-        }
-        if (lock_ops.length() > 0) {
-
-  #ifndef PRODUCT
-          if (PrintEliminateLocks) {
-            int locks = 0;
-            int unlocks = 0;
-            for (int i = 0; i < lock_ops.length(); i++) {
-              AbstractLockNode* lock = lock_ops.at(i);
-              if (lock->Opcode() == Op_Lock) locks++;
-              else                               unlocks++;
-              if (Verbose) {
-                lock->dump(1);
-              }
-            }
-            tty->print_cr("***Eliminated %d unescaped unlocks and %d unescaped locks", unlocks, locks);
-          }
-  #endif
-
-          // for each of the identified locks, mark them
-          // as eliminatable
-          for (int i = 0; i < lock_ops.length(); i++) {
-            AbstractLockNode* lock = lock_ops.at(i);
-
-            // Mark it eliminated to update any counters
-            lock->set_eliminated();
-          }
-        }
-      }
+    PointsToNode::EscapeState es = PointsToNode::GlobalEscape;
+    if (cgr != NULL)
+      es = cgr->escape_state(obj_node(), phase);
+    if (es != PointsToNode::UnknownEscape && es != PointsToNode::GlobalEscape) {
+      // Mark it eliminated to update any counters
+      this->set_eliminated();
     }
   }
   return result;
--- a/hotspot/src/share/vm/opto/callnode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/callnode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -38,7 +38,7 @@
 class       CallLeafNode;
 class         CallLeafNoFPNode;
 class     AllocateNode;
-class     AllocateArrayNode;
+class       AllocateArrayNode;
 class     LockNode;
 class     UnlockNode;
 class JVMState;
@@ -91,7 +91,9 @@
 class ParmNode : public ProjNode {
   static const char * const names[TypeFunc::Parms+1];
 public:
-  ParmNode( StartNode *src, uint con ) : ProjNode(src,con) {}
+  ParmNode( StartNode *src, uint con ) : ProjNode(src,con) {
+    init_class_id(Class_Parm);
+  }
   virtual int Opcode() const;
   virtual bool  is_CFG() const { return (_con == TypeFunc::Control); }
   virtual uint ideal_reg() const;
@@ -182,6 +184,7 @@
   uint              _locoff;    // Offset to locals in input edge mapping
   uint              _stkoff;    // Offset to stack in input edge mapping
   uint              _monoff;    // Offset to monitors in input edge mapping
+  uint              _scloff;    // Offset to fields of scalar objs in input edge mapping
   uint              _endoff;    // Offset to end of input edge mapping
   uint              _sp;        // Jave Expression Stack Pointer for this state
   int               _bci;       // Byte Code Index of this JVM point
@@ -205,16 +208,19 @@
   uint              stkoff() const { return _stkoff; }
   uint              argoff() const { return _stkoff + _sp; }
   uint              monoff() const { return _monoff; }
+  uint              scloff() const { return _scloff; }
   uint              endoff() const { return _endoff; }
   uint              oopoff() const { return debug_end(); }
 
   int            loc_size() const { return _stkoff - _locoff; }
   int            stk_size() const { return _monoff - _stkoff; }
-  int            mon_size() const { return _endoff - _monoff; }
+  int            mon_size() const { return _scloff - _monoff; }
+  int            scl_size() const { return _endoff - _scloff; }
 
   bool        is_loc(uint i) const { return i >= _locoff && i < _stkoff; }
   bool        is_stk(uint i) const { return i >= _stkoff && i < _monoff; }
-  bool        is_mon(uint i) const { return i >= _monoff && i < _endoff; }
+  bool        is_mon(uint i) const { return i >= _monoff && i < _scloff; }
+  bool        is_scl(uint i) const { return i >= _scloff && i < _endoff; }
 
   uint              sp()     const { return _sp; }
   int               bci()    const { return _bci; }
@@ -225,7 +231,9 @@
   uint              depth()  const { return _depth; }
   uint        debug_start()  const; // returns locoff of root caller
   uint        debug_end()    const; // returns endoff of self
-  uint        debug_size()   const { return loc_size() + sp() + mon_size(); }
+  uint        debug_size()   const {
+    return loc_size() + sp() + mon_size() + scl_size();
+  }
   uint        debug_depth()  const; // returns sum of debug_size values at all depths
 
   // Returns the JVM state at the desired depth (1 == root).
@@ -252,8 +260,11 @@
   void              set_locoff(uint off) { _locoff = off; }
   void              set_stkoff(uint off) { _stkoff = off; }
   void              set_monoff(uint off) { _monoff = off; }
+  void              set_scloff(uint off) { _scloff = off; }
   void              set_endoff(uint off) { _endoff = off; }
-  void              set_offsets(uint off) { _locoff = _stkoff = _monoff = _endoff = off; }
+  void              set_offsets(uint off) {
+    _locoff = _stkoff = _monoff = _scloff = _endoff = off;
+  }
   void              set_map(SafePointNode *map) { _map = map; }
   void              set_sp(uint sp) { _sp = sp; }
   void              set_bci(int bci) { _bci = bci; }
@@ -377,6 +388,9 @@
   void               set_next_exception(SafePointNode* n);
   bool                   has_exceptions() const { return next_exception() != NULL; }
 
+  // Does this node have a use of n other than in debug information?
+  virtual bool           has_non_debug_use(Node *n)  {return false; }
+
   // Standard Node stuff
   virtual int            Opcode() const;
   virtual bool           pinned() const { return true; }
@@ -397,6 +411,47 @@
 #endif
 };
 
+//------------------------------SafePointScalarObjectNode----------------------
+// A SafePointScalarObjectNode represents the state of a scalarized object
+// at a safepoint.
+
+class SafePointScalarObjectNode: public TypeNode {
+  uint _first_index; // First input edge index of a SafePoint node where
+                     // states of the scalarized object fields are collected.
+  uint _n_fields;    // Number of non-static fields of the scalarized object.
+  DEBUG_ONLY(AllocateNode* _alloc;)
+public:
+  SafePointScalarObjectNode(const TypeOopPtr* tp,
+#ifdef ASSERT
+                            AllocateNode* alloc,
+#endif
+                            uint first_index, uint n_fields);
+  virtual int Opcode() const;
+  virtual uint           ideal_reg() const;
+  virtual const RegMask &in_RegMask(uint) const;
+  virtual const RegMask &out_RegMask() const;
+  virtual uint           match_edge(uint idx) const;
+
+  uint first_index() const { return _first_index; }
+  uint n_fields()    const { return _n_fields; }
+  DEBUG_ONLY(AllocateNode* alloc() const { return _alloc; })
+
+  virtual uint size_of() const { return sizeof(*this); }
+
+  // Assumes that "this" is an argument to a safepoint node "s", and that
+  // "new_call" is being created to correspond to "s".  But the difference
+  // between the start index of the jvmstates of "new_call" and "s" is
+  // "jvms_adj".  Produce and return a SafePointScalarObjectNode that
+  // corresponds appropriately to "this" in "new_call".  Assumes that
+  // "sosn_map" is a map, specific to the translation of "s" to "new_call",
+  // mapping old SafePointScalarObjectNodes to new, to avoid multiple copies.
+  SafePointScalarObjectNode* clone(int jvms_adj, Dict* sosn_map) const;
+
+#ifndef PRODUCT
+  virtual void              dump_spec(outputStream *st) const;
+#endif
+};
+
 //------------------------------CallNode---------------------------------------
 // Call nodes now subsume the function of debug nodes at callsites, so they
 // contain the functionality of a full scope chain of debug nodes.
@@ -405,7 +460,6 @@
   const TypeFunc *_tf;        // Function type
   address      _entry_point;  // Address of method being called
   float        _cnt;          // Estimate of number of times called
-  PointsToNode::EscapeState _escape_state;
 
   CallNode(const TypeFunc* tf, address addr, const TypePtr* adr_type)
     : SafePointNode(tf->domain()->cnt(), NULL, adr_type),
@@ -415,7 +469,6 @@
   {
     init_class_id(Class_Call);
     init_flags(Flag_is_Call);
-    _escape_state = PointsToNode::UnknownEscape;
   }
 
   const TypeFunc* tf()        const { return _tf; }
@@ -441,6 +494,15 @@
   // the node the JVMState must be cloned.
   virtual void        clone_jvms() { }   // default is not to clone
 
+  // Returns true if the call may modify n
+  virtual bool        may_modify(const TypePtr *addr_t, PhaseTransform *phase);
+  // Does this node have a use of n other than in debug information?
+  virtual bool        has_non_debug_use(Node *n);
+  // Returns the unique CheckCastPP of a call
+  // or result projection is there are several CheckCastPP
+  // or returns NULL if there is no one.
+  Node *result_cast();
+
   virtual uint match_edge(uint idx) const;
 
 #ifndef PRODUCT
@@ -624,6 +686,8 @@
     return TypeFunc::make(domain, range);
   }
 
+  bool _is_scalar_replaceable;  // Result of Escape Analysis
+
   virtual uint size_of() const; // Size is bigger
   AllocateNode(Compile* C, const TypeFunc *atype, Node *ctrl, Node *mem, Node *abio,
                Node *size, Node *klass_node, Node *initial_test);
@@ -635,6 +699,9 @@
   virtual uint ideal_reg() const { return Op_RegP; }
   virtual bool        guaranteed_safepoint()  { return false; }
 
+  // allocations do not modify their arguments
+  virtual bool        may_modify(const TypePtr *addr_t, PhaseTransform *phase) { return false;}
+
   // Pattern-match a possible usage of AllocateNode.
   // Return null if no allocation is recognized.
   // The operand is the pointer produced by the (possible) allocation.
@@ -747,6 +814,9 @@
   // mark node as eliminated and update the counter if there is one
   void set_eliminated();
 
+  // locking does not modify its arguments
+  virtual bool        may_modify(const TypePtr *addr_t, PhaseTransform *phase){ return false;}
+
 #ifndef PRODUCT
   void create_lock_counter(JVMState* s);
   NamedCounter* counter() const { return _counter; }
--- a/hotspot/src/share/vm/opto/cfgnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -704,6 +704,61 @@
   return mem;
 }
 
+//------------------------split_out_instance-----------------------------------
+// Split out an instance type from a bottom phi.
+PhiNode* PhiNode::split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const {
+  assert(type() == Type::MEMORY && (adr_type() == TypePtr::BOTTOM ||
+         adr_type() == TypeRawPtr::BOTTOM) , "bottom or raw memory required");
+
+  // Check if an appropriate node already exists.
+  Node *region = in(0);
+  for (DUIterator_Fast kmax, k = region->fast_outs(kmax); k < kmax; k++) {
+    Node* use = region->fast_out(k);
+    if( use->is_Phi()) {
+      PhiNode *phi2 = use->as_Phi();
+      if (phi2->type() == Type::MEMORY && phi2->adr_type() == at) {
+        return phi2;
+      }
+    }
+  }
+  Compile *C = igvn->C;
+  Arena *a = Thread::current()->resource_area();
+  Node_Array node_map = new Node_Array(a);
+  Node_Stack stack(a, C->unique() >> 4);
+  PhiNode *nphi = slice_memory(at);
+  igvn->register_new_node_with_optimizer( nphi );
+  node_map.map(_idx, nphi);
+  stack.push((Node *)this, 1);
+  while(!stack.is_empty()) {
+    PhiNode *ophi = stack.node()->as_Phi();
+    uint i = stack.index();
+    assert(i >= 1, "not control edge");
+    stack.pop();
+    nphi = node_map[ophi->_idx]->as_Phi();
+    for (; i < ophi->req(); i++) {
+      Node *in = ophi->in(i);
+      if (in == NULL || igvn->type(in) == Type::TOP)
+        continue;
+      Node *opt = MemNode::optimize_simple_memory_chain(in, at, igvn);
+      PhiNode *optphi = opt->is_Phi() ? opt->as_Phi() : NULL;
+      if (optphi != NULL && optphi->adr_type() == TypePtr::BOTTOM) {
+        opt = node_map[optphi->_idx];
+        if (opt == NULL) {
+          stack.push(ophi, i);
+          nphi = optphi->slice_memory(at);
+          igvn->register_new_node_with_optimizer( nphi );
+          node_map.map(optphi->_idx, nphi);
+          ophi = optphi;
+          i = 0; // will get incremented at top of loop
+          continue;
+        }
+      }
+      nphi->set_req(i, opt);
+    }
+  }
+  return nphi;
+}
+
 //------------------------verify_adr_type--------------------------------------
 #ifdef ASSERT
 void PhiNode::verify_adr_type(VectorSet& visited, const TypePtr* at) const {
@@ -1736,6 +1791,18 @@
         return result;
       }
     }
+    //
+    // Other optimizations on the memory chain
+    //
+    const TypePtr* at = adr_type();
+    for( uint i=1; i<req(); ++i ) {// For all paths in
+      Node *ii = in(i);
+      Node *new_in = MemNode::optimize_memory_chain(ii, at, phase);
+      if (ii != new_in ) {
+        set_req(i, new_in);
+        progress = this;
+      }
+    }
   }
 
   return progress;              // Return any progress
--- a/hotspot/src/share/vm/opto/cfgnode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/cfgnode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -110,14 +110,15 @@
 // input in slot 0.
 class PhiNode : public TypeNode {
   const TypePtr* const _adr_type; // non-null only for Type::MEMORY nodes.
+  const int _inst_id;     // Instance id of the memory slice.
+  const int _inst_index;  // Alias index of the instance memory slice.
+  // Array elements references have the same alias_idx but different offset.
+  const int _inst_offset; // Offset of the instance memory slice.
   // Size is bigger to hold the _adr_type field.
   virtual uint hash() const;    // Check the type
   virtual uint cmp( const Node &n ) const;
   virtual uint size_of() const { return sizeof(*this); }
 
-  // Determine a unique non-trivial input, if any.
-  // Ignore casts if it helps.  Return NULL on failure.
-  Node* unique_input(PhaseTransform *phase);
   // Determine if CMoveNode::is_cmove_id can be used at this join point.
   Node* is_cmove_id(PhaseTransform* phase, int true_path);
 
@@ -127,8 +128,16 @@
          Input                  // Input values are [1..len)
   };
 
-  PhiNode( Node *r, const Type *t, const TypePtr* at = NULL )
-    : TypeNode(t,r->req()), _adr_type(at) {
+  PhiNode( Node *r, const Type *t, const TypePtr* at = NULL,
+           const int iid = TypeOopPtr::UNKNOWN_INSTANCE,
+           const int iidx = Compile::AliasIdxTop,
+           const int ioffs = Type::OffsetTop )
+    : TypeNode(t,r->req()),
+      _adr_type(at),
+      _inst_id(iid),
+      _inst_index(iidx),
+      _inst_offset(ioffs)
+  {
     init_class_id(Class_Phi);
     init_req(0, r);
     verify_adr_type();
@@ -139,6 +148,7 @@
   static PhiNode* make( Node* r, Node* x, const Type *t, const TypePtr* at = NULL );
   // create a new phi with narrowed memory type
   PhiNode* slice_memory(const TypePtr* adr_type) const;
+  PhiNode* split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const;
   // like make(r, x), but does not initialize the in edges to x
   static PhiNode* make_blank( Node* r, Node* x );
 
@@ -152,6 +162,10 @@
     return NULL;  // not a copy!
   }
 
+  // Determine a unique non-trivial input, if any.
+  // Ignore casts if it helps.  Return NULL on failure.
+  Node* unique_input(PhaseTransform *phase);
+
   // Check for a simple dead loop.
   enum LoopSafety { Safe = 0, Unsafe, UnsafeLoop };
   LoopSafety simple_data_loop_check(Node *in) const;
@@ -161,6 +175,18 @@
   virtual int Opcode() const;
   virtual bool pinned() const { return in(0) != 0; }
   virtual const TypePtr *adr_type() const { verify_adr_type(true); return _adr_type; }
+
+  const int inst_id()     const { return _inst_id; }
+  const int inst_index()  const { return _inst_index; }
+  const int inst_offset() const { return _inst_offset; }
+  bool is_same_inst_field(const Type* tp, int id, int index, int offset) {
+    return type()->basic_type() == tp->basic_type() &&
+           inst_id()     == id     &&
+           inst_index()  == index  &&
+           inst_offset() == offset &&
+           type()->higher_equal(tp);
+  }
+
   virtual const Type *Value( PhaseTransform *phase ) const;
   virtual Node *Identity( PhaseTransform *phase );
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -310,8 +336,14 @@
   virtual const RegMask &out_RegMask() const;
   void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
   int is_range_check(Node* &range, Node* &index, jint &offset);
+  Node* fold_compares(PhaseGVN* phase);
   static Node* up_one_dom(Node* curr, bool linear_only = false);
 
+  // Takes the type of val and filters it through the test represented
+  // by if_proj and returns a more refined type if one is produced.
+  // Returns NULL is it couldn't improve the type.
+  static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj);
+
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
 #endif
--- a/hotspot/src/share/vm/opto/chaitin.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/chaitin.hpp	Sun May 04 07:05:42 2008 -0700
@@ -457,7 +457,8 @@
   bool may_be_copy_of_callee( Node *def ) const;
 
   // If nreg already contains the same constant as val then eliminate it
-  bool eliminate_copy_of_constant(Node* val, Block *current_block, Node_List& value, Node_List &regnd,
+  bool eliminate_copy_of_constant(Node* val, Node* n,
+                                  Block *current_block, Node_List& value, Node_List &regnd,
                                   OptoReg::Name nreg, OptoReg::Name nreg2);
   // Extend the node to LRG mapping
   void add_reference( const Node *node, const Node *old_node);
--- a/hotspot/src/share/vm/opto/classes.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/classes.hpp	Sun May 04 07:05:42 2008 -0700
@@ -185,6 +185,7 @@
 macro(RoundDouble)
 macro(RoundFloat)
 macro(SafePoint)
+macro(SafePointScalarObject)
 macro(SCMemProj)
 macro(SinD)
 macro(SqrtD)
--- a/hotspot/src/share/vm/opto/compile.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/compile.cpp	Sun May 04 07:05:42 2008 -0700
@@ -333,6 +333,12 @@
     tty->print_cr("** Bailout: Recompile without subsuming loads          **");
     tty->print_cr("*********************************************************");
   }
+  if (_do_escape_analysis != DoEscapeAnalysis && PrintOpto) {
+    // Recompiling without escape analysis
+    tty->print_cr("*********************************************************");
+    tty->print_cr("** Bailout: Recompile without escape analysis          **");
+    tty->print_cr("*********************************************************");
+  }
   if (env()->break_at_compile()) {
     // Open the debugger when compiing this method.
     tty->print("### Breaking when compiling: ");
@@ -401,11 +407,6 @@
   return buf.code_size();
 }
 
-void  Compile::record_for_escape_analysis(Node* n) {
-  if (_congraph != NULL)
-    _congraph->record_for_escape_analysis(n);
-}
-
 
 // ============================================================================
 //------------------------------Compile standard-------------------------------
@@ -415,7 +416,7 @@
 // the continuation bci for on stack replacement.
 
 
-Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, bool subsume_loads )
+Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci, bool subsume_loads, bool do_escape_analysis )
                 : Phase(Compiler),
                   _env(ci_env),
                   _log(ci_env->log()),
@@ -430,6 +431,7 @@
                   _for_igvn(NULL),
                   _warm_calls(NULL),
                   _subsume_loads(subsume_loads),
+                  _do_escape_analysis(do_escape_analysis),
                   _failure_reason(NULL),
                   _code_buffer("Compile::Fill_buffer"),
                   _orig_pc_slot(0),
@@ -487,9 +489,6 @@
   PhaseGVN gvn(node_arena(), estimated_size);
   set_initial_gvn(&gvn);
 
-  if (DoEscapeAnalysis)
-    _congraph = new ConnectionGraph(this);
-
   { // Scope for timing the parser
     TracePhase t3("parse", &_t_parser, true);
 
@@ -574,9 +573,13 @@
   NOT_PRODUCT( verify_graph_edges(); )
 
   // Perform escape analysis
+  if (_do_escape_analysis)
+    _congraph = new ConnectionGraph(this);
   if (_congraph != NULL) {
     NOT_PRODUCT( TracePhase t2("escapeAnalysis", &_t_escapeAnalysis, TimeCompiler); )
     _congraph->compute_escape();
+    if (failing())  return;
+
 #ifndef PRODUCT
     if (PrintEscapeAnalysis) {
       _congraph->dump();
@@ -675,6 +678,7 @@
     _orig_pc_slot(0),
     _orig_pc_slot_offset_in_bytes(0),
     _subsume_loads(true),
+    _do_escape_analysis(false),
     _failure_reason(NULL),
     _code_buffer("Compile::Fill_buffer"),
     _node_bundling_limit(0),
@@ -822,7 +826,7 @@
   //   Type::update_loaded_types(_method, _method->constants());
 
   // Init alias_type map.
-  if (!DoEscapeAnalysis && aliaslevel == 3)
+  if (!_do_escape_analysis && aliaslevel == 3)
     aliaslevel = 2;  // No unique types without escape analysis
   _AliasLevel = aliaslevel;
   const int grow_ats = 16;
--- a/hotspot/src/share/vm/opto/compile.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/compile.hpp	Sun May 04 07:05:42 2008 -0700
@@ -31,6 +31,7 @@
 class Int_Array;
 class Matcher;
 class MachNode;
+class MachSafePointNode;
 class Node;
 class Node_Array;
 class Node_Notes;
@@ -52,9 +53,6 @@
 class Unique_Node_List;
 class nmethod;
 class WarmCallInfo;
-#ifdef ENABLE_ZAP_DEAD_LOCALS
-class MachSafePointNode;
-#endif
 
 //------------------------------Compile----------------------------------------
 // This class defines a top-level Compiler invocation.
@@ -127,6 +125,7 @@
   const int             _compile_id;
   const bool            _save_argument_registers; // save/restore arg regs for trampolines
   const bool            _subsume_loads;         // Load can be matched as part of a larger op.
+  const bool            _do_escape_analysis;    // Do escape analysis.
   ciMethod*             _method;                // The method being compiled.
   int                   _entry_bci;             // entry bci for osr methods.
   const TypeFunc*       _tf;                    // My kind of signature
@@ -260,6 +259,8 @@
   // instructions that subsume a load may result in an unschedulable
   // instruction sequence.
   bool              subsume_loads() const       { return _subsume_loads; }
+  // Do escape analysis.
+  bool              do_escape_analysis() const  { return _do_escape_analysis; }
   bool              save_argument_registers() const { return _save_argument_registers; }
 
 
@@ -484,7 +485,6 @@
   PhaseGVN*         initial_gvn()               { return _initial_gvn; }
   Unique_Node_List* for_igvn()                  { return _for_igvn; }
   inline void       record_for_igvn(Node* n);   // Body is after class Unique_Node_List.
-  void              record_for_escape_analysis(Node* n);
   void          set_initial_gvn(PhaseGVN *gvn)           { _initial_gvn = gvn; }
   void          set_for_igvn(Unique_Node_List *for_igvn) { _for_igvn = for_igvn; }
 
@@ -560,7 +560,7 @@
   // replacement, entry_bci indicates the bytecode for which to compile a
   // continuation.
   Compile(ciEnv* ci_env, C2Compiler* compiler, ciMethod* target,
-          int entry_bci, bool subsume_loads);
+          int entry_bci, bool subsume_loads, bool do_escape_analysis);
 
   // Second major entry point.  From the TypeFunc signature, generate code
   // to pass arguments from the Java calling convention to the C calling
@@ -605,8 +605,20 @@
 
   // Build OopMaps for each GC point
   void BuildOopMaps();
-  // Append debug info for the node to the array
-  void FillLocArray( int idx, Node *local, GrowableArray<ScopeValue*> *array );
+
+  // Append debug info for the node "local" at safepoint node "sfpt" to the
+  // "array",   May also consult and add to "objs", which describes the
+  // scalar-replaced objects.
+  void FillLocArray( int idx, MachSafePointNode* sfpt,
+                     Node *local, GrowableArray<ScopeValue*> *array,
+                     GrowableArray<ScopeValue*> *objs );
+
+  // If "objs" contains an ObjectValue whose id is "id", returns it, else NULL.
+  static ObjectValue* sv_for_node_id(GrowableArray<ScopeValue*> *objs, int id);
+  // Requres that "objs" does not contains an ObjectValue whose id matches
+  // that of "sv.  Appends "sv".
+  static void set_sv_for_object_node(GrowableArray<ScopeValue*> *objs,
+                                     ObjectValue* sv );
 
   // Process an OopMap Element while emitting nodes
   void Process_OopMap_Node(MachNode *mach, int code_offset);
--- a/hotspot/src/share/vm/opto/connode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/connode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -982,34 +982,9 @@
     return new (phase->C, 3) AddINode(add1,add2);
   }
 
-  // Fold up with a prior LoadL: LoadL->ConvL2I ==> LoadI
-  // Requires we understand the 'endianess' of Longs.
-  if( andl_op == Op_LoadL ) {
-    Node *adr = andl->in(MemNode::Address);
-    // VM_LITTLE_ENDIAN is #defined appropriately in the Makefiles
-#ifndef VM_LITTLE_ENDIAN
-    // The transformation can cause problems on BIG_ENDIAN architectures
-    // where the jint is not the same address as the jlong. Specifically, we
-    // will fail to insert an anti-dependence in GCM between the LoadI and a
-    // subsequent StoreL because different memory offsets provoke
-    // flatten_alias_type() into indicating two different types.  See bug
-    // 4755222.
-
-    // Node *base = adr->is_AddP() ? adr->in(AddPNode::Base) : adr;
-    // adr = phase->transform( new (phase->C, 4) AddPNode(base,adr,phase->MakeConX(sizeof(jint))));
-    return NULL;
-#else
-    if (phase->C->alias_type(andl->adr_type())->is_volatile()) {
-      // Picking up the low half by itself bypasses the atomic load and we could
-      // end up with more than one non-atomic load.  See bugs 4432655 and 4526490.
-      // We could go to the trouble of iterating over andl's output edges and
-      // punting only if there's more than one real use, but we don't bother.
-      return NULL;
-    }
-    return new (phase->C, 3) LoadINode(andl->in(MemNode::Control),andl->in(MemNode::Memory),adr,((LoadLNode*)andl)->raw_adr_type());
-#endif
-  }
-
+  // Disable optimization: LoadL->ConvL2I ==> LoadI.
+  // It causes problems (sizes of Load and Store nodes do not match)
+  // in objects initialization code and Escape Analysis.
   return NULL;
 }
 
--- a/hotspot/src/share/vm/opto/doCall.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Sun May 04 07:05:42 2008 -0700
@@ -390,6 +390,8 @@
   }
 
   if (cg->is_inline()) {
+    // Accumulate has_loops estimate
+    C->set_has_loops(C->has_loops() || call_method->has_loops());
     C->env()->notice_inlined_method(call_method);
   }
 
--- a/hotspot/src/share/vm/opto/escape.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/escape.cpp	Sun May 04 07:05:42 2008 -0700
@@ -51,21 +51,21 @@
 }
 
 #ifndef PRODUCT
-static char *node_type_names[] = {
+static const char *node_type_names[] = {
   "UnknownType",
   "JavaObject",
   "LocalVar",
   "Field"
 };
 
-static char *esc_names[] = {
+static const char *esc_names[] = {
   "UnknownEscape",
-  "NoEscape     ",
-  "ArgEscape    ",
-  "GlobalEscape "
+  "NoEscape",
+  "ArgEscape",
+  "GlobalEscape"
 };
 
-static char *edge_type_suffix[] = {
+static const char *edge_type_suffix[] = {
  "?", // UnknownEdge
  "P", // PointsToEdge
  "D", // DeferredEdge
@@ -75,7 +75,7 @@
 void PointsToNode::dump() const {
   NodeType nt = node_type();
   EscapeState es = escape_state();
-  tty->print("%s  %s  [[", node_type_names[(int) nt], esc_names[(int) es]);
+  tty->print("%s %s %s [[", node_type_names[(int) nt], esc_names[(int) es], _scalar_replaceable ? "" : "NSR");
   for (uint i = 0; i < edge_count(); i++) {
     tty->print(" %d%s", edge_target(i), edge_type_suffix[(int) edge_type(i)]);
   }
@@ -91,9 +91,11 @@
   _collecting = true;
   this->_compile = C;
   const PointsToNode &dummy = PointsToNode();
-  _nodes = new(C->comp_arena()) GrowableArray<PointsToNode>(C->comp_arena(), (int) INITIAL_NODE_COUNT, 0, dummy);
+  int sz = C->unique();
+  _nodes = new(C->comp_arena()) GrowableArray<PointsToNode>(C->comp_arena(), sz, sz, dummy);
   _phantom_object = C->top()->_idx;
   PointsToNode *phn = ptnode_adr(_phantom_object);
+  phn->_node = C->top();
   phn->set_node_type(PointsToNode::JavaObject);
   phn->set_escape_state(PointsToNode::GlobalEscape);
 }
@@ -121,8 +123,20 @@
     f->add_edge(to_i, PointsToNode::DeferredEdge);
 }
 
-int ConnectionGraph::type_to_offset(const Type *t) {
-  const TypePtr *t_ptr = t->isa_ptr();
+int ConnectionGraph::address_offset(Node* adr, PhaseTransform *phase) {
+  const Type *adr_type = phase->type(adr);
+  if (adr->is_AddP() && adr_type->isa_oopptr() == NULL &&
+      adr->in(AddPNode::Address)->is_Proj() &&
+      adr->in(AddPNode::Address)->in(0)->is_Allocate()) {
+    // We are computing a raw address for a store captured by an Initialize
+    // compute an appropriate address type. AddP cases #3 and #5 (see below).
+    int offs = (int)phase->find_intptr_t_con(adr->in(AddPNode::Offset), Type::OffsetBot);
+    assert(offs != Type::OffsetBot ||
+           adr->in(AddPNode::Address)->in(0)->is_AllocateArray(),
+           "offset must be a constant or it is initialization of array");
+    return offs;
+  }
+  const TypePtr *t_ptr = adr_type->isa_ptr();
   assert(t_ptr != NULL, "must be a pointer type");
   return t_ptr->offset();
 }
@@ -147,12 +161,28 @@
     npt->set_escape_state(es);
 }
 
+void ConnectionGraph::add_node(Node *n, PointsToNode::NodeType nt,
+                               PointsToNode::EscapeState es, bool done) {
+  PointsToNode* ptadr = ptnode_adr(n->_idx);
+  ptadr->_node = n;
+  ptadr->set_node_type(nt);
+
+  // inline set_escape_state(idx, es);
+  PointsToNode::EscapeState old_es = ptadr->escape_state();
+  if (es > old_es)
+    ptadr->set_escape_state(es);
+
+  if (done)
+    _processed.set(n->_idx);
+}
+
 PointsToNode::EscapeState ConnectionGraph::escape_state(Node *n, PhaseTransform *phase) {
   uint idx = n->_idx;
   PointsToNode::EscapeState es;
 
-  // If we are still collecting we don't know the answer yet
-  if (_collecting)
+  // If we are still collecting or there were no non-escaping allocations
+  // we don't know the answer yet
+  if (_collecting || !_has_allocations)
     return PointsToNode::UnknownEscape;
 
   // if the node was created after the escape computation, return
@@ -169,9 +199,9 @@
   // compute max escape state of anything this node could point to
   VectorSet ptset(Thread::current()->resource_area());
   PointsTo(ptset, n, phase);
-  for( VectorSetI i(&ptset); i.test() && es != PointsToNode::GlobalEscape; ++i ) {
+  for(VectorSetI i(&ptset); i.test() && es != PointsToNode::GlobalEscape; ++i) {
     uint pt = i.elem;
-    PointsToNode::EscapeState pes = _nodes->at(pt).escape_state();
+    PointsToNode::EscapeState pes = _nodes->adr_at(pt)->escape_state();
     if (pes > es)
       es = pes;
   }
@@ -185,7 +215,7 @@
   VectorSet visited(Thread::current()->resource_area());
   GrowableArray<uint>  worklist;
 
-  n = skip_casts(n);
+  n = n->uncast();
   PointsToNode  npt = _nodes->at_grow(n->_idx);
 
   // If we have a JavaObject, return just that object
@@ -193,39 +223,33 @@
     ptset.set(n->_idx);
     return;
   }
-  // we may have a Phi which has not been processed
-  if (npt._node == NULL) {
-    assert(n->is_Phi(), "unprocessed node must be a Phi");
-    record_for_escape_analysis(n);
-    npt = _nodes->at(n->_idx);
-  }
+  assert(npt._node != NULL, "unregistered node");
+
   worklist.push(n->_idx);
   while(worklist.length() > 0) {
     int ni = worklist.pop();
     PointsToNode pn = _nodes->at_grow(ni);
-    if (!visited.test(ni)) {
-      visited.set(ni);
-
+    if (!visited.test_set(ni)) {
       // ensure that all inputs of a Phi have been processed
-      if (_collecting && pn._node->is_Phi()) {
-        PhiNode *phi = pn._node->as_Phi();
-        process_phi_escape(phi, phase);
-      }
+      assert(!_collecting || !pn._node->is_Phi() || _processed.test(ni),"");
 
       int edges_processed = 0;
       for (uint e = 0; e < pn.edge_count(); e++) {
+        uint etgt = pn.edge_target(e);
         PointsToNode::EdgeType et = pn.edge_type(e);
         if (et == PointsToNode::PointsToEdge) {
-          ptset.set(pn.edge_target(e));
+          ptset.set(etgt);
           edges_processed++;
         } else if (et == PointsToNode::DeferredEdge) {
-          worklist.push(pn.edge_target(e));
+          worklist.push(etgt);
           edges_processed++;
+        } else {
+          assert(false,"neither PointsToEdge or DeferredEdge");
         }
       }
       if (edges_processed == 0) {
-        // no deferred or pointsto edges found.  Assume the value was set outside
-        // this method.  Add the phantom object to the pointsto set.
+        // no deferred or pointsto edges found.  Assume the value was set
+        // outside this method.  Add the phantom object to the pointsto set.
         ptset.set(_phantom_object);
       }
     }
@@ -239,20 +263,23 @@
   PointsToNode *ptn = ptnode_adr(ni);
 
   while(i < ptn->edge_count()) {
+    uint t = ptn->edge_target(i);
+    PointsToNode *ptt = ptnode_adr(t);
     if (ptn->edge_type(i) != PointsToNode::DeferredEdge) {
       i++;
     } else {
-      uint t = ptn->edge_target(i);
-      PointsToNode *ptt = ptnode_adr(t);
       ptn->remove_edge(t, PointsToNode::DeferredEdge);
-      if(!visited.test(t)) {
-        visited.set(t);
+      if(!visited.test_set(t)) {
         for (uint j = 0; j < ptt->edge_count(); j++) {
           uint n1 = ptt->edge_target(j);
           PointsToNode *pt1 = ptnode_adr(n1);
           switch(ptt->edge_type(j)) {
             case PointsToNode::PointsToEdge:
-               add_pointsto_edge(ni, n1);
+              add_pointsto_edge(ni, n1);
+              if(n1 == _phantom_object) {
+                // Special case - field set outside (globally escaping).
+                ptn->set_escape_state(PointsToNode::GlobalEscape);
+              }
               break;
             case PointsToNode::DeferredEdge:
               add_deferred_edge(ni, n1);
@@ -291,8 +318,8 @@
   }
 }
 
-//  Add a deferred  edge from node given by "from_i" to any field of adr_i whose offset
-//  matches "offset"
+// Add a deferred  edge from node given by "from_i" to any field of adr_i
+// whose offset matches "offset".
 void ConnectionGraph::add_deferred_edge_to_fields(uint from_i, uint adr_i, int offs) {
   PointsToNode an = _nodes->at_grow(adr_i);
   for (uint fe = 0; fe < an.edge_count(); fe++) {
@@ -310,25 +337,115 @@
   }
 }
 
-//
-// Search memory chain of "mem" to find a MemNode whose address
-// is the specified alias index.  Returns the MemNode found or the
-// first non-MemNode encountered.
-//
-Node *ConnectionGraph::find_mem(Node *mem, int alias_idx, PhaseGVN  *igvn) {
-  if (mem == NULL)
-    return mem;
-  while (mem->is_Mem()) {
-    const Type *at = igvn->type(mem->in(MemNode::Address));
-    if (at != Type::TOP) {
-      assert (at->isa_ptr() != NULL, "pointer type required.");
-      int idx = _compile->get_alias_index(at->is_ptr());
-      if (idx == alias_idx)
-        break;
-    }
-    mem = mem->in(MemNode::Memory);
+// Helper functions
+
+static Node* get_addp_base(Node *addp) {
+  assert(addp->is_AddP(), "must be AddP");
+  //
+  // AddP cases for Base and Address inputs:
+  // case #1. Direct object's field reference:
+  //     Allocate
+  //       |
+  //     Proj #5 ( oop result )
+  //       |
+  //     CheckCastPP (cast to instance type)
+  //      | |
+  //     AddP  ( base == address )
+  //
+  // case #2. Indirect object's field reference:
+  //      Phi
+  //       |
+  //     CastPP (cast to instance type)
+  //      | |
+  //     AddP  ( base == address )
+  //
+  // case #3. Raw object's field reference for Initialize node:
+  //      Allocate
+  //        |
+  //      Proj #5 ( oop result )
+  //  top   |
+  //     \  |
+  //     AddP  ( base == top )
+  //
+  // case #4. Array's element reference:
+  //   {CheckCastPP | CastPP}
+  //     |  | |
+  //     |  AddP ( array's element offset )
+  //     |  |
+  //     AddP ( array's offset )
+  //
+  // case #5. Raw object's field reference for arraycopy stub call:
+  //          The inline_native_clone() case when the arraycopy stub is called
+  //          after the allocation before Initialize and CheckCastPP nodes.
+  //      Allocate
+  //        |
+  //      Proj #5 ( oop result )
+  //       | |
+  //       AddP  ( base == address )
+  //
+  // case #6. Constant Pool, ThreadLocal, CastX2P or
+  //          Raw object's field reference:
+  //      {ConP, ThreadLocal, CastX2P, raw Load}
+  //  top   |
+  //     \  |
+  //     AddP  ( base == top )
+  //
+  // case #7. Klass's field reference.
+  //      LoadKlass
+  //       | |
+  //       AddP  ( base == address )
+  //
+  Node *base = addp->in(AddPNode::Base)->uncast();
+  if (base->is_top()) { // The AddP case #3 and #6.
+    base = addp->in(AddPNode::Address)->uncast();
+    assert(base->Opcode() == Op_ConP || base->Opcode() == Op_ThreadLocal ||
+           base->Opcode() == Op_CastX2P ||
+           (base->is_Mem() && base->bottom_type() == TypeRawPtr::NOTNULL) ||
+           (base->is_Proj() && base->in(0)->is_Allocate()), "sanity");
   }
-  return mem;
+  return base;
+}
+
+static Node* find_second_addp(Node* addp, Node* n) {
+  assert(addp->is_AddP() && addp->outcnt() > 0, "Don't process dead nodes");
+
+  Node* addp2 = addp->raw_out(0);
+  if (addp->outcnt() == 1 && addp2->is_AddP() &&
+      addp2->in(AddPNode::Base) == n &&
+      addp2->in(AddPNode::Address) == addp) {
+
+    assert(addp->in(AddPNode::Base) == n, "expecting the same base");
+    //
+    // Find array's offset to push it on worklist first and
+    // as result process an array's element offset first (pushed second)
+    // to avoid CastPP for the array's offset.
+    // Otherwise the inserted CastPP (LocalVar) will point to what
+    // the AddP (Field) points to. Which would be wrong since
+    // the algorithm expects the CastPP has the same point as
+    // as AddP's base CheckCastPP (LocalVar).
+    //
+    //    ArrayAllocation
+    //     |
+    //    CheckCastPP
+    //     |
+    //    memProj (from ArrayAllocation CheckCastPP)
+    //     |  ||
+    //     |  ||   Int (element index)
+    //     |  ||    |   ConI (log(element size))
+    //     |  ||    |   /
+    //     |  ||   LShift
+    //     |  ||  /
+    //     |  AddP (array's element offset)
+    //     |  |
+    //     |  | ConI (array's offset: #12(32-bits) or #24(64-bits))
+    //     | / /
+    //     AddP (array's offset)
+    //      |
+    //     Load/Store (memory operation on array's element)
+    //
+    return addp2;
+  }
+  return NULL;
 }
 
 //
@@ -336,24 +453,33 @@
 // address of a field of an instance
 //
 void ConnectionGraph::split_AddP(Node *addp, Node *base,  PhaseGVN  *igvn) {
+  const TypeOopPtr *base_t = igvn->type(base)->isa_oopptr();
+  assert(base_t != NULL && base_t->is_instance(), "expecting instance oopptr");
   const TypeOopPtr *t = igvn->type(addp)->isa_oopptr();
-  const TypeOopPtr *base_t = igvn->type(base)->isa_oopptr();
-  assert(t != NULL,  "expecting oopptr");
-  assert(base_t != NULL && base_t->is_instance(), "expecting instance oopptr");
+  if (t == NULL) {
+    // We are computing a raw address for a store captured by an Initialize
+    // compute an appropriate address type.
+    assert(igvn->type(addp) == TypeRawPtr::NOTNULL, "must be raw pointer");
+    assert(addp->in(AddPNode::Address)->is_Proj(), "base of raw address must be result projection from allocation");
+    int offs = (int)igvn->find_intptr_t_con(addp->in(AddPNode::Offset), Type::OffsetBot);
+    assert(offs != Type::OffsetBot, "offset must be a constant");
+    t = base_t->add_offset(offs)->is_oopptr();
+  }
   uint inst_id =  base_t->instance_id();
   assert(!t->is_instance() || t->instance_id() == inst_id,
                              "old type must be non-instance or match new type");
   const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
-  // ensure an alias index is allocated for the instance type
+  // Do NOT remove the next call: ensure an new alias index is allocated
+  // for the instance type
   int alias_idx = _compile->get_alias_index(tinst);
   igvn->set_type(addp, tinst);
   // record the allocation in the node map
   set_map(addp->_idx, get_map(base->_idx));
-  // if the Address input is not the appropriate instance type (due to intervening
-  // casts,) insert a cast
+  // if the Address input is not the appropriate instance type
+  // (due to intervening casts,) insert a cast
   Node *adr = addp->in(AddPNode::Address);
   const TypeOopPtr  *atype = igvn->type(adr)->isa_oopptr();
-  if (atype->instance_id() != inst_id) {
+  if (atype != NULL && atype->instance_id() != inst_id) {
     assert(!atype->is_instance(), "no conflicting instances");
     const TypeOopPtr *new_atype = base_t->add_offset(atype->offset())->isa_oopptr();
     Node *acast = new (_compile, 2) CastPPNode(adr, new_atype);
@@ -372,8 +498,9 @@
     addp->set_req(AddPNode::Base, bcast);
     addp->set_req(AddPNode::Address, acast);
     igvn->hash_insert(addp);
-    record_for_optimizer(addp);
   }
+  // Put on IGVN worklist since at least addp's type was changed above.
+  record_for_optimizer(addp);
 }
 
 //
@@ -386,17 +513,25 @@
   new_created = false;
   int phi_alias_idx = C->get_alias_index(orig_phi->adr_type());
   // nothing to do if orig_phi is bottom memory or matches alias_idx
-  if (phi_alias_idx == Compile::AliasIdxBot || phi_alias_idx == alias_idx) {
+  if (phi_alias_idx == alias_idx) {
     return orig_phi;
   }
   // have we already created a Phi for this alias index?
   PhiNode *result = get_map_phi(orig_phi->_idx);
-  const TypePtr *atype = C->get_adr_type(alias_idx);
   if (result != NULL && C->get_alias_index(result->adr_type()) == alias_idx) {
     return result;
   }
-
+  if ((int)C->unique() + 2*NodeLimitFudgeFactor > MaxNodeLimit) {
+    if (C->do_escape_analysis() == true && !C->failing()) {
+      // Retry compilation without escape analysis.
+      // If this is the first failure, the sentinel string will "stick"
+      // to the Compile object, and the C2Compiler will see it and retry.
+      C->record_failure(C2Compiler::retry_no_escape_analysis());
+    }
+    return NULL;
+  }
   orig_phi_worklist.append_if_missing(orig_phi);
+  const TypePtr *atype = C->get_adr_type(alias_idx);
   result = PhiNode::make(orig_phi->in(0), NULL, Type::MEMORY, atype);
   set_map_phi(orig_phi->_idx, result);
   igvn->set_type(result, result->bottom_type());
@@ -414,7 +549,7 @@
   assert(alias_idx != Compile::AliasIdxBot, "can't split out bottom memory");
   Compile *C = _compile;
   bool new_phi_created;
-  PhiNode *result =  create_split_phi(orig_phi, alias_idx, orig_phi_worklist, igvn, new_phi_created);
+  PhiNode *result = create_split_phi(orig_phi, alias_idx, orig_phi_worklist, igvn, new_phi_created);
   if (!new_phi_created) {
     return result;
   }
@@ -427,45 +562,149 @@
   bool finished = false;
   while(!finished) {
     while (idx < phi->req()) {
-      Node *mem = find_mem(phi->in(idx), alias_idx, igvn);
+      Node *mem = find_inst_mem(phi->in(idx), alias_idx, orig_phi_worklist, igvn);
       if (mem != NULL && mem->is_Phi()) {
-        PhiNode *nphi = create_split_phi(mem->as_Phi(), alias_idx, orig_phi_worklist, igvn, new_phi_created);
+        PhiNode *newphi = create_split_phi(mem->as_Phi(), alias_idx, orig_phi_worklist, igvn, new_phi_created);
         if (new_phi_created) {
           // found an phi for which we created a new split, push current one on worklist and begin
           // processing new one
           phi_list.push(phi);
           cur_input.push(idx);
           phi = mem->as_Phi();
-          result = nphi;
+          result = newphi;
           idx = 1;
           continue;
         } else {
-          mem = nphi;
+          mem = newphi;
         }
       }
+      if (C->failing()) {
+        return NULL;
+      }
       result->set_req(idx++, mem);
     }
 #ifdef ASSERT
     // verify that the new Phi has an input for each input of the original
     assert( phi->req() == result->req(), "must have same number of inputs.");
     assert( result->in(0) != NULL && result->in(0) == phi->in(0), "regions must match");
+#endif
+    // Check if all new phi's inputs have specified alias index.
+    // Otherwise use old phi.
     for (uint i = 1; i < phi->req(); i++) {
-      assert((phi->in(i) == NULL) == (result->in(i) == NULL), "inputs must correspond.");
+      Node* in = result->in(i);
+      assert((phi->in(i) == NULL) == (in == NULL), "inputs must correspond.");
     }
-#endif
     // we have finished processing a Phi, see if there are any more to do
     finished = (phi_list.length() == 0 );
     if (!finished) {
       phi = phi_list.pop();
       idx = cur_input.pop();
-      PhiNode *prev_phi = get_map_phi(phi->_idx);
-      prev_phi->set_req(idx++, result);
-      result = prev_phi;
+      PhiNode *prev_result = get_map_phi(phi->_idx);
+      prev_result->set_req(idx++, result);
+      result = prev_result;
     }
   }
   return result;
 }
 
+
+//
+// The next methods are derived from methods in MemNode.
+//
+static Node *step_through_mergemem(MergeMemNode *mmem, int alias_idx, const TypeOopPtr *tinst) {
+  Node *mem = mmem;
+  // TypeInstPtr::NOTNULL+any is an OOP with unknown offset - generally
+  // means an array I have not precisely typed yet.  Do not do any
+  // alias stuff with it any time soon.
+  if( tinst->base() != Type::AnyPtr &&
+      !(tinst->klass()->is_java_lang_Object() &&
+        tinst->offset() == Type::OffsetBot) ) {
+    mem = mmem->memory_at(alias_idx);
+    // Update input if it is progress over what we have now
+  }
+  return mem;
+}
+
+//
+// Search memory chain of "mem" to find a MemNode whose address
+// is the specified alias index.
+//
+Node* ConnectionGraph::find_inst_mem(Node *orig_mem, int alias_idx, GrowableArray<PhiNode *>  &orig_phis, PhaseGVN *phase) {
+  if (orig_mem == NULL)
+    return orig_mem;
+  Compile* C = phase->C;
+  const TypeOopPtr *tinst = C->get_adr_type(alias_idx)->isa_oopptr();
+  bool is_instance = (tinst != NULL) && tinst->is_instance();
+  Node *prev = NULL;
+  Node *result = orig_mem;
+  while (prev != result) {
+    prev = result;
+    if (result->is_Mem()) {
+      MemNode *mem = result->as_Mem();
+      const Type *at = phase->type(mem->in(MemNode::Address));
+      if (at != Type::TOP) {
+        assert (at->isa_ptr() != NULL, "pointer type required.");
+        int idx = C->get_alias_index(at->is_ptr());
+        if (idx == alias_idx)
+          break;
+      }
+      result = mem->in(MemNode::Memory);
+    }
+    if (!is_instance)
+      continue;  // don't search further for non-instance types
+    // skip over a call which does not affect this memory slice
+    if (result->is_Proj() && result->as_Proj()->_con == TypeFunc::Memory) {
+      Node *proj_in = result->in(0);
+      if (proj_in->is_Call()) {
+        CallNode *call = proj_in->as_Call();
+        if (!call->may_modify(tinst, phase)) {
+          result = call->in(TypeFunc::Memory);
+        }
+      } else if (proj_in->is_Initialize()) {
+        AllocateNode* alloc = proj_in->as_Initialize()->allocation();
+        // Stop if this is the initialization for the object instance which
+        // which contains this memory slice, otherwise skip over it.
+        if (alloc == NULL || alloc->_idx != tinst->instance_id()) {
+          result = proj_in->in(TypeFunc::Memory);
+        }
+      } else if (proj_in->is_MemBar()) {
+        result = proj_in->in(TypeFunc::Memory);
+      }
+    } else if (result->is_MergeMem()) {
+      MergeMemNode *mmem = result->as_MergeMem();
+      result = step_through_mergemem(mmem, alias_idx, tinst);
+      if (result == mmem->base_memory()) {
+        // Didn't find instance memory, search through general slice recursively.
+        result = mmem->memory_at(C->get_general_index(alias_idx));
+        result = find_inst_mem(result, alias_idx, orig_phis, phase);
+        if (C->failing()) {
+          return NULL;
+        }
+        mmem->set_memory_at(alias_idx, result);
+      }
+    } else if (result->is_Phi() &&
+               C->get_alias_index(result->as_Phi()->adr_type()) != alias_idx) {
+      Node *un = result->as_Phi()->unique_input(phase);
+      if (un != NULL) {
+        result = un;
+      } else {
+        break;
+      }
+    }
+  }
+  if (is_instance && result->is_Phi()) {
+    PhiNode *mphi = result->as_Phi();
+    assert(mphi->bottom_type() == Type::MEMORY, "memory phi required");
+    const TypePtr *t = mphi->adr_type();
+    if (C->get_alias_index(t) != alias_idx) {
+      result = split_memory_phi(mphi, alias_idx, orig_phis, phase);
+    }
+  }
+  // the result is either MemNode, PhiNode, InitializeNode.
+  return result;
+}
+
+
 //
 //  Convert the types of unescaped object to instance types where possible,
 //  propagate the new type information through the graph, and update memory
@@ -564,51 +803,101 @@
   VectorSet visited(Thread::current()->resource_area());
   VectorSet ptset(Thread::current()->resource_area());
 
-  //  Phase 1:  Process possible allocations from alloc_worklist.  Create instance
-  //            types for the CheckCastPP for allocations where possible.
+
+  //  Phase 1:  Process possible allocations from alloc_worklist.
+  //  Create instance types for the CheckCastPP for allocations where possible.
   while (alloc_worklist.length() != 0) {
     Node *n = alloc_worklist.pop();
     uint ni = n->_idx;
+    const TypeOopPtr* tinst = NULL;
     if (n->is_Call()) {
       CallNode *alloc = n->as_Call();
       // copy escape information to call node
-      PointsToNode ptn = _nodes->at(alloc->_idx);
+      PointsToNode* ptn = _nodes->adr_at(alloc->_idx);
       PointsToNode::EscapeState es = escape_state(alloc, igvn);
-      alloc->_escape_state = es;
+      // We have an allocation or call which returns a Java object,
+      // see if it is unescaped.
+      if (es != PointsToNode::NoEscape || !ptn->_scalar_replaceable)
+        continue;
+      if (alloc->is_Allocate()) {
+        // Set the scalar_replaceable flag before the next check.
+        alloc->as_Allocate()->_is_scalar_replaceable = true;
+      }
       // find CheckCastPP of call return value
-      n = alloc->proj_out(TypeFunc::Parms);
-      if (n != NULL && n->outcnt() == 1) {
-        n = n->unique_out();
-        if (n->Opcode() != Op_CheckCastPP) {
+      n = alloc->result_cast();
+      if (n == NULL ||          // No uses accept Initialize or
+          !n->is_CheckCastPP()) // not unique CheckCastPP.
+        continue;
+      // The inline code for Object.clone() casts the allocation result to
+      // java.lang.Object and then to the the actual type of the allocated
+      // object. Detect this case and use the second cast.
+      if (alloc->is_Allocate() && n->as_Type()->type() == TypeInstPtr::NOTNULL
+          && igvn->type(alloc->in(AllocateNode::KlassNode)) != TypeKlassPtr::OBJECT) {
+        Node *cast2 = NULL;
+        for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
+          Node *use = n->fast_out(i);
+          if (use->is_CheckCastPP()) {
+            cast2 = use;
+            break;
+          }
+        }
+        if (cast2 != NULL) {
+          n = cast2;
+        } else {
           continue;
         }
-      } else {
-        continue;
       }
-      // we have an allocation or call which returns a Java object, see if it is unescaped
-      if (es != PointsToNode::NoEscape || !ptn._unique_type) {
-        continue; //  can't make a unique type
-      }
+      set_escape_state(n->_idx, es);
+      // in order for an object to be stackallocatable, it must be:
+      //   - a direct allocation (not a call returning an object)
+      //   - non-escaping
+      //   - eligible to be a unique type
+      //   - not determined to be ineligible by escape analysis
       set_map(alloc->_idx, n);
       set_map(n->_idx, alloc);
-      const TypeInstPtr *t = igvn->type(n)->isa_instptr();
-      // Unique types which are arrays are not currently supported.
-      // The check for AllocateArray is needed in case an array
-      // allocation is immediately cast to Object
-      if (t == NULL || alloc->is_AllocateArray())
+      const TypeOopPtr *t = igvn->type(n)->isa_oopptr();
+      if (t == NULL)
         continue;  // not a TypeInstPtr
-      const TypeOopPtr *tinst = t->cast_to_instance(ni);
+      tinst = t->cast_to_instance(ni);
       igvn->hash_delete(n);
       igvn->set_type(n,  tinst);
       n->raise_bottom_type(tinst);
       igvn->hash_insert(n);
+      record_for_optimizer(n);
+      if (alloc->is_Allocate() && ptn->_scalar_replaceable &&
+          (t->isa_instptr() || t->isa_aryptr())) {
+        // An allocation may have an Initialize which has raw stores. Scan
+        // the users of the raw allocation result and push AddP users
+        // on alloc_worklist.
+        Node *raw_result = alloc->proj_out(TypeFunc::Parms);
+        assert (raw_result != NULL, "must have an allocation result");
+        for (DUIterator_Fast imax, i = raw_result->fast_outs(imax); i < imax; i++) {
+          Node *use = raw_result->fast_out(i);
+          if (use->is_AddP() && use->outcnt() > 0) { // Don't process dead nodes
+            Node* addp2 = find_second_addp(use, raw_result);
+            if (addp2 != NULL) {
+              assert(alloc->is_AllocateArray(),"array allocation was expected");
+              alloc_worklist.append_if_missing(addp2);
+            }
+            alloc_worklist.append_if_missing(use);
+          } else if (use->is_Initialize()) {
+            memnode_worklist.append_if_missing(use);
+          }
+        }
+      }
     } else if (n->is_AddP()) {
       ptset.Clear();
-      PointsTo(ptset, n->in(AddPNode::Address), igvn);
+      PointsTo(ptset, get_addp_base(n), igvn);
       assert(ptset.Size() == 1, "AddP address is unique");
-      Node *base = get_map(ptset.getelem());
+      uint elem = ptset.getelem(); // Allocation node's index
+      if (elem == _phantom_object)
+        continue; // Assume the value was set outside this method.
+      Node *base = get_map(elem);  // CheckCastPP node
       split_AddP(n, base, igvn);
-    } else if (n->is_Phi() || n->Opcode() == Op_CastPP || n->Opcode() == Op_CheckCastPP) {
+      tinst = igvn->type(base)->isa_oopptr();
+    } else if (n->is_Phi() ||
+               n->is_CheckCastPP() ||
+               (n->is_ConstraintCast() && n->Opcode() == Op_CastPP)) {
       if (visited.test_set(n->_idx)) {
         assert(n->is_Phi(), "loops only through Phi's");
         continue;  // already processed
@@ -616,17 +905,23 @@
       ptset.Clear();
       PointsTo(ptset, n, igvn);
       if (ptset.Size() == 1) {
+        uint elem = ptset.getelem(); // Allocation node's index
+        if (elem == _phantom_object)
+          continue; // Assume the value was set outside this method.
+        Node *val = get_map(elem);   // CheckCastPP node
         TypeNode *tn = n->as_Type();
-        Node *val = get_map(ptset.getelem());
-        const TypeInstPtr *val_t = igvn->type(val)->isa_instptr();;
-        assert(val_t != NULL && val_t->is_instance(), "instance type expected.");
-        const TypeInstPtr *tn_t = igvn->type(tn)->isa_instptr();;
+        tinst = igvn->type(val)->isa_oopptr();
+        assert(tinst != NULL && tinst->is_instance() &&
+               tinst->instance_id() == elem , "instance type expected.");
+        const TypeOopPtr *tn_t = igvn->type(tn)->isa_oopptr();
 
-        if (tn_t != NULL && val_t->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE)->higher_equal(tn_t)) {
+        if (tn_t != NULL &&
+ tinst->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE)->higher_equal(tn_t)) {
           igvn->hash_delete(tn);
-          igvn->set_type(tn, val_t);
-          tn->set_type(val_t);
+          igvn->set_type(tn, tinst);
+          tn->set_type(tinst);
           igvn->hash_insert(tn);
+          record_for_optimizer(n);
         }
       }
     } else {
@@ -636,13 +931,38 @@
     for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
       Node *use = n->fast_out(i);
       if(use->is_Mem() && use->in(MemNode::Address) == n) {
-        memnode_worklist.push(use);
-      } else if (use->is_AddP() || use->is_Phi() || use->Opcode() == Op_CastPP || use->Opcode() == Op_CheckCastPP) {
-        alloc_worklist.push(use);
+        memnode_worklist.append_if_missing(use);
+      } else if (use->is_Initialize()) {
+        memnode_worklist.append_if_missing(use);
+      } else if (use->is_MergeMem()) {
+        mergemem_worklist.append_if_missing(use);
+      } else if (use->is_Call() && tinst != NULL) {
+        // Look for MergeMem nodes for calls which reference unique allocation
+        // (through CheckCastPP nodes) even for debug info.
+        Node* m = use->in(TypeFunc::Memory);
+        uint iid = tinst->instance_id();
+        while (m->is_Proj() && m->in(0)->is_Call() &&
+               m->in(0) != use && !m->in(0)->_idx != iid) {
+          m = m->in(0)->in(TypeFunc::Memory);
+        }
+        if (m->is_MergeMem()) {
+          mergemem_worklist.append_if_missing(m);
+        }
+      } else if (use->is_AddP() && use->outcnt() > 0) { // No dead nodes
+        Node* addp2 = find_second_addp(use, n);
+        if (addp2 != NULL) {
+          alloc_worklist.append_if_missing(addp2);
+        }
+        alloc_worklist.append_if_missing(use);
+      } else if (use->is_Phi() ||
+                 use->is_CheckCastPP() ||
+                 (use->is_ConstraintCast() && use->Opcode() == Op_CastPP)) {
+        alloc_worklist.append_if_missing(use);
       }
     }
 
   }
+  // New alias types were created in split_AddP().
   uint new_index_end = (uint) _compile->num_alias_types();
 
   //  Phase 2:  Process MemNode's from memnode_worklist. compute new address type and
@@ -651,29 +971,37 @@
   if (memnode_worklist.length() == 0)
     return;  // nothing to do
 
-
   while (memnode_worklist.length() != 0) {
     Node *n = memnode_worklist.pop();
+    if (visited.test_set(n->_idx))
+      continue;
     if (n->is_Phi()) {
       assert(n->as_Phi()->adr_type() != TypePtr::BOTTOM, "narrow memory slice required");
       // we don't need to do anything, but the users must be pushed if we haven't processed
       // this Phi before
-      if (visited.test_set(n->_idx))
+    } else if (n->is_Initialize()) {
+      // we don't need to do anything, but the users of the memory projection must be pushed
+      n = n->as_Initialize()->proj_out(TypeFunc::Memory);
+      if (n == NULL)
         continue;
     } else {
       assert(n->is_Mem(), "memory node required.");
       Node *addr = n->in(MemNode::Address);
+      assert(addr->is_AddP(), "AddP required");
       const Type *addr_t = igvn->type(addr);
       if (addr_t == Type::TOP)
         continue;
       assert (addr_t->isa_ptr() != NULL, "pointer type required.");
       int alias_idx = _compile->get_alias_index(addr_t->is_ptr());
-      Node *mem = find_mem(n->in(MemNode::Memory), alias_idx, igvn);
-      if (mem->is_Phi()) {
-        mem = split_memory_phi(mem->as_Phi(), alias_idx, orig_phis, igvn);
+      assert ((uint)alias_idx < new_index_end, "wrong alias index");
+      Node *mem = find_inst_mem(n->in(MemNode::Memory), alias_idx, orig_phis, igvn);
+      if (_compile->failing()) {
+        return;
       }
-      if (mem != n->in(MemNode::Memory))
+      if (mem != n->in(MemNode::Memory)) {
         set_map(n->_idx, mem);
+        _nodes->adr_at(n->_idx)->_node = n;
+      }
       if (n->is_Load()) {
         continue;  // don't push users
       } else if (n->is_LoadStore()) {
@@ -692,29 +1020,33 @@
     for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
       Node *use = n->fast_out(i);
       if (use->is_Phi()) {
-        memnode_worklist.push(use);
+        memnode_worklist.append_if_missing(use);
       } else if(use->is_Mem() && use->in(MemNode::Memory) == n) {
-        memnode_worklist.push(use);
+        memnode_worklist.append_if_missing(use);
+      } else if (use->is_Initialize()) {
+        memnode_worklist.append_if_missing(use);
       } else if (use->is_MergeMem()) {
-        mergemem_worklist.push(use);
+        mergemem_worklist.append_if_missing(use);
       }
     }
   }
 
-  //  Phase 3:  Process MergeMem nodes from mergemem_worklist.  Walk each memory slice
-  //            moving the first node encountered of each  instance type to the
-  //            the input corresponding to its alias index.
+  //  Phase 3:  Process MergeMem nodes from mergemem_worklist.
+  //            Walk each memory moving the first node encountered of each
+  //            instance type to the the input corresponding to its alias index.
   while (mergemem_worklist.length() != 0) {
     Node *n = mergemem_worklist.pop();
     assert(n->is_MergeMem(), "MergeMem node required.");
+    if (visited.test_set(n->_idx))
+      continue;
     MergeMemNode *nmm = n->as_MergeMem();
     // Note: we don't want to use MergeMemStream here because we only want to
-    //       scan inputs which exist at the start, not ones we add during processing
+    //  scan inputs which exist at the start, not ones we add during processing.
     uint nslices = nmm->req();
     igvn->hash_delete(nmm);
     for (uint i = Compile::AliasIdxRaw+1; i < nslices; i++) {
-      Node * mem = nmm->in(i);
-      Node * cur = NULL;
+      Node* mem = nmm->in(i);
+      Node* cur = NULL;
       if (mem == NULL || mem->is_top())
         continue;
       while (mem->is_Mem()) {
@@ -734,26 +1066,76 @@
         mem = mem->in(MemNode::Memory);
       }
       nmm->set_memory_at(i, (cur != NULL) ? cur : mem);
-      if (mem->is_Phi()) {
-        // We have encountered a Phi, we need to split the Phi for
-        // any  instance of the current type if we haven't encountered
-        //  a value of the instance along the chain.
-        for (uint ni = new_index_start; ni < new_index_end; ni++) {
-          if((uint)_compile->get_general_index(ni) == i) {
-            Node *m = (ni >= nmm->req()) ? nmm->empty_memory() : nmm->in(ni);
-            if (nmm->is_empty_memory(m)) {
-              nmm->set_memory_at(ni, split_memory_phi(mem->as_Phi(), ni, orig_phis, igvn));
+      // Find any instance of the current type if we haven't encountered
+      // a value of the instance along the chain.
+      for (uint ni = new_index_start; ni < new_index_end; ni++) {
+        if((uint)_compile->get_general_index(ni) == i) {
+          Node *m = (ni >= nmm->req()) ? nmm->empty_memory() : nmm->in(ni);
+          if (nmm->is_empty_memory(m)) {
+            Node* result = find_inst_mem(mem, ni, orig_phis, igvn);
+            if (_compile->failing()) {
+              return;
+            }
+            nmm->set_memory_at(ni, result);
+          }
+        }
+      }
+    }
+    // Find the rest of instances values
+    for (uint ni = new_index_start; ni < new_index_end; ni++) {
+      const TypeOopPtr *tinst = igvn->C->get_adr_type(ni)->isa_oopptr();
+      Node* result = step_through_mergemem(nmm, ni, tinst);
+      if (result == nmm->base_memory()) {
+        // Didn't find instance memory, search through general slice recursively.
+        result = nmm->memory_at(igvn->C->get_general_index(ni));
+        result = find_inst_mem(result, ni, orig_phis, igvn);
+        if (_compile->failing()) {
+          return;
+        }
+        nmm->set_memory_at(ni, result);
+      }
+    }
+    igvn->hash_insert(nmm);
+    record_for_optimizer(nmm);
+
+    // Propagate new memory slices to following MergeMem nodes.
+    for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
+      Node *use = n->fast_out(i);
+      if (use->is_Call()) {
+        CallNode* in = use->as_Call();
+        if (in->proj_out(TypeFunc::Memory) != NULL) {
+          Node* m = in->proj_out(TypeFunc::Memory);
+          for (DUIterator_Fast jmax, j = m->fast_outs(jmax); j < jmax; j++) {
+            Node* mm = m->fast_out(j);
+            if (mm->is_MergeMem()) {
+              mergemem_worklist.append_if_missing(mm);
+            }
+          }
+        }
+        if (use->is_Allocate()) {
+          use = use->as_Allocate()->initialization();
+          if (use == NULL) {
+            continue;
+          }
+        }
+      }
+      if (use->is_Initialize()) {
+        InitializeNode* in = use->as_Initialize();
+        if (in->proj_out(TypeFunc::Memory) != NULL) {
+          Node* m = in->proj_out(TypeFunc::Memory);
+          for (DUIterator_Fast jmax, j = m->fast_outs(jmax); j < jmax; j++) {
+            Node* mm = m->fast_out(j);
+            if (mm->is_MergeMem()) {
+              mergemem_worklist.append_if_missing(mm);
             }
           }
         }
       }
     }
-    igvn->hash_insert(nmm);
-    record_for_optimizer(nmm);
   }
 
-  //  Phase 4:  Update the inputs of non-instance memory Phis and the Memory input of memnodes
-  //
+  //  Phase 4:  Update the inputs of non-instance memory Phis and
+  //            the Memory input of memnodes
   // First update the inputs of any non-instance Phi's from
   // which we split out an instance Phi.  Note we don't have
   // to recursively process Phi's encounted on the input memory
@@ -765,7 +1147,10 @@
     igvn->hash_delete(phi);
     for (uint i = 1; i < phi->req(); i++) {
       Node *mem = phi->in(i);
-      Node *new_mem = find_mem(mem, alias_idx, igvn);
+      Node *new_mem = find_inst_mem(mem, alias_idx, orig_phis, igvn);
+      if (_compile->failing()) {
+        return;
+      }
       if (mem != new_mem) {
         phi->set_req(i, new_mem);
       }
@@ -779,7 +1164,7 @@
   for (int i = 0; i < _nodes->length(); i++) {
     Node *nmem = get_map(i);
     if (nmem != NULL) {
-      Node *n = _nodes->at(i)._node;
+      Node *n = _nodes->adr_at(i)->_node;
       if (n != NULL && n->is_Mem()) {
         igvn->hash_delete(n);
         n->set_req(MemNode::Memory, nmem);
@@ -791,59 +1176,110 @@
 }
 
 void ConnectionGraph::compute_escape() {
-  GrowableArray<int>  worklist;
-  GrowableArray<Node *>  alloc_worklist;
-  VectorSet visited(Thread::current()->resource_area());
-  PhaseGVN  *igvn = _compile->initial_gvn();
+
+  // 1. Populate Connection Graph with Ideal nodes.
+
+  Unique_Node_List worklist_init;
+  worklist_init.map(_compile->unique(), NULL);  // preallocate space
+
+  // Initialize worklist
+  if (_compile->root() != NULL) {
+    worklist_init.push(_compile->root());
+  }
+
+  GrowableArray<int> cg_worklist;
+  PhaseGVN* igvn = _compile->initial_gvn();
+  bool has_allocations = false;
+
+  // Push all useful nodes onto CG list and set their type.
+  for( uint next = 0; next < worklist_init.size(); ++next ) {
+    Node* n = worklist_init.at(next);
+    record_for_escape_analysis(n, igvn);
+    if (n->is_Call() &&
+        _nodes->adr_at(n->_idx)->node_type() == PointsToNode::JavaObject) {
+      has_allocations = true;
+    }
+    if(n->is_AddP())
+      cg_worklist.append(n->_idx);
+    for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
+      Node* m = n->fast_out(i);   // Get user
+      worklist_init.push(m);
+    }
+  }
 
-  // process Phi nodes from the deferred list, they may not have
-  while(_deferred.size() > 0) {
-    Node * n = _deferred.pop();
-    PhiNode * phi = n->as_Phi();
+  if (has_allocations) {
+    _has_allocations = true;
+  } else {
+    _has_allocations = false;
+    _collecting = false;
+    return; // Nothing to do.
+  }
+
+  // 2. First pass to create simple CG edges (doesn't require to walk CG).
+  for( uint next = 0; next < _delayed_worklist.size(); ++next ) {
+    Node* n = _delayed_worklist.at(next);
+    build_connection_graph(n, igvn);
+  }
 
-    process_phi_escape(phi, igvn);
+  // 3. Pass to create fields edges (Allocate -F-> AddP).
+  for( int next = 0; next < cg_worklist.length(); ++next ) {
+    int ni = cg_worklist.at(next);
+    build_connection_graph(_nodes->adr_at(ni)->_node, igvn);
+  }
+
+  cg_worklist.clear();
+  cg_worklist.append(_phantom_object);
+
+  // 4. Build Connection Graph which need
+  //    to walk the connection graph.
+  for (uint ni = 0; ni < (uint)_nodes->length(); ni++) {
+    PointsToNode* ptn = _nodes->adr_at(ni);
+    Node *n = ptn->_node;
+    if (n != NULL) { // Call, AddP, LoadP, StoreP
+      build_connection_graph(n, igvn);
+      if (ptn->node_type() != PointsToNode::UnknownType)
+        cg_worklist.append(n->_idx); // Collect CG nodes
+    }
   }
 
   VectorSet ptset(Thread::current()->resource_area());
+  GrowableArray<Node*>  alloc_worklist;
+  GrowableArray<int>  worklist;
 
   // remove deferred edges from the graph and collect
   // information we will need for type splitting
-  for (uint ni = 0; ni < (uint)_nodes->length(); ni++) {
-    PointsToNode * ptn = _nodes->adr_at(ni);
+  for( int next = 0; next < cg_worklist.length(); ++next ) {
+    int ni = cg_worklist.at(next);
+    PointsToNode* ptn = _nodes->adr_at(ni);
     PointsToNode::NodeType nt = ptn->node_type();
-
-    if (nt == PointsToNode::UnknownType) {
-      continue;  // not a node we are interested in
-    }
     Node *n = ptn->_node;
     if (nt == PointsToNode::LocalVar || nt == PointsToNode::Field) {
       remove_deferred(ni);
       if (n->is_AddP()) {
-        // if this AddP computes an address which may point to more that one
-        // object, nothing the address points to can be a unique type.
-        Node *base = n->in(AddPNode::Base);
+        // If this AddP computes an address which may point to more that one
+        // object, nothing the address points to can be scalar replaceable.
+        Node *base = get_addp_base(n);
         ptset.Clear();
         PointsTo(ptset, base, igvn);
         if (ptset.Size() > 1) {
           for( VectorSetI j(&ptset); j.test(); ++j ) {
-            PointsToNode *ptaddr = _nodes->adr_at(j.elem);
-            ptaddr->_unique_type = false;
+            uint pt = j.elem;
+            ptnode_adr(pt)->_scalar_replaceable = false;
           }
         }
       }
-    } else if (n->is_Call()) {
-        // initialize _escape_state of calls to GlobalEscape
-        n->as_Call()->_escape_state = PointsToNode::GlobalEscape;
-        // push call on alloc_worlist (alocations are calls)
-        // for processing by split_unique_types()
-        alloc_worklist.push(n);
+    } else if (nt == PointsToNode::JavaObject && n->is_Call()) {
+      // Push call on alloc_worlist (alocations are calls)
+      // for processing by split_unique_types().
+      alloc_worklist.append(n);
     }
   }
+
   // push all GlobalEscape nodes on the worklist
-  for (uint nj = 0; nj < (uint)_nodes->length(); nj++) {
-    if (_nodes->at(nj).escape_state() == PointsToNode::GlobalEscape) {
-      worklist.append(nj);
-    }
+  for( int next = 0; next < cg_worklist.length(); ++next ) {
+    int nk = cg_worklist.at(next);
+    if (_nodes->adr_at(nk)->escape_state() == PointsToNode::GlobalEscape)
+      worklist.append(nk);
   }
   // mark all node reachable from GlobalEscape nodes
   while(worklist.length() > 0) {
@@ -851,7 +1287,7 @@
     for (uint ei = 0; ei < n.edge_count(); ei++) {
       uint npi = n.edge_target(ei);
       PointsToNode *np = ptnode_adr(npi);
-      if (np->escape_state() != PointsToNode::GlobalEscape) {
+      if (np->escape_state() < PointsToNode::GlobalEscape) {
         np->set_escape_state(PointsToNode::GlobalEscape);
         worklist.append_if_missing(npi);
       }
@@ -859,128 +1295,191 @@
   }
 
   // push all ArgEscape nodes on the worklist
-  for (uint nk = 0; nk < (uint)_nodes->length(); nk++) {
-    if (_nodes->at(nk).escape_state() == PointsToNode::ArgEscape)
+  for( int next = 0; next < cg_worklist.length(); ++next ) {
+    int nk = cg_worklist.at(next);
+    if (_nodes->adr_at(nk)->escape_state() == PointsToNode::ArgEscape)
       worklist.push(nk);
   }
   // mark all node reachable from ArgEscape nodes
   while(worklist.length() > 0) {
     PointsToNode n = _nodes->at(worklist.pop());
-
     for (uint ei = 0; ei < n.edge_count(); ei++) {
       uint npi = n.edge_target(ei);
       PointsToNode *np = ptnode_adr(npi);
-      if (np->escape_state() != PointsToNode::ArgEscape) {
+      if (np->escape_state() < PointsToNode::ArgEscape) {
         np->set_escape_state(PointsToNode::ArgEscape);
         worklist.append_if_missing(npi);
       }
     }
   }
+
+  // push all NoEscape nodes on the worklist
+  for( int next = 0; next < cg_worklist.length(); ++next ) {
+    int nk = cg_worklist.at(next);
+    if (_nodes->adr_at(nk)->escape_state() == PointsToNode::NoEscape)
+      worklist.push(nk);
+  }
+  // mark all node reachable from NoEscape nodes
+  while(worklist.length() > 0) {
+    PointsToNode n = _nodes->at(worklist.pop());
+    for (uint ei = 0; ei < n.edge_count(); ei++) {
+      uint npi = n.edge_target(ei);
+      PointsToNode *np = ptnode_adr(npi);
+      if (np->escape_state() < PointsToNode::NoEscape) {
+        np->set_escape_state(PointsToNode::NoEscape);
+        worklist.append_if_missing(npi);
+      }
+    }
+  }
+
   _collecting = false;
 
-  // Now use the escape information to create unique types for
-  // unescaped objects
-  split_unique_types(alloc_worklist);
-}
+  has_allocations = false; // Are there scalar replaceable allocations?
 
-Node * ConnectionGraph::skip_casts(Node *n) {
-  while(n->Opcode() == Op_CastPP || n->Opcode() == Op_CheckCastPP) {
-    n = n->in(1);
+  for( int next = 0; next < alloc_worklist.length(); ++next ) {
+    Node* n = alloc_worklist.at(next);
+    uint ni = n->_idx;
+    PointsToNode* ptn = _nodes->adr_at(ni);
+    PointsToNode::EscapeState es = ptn->escape_state();
+    if (ptn->escape_state() == PointsToNode::NoEscape &&
+        ptn->_scalar_replaceable) {
+      has_allocations = true;
+      break;
+    }
   }
-  return n;
-}
-
-void ConnectionGraph::process_phi_escape(PhiNode *phi, PhaseTransform *phase) {
-
-  if (phi->type()->isa_oopptr() == NULL)
-    return;  // nothing to do if not an oop
-
-  PointsToNode *ptadr = ptnode_adr(phi->_idx);
-  int incount = phi->req();
-  int non_null_inputs = 0;
+  if (!has_allocations) {
+    return; // Nothing to do.
+  }
 
-  for (int i = 1; i < incount ; i++) {
-    if (phi->in(i) != NULL)
-      non_null_inputs++;
-  }
-  if (non_null_inputs == ptadr->_inputs_processed)
-    return;  // no new inputs since the last time this node was processed,
-             // the current information is valid
+  if(_compile->AliasLevel() >= 3 && EliminateAllocations) {
+    // Now use the escape information to create unique types for
+    // unescaped objects
+    split_unique_types(alloc_worklist);
+    if (_compile->failing())  return;
+
+    // Clean up after split unique types.
+    ResourceMark rm;
+    PhaseRemoveUseless pru(_compile->initial_gvn(), _compile->for_igvn());
 
-  ptadr->_inputs_processed = non_null_inputs;  // prevent recursive processing of this node
-  for (int j = 1; j < incount ; j++) {
-    Node * n = phi->in(j);
-    if (n == NULL)
-      continue;  // ignore NULL
-    n =  skip_casts(n);
-    if (n->is_top() || n == phi)
-      continue;  // ignore top or inputs which go back this node
-    int nopc = n->Opcode();
-    PointsToNode  npt = _nodes->at(n->_idx);
-    if (_nodes->at(n->_idx).node_type() == PointsToNode::JavaObject) {
-      add_pointsto_edge(phi->_idx, n->_idx);
-    } else {
-      add_deferred_edge(phi->_idx, n->_idx);
+#ifdef ASSERT
+  } else if (PrintEscapeAnalysis || PrintEliminateAllocations) {
+    tty->print("=== No allocations eliminated for ");
+    C()->method()->print_short_name();
+    if(!EliminateAllocations) {
+      tty->print(" since EliminateAllocations is off ===");
+    } else if(_compile->AliasLevel() < 3) {
+      tty->print(" since AliasLevel < 3 ===");
     }
+    tty->cr();
+#endif
   }
 }
 
 void ConnectionGraph::process_call_arguments(CallNode *call, PhaseTransform *phase) {
 
-    _processed.set(call->_idx);
     switch (call->Opcode()) {
-
-    // arguments to allocation and locking don't escape
+#ifdef ASSERT
     case Op_Allocate:
     case Op_AllocateArray:
     case Op_Lock:
     case Op_Unlock:
+      assert(false, "should be done already");
       break;
+#endif
+    case Op_CallLeafNoFP:
+    {
+      // Stub calls, objects do not escape but they are not scale replaceable.
+      // Adjust escape state for outgoing arguments.
+      const TypeTuple * d = call->tf()->domain();
+      VectorSet ptset(Thread::current()->resource_area());
+      for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
+        const Type* at = d->field_at(i);
+        Node *arg = call->in(i)->uncast();
+        const Type *aat = phase->type(arg);
+        if (!arg->is_top() && at->isa_ptr() && aat->isa_ptr()) {
+          assert(aat == Type::TOP || aat == TypePtr::NULL_PTR ||
+                 aat->isa_ptr() != NULL, "expecting an Ptr");
+          set_escape_state(arg->_idx, PointsToNode::ArgEscape);
+          if (arg->is_AddP()) {
+            //
+            // The inline_native_clone() case when the arraycopy stub is called
+            // after the allocation before Initialize and CheckCastPP nodes.
+            //
+            // Set AddP's base (Allocate) as not scalar replaceable since
+            // pointer to the base (with offset) is passed as argument.
+            //
+            arg = get_addp_base(arg);
+          }
+          ptset.Clear();
+          PointsTo(ptset, arg, phase);
+          for( VectorSetI j(&ptset); j.test(); ++j ) {
+            uint pt = j.elem;
+            set_escape_state(pt, PointsToNode::ArgEscape);
+          }
+        }
+      }
+      break;
+    }
 
     case Op_CallStaticJava:
     // For a static call, we know exactly what method is being called.
     // Use bytecode estimator to record the call's escape affects
     {
       ciMethod *meth = call->as_CallJava()->method();
-      if (meth != NULL) {
+      BCEscapeAnalyzer *call_analyzer = (meth !=NULL) ? meth->get_bcea() : NULL;
+      // fall-through if not a Java method or no analyzer information
+      if (call_analyzer != NULL) {
         const TypeTuple * d = call->tf()->domain();
-        BCEscapeAnalyzer call_analyzer(meth);
         VectorSet ptset(Thread::current()->resource_area());
+        bool copy_dependencies = false;
         for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
           const Type* at = d->field_at(i);
           int k = i - TypeFunc::Parms;
 
           if (at->isa_oopptr() != NULL) {
-            Node *arg = skip_casts(call->in(i));
-
-            if (!call_analyzer.is_arg_stack(k)) {
-              // The argument global escapes, mark everything it could point to
-              ptset.Clear();
-              PointsTo(ptset, arg, phase);
-              for( VectorSetI j(&ptset); j.test(); ++j ) {
-                uint pt = j.elem;
+            Node *arg = call->in(i)->uncast();
 
-                set_escape_state(pt, PointsToNode::GlobalEscape);
+            bool global_escapes = false;
+            bool fields_escapes = false;
+            if (!call_analyzer->is_arg_stack(k)) {
+              // The argument global escapes, mark everything it could point to
+              set_escape_state(arg->_idx, PointsToNode::GlobalEscape);
+              global_escapes = true;
+            } else {
+              if (!call_analyzer->is_arg_local(k)) {
+                // The argument itself doesn't escape, but any fields might
+                fields_escapes = true;
               }
-            } else if (!call_analyzer.is_arg_local(k)) {
-              // The argument itself doesn't escape, but any fields might
-              ptset.Clear();
-              PointsTo(ptset, arg, phase);
-              for( VectorSetI j(&ptset); j.test(); ++j ) {
-                uint pt = j.elem;
-                add_edge_from_fields(pt, _phantom_object, Type::OffsetBot);
+              set_escape_state(arg->_idx, PointsToNode::ArgEscape);
+              copy_dependencies = true;
+            }
+
+            ptset.Clear();
+            PointsTo(ptset, arg, phase);
+            for( VectorSetI j(&ptset); j.test(); ++j ) {
+              uint pt = j.elem;
+              if (global_escapes) {
+                //The argument global escapes, mark everything it could point to
+                set_escape_state(pt, PointsToNode::GlobalEscape);
+              } else {
+                if (fields_escapes) {
+                  // The argument itself doesn't escape, but any fields might
+                  add_edge_from_fields(pt, _phantom_object, Type::OffsetBot);
+                }
+                set_escape_state(pt, PointsToNode::ArgEscape);
               }
             }
           }
         }
-        call_analyzer.copy_dependencies(C()->dependencies());
+        if (copy_dependencies)
+          call_analyzer->copy_dependencies(C()->dependencies());
         break;
       }
-      // fall-through if not a Java method
     }
 
     default:
-    // Some other type of call, assume the worst case: all arguments
+    // Fall-through here if not a Java method or no analyzer information
+    // or some other type of call, assume the worst case: all arguments
     // globally escape.
     {
       // adjust escape state for  outgoing arguments
@@ -988,15 +1487,15 @@
       VectorSet ptset(Thread::current()->resource_area());
       for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
         const Type* at = d->field_at(i);
-
         if (at->isa_oopptr() != NULL) {
-          Node *arg = skip_casts(call->in(i));
+          Node *arg = call->in(i)->uncast();
+          set_escape_state(arg->_idx, PointsToNode::GlobalEscape);
           ptset.Clear();
           PointsTo(ptset, arg, phase);
           for( VectorSetI j(&ptset); j.test(); ++j ) {
             uint pt = j.elem;
-
             set_escape_state(pt, PointsToNode::GlobalEscape);
+            PointsToNode *ptadr = ptnode_adr(pt);
           }
         }
       }
@@ -1004,15 +1503,9 @@
   }
 }
 void ConnectionGraph::process_call_result(ProjNode *resproj, PhaseTransform *phase) {
-  CallNode *call = resproj->in(0)->as_Call();
-
   PointsToNode *ptadr = ptnode_adr(resproj->_idx);
 
-  ptadr->_node = resproj;
-  ptadr->set_node_type(PointsToNode::LocalVar);
-  set_escape_state(resproj->_idx, PointsToNode::UnknownEscape);
-  _processed.set(resproj->_idx);
-
+  CallNode *call = resproj->in(0)->as_Call();
   switch (call->Opcode()) {
     case Op_Allocate:
     {
@@ -1028,36 +1521,40 @@
       ciInstanceKlass* ciik = cik->as_instance_klass();
 
       PointsToNode *ptadr = ptnode_adr(call->_idx);
-      ptadr->set_node_type(PointsToNode::JavaObject);
+      PointsToNode::EscapeState es;
+      uint edge_to;
       if (cik->is_subclass_of(_compile->env()->Thread_klass()) || ciik->has_finalizer()) {
-        set_escape_state(call->_idx, PointsToNode::GlobalEscape);
-        add_pointsto_edge(resproj->_idx, _phantom_object);
+        es = PointsToNode::GlobalEscape;
+        edge_to = _phantom_object; // Could not be worse
       } else {
-        set_escape_state(call->_idx, PointsToNode::NoEscape);
-        add_pointsto_edge(resproj->_idx, call->_idx);
+        es = PointsToNode::NoEscape;
+        edge_to = call->_idx;
       }
-      _processed.set(call->_idx);
+      set_escape_state(call->_idx, es);
+      add_pointsto_edge(resproj->_idx, edge_to);
+      _processed.set(resproj->_idx);
       break;
     }
 
     case Op_AllocateArray:
     {
       PointsToNode *ptadr = ptnode_adr(call->_idx);
-      ptadr->set_node_type(PointsToNode::JavaObject);
+      int length = call->in(AllocateNode::ALength)->find_int_con(-1);
+      if (length < 0 || length > EliminateAllocationArraySizeLimit) {
+        // Not scalar replaceable if the length is not constant or too big.
+        ptadr->_scalar_replaceable = false;
+      }
       set_escape_state(call->_idx, PointsToNode::NoEscape);
-      _processed.set(call->_idx);
       add_pointsto_edge(resproj->_idx, call->_idx);
+      _processed.set(resproj->_idx);
       break;
     }
 
-    case Op_Lock:
-    case Op_Unlock:
-      break;
-
     case Op_CallStaticJava:
     // For a static call, we know exactly what method is being called.
     // Use bytecode estimator to record whether the call's return value escapes
     {
+      bool done = true;
       const TypeTuple *r = call->tf()->range();
       const Type* ret_type = NULL;
 
@@ -1066,32 +1563,45 @@
 
       // Note:  we use isa_ptr() instead of isa_oopptr()  here because the
       //        _multianewarray functions return a TypeRawPtr.
-      if (ret_type == NULL || ret_type->isa_ptr() == NULL)
+      if (ret_type == NULL || ret_type->isa_ptr() == NULL) {
+        _processed.set(resproj->_idx);
         break;  // doesn't return a pointer type
-
+      }
       ciMethod *meth = call->as_CallJava()->method();
+      const TypeTuple * d = call->tf()->domain();
       if (meth == NULL) {
         // not a Java method, assume global escape
         set_escape_state(call->_idx, PointsToNode::GlobalEscape);
         if (resproj != NULL)
           add_pointsto_edge(resproj->_idx, _phantom_object);
       } else {
-        BCEscapeAnalyzer call_analyzer(meth);
+        BCEscapeAnalyzer *call_analyzer = meth->get_bcea();
         VectorSet ptset(Thread::current()->resource_area());
+        bool copy_dependencies = false;
 
-        if (call_analyzer.is_return_local() && resproj != NULL) {
+        if (call_analyzer->is_return_allocated()) {
+          // Returns a newly allocated unescaped object, simply
+          // update dependency information.
+          // Mark it as NoEscape so that objects referenced by
+          // it's fields will be marked as NoEscape at least.
+          set_escape_state(call->_idx, PointsToNode::NoEscape);
+          if (resproj != NULL)
+            add_pointsto_edge(resproj->_idx, call->_idx);
+          copy_dependencies = true;
+        } else if (call_analyzer->is_return_local() && resproj != NULL) {
           // determine whether any arguments are returned
-          const TypeTuple * d = call->tf()->domain();
           set_escape_state(call->_idx, PointsToNode::NoEscape);
           for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
             const Type* at = d->field_at(i);
 
             if (at->isa_oopptr() != NULL) {
-              Node *arg = skip_casts(call->in(i));
+              Node *arg = call->in(i)->uncast();
 
-              if (call_analyzer.is_arg_returned(i - TypeFunc::Parms)) {
+              if (call_analyzer->is_arg_returned(i - TypeFunc::Parms)) {
                 PointsToNode *arg_esp = _nodes->adr_at(arg->_idx);
-                if (arg_esp->node_type() == PointsToNode::JavaObject)
+                if (arg_esp->node_type() == PointsToNode::UnknownType)
+                  done = false;
+                else if (arg_esp->node_type() == PointsToNode::JavaObject)
                   add_pointsto_edge(resproj->_idx, arg->_idx);
                 else
                   add_deferred_edge(resproj->_idx, arg->_idx);
@@ -1099,13 +1609,25 @@
               }
             }
           }
+          copy_dependencies = true;
         } else {
           set_escape_state(call->_idx, PointsToNode::GlobalEscape);
           if (resproj != NULL)
             add_pointsto_edge(resproj->_idx, _phantom_object);
+          for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
+            const Type* at = d->field_at(i);
+            if (at->isa_oopptr() != NULL) {
+              Node *arg = call->in(i)->uncast();
+              PointsToNode *arg_esp = _nodes->adr_at(arg->_idx);
+              arg_esp->_hidden_alias = true;
+            }
+          }
         }
-        call_analyzer.copy_dependencies(C()->dependencies());
+        if (copy_dependencies)
+          call_analyzer->copy_dependencies(C()->dependencies());
       }
+      if (done)
+        _processed.set(resproj->_idx);
       break;
     }
 
@@ -1114,7 +1636,6 @@
     // returned value, if any, globally escapes.
     {
       const TypeTuple *r = call->tf()->range();
-
       if (r->cnt() > TypeFunc::Parms) {
         const Type* ret_type = r->field_at(TypeFunc::Parms);
 
@@ -1122,142 +1643,385 @@
         //        _multianewarray functions return a TypeRawPtr.
         if (ret_type->isa_ptr() != NULL) {
           PointsToNode *ptadr = ptnode_adr(call->_idx);
-          ptadr->set_node_type(PointsToNode::JavaObject);
           set_escape_state(call->_idx, PointsToNode::GlobalEscape);
           if (resproj != NULL)
             add_pointsto_edge(resproj->_idx, _phantom_object);
         }
       }
-    }
-  }
-}
-
-void ConnectionGraph::record_for_escape_analysis(Node *n) {
-  if (_collecting) {
-    if (n->is_Phi()) {
-      PhiNode *phi = n->as_Phi();
-      const Type *pt = phi->type();
-      if ((pt->isa_oopptr() != NULL) || pt == TypePtr::NULL_PTR) {
-        PointsToNode *ptn = ptnode_adr(phi->_idx);
-        ptn->set_node_type(PointsToNode::LocalVar);
-        ptn->_node = n;
-        _deferred.push(n);
-      }
+      _processed.set(resproj->_idx);
     }
   }
 }
 
-void ConnectionGraph::record_escape_work(Node *n, PhaseTransform *phase) {
+// Populate Connection Graph with Ideal nodes and create simple
+// connection graph edges (do not need to check the node_type of inputs
+// or to call PointsTo() to walk the connection graph).
+void ConnectionGraph::record_for_escape_analysis(Node *n, PhaseTransform *phase) {
+  if (_processed.test(n->_idx))
+    return; // No need to redefine node's state.
+
+  if (n->is_Call()) {
+    // Arguments to allocation and locking don't escape.
+    if (n->is_Allocate()) {
+      add_node(n, PointsToNode::JavaObject, PointsToNode::UnknownEscape, true);
+      record_for_optimizer(n);
+    } else if (n->is_Lock() || n->is_Unlock()) {
+      // Put Lock and Unlock nodes on IGVN worklist to process them during
+      // the first IGVN optimization when escape information is still available.
+      record_for_optimizer(n);
+      _processed.set(n->_idx);
+    } else {
+      // Have to process call's arguments first.
+      PointsToNode::NodeType nt = PointsToNode::UnknownType;
+
+      // Check if a call returns an object.
+      const TypeTuple *r = n->as_Call()->tf()->range();
+      if (r->cnt() > TypeFunc::Parms &&
+          n->as_Call()->proj_out(TypeFunc::Parms) != NULL) {
+        // Note:  use isa_ptr() instead of isa_oopptr() here because
+        //        the _multianewarray functions return a TypeRawPtr.
+        if (r->field_at(TypeFunc::Parms)->isa_ptr() != NULL) {
+          nt = PointsToNode::JavaObject;
+        }
+      }
+      add_node(n, nt, PointsToNode::UnknownEscape, false);
+    }
+    return;
+  }
+
+  // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
+  // ThreadLocal has RawPrt type.
+  switch (n->Opcode()) {
+    case Op_AddP:
+    {
+      add_node(n, PointsToNode::Field, PointsToNode::UnknownEscape, false);
+      break;
+    }
+    case Op_CastX2P:
+    { // "Unsafe" memory access.
+      add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true);
+      break;
+    }
+    case Op_CastPP:
+    case Op_CheckCastPP:
+    {
+      add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false);
+      int ti = n->in(1)->_idx;
+      PointsToNode::NodeType nt = _nodes->adr_at(ti)->node_type();
+      if (nt == PointsToNode::UnknownType) {
+        _delayed_worklist.push(n); // Process it later.
+        break;
+      } else if (nt == PointsToNode::JavaObject) {
+        add_pointsto_edge(n->_idx, ti);
+      } else {
+        add_deferred_edge(n->_idx, ti);
+      }
+      _processed.set(n->_idx);
+      break;
+    }
+    case Op_ConP:
+    {
+      // assume all pointer constants globally escape except for null
+      PointsToNode::EscapeState es;
+      if (phase->type(n) == TypePtr::NULL_PTR)
+        es = PointsToNode::NoEscape;
+      else
+        es = PointsToNode::GlobalEscape;
 
-  int opc = n->Opcode();
+      add_node(n, PointsToNode::JavaObject, es, true);
+      break;
+    }
+    case Op_CreateEx:
+    {
+      // assume that all exception objects globally escape
+      add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true);
+      break;
+    }
+    case Op_LoadKlass:
+    {
+      add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, true);
+      break;
+    }
+    case Op_LoadP:
+    {
+      const Type *t = phase->type(n);
+      if (t->isa_ptr() == NULL) {
+        _processed.set(n->_idx);
+        return;
+      }
+      add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false);
+      break;
+    }
+    case Op_Parm:
+    {
+      _processed.set(n->_idx); // No need to redefine it state.
+      uint con = n->as_Proj()->_con;
+      if (con < TypeFunc::Parms)
+        return;
+      const Type *t = n->in(0)->as_Start()->_domain->field_at(con);
+      if (t->isa_ptr() == NULL)
+        return;
+      // We have to assume all input parameters globally escape
+      // (Note: passing 'false' since _processed is already set).
+      add_node(n, PointsToNode::JavaObject, PointsToNode::GlobalEscape, false);
+      break;
+    }
+    case Op_Phi:
+    {
+      if (n->as_Phi()->type()->isa_ptr() == NULL) {
+        // nothing to do if not an oop
+        _processed.set(n->_idx);
+        return;
+      }
+      add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false);
+      uint i;
+      for (i = 1; i < n->req() ; i++) {
+        Node* in = n->in(i);
+        if (in == NULL)
+          continue;  // ignore NULL
+        in = in->uncast();
+        if (in->is_top() || in == n)
+          continue;  // ignore top or inputs which go back this node
+        int ti = in->_idx;
+        PointsToNode::NodeType nt = _nodes->adr_at(ti)->node_type();
+        if (nt == PointsToNode::UnknownType) {
+          break;
+        } else if (nt == PointsToNode::JavaObject) {
+          add_pointsto_edge(n->_idx, ti);
+        } else {
+          add_deferred_edge(n->_idx, ti);
+        }
+      }
+      if (i >= n->req())
+        _processed.set(n->_idx);
+      else
+        _delayed_worklist.push(n);
+      break;
+    }
+    case Op_Proj:
+    {
+      // we are only interested in the result projection from a call
+      if (n->as_Proj()->_con == TypeFunc::Parms && n->in(0)->is_Call() ) {
+        add_node(n, PointsToNode::LocalVar, PointsToNode::UnknownEscape, false);
+        process_call_result(n->as_Proj(), phase);
+        if (!_processed.test(n->_idx)) {
+          // The call's result may need to be processed later if the call
+          // returns it's argument and the argument is not processed yet.
+          _delayed_worklist.push(n);
+        }
+      } else {
+        _processed.set(n->_idx);
+      }
+      break;
+    }
+    case Op_Return:
+    {
+      if( n->req() > TypeFunc::Parms &&
+          phase->type(n->in(TypeFunc::Parms))->isa_oopptr() ) {
+        // Treat Return value as LocalVar with GlobalEscape escape state.
+        add_node(n, PointsToNode::LocalVar, PointsToNode::GlobalEscape, false);
+        int ti = n->in(TypeFunc::Parms)->_idx;
+        PointsToNode::NodeType nt = _nodes->adr_at(ti)->node_type();
+        if (nt == PointsToNode::UnknownType) {
+          _delayed_worklist.push(n); // Process it later.
+          break;
+        } else if (nt == PointsToNode::JavaObject) {
+          add_pointsto_edge(n->_idx, ti);
+        } else {
+          add_deferred_edge(n->_idx, ti);
+        }
+      }
+      _processed.set(n->_idx);
+      break;
+    }
+    case Op_StoreP:
+    {
+      const Type *adr_type = phase->type(n->in(MemNode::Address));
+      if (adr_type->isa_oopptr()) {
+        add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false);
+      } else {
+        Node* adr = n->in(MemNode::Address);
+        if (adr->is_AddP() && phase->type(adr) == TypeRawPtr::NOTNULL &&
+            adr->in(AddPNode::Address)->is_Proj() &&
+            adr->in(AddPNode::Address)->in(0)->is_Allocate()) {
+          add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false);
+          // We are computing a raw address for a store captured
+          // by an Initialize compute an appropriate address type.
+          int offs = (int)phase->find_intptr_t_con(adr->in(AddPNode::Offset), Type::OffsetBot);
+          assert(offs != Type::OffsetBot, "offset must be a constant");
+        } else {
+          _processed.set(n->_idx);
+          return;
+        }
+      }
+      break;
+    }
+    case Op_StorePConditional:
+    case Op_CompareAndSwapP:
+    {
+      const Type *adr_type = phase->type(n->in(MemNode::Address));
+      if (adr_type->isa_oopptr()) {
+        add_node(n, PointsToNode::UnknownType, PointsToNode::UnknownEscape, false);
+      } else {
+        _processed.set(n->_idx);
+        return;
+      }
+      break;
+    }
+    case Op_ThreadLocal:
+    {
+      add_node(n, PointsToNode::JavaObject, PointsToNode::ArgEscape, true);
+      break;
+    }
+    default:
+      ;
+      // nothing to do
+  }
+  return;
+}
+
+void ConnectionGraph::build_connection_graph(Node *n, PhaseTransform *phase) {
+  // Don't set processed bit for AddP, LoadP, StoreP since
+  // they may need more then one pass to process.
+  if (_processed.test(n->_idx))
+    return; // No need to redefine node's state.
+
   PointsToNode *ptadr = ptnode_adr(n->_idx);
 
-  if (_processed.test(n->_idx))
-    return;
-
-  ptadr->_node = n;
   if (n->is_Call()) {
     CallNode *call = n->as_Call();
     process_call_arguments(call, phase);
+    _processed.set(n->_idx);
     return;
   }
 
-  switch (opc) {
+  switch (n->Opcode()) {
     case Op_AddP:
     {
-      Node *base = skip_casts(n->in(AddPNode::Base));
-      ptadr->set_node_type(PointsToNode::Field);
-
-      // create a field edge to this node from everything adr could point to
+      Node *base = get_addp_base(n);
+      // Create a field edge to this node from everything base could point to.
       VectorSet ptset(Thread::current()->resource_area());
       PointsTo(ptset, base, phase);
       for( VectorSetI i(&ptset); i.test(); ++i ) {
         uint pt = i.elem;
-        add_field_edge(pt, n->_idx, type_to_offset(phase->type(n)));
+        add_field_edge(pt, n->_idx, address_offset(n, phase));
+      }
+      break;
+    }
+    case Op_CastX2P:
+    {
+      assert(false, "Op_CastX2P");
+      break;
+    }
+    case Op_CastPP:
+    case Op_CheckCastPP:
+    {
+      int ti = n->in(1)->_idx;
+      if (_nodes->adr_at(ti)->node_type() == PointsToNode::JavaObject) {
+        add_pointsto_edge(n->_idx, ti);
+      } else {
+        add_deferred_edge(n->_idx, ti);
+      }
+      _processed.set(n->_idx);
+      break;
+    }
+    case Op_ConP:
+    {
+      assert(false, "Op_ConP");
+      break;
+    }
+    case Op_CreateEx:
+    {
+      assert(false, "Op_CreateEx");
+      break;
+    }
+    case Op_LoadKlass:
+    {
+      assert(false, "Op_LoadKlass");
+      break;
+    }
+    case Op_LoadP:
+    {
+      const Type *t = phase->type(n);
+#ifdef ASSERT
+      if (t->isa_ptr() == NULL)
+        assert(false, "Op_LoadP");
+#endif
+
+      Node* adr = n->in(MemNode::Address)->uncast();
+      const Type *adr_type = phase->type(adr);
+      Node* adr_base;
+      if (adr->is_AddP()) {
+        adr_base = get_addp_base(adr);
+      } else {
+        adr_base = adr;
+      }
+
+      // For everything "adr_base" could point to, create a deferred edge from
+      // this node to each field with the same offset.
+      VectorSet ptset(Thread::current()->resource_area());
+      PointsTo(ptset, adr_base, phase);
+      int offset = address_offset(adr, phase);
+      for( VectorSetI i(&ptset); i.test(); ++i ) {
+        uint pt = i.elem;
+        add_deferred_edge_to_fields(n->_idx, pt, offset);
       }
       break;
     }
     case Op_Parm:
     {
-      ProjNode *nproj = n->as_Proj();
-      uint con = nproj->_con;
-      if (con < TypeFunc::Parms)
-        return;
-      const Type *t = nproj->in(0)->as_Start()->_domain->field_at(con);
-      if (t->isa_ptr() == NULL)
-        return;
-      ptadr->set_node_type(PointsToNode::JavaObject);
-      if (t->isa_oopptr() != NULL) {
-        set_escape_state(n->_idx, PointsToNode::ArgEscape);
-      } else {
-        // this must be the incoming state of an OSR compile, we have to assume anything
-        // passed in globally escapes
-        assert(_compile->is_osr_compilation(), "bad argument type for non-osr compilation");
-        set_escape_state(n->_idx, PointsToNode::GlobalEscape);
-      }
-      _processed.set(n->_idx);
+      assert(false, "Op_Parm");
       break;
     }
     case Op_Phi:
     {
-      PhiNode *phi = n->as_Phi();
-      if (phi->type()->isa_oopptr() == NULL)
-        return;  // nothing to do if not an oop
-      ptadr->set_node_type(PointsToNode::LocalVar);
-      process_phi_escape(phi, phase);
-      break;
-    }
-    case Op_CreateEx:
-    {
-      // assume that all exception objects globally escape
-      ptadr->set_node_type(PointsToNode::JavaObject);
-      set_escape_state(n->_idx, PointsToNode::GlobalEscape);
-      _processed.set(n->_idx);
-      break;
-    }
-    case Op_ConP:
-    {
-      const Type *t = phase->type(n);
-      ptadr->set_node_type(PointsToNode::JavaObject);
-      // assume all pointer constants globally escape except for null
-      if (t == TypePtr::NULL_PTR)
-        set_escape_state(n->_idx, PointsToNode::NoEscape);
-      else
-        set_escape_state(n->_idx, PointsToNode::GlobalEscape);
+#ifdef ASSERT
+      if (n->as_Phi()->type()->isa_ptr() == NULL)
+        assert(false, "Op_Phi");
+#endif
+      for (uint i = 1; i < n->req() ; i++) {
+        Node* in = n->in(i);
+        if (in == NULL)
+          continue;  // ignore NULL
+        in = in->uncast();
+        if (in->is_top() || in == n)
+          continue;  // ignore top or inputs which go back this node
+        int ti = in->_idx;
+        if (_nodes->adr_at(in->_idx)->node_type() == PointsToNode::JavaObject) {
+          add_pointsto_edge(n->_idx, ti);
+        } else {
+          add_deferred_edge(n->_idx, ti);
+        }
+      }
       _processed.set(n->_idx);
       break;
     }
-    case Op_LoadKlass:
+    case Op_Proj:
     {
-      ptadr->set_node_type(PointsToNode::JavaObject);
-      set_escape_state(n->_idx, PointsToNode::GlobalEscape);
-      _processed.set(n->_idx);
+      // we are only interested in the result projection from a call
+      if (n->as_Proj()->_con == TypeFunc::Parms && n->in(0)->is_Call() ) {
+        process_call_result(n->as_Proj(), phase);
+        assert(_processed.test(n->_idx), "all call results should be processed");
+      } else {
+        assert(false, "Op_Proj");
+      }
       break;
     }
-    case Op_LoadP:
+    case Op_Return:
     {
-      const Type *t = phase->type(n);
-      if (!t->isa_oopptr())
-        return;
-      ptadr->set_node_type(PointsToNode::LocalVar);
-      set_escape_state(n->_idx, PointsToNode::UnknownEscape);
-
-      Node *adr = skip_casts(n->in(MemNode::Address));
-      const Type *adr_type = phase->type(adr);
-      Node *adr_base = skip_casts((adr->Opcode() == Op_AddP) ? adr->in(AddPNode::Base) : adr);
-
-      // For everything "adr" could point to, create a deferred edge from
-      // this node to each field with the same offset as "adr_type"
-      VectorSet ptset(Thread::current()->resource_area());
-      PointsTo(ptset, adr_base, phase);
-      // If ptset is empty, then this value must have been set outside
-      // this method, so we add the phantom node
-      if (ptset.Size() == 0)
-        ptset.set(_phantom_object);
-      for( VectorSetI i(&ptset); i.test(); ++i ) {
-        uint pt = i.elem;
-        add_deferred_edge_to_fields(n->_idx, pt, type_to_offset(adr_type));
+#ifdef ASSERT
+      if( n->req() <= TypeFunc::Parms ||
+          !phase->type(n->in(TypeFunc::Parms))->isa_oopptr() ) {
+        assert(false, "Op_Return");
       }
+#endif
+      int ti = n->in(TypeFunc::Parms)->_idx;
+      if (_nodes->adr_at(ti)->node_type() == PointsToNode::JavaObject) {
+        add_pointsto_edge(n->_idx, ti);
+      } else {
+        add_deferred_edge(n->_idx, ti);
+      }
+      _processed.set(n->_idx);
       break;
     }
     case Op_StoreP:
@@ -1265,45 +2029,28 @@
     case Op_CompareAndSwapP:
     {
       Node *adr = n->in(MemNode::Address);
-      Node *val = skip_casts(n->in(MemNode::ValueIn));
       const Type *adr_type = phase->type(adr);
+#ifdef ASSERT
       if (!adr_type->isa_oopptr())
-        return;
+        assert(phase->type(adr) == TypeRawPtr::NOTNULL, "Op_StoreP");
+#endif
 
-      assert(adr->Opcode() == Op_AddP, "expecting an AddP");
-      Node *adr_base = adr->in(AddPNode::Base);
-
-      // For everything "adr_base" could point to, create a deferred edge to "val" from each field
-      // with the same offset as "adr_type"
+      assert(adr->is_AddP(), "expecting an AddP");
+      Node *adr_base = get_addp_base(adr);
+      Node *val = n->in(MemNode::ValueIn)->uncast();
+      // For everything "adr_base" could point to, create a deferred edge
+      // to "val" from each field with the same offset.
       VectorSet ptset(Thread::current()->resource_area());
       PointsTo(ptset, adr_base, phase);
       for( VectorSetI i(&ptset); i.test(); ++i ) {
         uint pt = i.elem;
-        add_edge_from_fields(pt, val->_idx, type_to_offset(adr_type));
+        add_edge_from_fields(pt, val->_idx, address_offset(adr, phase));
       }
       break;
     }
-    case Op_Proj:
+    case Op_ThreadLocal:
     {
-      ProjNode *nproj = n->as_Proj();
-      Node *n0 = nproj->in(0);
-      // we are only interested in the result projection from a call
-      if (nproj->_con == TypeFunc::Parms && n0->is_Call() ) {
-        process_call_result(nproj, phase);
-      }
-
-      break;
-    }
-    case Op_CastPP:
-    case Op_CheckCastPP:
-    {
-      ptadr->set_node_type(PointsToNode::LocalVar);
-      int ti = n->in(1)->_idx;
-      if (_nodes->at(ti).node_type() == PointsToNode::JavaObject) {
-        add_pointsto_edge(n->_idx, ti);
-      } else {
-        add_deferred_edge(n->_idx, ti);
-      }
+      assert(false, "Op_ThreadLocal");
       break;
     }
     default:
@@ -1312,34 +2059,48 @@
   }
 }
 
-void ConnectionGraph::record_escape(Node *n, PhaseTransform *phase) {
-  if (_collecting)
-    record_escape_work(n, phase);
-}
-
 #ifndef PRODUCT
 void ConnectionGraph::dump() {
   PhaseGVN  *igvn = _compile->initial_gvn();
   bool first = true;
 
-  for (uint ni = 0; ni < (uint)_nodes->length(); ni++) {
-    PointsToNode *esp = _nodes->adr_at(ni);
-    if (esp->node_type() == PointsToNode::UnknownType || esp->_node == NULL)
+  uint size = (uint)_nodes->length();
+  for (uint ni = 0; ni < size; ni++) {
+    PointsToNode *ptn = _nodes->adr_at(ni);
+    PointsToNode::NodeType ptn_type = ptn->node_type();
+
+    if (ptn_type != PointsToNode::JavaObject || ptn->_node == NULL)
       continue;
-    PointsToNode::EscapeState es = escape_state(esp->_node, igvn);
-    if (es == PointsToNode::NoEscape || (Verbose &&
-            (es != PointsToNode::UnknownEscape || esp->edge_count() != 0))) {
-      // don't print null pointer node which almost every method has
-      if (esp->_node->Opcode() != Op_ConP || igvn->type(esp->_node) != TypePtr::NULL_PTR) {
-        if (first) {
-          tty->print("======== Connection graph for ");
-          C()->method()->print_short_name();
-          tty->cr();
-          first = false;
+    PointsToNode::EscapeState es = escape_state(ptn->_node, igvn);
+    if (ptn->_node->is_Allocate() && (es == PointsToNode::NoEscape || Verbose)) {
+      if (first) {
+        tty->cr();
+        tty->print("======== Connection graph for ");
+        C()->method()->print_short_name();
+        tty->cr();
+        first = false;
+      }
+      tty->print("%6d ", ni);
+      ptn->dump();
+      // Print all locals which reference this allocation
+      for (uint li = ni; li < size; li++) {
+        PointsToNode *ptn_loc = _nodes->adr_at(li);
+        PointsToNode::NodeType ptn_loc_type = ptn_loc->node_type();
+        if ( ptn_loc_type == PointsToNode::LocalVar && ptn_loc->_node != NULL &&
+             ptn_loc->edge_count() == 1 && ptn_loc->edge_target(0) == ni ) {
+          tty->print("%6d  LocalVar [[%d]]", li, ni);
+          _nodes->adr_at(li)->_node->dump();
         }
-        tty->print("%4d  ", ni);
-        esp->dump();
       }
+      if (Verbose) {
+        // Print all fields which reference this allocation
+        for (uint i = 0; i < ptn->edge_count(); i++) {
+          uint ei = ptn->edge_target(i);
+          tty->print("%6d  Field [[%d]]", ei, ni);
+          _nodes->adr_at(ei)->_node->dump();
+        }
+      }
+      tty->cr();
     }
   }
 }
--- a/hotspot/src/share/vm/opto/escape.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/escape.hpp	Sun May 04 07:05:42 2008 -0700
@@ -25,14 +25,15 @@
 //
 // Adaptation for C2 of the escape analysis algorithm described in:
 //
-//     [Choi99] Jong-Deok Shoi, Manish Gupta, Mauricio Seffano, Vugranam C. Sreedhar,
-//              Sam Midkiff,  "Escape Analysis for Java", Procedings of ACM SIGPLAN
-//              OOPSLA  Conference, November 1, 1999
+// [Choi99] Jong-Deok Shoi, Manish Gupta, Mauricio Seffano,
+//          Vugranam C. Sreedhar, Sam Midkiff,
+//          "Escape Analysis for Java", Procedings of ACM SIGPLAN
+//          OOPSLA  Conference, November 1, 1999
 //
 // The flow-insensitive analysis described in the paper has been implemented.
 //
-// The analysis requires construction of a "connection graph" (CG) for the method being
-// analyzed.  The nodes of the connection graph are:
+// The analysis requires construction of a "connection graph" (CG) for
+// the method being analyzed.  The nodes of the connection graph are:
 //
 //     -  Java objects (JO)
 //     -  Local variables (LV)
@@ -40,47 +41,51 @@
 //
 // The CG contains 3 types of edges:
 //
-//   -  PointsTo  (-P>)     {LV,OF}  to JO
-//   -  Deferred  (-D>)    from {LV, OF}  to {LV, OF}
+//   -  PointsTo  (-P>)    {LV, OF} to JO
+//   -  Deferred  (-D>)    from {LV, OF} to {LV, OF}
 //   -  Field     (-F>)    from JO to OF
 //
 // The following  utility functions is used by the algorithm:
 //
-//   PointsTo(n)      - n is any CG node,  it returns the set of JO that n could
-//                      point to.
+//   PointsTo(n) - n is any CG node, it returns the set of JO that n could
+//                 point to.
 //
-// The algorithm describes how to construct the connection graph in the following 4 cases:
+// The algorithm describes how to construct the connection graph
+// in the following 4 cases:
 //
 //          Case                  Edges Created
 //
-// (1)   p   = new T()              LV  -P> JO
-// (2)   p   = q                    LV  -D> LV
-// (3)   p.f = q                    JO  -F> OF,  OF -D> LV
-// (4)   p   = q.f                  JO  -F> OF,  LV -D> OF
+// (1)   p   = new T()              LV -P> JO
+// (2)   p   = q                    LV -D> LV
+// (3)   p.f = q                    JO -F> OF,  OF -D> LV
+// (4)   p   = q.f                  JO -F> OF,  LV -D> OF
 //
-// In all these cases, p and q are local variables.  For static field references, we can
-// construct a local variable containing a reference to the static memory.
+// In all these cases, p and q are local variables.  For static field
+// references, we can construct a local variable containing a reference
+// to the static memory.
 //
 // C2 does not have local variables.  However for the purposes of constructing
 // the connection graph, the following IR nodes are treated as local variables:
 //     Phi    (pointer values)
 //     LoadP
-//     Proj  (value returned from callnodes including allocations)
-//     CheckCastPP
+//     Proj#5 (value returned from callnodes including allocations)
+//     CheckCastPP, CastPP
 //
-// The LoadP, Proj and CheckCastPP behave like variables assigned to only once.  Only
-// a Phi can have multiple assignments.  Each input to a Phi is treated
+// The LoadP, Proj and CheckCastPP behave like variables assigned to only once.
+// Only a Phi can have multiple assignments.  Each input to a Phi is treated
 // as an assignment to it.
 //
-// The following note types are JavaObject:
+// The following node types are JavaObject:
 //
 //     top()
 //     Allocate
 //     AllocateArray
 //     Parm  (for incoming arguments)
+//     CastX2P ("unsafe" operations)
 //     CreateEx
 //     ConP
 //     LoadKlass
+//     ThreadLocal
 //
 // AddP nodes are fields.
 //
@@ -89,7 +94,7 @@
 // source.  This results in a graph with no deferred edges, only:
 //
 //    LV -P> JO
-//    OF -P> JO
+//    OF -P> JO (the object whose oop is stored in the field)
 //    JO -F> OF
 //
 // Then, for each node which is GlobalEscape, anything it could point to
@@ -110,17 +115,18 @@
 friend class ConnectionGraph;
 public:
   typedef enum {
-    UnknownType    = 0,
-    JavaObject = 1,
-    LocalVar   = 2,
-    Field      = 3
+    UnknownType = 0,
+    JavaObject  = 1,
+    LocalVar    = 2,
+    Field       = 3
   } NodeType;
 
   typedef enum {
     UnknownEscape = 0,
-    NoEscape      = 1,
-    ArgEscape     = 2,
-    GlobalEscape  = 3
+    NoEscape      = 1, // A scalar replaceable object with unique type.
+    ArgEscape     = 2, // An object passed as argument or referenced by
+                       // argument (and not globally escape during call).
+    GlobalEscape  = 3  // An object escapes the method and thread.
   } EscapeState;
 
   typedef enum {
@@ -140,18 +146,24 @@
 
   NodeType             _type;
   EscapeState          _escape;
-  GrowableArray<uint>* _edges;  // outgoing edges
-  int                  _offset; // for fields
+  GrowableArray<uint>* _edges;   // outgoing edges
 
-  bool       _unique_type;       // For allocated objects, this node may be a unique type
 public:
-  Node*      _node;              // Ideal node corresponding to this PointsTo node
-  int        _inputs_processed;  // the number of Phi inputs that have been processed so far
-  bool       _hidden_alias;      // this node is an argument to a function which may return it
-                                 // creating a hidden alias
+  Node* _node;              // Ideal node corresponding to this PointsTo node.
+  int   _offset;            // Object fields offsets.
+  bool  _scalar_replaceable;// Not escaped object could be replaced with scalar
+  bool  _hidden_alias;      // This node is an argument to a function.
+                            // which may return it creating a hidden alias.
 
+  PointsToNode():
+    _type(UnknownType),
+    _escape(UnknownEscape),
+    _edges(NULL),
+    _node(NULL),
+    _offset(-1),
+    _scalar_replaceable(true),
+    _hidden_alias(false) {}
 
-  PointsToNode(): _offset(-1), _type(UnknownType), _escape(UnknownEscape), _edges(NULL), _node(NULL), _inputs_processed(0), _hidden_alias(false), _unique_type(true) {}
 
   EscapeState escape_state() const { return _escape; }
   NodeType node_type() const { return _type;}
@@ -182,22 +194,28 @@
 
 class ConnectionGraph: public ResourceObj {
 private:
-  enum {
-    INITIAL_NODE_COUNT = 100                    // initial size of _nodes array
-  };
+  GrowableArray<PointsToNode>* _nodes; // Connection graph nodes indexed
+                                       // by ideal node index.
 
+  Unique_Node_List  _delayed_worklist; // Nodes to be processed before
+                                       // the call build_connection_graph().
+
+  VectorSet                _processed; // Records which nodes have been
+                                       // processed.
 
-  GrowableArray<PointsToNode>* _nodes;          // connection graph nodes  Indexed by ideal
-                                                // node index
-  Unique_Node_List             _deferred;       // Phi's to be processed after parsing
-  VectorSet                    _processed;      // records which nodes have been processed
-  bool                         _collecting;     // indicates whether escape information is
-                                                // still being collected.  If false, no new
-                                                // nodes will be processed
-  uint                         _phantom_object; // index of globally escaping object that
-                                                // pointer values loaded from a field which
-                                                // has not been set are assumed to point to
-  Compile *                    _compile;        // Compile object for current compilation
+  bool                    _collecting; // Indicates whether escape information
+                                       // is still being collected. If false,
+                                       // no new nodes will be processed.
+
+  bool               _has_allocations; // Indicates whether method has any
+                                       // non-escaping allocations.
+
+  uint                _phantom_object; // Index of globally escaping object
+                                       // that pointer values loaded from
+                                       // a field which has not been set
+                                       // are assumed to point to.
+
+  Compile *                  _compile; // Compile object for current compilation
 
   // address of an element in _nodes.  Used when the element is to be modified
   PointsToNode *ptnode_adr(uint idx) {
@@ -208,8 +226,11 @@
     return _nodes->adr_at(idx);
   }
 
+  // Add node to ConnectionGraph.
+  void add_node(Node *n, PointsToNode::NodeType nt, PointsToNode::EscapeState es, bool done);
+
   // offset of a field reference
-  int type_to_offset(const Type *t);
+  int address_offset(Node* adr, PhaseTransform *phase);
 
   // compute the escape state for arguments to a call
   void process_call_arguments(CallNode *call, PhaseTransform *phase);
@@ -217,12 +238,11 @@
   // compute the escape state for the return value of a call
   void process_call_result(ProjNode *resproj, PhaseTransform *phase);
 
-  // compute the escape state of a Phi.  This may be called multiple
-  // times as new inputs are added to the Phi.
-  void process_phi_escape(PhiNode *phi, PhaseTransform *phase);
+  // Populate Connection Graph with Ideal nodes.
+  void record_for_escape_analysis(Node *n, PhaseTransform *phase);
 
-  // compute the escape state of an ideal node.
-  void record_escape_work(Node *n, PhaseTransform *phase);
+  // Build Connection Graph and set nodes escape state.
+  void build_connection_graph(Node *n, PhaseTransform *phase);
 
   // walk the connection graph starting at the node corresponding to "n" and
   // add the index of everything it could point to, to "ptset".  This may cause
@@ -241,8 +261,8 @@
   // a pointsto edge is added if it is a JavaObject
   void add_edge_from_fields(uint adr, uint to_i, int offs);
 
-  // Add a deferred  edge from node given by "from_i" to any field of adr_i whose offset
-  // matches "offset"
+  // Add a deferred  edge from node given by "from_i" to any field
+  // of adr_i whose offset matches "offset"
   void add_deferred_edge_to_fields(uint from_i, uint adr, int offs);
 
 
@@ -262,6 +282,8 @@
   PhiNode *create_split_phi(PhiNode *orig_phi, int alias_idx, GrowableArray<PhiNode *>  &orig_phi_worklist, PhaseGVN  *igvn, bool &new_created);
   PhiNode *split_memory_phi(PhiNode *orig_phi, int alias_idx, GrowableArray<PhiNode *>  &orig_phi_worklist, PhaseGVN  *igvn);
   Node *find_mem(Node *mem, int alias_idx, PhaseGVN  *igvn);
+  Node *find_inst_mem(Node *mem, int alias_idx,GrowableArray<PhiNode *>  &orig_phi_worklist,  PhaseGVN  *igvn);
+
   // Propagate unique types created for unescaped allocated objects
   // through the graph
   void split_unique_types(GrowableArray<Node *>  &alloc_worklist);
@@ -285,26 +307,24 @@
   // Set the escape state of a node
   void set_escape_state(uint ni, PointsToNode::EscapeState es);
 
-  // bypass any casts and return the node they refer to
-  Node * skip_casts(Node *n);
-
   // Get Compile object for current compilation.
   Compile *C() const        { return _compile; }
 
 public:
   ConnectionGraph(Compile *C);
 
-  // record a Phi for later processing.
-  void record_for_escape_analysis(Node *n);
-
-  // process a node and  fill in its connection graph node
-  void record_escape(Node *n, PhaseTransform *phase);
-
-  // All nodes have been recorded, compute the escape information
+  // Compute the escape information
   void compute_escape();
 
   // escape state of a node
   PointsToNode::EscapeState escape_state(Node *n, PhaseTransform *phase);
+  // other information we have collected
+  bool is_scalar_replaceable(Node *n) {
+    if (_collecting)
+      return false;
+    PointsToNode  ptn = _nodes->at_grow(n->_idx);
+    return ptn.escape_state() == PointsToNode::NoEscape && ptn._scalar_replaceable;
+  }
 
   bool hidden_alias(Node *n) {
     if (_collecting)
--- a/hotspot/src/share/vm/opto/gcm.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/gcm.cpp	Sun May 04 07:05:42 2008 -0700
@@ -448,9 +448,9 @@
   ResourceArea *area = Thread::current()->resource_area();
   Node_List worklist_mem(area);     // prior memory state to store
   Node_List worklist_store(area);   // possible-def to explore
+  Node_List worklist_visited(area); // visited mergemem nodes
   Node_List non_early_stores(area); // all relevant stores outside of early
   bool must_raise_LCA = false;
-  DEBUG_ONLY(VectorSet should_not_repeat(area));
 
 #ifdef TRACK_PHI_INPUTS
   // %%% This extra checking fails because MergeMem nodes are not GVNed.
@@ -479,8 +479,8 @@
 
   Node* initial_mem = load->in(MemNode::Memory);
   worklist_store.push(initial_mem);
+  worklist_visited.push(initial_mem);
   worklist_mem.push(NULL);
-  DEBUG_ONLY(should_not_repeat.test_set(initial_mem->_idx));
   while (worklist_store.size() > 0) {
     // Examine a nearby store to see if it might interfere with our load.
     Node* mem   = worklist_mem.pop();
@@ -494,18 +494,20 @@
         || op == Op_MergeMem    // internal node of tree we are searching
         ) {
       mem = store;   // It's not a possibly interfering store.
+      if (store == initial_mem)
+        initial_mem = NULL;  // only process initial memory once
+
       for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
         store = mem->fast_out(i);
         if (store->is_MergeMem()) {
           // Be sure we don't get into combinatorial problems.
           // (Allow phis to be repeated; they can merge two relevant states.)
-          uint i = worklist_store.size();
-          for (; i > 0; i--) {
-            if (worklist_store.at(i-1) == store)  break;
+          uint j = worklist_visited.size();
+          for (; j > 0; j--) {
+            if (worklist_visited.at(j-1) == store)  break;
           }
-          if (i > 0)  continue; // already on work list; do not repeat
-          DEBUG_ONLY(int repeated = should_not_repeat.test_set(store->_idx));
-          assert(!repeated, "do not walk merges twice");
+          if (j > 0)  continue; // already on work list; do not repeat
+          worklist_visited.push(store);
         }
         worklist_mem.push(mem);
         worklist_store.push(store);
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Sun May 04 07:05:42 2008 -0700
@@ -857,6 +857,13 @@
     for (j = 0; j < l; j++)
       call->set_req(p++, in_map->in(k+j));
 
+    // Copy any scalar object fields.
+    k = in_jvms->scloff();
+    l = in_jvms->scl_size();
+    out_jvms->set_scloff(p);
+    for (j = 0; j < l; j++)
+      call->set_req(p++, in_map->in(k+j));
+
     // Finish the new jvms.
     out_jvms->set_endoff(p);
 
@@ -864,6 +871,7 @@
     assert(out_jvms->depth()      == in_jvms->depth(),      "depth must match");
     assert(out_jvms->loc_size()   == in_jvms->loc_size(),   "size must match");
     assert(out_jvms->mon_size()   == in_jvms->mon_size(),   "size must match");
+    assert(out_jvms->scl_size()   == in_jvms->scl_size(),   "size must match");
     assert(out_jvms->debug_size() == in_jvms->debug_size(), "size must match");
 
     // Update the two tail pointers in parallel.
@@ -1447,7 +1455,7 @@
 //-------------------------array_element_address-------------------------
 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
                                       const TypeInt* sizetype) {
-  uint shift  = exact_log2(type2aelembytes[elembt]);
+  uint shift  = exact_log2(type2aelembytes(elembt));
   uint header = arrayOopDesc::base_offset_in_bytes(elembt);
 
   // short-circuit a common case (saves lots of confusing waste motion)
@@ -2808,7 +2816,7 @@
       ciInstanceKlass* ik = oop_type->klass()->as_instance_klass();
       for (int i = 0, len = ik->nof_nonstatic_fields(); i < len; i++) {
         ciField* field = ik->nonstatic_field_at(i);
-        if (field->offset() >= TrackedInitializationLimit)
+        if (field->offset() >= TrackedInitializationLimit * HeapWordSize)
           continue;  // do not bother to track really large numbers of fields
         // Find (or create) the alias category for this field:
         int fieldidx = C->alias_type(field)->index();
@@ -2914,10 +2922,22 @@
   const TypeOopPtr* oop_type = tklass->as_instance_type();
 
   // Now generate allocation code
+
+  // With escape analysis, the entire memory state is needed to be able to
+  // eliminate the allocation.  If the allocations cannot be eliminated, this
+  // will be optimized to the raw slice when the allocation is expanded.
+  Node *mem;
+  if (C->do_escape_analysis()) {
+    mem = reset_memory();
+    set_all_memory(mem);
+  } else {
+    mem = memory(Compile::AliasIdxRaw);
+  }
+
   AllocateNode* alloc
     = new (C, AllocateNode::ParmLimit)
         AllocateNode(C, AllocateNode::alloc_type(),
-                     control(), memory(Compile::AliasIdxRaw), i_o(),
+                     control(), mem, i_o(),
                      size, klass_node,
                      initial_slow_test);
 
@@ -3048,11 +3068,23 @@
   }
 
   // Now generate allocation code
+
+  // With escape analysis, the entire memory state is needed to be able to
+  // eliminate the allocation.  If the allocations cannot be eliminated, this
+  // will be optimized to the raw slice when the allocation is expanded.
+  Node *mem;
+  if (C->do_escape_analysis()) {
+    mem = reset_memory();
+    set_all_memory(mem);
+  } else {
+    mem = memory(Compile::AliasIdxRaw);
+  }
+
   // Create the AllocateArrayNode and its result projections
   AllocateArrayNode* alloc
     = new (C, AllocateArrayNode::ParmLimit)
         AllocateArrayNode(C, AllocateArrayNode::alloc_type(),
-                          control(), memory(Compile::AliasIdxRaw), i_o(),
+                          control(), mem, i_o(),
                           size, klass_node,
                           initial_slow_test,
                           length);
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -543,6 +543,159 @@
   return NULL;                  // Dead loop?  Or hit root?
 }
 
+
+//------------------------------filtered_int_type--------------------------------
+// Return a possibly more restrictive type for val based on condition control flow for an if
+const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node *val, Node* if_proj) {
+  assert(if_proj &&
+         (if_proj->Opcode() == Op_IfTrue || if_proj->Opcode() == Op_IfFalse), "expecting an if projection");
+  if (if_proj->in(0) && if_proj->in(0)->is_If()) {
+    IfNode* iff = if_proj->in(0)->as_If();
+    if (iff->in(1) && iff->in(1)->is_Bool()) {
+      BoolNode* bol = iff->in(1)->as_Bool();
+      if (bol->in(1) && bol->in(1)->is_Cmp()) {
+        const CmpNode* cmp  = bol->in(1)->as_Cmp();
+        if (cmp->in(1) == val) {
+          const TypeInt* cmp2_t = gvn->type(cmp->in(2))->isa_int();
+          if (cmp2_t != NULL) {
+            jint lo = cmp2_t->_lo;
+            jint hi = cmp2_t->_hi;
+            BoolTest::mask msk = if_proj->Opcode() == Op_IfTrue ? bol->_test._test : bol->_test.negate();
+            switch (msk) {
+            case BoolTest::ne:
+              // Can't refine type
+              return NULL;
+            case BoolTest::eq:
+              return cmp2_t;
+            case BoolTest::lt:
+              lo = TypeInt::INT->_lo;
+              if (hi - 1 < hi) {
+                hi = hi - 1;
+              }
+              break;
+            case BoolTest::le:
+              lo = TypeInt::INT->_lo;
+              break;
+            case BoolTest::gt:
+              if (lo + 1 > lo) {
+                lo = lo + 1;
+              }
+              hi = TypeInt::INT->_hi;
+              break;
+            case BoolTest::ge:
+              // lo unchanged
+              hi = TypeInt::INT->_hi;
+              break;
+            }
+            const TypeInt* rtn_t = TypeInt::make(lo, hi, cmp2_t->_widen);
+            return rtn_t;
+          }
+        }
+      }
+    }
+  }
+  return NULL;
+}
+
+//------------------------------fold_compares----------------------------
+// See if a pair of CmpIs can be converted into a CmpU.  In some cases
+// the direction of this if is determined by the preciding if so it
+// can be eliminate entirely.  Given an if testing (CmpI n c) check
+// for an immediately control dependent if that is testing (CmpI n c2)
+// and has one projection leading to this if and the other projection
+// leading to a region that merges one of this ifs control
+// projections.
+//
+//                   If
+//                  / |
+//                 /  |
+//                /   |
+//              If    |
+//              /\    |
+//             /  \   |
+//            /    \  |
+//           /    Region
+//
+Node* IfNode::fold_compares(PhaseGVN* phase) {
+  if (!EliminateAutoBox || Opcode() != Op_If) return NULL;
+
+  Node* this_cmp = in(1)->in(1);
+  if (this_cmp != NULL && this_cmp->Opcode() == Op_CmpI &&
+      this_cmp->in(2)->is_Con() && this_cmp->in(2) != phase->C->top()) {
+    Node* ctrl = in(0);
+    BoolNode* this_bool = in(1)->as_Bool();
+    Node* n = this_cmp->in(1);
+    int hi = this_cmp->in(2)->get_int();
+    if (ctrl != NULL && ctrl->is_Proj() && ctrl->outcnt() == 1 &&
+        ctrl->in(0)->is_If() &&
+        ctrl->in(0)->outcnt() == 2 &&
+        ctrl->in(0)->in(1)->is_Bool() &&
+        ctrl->in(0)->in(1)->in(1)->Opcode() == Op_CmpI &&
+        ctrl->in(0)->in(1)->in(1)->in(2)->is_Con() &&
+        ctrl->in(0)->in(1)->in(1)->in(1) == n) {
+      IfNode* dom_iff = ctrl->in(0)->as_If();
+      Node* otherproj = dom_iff->proj_out(!ctrl->as_Proj()->_con);
+      if (otherproj->outcnt() == 1 && otherproj->unique_out()->is_Region() &&
+          this_bool->_test._test != BoolTest::ne && this_bool->_test._test != BoolTest::eq) {
+        // Identify which proj goes to the region and which continues on
+        RegionNode* region = otherproj->unique_out()->as_Region();
+        Node* success = NULL;
+        Node* fail = NULL;
+        for (int i = 0; i < 2; i++) {
+          Node* proj = proj_out(i);
+          if (success == NULL && proj->outcnt() == 1 && proj->unique_out() == region) {
+            success = proj;
+          } else if (fail == NULL) {
+            fail = proj;
+          } else {
+            success = fail = NULL;
+          }
+        }
+        if (success != NULL && fail != NULL && !region->has_phi()) {
+          int lo = dom_iff->in(1)->in(1)->in(2)->get_int();
+          BoolNode* dom_bool = dom_iff->in(1)->as_Bool();
+          Node* dom_cmp =  dom_bool->in(1);
+          const TypeInt* failtype  = filtered_int_type(phase, n, ctrl);
+          if (failtype != NULL) {
+            const TypeInt* type2 = filtered_int_type(phase, n, fail);
+            if (type2 != NULL) {
+              failtype = failtype->join(type2)->is_int();
+            } else {
+              failtype = NULL;
+            }
+          }
+
+          if (failtype != NULL &&
+              dom_bool->_test._test != BoolTest::ne && dom_bool->_test._test != BoolTest::eq) {
+            int bound = failtype->_hi - failtype->_lo + 1;
+            if (failtype->_hi != max_jint && failtype->_lo != min_jint && bound > 1) {
+              // Merge the two compares into a single unsigned compare by building  (CmpU (n - lo) hi)
+              BoolTest::mask cond = fail->as_Proj()->_con ? BoolTest::lt : BoolTest::ge;
+              Node* adjusted = phase->transform(new (phase->C, 3) SubINode(n, phase->intcon(failtype->_lo)));
+              Node* newcmp = phase->transform(new (phase->C, 3) CmpUNode(adjusted, phase->intcon(bound)));
+              Node* newbool = phase->transform(new (phase->C, 2) BoolNode(newcmp, cond));
+              phase->hash_delete(dom_iff);
+              dom_iff->set_req(1, phase->intcon(ctrl->as_Proj()->_con));
+              phase->is_IterGVN()->_worklist.push(dom_iff);
+              phase->hash_delete(this);
+              set_req(1, newbool);
+              return this;
+            }
+            if (failtype->_lo > failtype->_hi) {
+              // previous if determines the result of this if so
+              // replace Bool with constant
+              phase->hash_delete(this);
+              set_req(1, phase->intcon(success->as_Proj()->_con));
+              return this;
+            }
+          }
+        }
+      }
+    }
+  }
+  return NULL;
+}
+
 //------------------------------remove_useless_bool----------------------------
 // Check for people making a useless boolean: things like
 // if( (x < y ? true : false) ) { ... }
@@ -744,6 +897,11 @@
     // Normal equivalent-test check.
     if( !dom ) return NULL;     // Dead loop?
 
+    Node* result = fold_compares(phase);
+    if (result != NULL) {
+      return result;
+    }
+
     // Search up the dominator tree for an If with an identical test
     while( dom->Opcode() != op    ||  // Not same opcode?
            dom->in(1)    != in(1) ||  // Not same input 1?
--- a/hotspot/src/share/vm/opto/library_call.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Sun May 04 07:05:42 2008 -0700
@@ -2097,7 +2097,7 @@
   int type_words = type2size[type];
 
   // Cannot inline wide CAS on machines that don't support it natively
-  if (type2aelembytes[type] > BytesPerInt && !VM_Version::supports_cx8())
+  if (type2aelembytes(type) > BytesPerInt && !VM_Version::supports_cx8())
     return false;
 
   C->set_has_unsafe_access(true);  // Mark eventual nmethod as "unsafe".
@@ -3975,7 +3975,7 @@
     // both indices are constants
     int s_offs = src_offset_inttype->get_con();
     int d_offs = dest_offset_inttype->get_con();
-    int element_size = type2aelembytes[t];
+    int element_size = type2aelembytes(t);
     aligned = ((arrayOopDesc::base_offset_in_bytes(t) + s_offs * element_size) % HeapWordSize == 0) &&
               ((arrayOopDesc::base_offset_in_bytes(t) + d_offs * element_size) % HeapWordSize == 0);
     if (s_offs >= d_offs)  disjoint = true;
@@ -4170,6 +4170,7 @@
       && !_gvn.eqv_uncast(src, dest)
       && ((alloc = tightly_coupled_allocation(dest, slow_region))
           != NULL)
+      && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
       && alloc->maybe_set_complete(&_gvn)) {
     // "You break it, you buy it."
     InitializeNode* init = alloc->initialization();
@@ -4389,7 +4390,7 @@
     if (alloc != NULL && use_ReduceInitialCardMarks()) {
       // If we do not need card marks, copy using the jint or jlong stub.
       copy_type = LP64_ONLY(T_LONG) NOT_LP64(T_INT);
-      assert(type2aelembytes[basic_elem_type] == type2aelembytes[copy_type],
+      assert(type2aelembytes(basic_elem_type) == type2aelembytes(copy_type),
              "sizes agree");
     }
   }
@@ -4659,7 +4660,7 @@
   Node* mem = memory(adr_type); // memory slice to operate on
 
   // scaling and rounding of indexes:
-  int scale = exact_log2(type2aelembytes[basic_elem_type]);
+  int scale = exact_log2(type2aelembytes(basic_elem_type));
   int abase = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
   int clear_low = (-1 << scale) & (BytesPerInt  - 1);
   int bump_bit  = (-1 << scale) & BytesPerInt;
@@ -4753,7 +4754,7 @@
                                          Node* dest, Node* dest_offset,
                                          Node* dest_size) {
   // See if there is an advantage from block transfer.
-  int scale = exact_log2(type2aelembytes[basic_elem_type]);
+  int scale = exact_log2(type2aelembytes(basic_elem_type));
   if (scale >= LogBytesPerLong)
     return false;               // it is already a block transfer
 
--- a/hotspot/src/share/vm/opto/locknode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/locknode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -36,7 +36,8 @@
 
 uint BoxLockNode::size_of() const { return sizeof(*this); }
 
-BoxLockNode::BoxLockNode( int slot ) : Node( Compile::current()->root() ), _slot(slot) {
+BoxLockNode::BoxLockNode( int slot ) : Node( Compile::current()->root() ),
+                                       _slot(slot), _is_eliminated(false) {
   init_class_id(Class_BoxLock);
   init_flags(Flag_rematerialize);
   OptoReg::Name reg = OptoReg::stack2reg(_slot);
--- a/hotspot/src/share/vm/opto/locknode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/locknode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -27,6 +27,7 @@
 public:
   const int _slot;
   RegMask   _inmask;
+  bool _is_eliminated;    // indicates this lock was safely eliminated
 
   BoxLockNode( int lock );
   virtual int Opcode() const;
@@ -42,6 +43,10 @@
 
   static OptoReg::Name stack_slot(Node* box_node);
 
+  bool is_eliminated()  { return _is_eliminated; }
+  // mark lock as eliminated.
+  void set_eliminated() { _is_eliminated = true; }
+
 #ifndef PRODUCT
   virtual void format( PhaseRegAlloc *, outputStream *st ) const;
   virtual void dump_spec(outputStream *st) const { st->print("  Lock %d",_slot); }
--- a/hotspot/src/share/vm/opto/loopTransform.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1714,6 +1714,7 @@
   // Gate unrolling, RCE and peeling efforts.
   if( !_child &&                // If not an inner loop, do not split
       !_irreducible &&
+      _allow_optimizations &&
       !tail()->is_top() ) {     // Also ignore the occasional dead backedge
     if (!_has_call) {
       iteration_split_impl( phase, old_new );
--- a/hotspot/src/share/vm/opto/loopnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/loopnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -651,7 +651,7 @@
     while (if_cnt < if_limit) {
       if ((pred->Opcode() == Op_IfTrue || pred->Opcode() == Op_IfFalse)) {
         if_cnt++;
-        const TypeInt* if_t = filtered_type_at_if(val, pred);
+        const TypeInt* if_t = IfNode::filtered_int_type(&_igvn, val, pred);
         if (if_t != NULL) {
           if (rtn_t == NULL) {
             rtn_t = if_t;
@@ -674,59 +674,6 @@
 }
 
 
-//------------------------------filtered_type_at_if--------------------------------
-// Return a possibly more restrictive type for val based on condition control flow for an if
-const TypeInt* PhaseIdealLoop::filtered_type_at_if( Node* val, Node *if_proj) {
-  assert(if_proj &&
-         (if_proj->Opcode() == Op_IfTrue || if_proj->Opcode() == Op_IfFalse), "expecting an if projection");
-  if (if_proj->in(0) && if_proj->in(0)->is_If()) {
-    IfNode* iff = if_proj->in(0)->as_If();
-    if (iff->in(1) && iff->in(1)->is_Bool()) {
-      BoolNode* bol = iff->in(1)->as_Bool();
-      if (bol->in(1) && bol->in(1)->is_Cmp()) {
-        const CmpNode* cmp  = bol->in(1)->as_Cmp();
-        if (cmp->in(1) == val) {
-          const TypeInt* cmp2_t = _igvn.type(cmp->in(2))->isa_int();
-          if (cmp2_t != NULL) {
-            jint lo = cmp2_t->_lo;
-            jint hi = cmp2_t->_hi;
-            BoolTest::mask msk = if_proj->Opcode() == Op_IfTrue ? bol->_test._test : bol->_test.negate();
-            switch (msk) {
-            case BoolTest::ne:
-              // Can't refine type
-              return NULL;
-            case BoolTest::eq:
-              return cmp2_t;
-            case BoolTest::lt:
-              lo = TypeInt::INT->_lo;
-              if (hi - 1 < hi) {
-                hi = hi - 1;
-              }
-              break;
-            case BoolTest::le:
-              lo = TypeInt::INT->_lo;
-              break;
-            case BoolTest::gt:
-              if (lo + 1 > lo) {
-                lo = lo + 1;
-              }
-              hi = TypeInt::INT->_hi;
-              break;
-            case BoolTest::ge:
-              // lo unchanged
-              hi = TypeInt::INT->_hi;
-              break;
-            }
-            const TypeInt* rtn_t = TypeInt::make(lo, hi, cmp2_t->_widen);
-            return rtn_t;
-          }
-        }
-      }
-    }
-  }
-  return NULL;
-}
-
 //------------------------------dump_spec--------------------------------------
 // Dump special per-node info
 #ifndef PRODUCT
@@ -1614,7 +1561,7 @@
       // on just their loop-phi's for this pass of loop opts
       if( SplitIfBlocks && do_split_ifs ) {
         if (lpt->policy_range_check(this)) {
-          lpt->_rce_candidate = true;
+          lpt->_rce_candidate = 1; // = true
         }
       }
     }
@@ -2198,7 +2145,7 @@
     // as well?  If so, then I found another entry into the loop.
     while( is_postvisited(l->_head) ) {
       // found irreducible
-      l->_irreducible = true;
+      l->_irreducible = 1; // = true
       l = l->_parent;
       _has_irreducible_loops = true;
       // Check for bad CFG here to prevent crash, and bailout of compile
@@ -2252,6 +2199,12 @@
               (iff->as_If()->_prob >= 0.01) )
             innermost->_has_call = 1;
         }
+      } else if( n->is_Allocate() && n->as_Allocate()->_is_scalar_replaceable ) {
+        // Disable loop optimizations if the loop has a scalar replaceable
+        // allocation. This disabling may cause a potential performance lost
+        // if the allocation is not eliminated for some reason.
+        innermost->_allow_optimizations = false;
+        innermost->_has_call = 1; // = true
       }
     }
   }
--- a/hotspot/src/share/vm/opto/loopnode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/loopnode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -289,13 +289,15 @@
         _has_sfpt:1,            // True if has non-call safepoint
         _rce_candidate:1;       // True if candidate for range check elimination
 
-  Node_List* _required_safept;      // A inner loop cannot delete these safepts;
+  Node_List* _required_safept;  // A inner loop cannot delete these safepts;
+  bool  _allow_optimizations;   // Allow loop optimizations
 
   IdealLoopTree( PhaseIdealLoop* phase, Node *head, Node *tail )
     : _parent(0), _next(0), _child(0),
       _head(head), _tail(tail),
       _phase(phase),
       _required_safept(NULL),
+      _allow_optimizations(true),
       _nest(0), _irreducible(0), _has_call(0), _has_sfpt(0), _rce_candidate(0)
   { }
 
@@ -850,7 +852,6 @@
   const TypeInt* filtered_type( Node *n ) { return filtered_type(n, NULL); }
  // Helpers for filtered type
   const TypeInt* filtered_type_from_dominators( Node* val, Node *val_ctrl);
-  const TypeInt* filtered_type_at_if( Node* val, Node *if_proj);
 
   // Helper functions
   void register_new_node( Node *n, Node *blk );
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Sun May 04 07:05:42 2008 -0700
@@ -29,10 +29,26 @@
 //------------------------------split_thru_phi---------------------------------
 // Split Node 'n' through merge point if there is enough win.
 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
+  if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
+    // ConvI2L may have type information on it which is unsafe to push up
+    // so disable this for now
+    return NULL;
+  }
   int wins = 0;
   assert( !n->is_CFG(), "" );
   assert( region->is_Region(), "" );
-  Node *phi = new (C, region->req()) PhiNode( region, n->bottom_type() );
+
+  const Type* type = n->bottom_type();
+  const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
+  Node *phi;
+  if( t_oop != NULL && t_oop->is_instance_field() ) {
+    int iid    = t_oop->instance_id();
+    int index  = C->get_alias_index(t_oop);
+    int offset = t_oop->offset();
+    phi = new (C,region->req()) PhiNode(region, type, NULL, iid, index, offset);
+  } else {
+    phi = new (C,region->req()) PhiNode(region, type);
+  }
   uint old_unique = C->unique();
   for( uint i = 1; i < region->req(); i++ ) {
     Node *x;
@@ -435,9 +451,11 @@
 
   // Check profitability
   int cost = 0;
+  int phis = 0;
   for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
     Node *out = region->fast_out(i);
     if( !out->is_Phi() ) continue; // Ignore other control edges, etc
+    phis++;
     PhiNode* phi = out->as_Phi();
     switch (phi->type()->basic_type()) {
     case T_LONG:
@@ -489,6 +507,12 @@
     }
   }
   if( cost >= ConditionalMoveLimit ) return NULL; // Too much goo
+  Node* bol = iff->in(1);
+  assert( bol->Opcode() == Op_Bool, "" );
+  int cmp_op = bol->in(1)->Opcode();
+  // It is expensive to generate flags from a float compare.
+  // Avoid duplicated float compare.
+  if( phis > 1 && (cmp_op == Op_CmpF || cmp_op == Op_CmpD)) return NULL;
 
   // --------------
   // Now replace all Phis with CMOV's
--- a/hotspot/src/share/vm/opto/macro.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/macro.cpp	Sun May 04 07:05:42 2008 -0700
@@ -54,15 +54,30 @@
   uint new_dbg_start = newcall->tf()->domain()->cnt();
   int jvms_adj  = new_dbg_start - old_dbg_start;
   assert (new_dbg_start == newcall->req(), "argument count mismatch");
+
+  Dict* sosn_map = new Dict(cmpkey,hashkey);
   for (uint i = old_dbg_start; i < oldcall->req(); i++) {
-    newcall->add_req(oldcall->in(i));
+    Node* old_in = oldcall->in(i);
+    // Clone old SafePointScalarObjectNodes, adjusting their field contents.
+    if (old_in->is_SafePointScalarObject()) {
+      SafePointScalarObjectNode* old_sosn = old_in->as_SafePointScalarObject();
+      uint old_unique = C->unique();
+      Node* new_in = old_sosn->clone(jvms_adj, sosn_map);
+      if (old_unique != C->unique()) {
+        new_in = transform_later(new_in); // Register new node.
+      }
+      old_in = new_in;
+    }
+    newcall->add_req(old_in);
   }
+
   newcall->set_jvms(oldcall->jvms());
   for (JVMState *jvms = newcall->jvms(); jvms != NULL; jvms = jvms->caller()) {
     jvms->set_map(newcall);
     jvms->set_locoff(jvms->locoff()+jvms_adj);
     jvms->set_stkoff(jvms->stkoff()+jvms_adj);
     jvms->set_monoff(jvms->monoff()+jvms_adj);
+    jvms->set_scloff(jvms->scloff()+jvms_adj);
     jvms->set_endoff(jvms->endoff()+jvms_adj);
   }
 }
@@ -166,6 +181,622 @@
 
 }
 
+// Eliminate a card mark sequence.  p2x is a ConvP2XNode
+void PhaseMacroExpand::eliminate_card_mark(Node *p2x) {
+  assert(p2x->Opcode() == Op_CastP2X, "ConvP2XNode required");
+  Node *shift = p2x->unique_out();
+  Node *addp = shift->unique_out();
+  for (DUIterator_Last jmin, j = addp->last_outs(jmin); j >= jmin; --j) {
+    Node *st = addp->last_out(j);
+    assert(st->is_Store(), "store required");
+    _igvn.replace_node(st, st->in(MemNode::Memory));
+  }
+}
+
+// Search for a memory operation for the specified memory slice.
+static Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_mem, Node *alloc) {
+  Node *orig_mem = mem;
+  Node *alloc_mem = alloc->in(TypeFunc::Memory);
+  while (true) {
+    if (mem == alloc_mem || mem == start_mem ) {
+      return mem;  // hit one of our sentinals
+    } else if (mem->is_MergeMem()) {
+      mem = mem->as_MergeMem()->memory_at(alias_idx);
+    } else if (mem->is_Proj() && mem->as_Proj()->_con == TypeFunc::Memory) {
+      Node *in = mem->in(0);
+      // we can safely skip over safepoints, calls, locks and membars because we
+      // already know that the object is safe to eliminate.
+      if (in->is_Initialize() && in->as_Initialize()->allocation() == alloc) {
+        return in;
+      } else if (in->is_Call() || in->is_MemBar()) {
+        mem = in->in(TypeFunc::Memory);
+      } else {
+        assert(false, "unexpected projection");
+      }
+    } else if (mem->is_Store()) {
+      const TypePtr* atype = mem->as_Store()->adr_type();
+      int adr_idx = Compile::current()->get_alias_index(atype);
+      if (adr_idx == alias_idx) {
+        assert(atype->isa_oopptr(), "address type must be oopptr");
+        int adr_offset = atype->offset();
+        uint adr_iid = atype->is_oopptr()->instance_id();
+        // Array elements references have the same alias_idx
+        // but different offset and different instance_id.
+        if (adr_offset == offset && adr_iid == alloc->_idx)
+          return mem;
+      } else {
+        assert(adr_idx == Compile::AliasIdxRaw, "address must match or be raw");
+      }
+      mem = mem->in(MemNode::Memory);
+    } else {
+      return mem;
+    }
+    if (mem == orig_mem)
+      return mem;
+  }
+}
+
+//
+// Given a Memory Phi, compute a value Phi containing the values from stores
+// on the input paths.
+// Note: this function is recursive, its depth is limied by the "level" argument
+// Returns the computed Phi, or NULL if it cannot compute it.
+Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *phi_type, const TypeOopPtr *adr_t, Node *alloc, int level) {
+
+  if (level <= 0) {
+    return NULL;
+  }
+  int alias_idx = C->get_alias_index(adr_t);
+  int offset = adr_t->offset();
+  int instance_id = adr_t->instance_id();
+
+  Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+  Node *alloc_mem = alloc->in(TypeFunc::Memory);
+
+  uint length = mem->req();
+  GrowableArray <Node *> values(length, length, NULL);
+
+  for (uint j = 1; j < length; j++) {
+    Node *in = mem->in(j);
+    if (in == NULL || in->is_top()) {
+      values.at_put(j, in);
+    } else  {
+      Node *val = scan_mem_chain(in, alias_idx, offset, start_mem, alloc);
+      if (val == start_mem || val == alloc_mem) {
+        // hit a sentinel, return appropriate 0 value
+        values.at_put(j, _igvn.zerocon(ft));
+        continue;
+      }
+      if (val->is_Initialize()) {
+        val = val->as_Initialize()->find_captured_store(offset, type2aelembytes(ft), &_igvn);
+      }
+      if (val == NULL) {
+        return NULL;  // can't find a value on this path
+      }
+      if (val == mem) {
+        values.at_put(j, mem);
+      } else if (val->is_Store()) {
+        values.at_put(j, val->in(MemNode::ValueIn));
+      } else if(val->is_Proj() && val->in(0) == alloc) {
+        values.at_put(j, _igvn.zerocon(ft));
+      } else if (val->is_Phi()) {
+        // Check if an appropriate node already exists.
+        Node* region = val->in(0);
+        Node* old_phi = NULL;
+        for (DUIterator_Fast kmax, k = region->fast_outs(kmax); k < kmax; k++) {
+          Node* phi = region->fast_out(k);
+          if (phi->is_Phi() && phi != val &&
+              phi->as_Phi()->is_same_inst_field(phi_type, instance_id, alias_idx, offset)) {
+            old_phi = phi;
+            break;
+          }
+        }
+        if (old_phi == NULL) {
+          val = value_from_mem_phi(val, ft, phi_type, adr_t, alloc, level-1);
+          if (val == NULL) {
+            return NULL;
+          }
+          values.at_put(j, val);
+        } else {
+          values.at_put(j, old_phi);
+        }
+      } else {
+        return NULL;  // unknown node  on this path
+      }
+    }
+  }
+  // create a new Phi for the value
+  PhiNode *phi = new (C, length) PhiNode(mem->in(0), phi_type, NULL, instance_id, alias_idx, offset);
+  for (uint j = 1; j < length; j++) {
+    if (values.at(j) == mem) {
+      phi->init_req(j, phi);
+    } else {
+      phi->init_req(j, values.at(j));
+    }
+  }
+  transform_later(phi);
+  return phi;
+}
+
+// Search the last value stored into the object's field.
+Node *PhaseMacroExpand::value_from_mem(Node *sfpt_mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc) {
+  assert(adr_t->is_instance_field(), "instance required");
+  uint instance_id = adr_t->instance_id();
+  assert(instance_id == alloc->_idx, "wrong allocation");
+
+  int alias_idx = C->get_alias_index(adr_t);
+  int offset = adr_t->offset();
+  Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+  Node *alloc_ctrl = alloc->in(TypeFunc::Control);
+  Node *alloc_mem = alloc->in(TypeFunc::Memory);
+  VectorSet visited(Thread::current()->resource_area());
+
+
+  bool done = sfpt_mem == alloc_mem;
+  Node *mem = sfpt_mem;
+  while (!done) {
+    if (visited.test_set(mem->_idx)) {
+      return NULL;  // found a loop, give up
+    }
+    mem = scan_mem_chain(mem, alias_idx, offset, start_mem, alloc);
+    if (mem == start_mem || mem == alloc_mem) {
+      done = true;  // hit a sentinel, return appropriate 0 value
+    } else if (mem->is_Initialize()) {
+      mem = mem->as_Initialize()->find_captured_store(offset, type2aelembytes(ft), &_igvn);
+      if (mem == NULL) {
+        done = true; // Something go wrong.
+      } else if (mem->is_Store()) {
+        const TypePtr* atype = mem->as_Store()->adr_type();
+        assert(C->get_alias_index(atype) == Compile::AliasIdxRaw, "store is correct memory slice");
+        done = true;
+      }
+    } else if (mem->is_Store()) {
+      const TypeOopPtr* atype = mem->as_Store()->adr_type()->isa_oopptr();
+      assert(atype != NULL, "address type must be oopptr");
+      assert(C->get_alias_index(atype) == alias_idx &&
+             atype->is_instance_field() && atype->offset() == offset &&
+             atype->instance_id() == instance_id, "store is correct memory slice");
+      done = true;
+    } else if (mem->is_Phi()) {
+      // try to find a phi's unique input
+      Node *unique_input = NULL;
+      Node *top = C->top();
+      for (uint i = 1; i < mem->req(); i++) {
+        Node *n = scan_mem_chain(mem->in(i), alias_idx, offset, start_mem, alloc);
+        if (n == NULL || n == top || n == mem) {
+          continue;
+        } else if (unique_input == NULL) {
+          unique_input = n;
+        } else if (unique_input != n) {
+          unique_input = top;
+          break;
+        }
+      }
+      if (unique_input != NULL && unique_input != top) {
+        mem = unique_input;
+      } else {
+        done = true;
+      }
+    } else {
+      assert(false, "unexpected node");
+    }
+  }
+  if (mem != NULL) {
+    if (mem == start_mem || mem == alloc_mem) {
+      // hit a sentinel, return appropriate 0 value
+      return _igvn.zerocon(ft);
+    } else if (mem->is_Store()) {
+      return mem->in(MemNode::ValueIn);
+    } else if (mem->is_Phi()) {
+      // attempt to produce a Phi reflecting the values on the input paths of the Phi
+      Node * phi = value_from_mem_phi(mem, ft, ftype, adr_t, alloc, 8);
+      if (phi != NULL) {
+        return phi;
+      }
+    }
+  }
+  // Something go wrong.
+  return NULL;
+}
+
+// Check the possibility of scalar replacement.
+bool PhaseMacroExpand::can_eliminate_allocation(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints) {
+  //  Scan the uses of the allocation to check for anything that would
+  //  prevent us from eliminating it.
+  NOT_PRODUCT( const char* fail_eliminate = NULL; )
+  DEBUG_ONLY( Node* disq_node = NULL; )
+  bool  can_eliminate = true;
+
+  Node* res = alloc->result_cast();
+  const TypeOopPtr* res_type = NULL;
+  if (res == NULL) {
+    // All users were eliminated.
+  } else if (!res->is_CheckCastPP()) {
+    alloc->_is_scalar_replaceable = false;  // don't try again
+    NOT_PRODUCT(fail_eliminate = "Allocation does not have unique CheckCastPP";)
+    can_eliminate = false;
+  } else {
+    res_type = _igvn.type(res)->isa_oopptr();
+    if (res_type == NULL) {
+      NOT_PRODUCT(fail_eliminate = "Neither instance or array allocation";)
+      can_eliminate = false;
+    } else if (res_type->isa_aryptr()) {
+      int length = alloc->in(AllocateNode::ALength)->find_int_con(-1);
+      if (length < 0) {
+        NOT_PRODUCT(fail_eliminate = "Array's size is not constant";)
+        can_eliminate = false;
+      }
+    }
+  }
+
+  if (can_eliminate && res != NULL) {
+    for (DUIterator_Fast jmax, j = res->fast_outs(jmax);
+                               j < jmax && can_eliminate; j++) {
+      Node* use = res->fast_out(j);
+
+      if (use->is_AddP()) {
+        const TypePtr* addp_type = _igvn.type(use)->is_ptr();
+        int offset = addp_type->offset();
+
+        if (offset == Type::OffsetTop || offset == Type::OffsetBot) {
+          NOT_PRODUCT(fail_eliminate = "Undefined field referrence";)
+          can_eliminate = false;
+          break;
+        }
+        for (DUIterator_Fast kmax, k = use->fast_outs(kmax);
+                                   k < kmax && can_eliminate; k++) {
+          Node* n = use->fast_out(k);
+          if (!n->is_Store() && n->Opcode() != Op_CastP2X) {
+            DEBUG_ONLY(disq_node = n;)
+            if (n->is_Load()) {
+              NOT_PRODUCT(fail_eliminate = "Field load";)
+            } else {
+              NOT_PRODUCT(fail_eliminate = "Not store field referrence";)
+            }
+            can_eliminate = false;
+          }
+        }
+      } else if (use->is_SafePoint()) {
+        SafePointNode* sfpt = use->as_SafePoint();
+        if (sfpt->has_non_debug_use(res)) {
+          // Object is passed as argument.
+          DEBUG_ONLY(disq_node = use;)
+          NOT_PRODUCT(fail_eliminate = "Object is passed as argument";)
+          can_eliminate = false;
+        }
+        Node* sfptMem = sfpt->memory();
+        if (sfptMem == NULL || sfptMem->is_top()) {
+          DEBUG_ONLY(disq_node = use;)
+          NOT_PRODUCT(fail_eliminate = "NULL or TOP memory";)
+          can_eliminate = false;
+        } else {
+          safepoints.append_if_missing(sfpt);
+        }
+      } else if (use->Opcode() != Op_CastP2X) { // CastP2X is used by card mark
+        if (use->is_Phi()) {
+          if (use->outcnt() == 1 && use->unique_out()->Opcode() == Op_Return) {
+            NOT_PRODUCT(fail_eliminate = "Object is return value";)
+          } else {
+            NOT_PRODUCT(fail_eliminate = "Object is referenced by Phi";)
+          }
+          DEBUG_ONLY(disq_node = use;)
+        } else {
+          if (use->Opcode() == Op_Return) {
+            NOT_PRODUCT(fail_eliminate = "Object is return value";)
+          }else {
+            NOT_PRODUCT(fail_eliminate = "Object is referenced by node";)
+          }
+          DEBUG_ONLY(disq_node = use;)
+        }
+        can_eliminate = false;
+      }
+    }
+  }
+
+#ifndef PRODUCT
+  if (PrintEliminateAllocations) {
+    if (can_eliminate) {
+      tty->print("Scalar ");
+      if (res == NULL)
+        alloc->dump();
+      else
+        res->dump();
+    } else {
+      tty->print("NotScalar (%s)", fail_eliminate);
+      if (res == NULL)
+        alloc->dump();
+      else
+        res->dump();
+#ifdef ASSERT
+      if (disq_node != NULL) {
+          tty->print("  >>>> ");
+          disq_node->dump();
+      }
+#endif /*ASSERT*/
+    }
+  }
+#endif
+  return can_eliminate;
+}
+
+// Do scalar replacement.
+bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints) {
+  GrowableArray <SafePointNode *> safepoints_done;
+
+  ciKlass* klass = NULL;
+  ciInstanceKlass* iklass = NULL;
+  int nfields = 0;
+  int array_base;
+  int element_size;
+  BasicType basic_elem_type;
+  ciType* elem_type;
+
+  Node* res = alloc->result_cast();
+  const TypeOopPtr* res_type = NULL;
+  if (res != NULL) { // Could be NULL when there are no users
+    res_type = _igvn.type(res)->isa_oopptr();
+  }
+
+  if (res != NULL) {
+    klass = res_type->klass();
+    if (res_type->isa_instptr()) {
+      // find the fields of the class which will be needed for safepoint debug information
+      assert(klass->is_instance_klass(), "must be an instance klass.");
+      iklass = klass->as_instance_klass();
+      nfields = iklass->nof_nonstatic_fields();
+    } else {
+      // find the array's elements which will be needed for safepoint debug information
+      nfields = alloc->in(AllocateNode::ALength)->find_int_con(-1);
+      assert(klass->is_array_klass() && nfields >= 0, "must be an array klass.");
+      elem_type = klass->as_array_klass()->element_type();
+      basic_elem_type = elem_type->basic_type();
+      array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
+      element_size = type2aelembytes(basic_elem_type);
+    }
+  }
+  //
+  // Process the safepoint uses
+  //
+  while (safepoints.length() > 0) {
+    SafePointNode* sfpt = safepoints.pop();
+    Node* mem = sfpt->memory();
+    uint first_ind = sfpt->req();
+    SafePointScalarObjectNode* sobj = new (C, 1) SafePointScalarObjectNode(res_type,
+#ifdef ASSERT
+                                                 alloc,
+#endif
+                                                 first_ind, nfields);
+    sobj->init_req(0, sfpt->in(TypeFunc::Control));
+    transform_later(sobj);
+
+    // Scan object's fields adding an input to the safepoint for each field.
+    for (int j = 0; j < nfields; j++) {
+      int offset;
+      ciField* field = NULL;
+      if (iklass != NULL) {
+        field = iklass->nonstatic_field_at(j);
+        offset = field->offset();
+        elem_type = field->type();
+        basic_elem_type = field->layout_type();
+      } else {
+        offset = array_base + j * element_size;
+      }
+
+      const Type *field_type;
+      // The next code is taken from Parse::do_get_xxx().
+      if (basic_elem_type == T_OBJECT) {
+        if (!elem_type->is_loaded()) {
+          field_type = TypeInstPtr::BOTTOM;
+        } else if (field != NULL && field->is_constant()) {
+          // This can happen if the constant oop is non-perm.
+          ciObject* con = field->constant_value().as_object();
+          // Do not "join" in the previous type; it doesn't add value,
+          // and may yield a vacuous result if the field is of interface type.
+          field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr();
+          assert(field_type != NULL, "field singleton type must be consistent");
+        } else {
+          field_type = TypeOopPtr::make_from_klass(elem_type->as_klass());
+        }
+      } else {
+        field_type = Type::get_const_basic_type(basic_elem_type);
+      }
+
+      const TypeOopPtr *field_addr_type = res_type->add_offset(offset)->isa_oopptr();
+
+      Node *field_val = value_from_mem(mem, basic_elem_type, field_type, field_addr_type, alloc);
+      if (field_val == NULL) {
+        // we weren't able to find a value for this field,
+        // give up on eliminating this allocation
+        alloc->_is_scalar_replaceable = false;  // don't try again
+        // remove any extra entries we added to the safepoint
+        uint last = sfpt->req() - 1;
+        for (int k = 0;  k < j; k++) {
+          sfpt->del_req(last--);
+        }
+        // rollback processed safepoints
+        while (safepoints_done.length() > 0) {
+          SafePointNode* sfpt_done = safepoints_done.pop();
+          // remove any extra entries we added to the safepoint
+          last = sfpt_done->req() - 1;
+          for (int k = 0;  k < nfields; k++) {
+            sfpt_done->del_req(last--);
+          }
+          JVMState *jvms = sfpt_done->jvms();
+          jvms->set_endoff(sfpt_done->req());
+          // Now make a pass over the debug information replacing any references
+          // to SafePointScalarObjectNode with the allocated object.
+          int start = jvms->debug_start();
+          int end   = jvms->debug_end();
+          for (int i = start; i < end; i++) {
+            if (sfpt_done->in(i)->is_SafePointScalarObject()) {
+              SafePointScalarObjectNode* scobj = sfpt_done->in(i)->as_SafePointScalarObject();
+              if (scobj->first_index() == sfpt_done->req() &&
+                  scobj->n_fields() == (uint)nfields) {
+                assert(scobj->alloc() == alloc, "sanity");
+                sfpt_done->set_req(i, res);
+              }
+            }
+          }
+        }
+#ifndef PRODUCT
+        if (PrintEliminateAllocations) {
+          if (field != NULL) {
+            tty->print("=== At SafePoint node %d can't find value of Field: ",
+                       sfpt->_idx);
+            field->print();
+            int field_idx = C->get_alias_index(field_addr_type);
+            tty->print(" (alias_idx=%d)", field_idx);
+          } else { // Array's element
+            tty->print("=== At SafePoint node %d can't find value of array element [%d]",
+                       sfpt->_idx, j);
+          }
+          tty->print(", which prevents elimination of: ");
+          if (res == NULL)
+            alloc->dump();
+          else
+            res->dump();
+        }
+#endif
+        return false;
+      }
+      sfpt->add_req(field_val);
+    }
+    JVMState *jvms = sfpt->jvms();
+    jvms->set_endoff(sfpt->req());
+    // Now make a pass over the debug information replacing any references
+    // to the allocated object with "sobj"
+    int start = jvms->debug_start();
+    int end   = jvms->debug_end();
+    for (int i = start; i < end; i++) {
+      if (sfpt->in(i) == res) {
+        sfpt->set_req(i, sobj);
+      }
+    }
+    safepoints_done.append_if_missing(sfpt); // keep it for rollback
+  }
+  return true;
+}
+
+// Process users of eliminated allocation.
+void PhaseMacroExpand::process_users_of_allocation(AllocateNode *alloc) {
+  Node* res = alloc->result_cast();
+  if (res != NULL) {
+    for (DUIterator_Last jmin, j = res->last_outs(jmin); j >= jmin; ) {
+      Node *use = res->last_out(j);
+      uint oc1 = res->outcnt();
+
+      if (use->is_AddP()) {
+        for (DUIterator_Last kmin, k = use->last_outs(kmin); k >= kmin; ) {
+          Node *n = use->last_out(k);
+          uint oc2 = use->outcnt();
+          if (n->is_Store()) {
+            _igvn.replace_node(n, n->in(MemNode::Memory));
+          } else {
+            assert( n->Opcode() == Op_CastP2X, "CastP2X required");
+            eliminate_card_mark(n);
+          }
+          k -= (oc2 - use->outcnt());
+        }
+      } else {
+        assert( !use->is_SafePoint(), "safepoint uses must have been already elimiated");
+        assert( use->Opcode() == Op_CastP2X, "CastP2X required");
+        eliminate_card_mark(use);
+      }
+      j -= (oc1 - res->outcnt());
+    }
+    assert(res->outcnt() == 0, "all uses of allocated objects must be deleted");
+    _igvn.remove_dead_node(res);
+  }
+
+  //
+  // Process other users of allocation's projections
+  //
+  if (_resproj != NULL && _resproj->outcnt() != 0) {
+    for (DUIterator_Last jmin, j = _resproj->last_outs(jmin); j >= jmin; ) {
+      Node *use = _resproj->last_out(j);
+      uint oc1 = _resproj->outcnt();
+      if (use->is_Initialize()) {
+        // Eliminate Initialize node.
+        InitializeNode *init = use->as_Initialize();
+        assert(init->outcnt() <= 2, "only a control and memory projection expected");
+        Node *ctrl_proj = init->proj_out(TypeFunc::Control);
+        if (ctrl_proj != NULL) {
+           assert(init->in(TypeFunc::Control) == _fallthroughcatchproj, "allocation control projection");
+          _igvn.replace_node(ctrl_proj, _fallthroughcatchproj);
+        }
+        Node *mem_proj = init->proj_out(TypeFunc::Memory);
+        if (mem_proj != NULL) {
+          Node *mem = init->in(TypeFunc::Memory);
+#ifdef ASSERT
+          if (mem->is_MergeMem()) {
+            assert(mem->in(TypeFunc::Memory) == _memproj_fallthrough, "allocation memory projection");
+          } else {
+            assert(mem == _memproj_fallthrough, "allocation memory projection");
+          }
+#endif
+          _igvn.replace_node(mem_proj, mem);
+        }
+      } else if (use->is_AddP()) {
+        // raw memory addresses used only by the initialization
+        _igvn.hash_delete(use);
+        _igvn.subsume_node(use, C->top());
+      } else  {
+        assert(false, "only Initialize or AddP expected");
+      }
+      j -= (oc1 - _resproj->outcnt());
+    }
+  }
+  if (_fallthroughcatchproj != NULL) {
+    _igvn.replace_node(_fallthroughcatchproj, alloc->in(TypeFunc::Control));
+  }
+  if (_memproj_fallthrough != NULL) {
+    _igvn.replace_node(_memproj_fallthrough, alloc->in(TypeFunc::Memory));
+  }
+  if (_memproj_catchall != NULL) {
+    _igvn.replace_node(_memproj_catchall, C->top());
+  }
+  if (_ioproj_fallthrough != NULL) {
+    _igvn.replace_node(_ioproj_fallthrough, alloc->in(TypeFunc::I_O));
+  }
+  if (_ioproj_catchall != NULL) {
+    _igvn.replace_node(_ioproj_catchall, C->top());
+  }
+  if (_catchallcatchproj != NULL) {
+    _igvn.replace_node(_catchallcatchproj, C->top());
+  }
+}
+
+bool PhaseMacroExpand::eliminate_allocate_node(AllocateNode *alloc) {
+
+  if (!EliminateAllocations || !alloc->_is_scalar_replaceable) {
+    return false;
+  }
+
+  extract_call_projections(alloc);
+
+  GrowableArray <SafePointNode *> safepoints;
+  if (!can_eliminate_allocation(alloc, safepoints)) {
+    return false;
+  }
+
+  if (!scalar_replacement(alloc, safepoints)) {
+    return false;
+  }
+
+  process_users_of_allocation(alloc);
+
+#ifndef PRODUCT
+if (PrintEliminateAllocations) {
+  if (alloc->is_AllocateArray())
+    tty->print_cr("++++ Eliminated: %d AllocateArray", alloc->_idx);
+  else
+    tty->print_cr("++++ Eliminated: %d Allocate", alloc->_idx);
+}
+#endif
+
+  return true;
+}
+
 
 //---------------------------set_eden_pointers-------------------------
 void PhaseMacroExpand::set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr) {
@@ -270,6 +901,13 @@
   Node* klass_node        = alloc->in(AllocateNode::KlassNode);
   Node* initial_slow_test = alloc->in(AllocateNode::InitialTest);
 
+  // With escape analysis, the entire memory state was needed to be able to
+  // eliminate the allocation.  Since the allocations cannot be eliminated,
+  // optimize it to the raw slice.
+  if (mem->is_MergeMem()) {
+    mem = mem->as_MergeMem()->memory_at(Compile::AliasIdxRaw);
+  }
+
   Node* eden_top_adr;
   Node* eden_end_adr;
   set_eden_pointers(eden_top_adr, eden_end_adr);
@@ -813,27 +1451,87 @@
 // Note:  The membar's associated with the lock/unlock are currently not
 //        eliminated.  This should be investigated as a future enhancement.
 //
-void PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
-  Node* mem = alock->in(TypeFunc::Memory);
+bool PhaseMacroExpand::eliminate_locking_node(AbstractLockNode *alock) {
+
+  if (!alock->is_eliminated()) {
+    return false;
+  }
+  // Mark the box lock as eliminated if all correspondent locks are eliminated
+  // to construct correct debug info.
+  BoxLockNode* box = alock->box_node()->as_BoxLock();
+  if (!box->is_eliminated()) {
+    bool eliminate = true;
+    for (DUIterator_Fast imax, i = box->fast_outs(imax); i < imax; i++) {
+      Node *lck = box->fast_out(i);
+      if (lck->is_Lock() && !lck->as_AbstractLock()->is_eliminated()) {
+        eliminate = false;
+        break;
+      }
+    }
+    if (eliminate)
+      box->set_eliminated();
+  }
+
+  #ifndef PRODUCT
+  if (PrintEliminateLocks) {
+    if (alock->is_Lock()) {
+      tty->print_cr("++++ Eliminating: %d Lock", alock->_idx);
+    } else {
+      tty->print_cr("++++ Eliminating: %d Unlock", alock->_idx);
+    }
+  }
+  #endif
+
+  Node* mem  = alock->in(TypeFunc::Memory);
+  Node* ctrl = alock->in(TypeFunc::Control);
+
+  extract_call_projections(alock);
+  // There are 2 projections from the lock.  The lock node will
+  // be deleted when its last use is subsumed below.
+  assert(alock->outcnt() == 2 &&
+         _fallthroughproj != NULL &&
+         _memproj_fallthrough != NULL,
+         "Unexpected projections from Lock/Unlock");
+
+  Node* fallthroughproj = _fallthroughproj;
+  Node* memproj_fallthrough = _memproj_fallthrough;
 
   // The memory projection from a lock/unlock is RawMem
   // The input to a Lock is merged memory, so extract its RawMem input
   // (unless the MergeMem has been optimized away.)
   if (alock->is_Lock()) {
-    if (mem->is_MergeMem())
-      mem = mem->as_MergeMem()->in(Compile::AliasIdxRaw);
+    // Seach for MemBarAcquire node and delete it also.
+    MemBarNode* membar = fallthroughproj->unique_ctrl_out()->as_MemBar();
+    assert(membar != NULL && membar->Opcode() == Op_MemBarAcquire, "");
+    Node* ctrlproj = membar->proj_out(TypeFunc::Control);
+    Node* memproj = membar->proj_out(TypeFunc::Memory);
+    _igvn.hash_delete(ctrlproj);
+    _igvn.subsume_node(ctrlproj, fallthroughproj);
+    _igvn.hash_delete(memproj);
+    _igvn.subsume_node(memproj, memproj_fallthrough);
   }
 
-  extract_call_projections(alock);
-  // There are 2 projections from the lock.  The lock node will
-  // be deleted when its last use is subsumed below.
-  assert(alock->outcnt() == 2 && _fallthroughproj != NULL &&
-          _memproj_fallthrough != NULL, "Unexpected projections from Lock/Unlock");
-  _igvn.hash_delete(_fallthroughproj);
-  _igvn.subsume_node(_fallthroughproj, alock->in(TypeFunc::Control));
-  _igvn.hash_delete(_memproj_fallthrough);
-  _igvn.subsume_node(_memproj_fallthrough, mem);
-  return;
+  // Seach for MemBarRelease node and delete it also.
+  if (alock->is_Unlock() && ctrl != NULL && ctrl->is_Proj() &&
+      ctrl->in(0)->is_MemBar()) {
+    MemBarNode* membar = ctrl->in(0)->as_MemBar();
+    assert(membar->Opcode() == Op_MemBarRelease &&
+           mem->is_Proj() && membar == mem->in(0), "");
+    _igvn.hash_delete(fallthroughproj);
+    _igvn.subsume_node(fallthroughproj, ctrl);
+    _igvn.hash_delete(memproj_fallthrough);
+    _igvn.subsume_node(memproj_fallthrough, mem);
+    fallthroughproj = ctrl;
+    memproj_fallthrough = mem;
+    ctrl = membar->in(TypeFunc::Control);
+    mem  = membar->in(TypeFunc::Memory);
+  }
+
+  _igvn.hash_delete(fallthroughproj);
+  _igvn.subsume_node(fallthroughproj, ctrl);
+  _igvn.hash_delete(memproj_fallthrough);
+  _igvn.subsume_node(memproj_fallthrough, mem);
+  return true;
 }
 
 
@@ -844,12 +1542,7 @@
   Node* mem = lock->in(TypeFunc::Memory);
   Node* obj = lock->obj_node();
   Node* box = lock->box_node();
-  Node *flock = lock->fastlock_node();
-
-  if (lock->is_eliminated()) {
-    eliminate_locking_node(lock);
-    return;
-  }
+  Node* flock = lock->fastlock_node();
 
   // Make the merge point
   Node *region = new (C, 3) RegionNode(3);
@@ -898,17 +1591,11 @@
 //------------------------------expand_unlock_node----------------------
 void PhaseMacroExpand::expand_unlock_node(UnlockNode *unlock) {
 
-  Node *ctrl = unlock->in(TypeFunc::Control);
+  Node* ctrl = unlock->in(TypeFunc::Control);
   Node* mem = unlock->in(TypeFunc::Memory);
   Node* obj = unlock->obj_node();
   Node* box = unlock->box_node();
 
-
-  if (unlock->is_eliminated()) {
-    eliminate_locking_node(unlock);
-    return;
-  }
-
   // No need for a null check on unlock
 
   // Make the merge point
@@ -958,14 +1645,41 @@
 bool PhaseMacroExpand::expand_macro_nodes() {
   if (C->macro_count() == 0)
     return false;
-  // Make sure expansion will not cause node limit to be exceeded.  Worst case is a
-  // macro node gets expanded into about 50 nodes.  Allow 50% more for optimization
+  // attempt to eliminate allocations
+  bool progress = true;
+  while (progress) {
+    progress = false;
+    for (int i = C->macro_count(); i > 0; i--) {
+      Node * n = C->macro_node(i-1);
+      bool success = false;
+      debug_only(int old_macro_count = C->macro_count(););
+      switch (n->class_id()) {
+      case Node::Class_Allocate:
+      case Node::Class_AllocateArray:
+        success = eliminate_allocate_node(n->as_Allocate());
+        break;
+      case Node::Class_Lock:
+      case Node::Class_Unlock:
+        success = eliminate_locking_node(n->as_AbstractLock());
+        break;
+      default:
+        assert(false, "unknown node type in macro list");
+      }
+      assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count");
+      progress = progress || success;
+    }
+  }
+  // Make sure expansion will not cause node limit to be exceeded.
+  // Worst case is a macro node gets expanded into about 50 nodes.
+  // Allow 50% more for optimization.
   if (C->check_node_count(C->macro_count() * 75, "out of nodes before macro expansion" ) )
     return true;
+
   // expand "macro" nodes
   // nodes are removed from the macro list as they are processed
   while (C->macro_count() > 0) {
-    Node * n = C->macro_node(0);
+    int macro_count = C->macro_count();
+    Node * n = C->macro_node(macro_count-1);
     assert(n->is_macro(), "only macro nodes expected here");
     if (_igvn.type(n) == Type::TOP || n->in(0)->is_top() ) {
       // node is unreachable, so don't try to expand it
@@ -988,6 +1702,7 @@
     default:
       assert(false, "unknown node type in macro list");
     }
+    assert(C->macro_count() < macro_count, "must have deleted a node from macro list");
     if (C->failing())  return true;
   }
   _igvn.optimize();
--- a/hotspot/src/share/vm/opto/macro.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/macro.hpp	Sun May 04 07:05:42 2008 -0700
@@ -78,7 +78,16 @@
                               Node* length,
                               const TypeFunc* slow_call_type,
                               address slow_call_address);
-  void eliminate_locking_node(AbstractLockNode *alock);
+  Node *value_from_mem(Node *mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc);
+  Node *value_from_mem_phi(Node *mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc, int level);
+
+  bool eliminate_allocate_node(AllocateNode *alloc);
+  bool can_eliminate_allocation(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints);
+  bool scalar_replacement(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints_done);
+  void process_users_of_allocation(AllocateNode *alloc);
+
+  void eliminate_card_mark(Node *cm);
+  bool eliminate_locking_node(AbstractLockNode *alock);
   void expand_lock_node(LockNode *lock);
   void expand_unlock_node(UnlockNode *unlock);
 
--- a/hotspot/src/share/vm/opto/matcher.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/matcher.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1647,6 +1647,7 @@
       case Op_Phi:             // Treat Phis as shared roots
       case Op_Parm:
       case Op_Proj:            // All handled specially during matching
+      case Op_SafePointScalarObject:
         set_shared(n);
         set_dontcare(n);
         break;
--- a/hotspot/src/share/vm/opto/memnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -29,6 +29,8 @@
 #include "incls/_precompiled.incl"
 #include "incls/_memnode.cpp.incl"
 
+static Node *step_through_mergemem(PhaseGVN *phase, MergeMemNode *mmem,  const TypePtr *tp, const TypePtr *adr_check, outputStream *st);
+
 //=============================================================================
 uint MemNode::size_of() const { return sizeof(*this); }
 
@@ -87,6 +89,112 @@
 
 #endif
 
+Node *MemNode::optimize_simple_memory_chain(Node *mchain, const TypePtr *t_adr, PhaseGVN *phase) {
+  const TypeOopPtr *tinst = t_adr->isa_oopptr();
+  if (tinst == NULL || !tinst->is_instance_field())
+    return mchain;  // don't try to optimize non-instance types
+  uint instance_id = tinst->instance_id();
+  Node *prev = NULL;
+  Node *result = mchain;
+  while (prev != result) {
+    prev = result;
+    // skip over a call which does not affect this memory slice
+    if (result->is_Proj() && result->as_Proj()->_con == TypeFunc::Memory) {
+      Node *proj_in = result->in(0);
+      if (proj_in->is_Call()) {
+        CallNode *call = proj_in->as_Call();
+        if (!call->may_modify(t_adr, phase)) {
+          result = call->in(TypeFunc::Memory);
+        }
+      } else if (proj_in->is_Initialize()) {
+        AllocateNode* alloc = proj_in->as_Initialize()->allocation();
+        // Stop if this is the initialization for the object instance which
+        // which contains this memory slice, otherwise skip over it.
+        if (alloc != NULL && alloc->_idx != instance_id) {
+          result = proj_in->in(TypeFunc::Memory);
+        }
+      } else if (proj_in->is_MemBar()) {
+        result = proj_in->in(TypeFunc::Memory);
+      }
+    } else if (result->is_MergeMem()) {
+      result = step_through_mergemem(phase, result->as_MergeMem(), t_adr, NULL, tty);
+    }
+  }
+  return result;
+}
+
+Node *MemNode::optimize_memory_chain(Node *mchain, const TypePtr *t_adr, PhaseGVN *phase) {
+  const TypeOopPtr *t_oop = t_adr->isa_oopptr();
+  bool is_instance = (t_oop != NULL) && t_oop->is_instance_field();
+  PhaseIterGVN *igvn = phase->is_IterGVN();
+  Node *result = mchain;
+  result = optimize_simple_memory_chain(result, t_adr, phase);
+  if (is_instance && igvn != NULL  && result->is_Phi()) {
+    PhiNode *mphi = result->as_Phi();
+    assert(mphi->bottom_type() == Type::MEMORY, "memory phi required");
+    const TypePtr *t = mphi->adr_type();
+    if (t == TypePtr::BOTTOM || t == TypeRawPtr::BOTTOM) {
+      // clone the Phi with our address type
+      result = mphi->split_out_instance(t_adr, igvn);
+    } else {
+      assert(phase->C->get_alias_index(t) == phase->C->get_alias_index(t_adr), "correct memory chain");
+    }
+  }
+  return result;
+}
+
+static Node *step_through_mergemem(PhaseGVN *phase, MergeMemNode *mmem,  const TypePtr *tp, const TypePtr *adr_check, outputStream *st) {
+  uint alias_idx = phase->C->get_alias_index(tp);
+  Node *mem = mmem;
+#ifdef ASSERT
+  {
+    // Check that current type is consistent with the alias index used during graph construction
+    assert(alias_idx >= Compile::AliasIdxRaw, "must not be a bad alias_idx");
+    bool consistent =  adr_check == NULL || adr_check->empty() ||
+                       phase->C->must_alias(adr_check, alias_idx );
+    // Sometimes dead array references collapse to a[-1], a[-2], or a[-3]
+    if( !consistent && adr_check != NULL && !adr_check->empty() &&
+           tp->isa_aryptr() &&    tp->offset() == Type::OffsetBot &&
+        adr_check->isa_aryptr() && adr_check->offset() != Type::OffsetBot &&
+        ( adr_check->offset() == arrayOopDesc::length_offset_in_bytes() ||
+          adr_check->offset() == oopDesc::klass_offset_in_bytes() ||
+          adr_check->offset() == oopDesc::mark_offset_in_bytes() ) ) {
+      // don't assert if it is dead code.
+      consistent = true;
+    }
+    if( !consistent ) {
+      st->print("alias_idx==%d, adr_check==", alias_idx);
+      if( adr_check == NULL ) {
+        st->print("NULL");
+      } else {
+        adr_check->dump();
+      }
+      st->cr();
+      print_alias_types();
+      assert(consistent, "adr_check must match alias idx");
+    }
+  }
+#endif
+  // TypeInstPtr::NOTNULL+any is an OOP with unknown offset - generally
+  // means an array I have not precisely typed yet.  Do not do any
+  // alias stuff with it any time soon.
+  const TypeOopPtr *tinst = tp->isa_oopptr();
+  if( tp->base() != Type::AnyPtr &&
+      !(tinst &&
+        tinst->klass()->is_java_lang_Object() &&
+        tinst->offset() == Type::OffsetBot) ) {
+    // compress paths and change unreachable cycles to TOP
+    // If not, we can update the input infinitely along a MergeMem cycle
+    // Equivalent code in PhiNode::Ideal
+    Node* m  = phase->transform(mmem);
+    // If tranformed to a MergeMem, get the desired slice
+    // Otherwise the returned node represents memory for every slice
+    mem = (m->is_MergeMem())? m->as_MergeMem()->memory_at(alias_idx) : m;
+    // Update input if it is progress over what we have now
+  }
+  return mem;
+}
+
 //--------------------------Ideal_common---------------------------------------
 // Look for degenerate control and memory inputs.  Bypass MergeMem inputs.
 // Unhook non-raw memories from complete (macro-expanded) initializations.
@@ -108,65 +216,19 @@
   // Avoid independent memory operations
   Node* old_mem = mem;
 
-  if (mem->is_Proj() && mem->in(0)->is_Initialize()) {
-    InitializeNode* init = mem->in(0)->as_Initialize();
-    if (init->is_complete()) {  // i.e., after macro expansion
-      const TypePtr* tp = t_adr->is_ptr();
-      uint alias_idx = phase->C->get_alias_index(tp);
-      // Free this slice from the init.  It was hooked, temporarily,
-      // by GraphKit::set_output_for_allocation.
-      if (alias_idx > Compile::AliasIdxRaw) {
-        mem = init->memory(alias_idx);
-        // ...but not with the raw-pointer slice.
-      }
-    }
-  }
+  // The code which unhooks non-raw memories from complete (macro-expanded)
+  // initializations was removed. After macro-expansion all stores catched
+  // by Initialize node became raw stores and there is no information
+  // which memory slices they modify. So it is unsafe to move any memory
+  // operation above these stores. Also in most cases hooked non-raw memories
+  // were already unhooked by using information from detect_ptr_independence()
+  // and find_previous_store().
 
   if (mem->is_MergeMem()) {
     MergeMemNode* mmem = mem->as_MergeMem();
     const TypePtr *tp = t_adr->is_ptr();
-    uint alias_idx = phase->C->get_alias_index(tp);
-#ifdef ASSERT
-    {
-      // Check that current type is consistent with the alias index used during graph construction
-      assert(alias_idx >= Compile::AliasIdxRaw, "must not be a bad alias_idx");
-      const TypePtr *adr_t =  adr_type();
-      bool consistent =  adr_t == NULL || adr_t->empty() || phase->C->must_alias(adr_t, alias_idx );
-      // Sometimes dead array references collapse to a[-1], a[-2], or a[-3]
-      if( !consistent && adr_t != NULL && !adr_t->empty() &&
-             tp->isa_aryptr() &&    tp->offset() == Type::OffsetBot &&
-          adr_t->isa_aryptr() && adr_t->offset() != Type::OffsetBot &&
-          ( adr_t->offset() == arrayOopDesc::length_offset_in_bytes() ||
-            adr_t->offset() == oopDesc::klass_offset_in_bytes() ||
-            adr_t->offset() == oopDesc::mark_offset_in_bytes() ) ) {
-        // don't assert if it is dead code.
-        consistent = true;
-      }
-      if( !consistent ) {
-        tty->print("alias_idx==%d, adr_type()==", alias_idx); if( adr_t == NULL ) { tty->print("NULL"); } else { adr_t->dump(); }
-        tty->cr();
-        print_alias_types();
-        assert(consistent, "adr_type must match alias idx");
-      }
-    }
-#endif
-    // TypeInstPtr::NOTNULL+any is an OOP with unknown offset - generally
-    // means an array I have not precisely typed yet.  Do not do any
-    // alias stuff with it any time soon.
-    const TypeInstPtr *tinst = tp->isa_instptr();
-    if( tp->base() != Type::AnyPtr &&
-        !(tinst &&
-          tinst->klass()->is_java_lang_Object() &&
-          tinst->offset() == Type::OffsetBot) ) {
-      // compress paths and change unreachable cycles to TOP
-      // If not, we can update the input infinitely along a MergeMem cycle
-      // Equivalent code in PhiNode::Ideal
-      Node* m  = phase->transform(mmem);
-      // If tranformed to a MergeMem, get the desired slice
-      // Otherwise the returned node represents memory for every slice
-      mem = (m->is_MergeMem())? m->as_MergeMem()->memory_at(alias_idx) : m;
-      // Update input if it is progress over what we have now
-    }
+
+    mem = step_through_mergemem(phase, mmem, tp, adr_type(), tty);
   }
 
   if (mem != old_mem) {
@@ -179,36 +241,91 @@
 }
 
 // Helper function for proving some simple control dominations.
-// Attempt to prove that control input 'dom' dominates (or equals) 'sub'.
+// Attempt to prove that all control inputs of 'dom' dominate 'sub'.
 // Already assumes that 'dom' is available at 'sub', and that 'sub'
 // is not a constant (dominated by the method's StartNode).
 // Used by MemNode::find_previous_store to prove that the
 // control input of a memory operation predates (dominates)
 // an allocation it wants to look past.
-bool MemNode::detect_dominating_control(Node* dom, Node* sub) {
-  if (dom == NULL)      return false;
-  if (dom->is_Proj())   dom = dom->in(0);
-  if (dom->is_Start())  return true; // anything inside the method
-  if (dom->is_Root())   return true; // dom 'controls' a constant
-  int cnt = 20;                      // detect cycle or too much effort
-  while (sub != NULL) {              // walk 'sub' up the chain to 'dom'
-    if (--cnt < 0)   return false;   // in a cycle or too complex
-    if (sub == dom)  return true;
-    if (sub->is_Start())  return false;
-    if (sub->is_Root())   return false;
-    Node* up = sub->in(0);
-    if (sub == up && sub->is_Region()) {
-      for (uint i = 1; i < sub->req(); i++) {
-        Node* in = sub->in(i);
-        if (in != NULL && !in->is_top() && in != sub) {
-          up = in; break;            // take any path on the way up to 'dom'
+bool MemNode::all_controls_dominate(Node* dom, Node* sub) {
+  if (dom == NULL || dom->is_top() || sub == NULL || sub->is_top())
+    return false; // Conservative answer for dead code
+
+  // Check 'dom'.
+  dom = dom->find_exact_control(dom);
+  if (dom == NULL || dom->is_top())
+    return false; // Conservative answer for dead code
+
+  if (dom->is_Start() || dom->is_Root() || dom == sub)
+    return true;
+
+  // 'dom' dominates 'sub' if its control edge and control edges
+  // of all its inputs dominate or equal to sub's control edge.
+
+  // Currently 'sub' is either Allocate, Initialize or Start nodes.
+  assert(sub->is_Allocate() || sub->is_Initialize() || sub->is_Start(), "expecting only these nodes");
+
+  // Get control edge of 'sub'.
+  sub = sub->find_exact_control(sub->in(0));
+  if (sub == NULL || sub->is_top())
+    return false; // Conservative answer for dead code
+
+  assert(sub->is_CFG(), "expecting control");
+
+  if (sub == dom)
+    return true;
+
+  if (sub->is_Start() || sub->is_Root())
+    return false;
+
+  {
+    // Check all control edges of 'dom'.
+
+    ResourceMark rm;
+    Arena* arena = Thread::current()->resource_area();
+    Node_List nlist(arena);
+    Unique_Node_List dom_list(arena);
+
+    dom_list.push(dom);
+    bool only_dominating_controls = false;
+
+    for (uint next = 0; next < dom_list.size(); next++) {
+      Node* n = dom_list.at(next);
+      if (!n->is_CFG() && n->pinned()) {
+        // Check only own control edge for pinned non-control nodes.
+        n = n->find_exact_control(n->in(0));
+        if (n == NULL || n->is_top())
+          return false; // Conservative answer for dead code
+        assert(n->is_CFG(), "expecting control");
+      }
+      if (n->is_Start() || n->is_Root()) {
+        only_dominating_controls = true;
+      } else if (n->is_CFG()) {
+        if (n->dominates(sub, nlist))
+          only_dominating_controls = true;
+        else
+          return false;
+      } else {
+        // First, own control edge.
+        Node* m = n->find_exact_control(n->in(0));
+        if (m == NULL)
+          continue;
+        if (m->is_top())
+          return false; // Conservative answer for dead code
+        dom_list.push(m);
+
+        // Now, the rest of edges.
+        uint cnt = n->req();
+        for (uint i = 1; i < cnt; i++) {
+          m = n->find_exact_control(n->in(i));
+          if (m == NULL || m->is_top())
+            continue;
+          dom_list.push(m);
         }
       }
     }
-    if (sub == up)  return false;    // some kind of tight cycle
-    sub = up;
+    return only_dominating_controls;
   }
-  return false;
 }
 
 //---------------------detect_ptr_independence---------------------------------
@@ -229,9 +346,9 @@
     return (a1 != a2);
   } else if (a1 != NULL) {                  // one allocation a1
     // (Note:  p2->is_Con implies p2->in(0)->is_Root, which dominates.)
-    return detect_dominating_control(p2->in(0), a1->in(0));
+    return all_controls_dominate(p2, a1);
   } else { //(a2 != NULL)                   // one allocation a2
-    return detect_dominating_control(p1->in(0), a2->in(0));
+    return all_controls_dominate(p1, a2);
   }
   return false;
 }
@@ -260,6 +377,8 @@
   if (offset == Type::OffsetBot)
     return NULL;            // cannot unalias unless there are precise offsets
 
+  const TypeOopPtr *addr_t = adr->bottom_type()->isa_oopptr();
+
   intptr_t size_in_bytes = memory_size();
 
   Node* mem = in(MemNode::Memory);   // start searching here...
@@ -315,8 +434,7 @@
         known_identical = true;
       else if (alloc != NULL)
         known_independent = true;
-      else if (ctrl != NULL &&
-               detect_dominating_control(ctrl, st_alloc->in(0)))
+      else if (all_controls_dominate(this, st_alloc))
         known_independent = true;
 
       if (known_independent) {
@@ -339,6 +457,22 @@
         return mem;         // let caller handle steps (c), (d)
       }
 
+    } else if (addr_t != NULL && addr_t->is_instance_field()) {
+      // Can't use optimize_simple_memory_chain() since it needs PhaseGVN.
+      if (mem->is_Proj() && mem->in(0)->is_Call()) {
+        CallNode *call = mem->in(0)->as_Call();
+        if (!call->may_modify(addr_t, phase)) {
+          mem = call->in(TypeFunc::Memory);
+          continue;         // (a) advance through independent call memory
+        }
+      } else if (mem->is_Proj() && mem->in(0)->is_MemBar()) {
+        mem = mem->in(0)->in(TypeFunc::Memory);
+        continue;           // (a) advance through independent MemBar memory
+      } else if (mem->is_MergeMem()) {
+        int alias_idx = phase->C->get_alias_index(adr_type());
+        mem = mem->as_MergeMem()->memory_at(alias_idx);
+        continue;           // (a) advance through independent MergeMem memory
+      }
     }
 
     // Unless there is an explicit 'continue', we must bail out here,
@@ -540,7 +674,10 @@
           const Node* call = adr->in(0);
           if (call->is_CallStaticJava()) {
             const CallStaticJavaNode* call_java = call->as_CallStaticJava();
-            assert(call_java && call_java->method() == NULL, "must be runtime call");
+            const TypeTuple *r = call_java->tf()->range();
+            assert(r->cnt() > TypeFunc::Parms, "must return value");
+            const Type* ret_type = r->field_at(TypeFunc::Parms);
+            assert(ret_type && ret_type->isa_ptr(), "must return pointer");
             // We further presume that this is one of
             // new_instance_Java, new_array_Java, or
             // the like, but do not assert for this.
@@ -634,6 +771,46 @@
 Node* MemNode::can_see_stored_value(Node* st, PhaseTransform* phase) const {
   Node* ld_adr = in(MemNode::Address);
 
+  const TypeInstPtr* tp = phase->type(ld_adr)->isa_instptr();
+  Compile::AliasType* atp = tp != NULL ? phase->C->alias_type(tp) : NULL;
+  if (EliminateAutoBox && atp != NULL && atp->index() >= Compile::AliasIdxRaw &&
+      atp->field() != NULL && !atp->field()->is_volatile()) {
+    uint alias_idx = atp->index();
+    bool final = atp->field()->is_final();
+    Node* result = NULL;
+    Node* current = st;
+    // Skip through chains of MemBarNodes checking the MergeMems for
+    // new states for the slice of this load.  Stop once any other
+    // kind of node is encountered.  Loads from final memory can skip
+    // through any kind of MemBar but normal loads shouldn't skip
+    // through MemBarAcquire since the could allow them to move out of
+    // a synchronized region.
+    while (current->is_Proj()) {
+      int opc = current->in(0)->Opcode();
+      if ((final && opc == Op_MemBarAcquire) ||
+          opc == Op_MemBarRelease || opc == Op_MemBarCPUOrder) {
+        Node* mem = current->in(0)->in(TypeFunc::Memory);
+        if (mem->is_MergeMem()) {
+          MergeMemNode* merge = mem->as_MergeMem();
+          Node* new_st = merge->memory_at(alias_idx);
+          if (new_st == merge->base_memory()) {
+            // Keep searching
+            current = merge->base_memory();
+            continue;
+          }
+          // Save the new memory state for the slice and fall through
+          // to exit.
+          result = new_st;
+        }
+      }
+      break;
+    }
+    if (result != NULL) {
+      st = result;
+    }
+  }
+
+
   // Loop around twice in the case Load -> Initialize -> Store.
   // (See PhaseIterGVN::add_users_to_worklist, which knows about this case.)
   for (int trip = 0; trip <= 1; trip++) {
@@ -698,6 +875,21 @@
   return NULL;
 }
 
+//----------------------is_instance_field_load_with_local_phi------------------
+bool LoadNode::is_instance_field_load_with_local_phi(Node* ctrl) {
+  if( in(MemNode::Memory)->is_Phi() && in(MemNode::Memory)->in(0) == ctrl &&
+      in(MemNode::Address)->is_AddP() ) {
+    const TypeOopPtr* t_oop = in(MemNode::Address)->bottom_type()->isa_oopptr();
+    // Only instances.
+    if( t_oop != NULL && t_oop->is_instance_field() &&
+        t_oop->offset() != Type::OffsetBot &&
+        t_oop->offset() != Type::OffsetTop) {
+      return true;
+    }
+  }
+  return false;
+}
+
 //------------------------------Identity---------------------------------------
 // Loads are identity if previous store is to same address
 Node *LoadNode::Identity( PhaseTransform *phase ) {
@@ -720,9 +912,190 @@
     // usually runs first, producing the singleton type of the Con.)
     return value;
   }
+
+  // Search for an existing data phi which was generated before for the same
+  // instance's field to avoid infinite genertion of phis in a loop.
+  Node *region = mem->in(0);
+  if (is_instance_field_load_with_local_phi(region)) {
+    const TypePtr *addr_t = in(MemNode::Address)->bottom_type()->isa_ptr();
+    int this_index  = phase->C->get_alias_index(addr_t);
+    int this_offset = addr_t->offset();
+    int this_id    = addr_t->is_oopptr()->instance_id();
+    const Type* this_type = bottom_type();
+    for (DUIterator_Fast imax, i = region->fast_outs(imax); i < imax; i++) {
+      Node* phi = region->fast_out(i);
+      if (phi->is_Phi() && phi != mem &&
+          phi->as_Phi()->is_same_inst_field(this_type, this_id, this_index, this_offset)) {
+        return phi;
+      }
+    }
+  }
+
   return this;
 }
 
+
+// Returns true if the AliasType refers to the field that holds the
+// cached box array.  Currently only handles the IntegerCache case.
+static bool is_autobox_cache(Compile::AliasType* atp) {
+  if (atp != NULL && atp->field() != NULL) {
+    ciField* field = atp->field();
+    ciSymbol* klass = field->holder()->name();
+    if (field->name() == ciSymbol::cache_field_name() &&
+        field->holder()->uses_default_loader() &&
+        klass == ciSymbol::java_lang_Integer_IntegerCache()) {
+      return true;
+    }
+  }
+  return false;
+}
+
+// Fetch the base value in the autobox array
+static bool fetch_autobox_base(Compile::AliasType* atp, int& cache_offset) {
+  if (atp != NULL && atp->field() != NULL) {
+    ciField* field = atp->field();
+    ciSymbol* klass = field->holder()->name();
+    if (field->name() == ciSymbol::cache_field_name() &&
+        field->holder()->uses_default_loader() &&
+        klass == ciSymbol::java_lang_Integer_IntegerCache()) {
+      assert(field->is_constant(), "what?");
+      ciObjArray* array = field->constant_value().as_object()->as_obj_array();
+      // Fetch the box object at the base of the array and get its value
+      ciInstance* box = array->obj_at(0)->as_instance();
+      ciInstanceKlass* ik = box->klass()->as_instance_klass();
+      if (ik->nof_nonstatic_fields() == 1) {
+        // This should be true nonstatic_field_at requires calling
+        // nof_nonstatic_fields so check it anyway
+        ciConstant c = box->field_value(ik->nonstatic_field_at(0));
+        cache_offset = c.as_int();
+      }
+      return true;
+    }
+  }
+  return false;
+}
+
+// Returns true if the AliasType refers to the value field of an
+// autobox object.  Currently only handles Integer.
+static bool is_autobox_object(Compile::AliasType* atp) {
+  if (atp != NULL && atp->field() != NULL) {
+    ciField* field = atp->field();
+    ciSymbol* klass = field->holder()->name();
+    if (field->name() == ciSymbol::value_name() &&
+        field->holder()->uses_default_loader() &&
+        klass == ciSymbol::java_lang_Integer()) {
+      return true;
+    }
+  }
+  return false;
+}
+
+
+// We're loading from an object which has autobox behaviour.
+// If this object is result of a valueOf call we'll have a phi
+// merging a newly allocated object and a load from the cache.
+// We want to replace this load with the original incoming
+// argument to the valueOf call.
+Node* LoadNode::eliminate_autobox(PhaseGVN* phase) {
+  Node* base = in(Address)->in(AddPNode::Base);
+  if (base->is_Phi() && base->req() == 3) {
+    AllocateNode* allocation = NULL;
+    int allocation_index = -1;
+    int load_index = -1;
+    for (uint i = 1; i < base->req(); i++) {
+      allocation = AllocateNode::Ideal_allocation(base->in(i), phase);
+      if (allocation != NULL) {
+        allocation_index = i;
+        load_index = 3 - allocation_index;
+        break;
+      }
+    }
+    LoadNode* load = NULL;
+    if (allocation != NULL && base->in(load_index)->is_Load()) {
+      load = base->in(load_index)->as_Load();
+    }
+    if (load != NULL && in(Memory)->is_Phi() && in(Memory)->in(0) == base->in(0)) {
+      // Push the loads from the phi that comes from valueOf up
+      // through it to allow elimination of the loads and the recovery
+      // of the original value.
+      Node* mem_phi = in(Memory);
+      Node* offset = in(Address)->in(AddPNode::Offset);
+
+      Node* in1 = clone();
+      Node* in1_addr = in1->in(Address)->clone();
+      in1_addr->set_req(AddPNode::Base, base->in(allocation_index));
+      in1_addr->set_req(AddPNode::Address, base->in(allocation_index));
+      in1_addr->set_req(AddPNode::Offset, offset);
+      in1->set_req(0, base->in(allocation_index));
+      in1->set_req(Address, in1_addr);
+      in1->set_req(Memory, mem_phi->in(allocation_index));
+
+      Node* in2 = clone();
+      Node* in2_addr = in2->in(Address)->clone();
+      in2_addr->set_req(AddPNode::Base, base->in(load_index));
+      in2_addr->set_req(AddPNode::Address, base->in(load_index));
+      in2_addr->set_req(AddPNode::Offset, offset);
+      in2->set_req(0, base->in(load_index));
+      in2->set_req(Address, in2_addr);
+      in2->set_req(Memory, mem_phi->in(load_index));
+
+      in1_addr = phase->transform(in1_addr);
+      in1 =      phase->transform(in1);
+      in2_addr = phase->transform(in2_addr);
+      in2 =      phase->transform(in2);
+
+      PhiNode* result = PhiNode::make_blank(base->in(0), this);
+      result->set_req(allocation_index, in1);
+      result->set_req(load_index, in2);
+      return result;
+    }
+  } else if (base->is_Load()) {
+    // Eliminate the load of Integer.value for integers from the cache
+    // array by deriving the value from the index into the array.
+    // Capture the offset of the load and then reverse the computation.
+    Node* load_base = base->in(Address)->in(AddPNode::Base);
+    if (load_base != NULL) {
+      Compile::AliasType* atp = phase->C->alias_type(load_base->adr_type());
+      intptr_t cache_offset;
+      int shift = -1;
+      Node* cache = NULL;
+      if (is_autobox_cache(atp)) {
+        shift  = exact_log2(type2aelembytes(T_OBJECT));
+        cache = AddPNode::Ideal_base_and_offset(load_base->in(Address), phase, cache_offset);
+      }
+      if (cache != NULL && base->in(Address)->is_AddP()) {
+        Node* elements[4];
+        int count = base->in(Address)->as_AddP()->unpack_offsets(elements, ARRAY_SIZE(elements));
+        int cache_low;
+        if (count > 0 && fetch_autobox_base(atp, cache_low)) {
+          int offset = arrayOopDesc::base_offset_in_bytes(memory_type()) - (cache_low << shift);
+          // Add up all the offsets making of the address of the load
+          Node* result = elements[0];
+          for (int i = 1; i < count; i++) {
+            result = phase->transform(new (phase->C, 3) AddXNode(result, elements[i]));
+          }
+          // Remove the constant offset from the address and then
+          // remove the scaling of the offset to recover the original index.
+          result = phase->transform(new (phase->C, 3) AddXNode(result, phase->MakeConX(-offset)));
+          if (result->Opcode() == Op_LShiftX && result->in(2) == phase->intcon(shift)) {
+            // Peel the shift off directly but wrap it in a dummy node
+            // since Ideal can't return existing nodes
+            result = new (phase->C, 3) RShiftXNode(result->in(1), phase->intcon(0));
+          } else {
+            result = new (phase->C, 3) RShiftXNode(result, phase->intcon(shift));
+          }
+#ifdef _LP64
+          result = new (phase->C, 2) ConvL2INode(phase->transform(result));
+#endif
+          return result;
+        }
+      }
+    }
+  }
+  return NULL;
+}
+
+
 //------------------------------Ideal------------------------------------------
 // If the load is from Field memory and the pointer is non-null, we can
 // zero out the control input.
@@ -749,12 +1122,145 @@
     Node*    base   = AddPNode::Ideal_base_and_offset(address, phase, ignore);
     if (base != NULL
         && phase->type(base)->higher_equal(TypePtr::NOTNULL)
-        && detect_dominating_control(base->in(0), phase->C->start())) {
+        && all_controls_dominate(base, phase->C->start())) {
       // A method-invariant, non-null address (constant or 'this' argument).
       set_req(MemNode::Control, NULL);
     }
   }
 
+  if (EliminateAutoBox && can_reshape && in(Address)->is_AddP()) {
+    Node* base = in(Address)->in(AddPNode::Base);
+    if (base != NULL) {
+      Compile::AliasType* atp = phase->C->alias_type(adr_type());
+      if (is_autobox_object(atp)) {
+        Node* result = eliminate_autobox(phase);
+        if (result != NULL) return result;
+      }
+    }
+  }
+
+  Node* mem = in(MemNode::Memory);
+  const TypePtr *addr_t = phase->type(address)->isa_ptr();
+
+  if (addr_t != NULL) {
+    // try to optimize our memory input
+    Node* opt_mem = MemNode::optimize_memory_chain(mem, addr_t, phase);
+    if (opt_mem != mem) {
+      set_req(MemNode::Memory, opt_mem);
+      return this;
+    }
+    const TypeOopPtr *t_oop = addr_t->isa_oopptr();
+    if (can_reshape && opt_mem->is_Phi() &&
+        (t_oop != NULL) && t_oop->is_instance_field()) {
+      assert(t_oop->offset() != Type::OffsetBot && t_oop->offset() != Type::OffsetTop, "");
+      Node *region = opt_mem->in(0);
+      uint cnt = opt_mem->req();
+      for( uint i = 1; i < cnt; i++ ) {
+        Node *in = opt_mem->in(i);
+        if( in == NULL ) {
+          region = NULL; // Wait stable graph
+          break;
+        }
+      }
+      if (region != NULL) {
+        // Check for loop invariant.
+        if (cnt == 3) {
+          for( uint i = 1; i < cnt; i++ ) {
+            Node *in = opt_mem->in(i);
+            Node* m = MemNode::optimize_memory_chain(in, addr_t, phase);
+            if (m == opt_mem) {
+              set_req(MemNode::Memory, opt_mem->in(cnt - i)); // Skip this phi.
+              return this;
+            }
+          }
+        }
+        // Split through Phi (see original code in loopopts.cpp).
+        assert(phase->C->have_alias_type(addr_t), "instance should have alias type");
+
+        // Do nothing here if Identity will find a value
+        // (to avoid infinite chain of value phis generation).
+        if ( !phase->eqv(this, this->Identity(phase)) )
+          return NULL;
+
+        const Type* this_type = this->bottom_type();
+        int this_index  = phase->C->get_alias_index(addr_t);
+        int this_offset = addr_t->offset();
+        int this_iid    = addr_t->is_oopptr()->instance_id();
+        int wins = 0;
+        PhaseIterGVN *igvn = phase->is_IterGVN();
+        Node *phi = new (igvn->C, region->req()) PhiNode(region, this_type, NULL, this_iid, this_index, this_offset);
+        for( uint i = 1; i < region->req(); i++ ) {
+          Node *x;
+          Node* the_clone = NULL;
+          if( region->in(i) == phase->C->top() ) {
+            x = phase->C->top();      // Dead path?  Use a dead data op
+          } else {
+            x = this->clone();        // Else clone up the data op
+            the_clone = x;            // Remember for possible deletion.
+            // Alter data node to use pre-phi inputs
+            if( this->in(0) == region ) {
+              x->set_req( 0, region->in(i) );
+            } else {
+              x->set_req( 0, NULL );
+            }
+            for( uint j = 1; j < this->req(); j++ ) {
+              Node *in = this->in(j);
+              if( in->is_Phi() && in->in(0) == region )
+                x->set_req( j, in->in(i) ); // Use pre-Phi input for the clone
+            }
+          }
+          // Check for a 'win' on some paths
+          const Type *t = x->Value(igvn);
+
+          bool singleton = t->singleton();
+
+          // See comments in PhaseIdealLoop::split_thru_phi().
+          if( singleton && t == Type::TOP ) {
+            singleton &= region->is_Loop() && (i != LoopNode::EntryControl);
+          }
+
+          if( singleton ) {
+            wins++;
+            x = igvn->makecon(t);
+          } else {
+            // We now call Identity to try to simplify the cloned node.
+            // Note that some Identity methods call phase->type(this).
+            // Make sure that the type array is big enough for
+            // our new node, even though we may throw the node away.
+            // (This tweaking with igvn only works because x is a new node.)
+            igvn->set_type(x, t);
+            Node *y = x->Identity(igvn);
+            if( y != x ) {
+              wins++;
+              x = y;
+            } else {
+              y = igvn->hash_find(x);
+              if( y ) {
+                wins++;
+                x = y;
+              } else {
+                // Else x is a new node we are keeping
+                // We do not need register_new_node_with_optimizer
+                // because set_type has already been called.
+                igvn->_worklist.push(x);
+              }
+            }
+          }
+          if (x != the_clone && the_clone != NULL)
+            igvn->remove_dead_node(the_clone);
+          phi->set_req(i, x);
+        }
+        if( wins > 0 ) {
+          // Record Phi
+          igvn->register_new_node_with_optimizer(phi);
+          return phi;
+        } else {
+          igvn->remove_dead_node(phi);
+        }
+      }
+    }
+  }
+
   // Check for prior store with a different base or offset; make Load
   // independent.  Skip through any number of them.  Bail out if the stores
   // are in an endless dead cycle and report no progress.  This is a key
@@ -858,6 +1364,17 @@
           // This can happen if a interface-typed array narrows to a class type.
           jt = _type;
         }
+
+        if (EliminateAutoBox) {
+          // The pointers in the autobox arrays are always non-null
+          Node* base = in(Address)->in(AddPNode::Base);
+          if (base != NULL) {
+            Compile::AliasType* atp = phase->C->alias_type(base->adr_type());
+            if (is_autobox_cache(atp)) {
+              return jt->join(TypePtr::NOTNULL)->is_ptr();
+            }
+          }
+        }
         return jt;
       }
     }
@@ -971,6 +1488,17 @@
       return value->bottom_type();
   }
 
+  const TypeOopPtr *tinst = tp->isa_oopptr();
+  if (tinst != NULL && tinst->is_instance_field()) {
+    // If we have an instance type and our memory input is the
+    // programs's initial memory state, there is no matching store,
+    // so just return a zero of the appropriate type
+    Node *mem = in(MemNode::Memory);
+    if (mem->is_Parm() && mem->in(0)->is_Start()) {
+      assert(mem->as_Parm()->_con == TypeFunc::Memory, "must be memory Parm");
+      return Type::get_zero_type(_type->basic_type());
+    }
+  }
   return _type;
 }
 
@@ -1494,7 +2022,7 @@
   const TypeOopPtr *adr_oop = phase->type(adr)->isa_oopptr();
   if (adr_oop == NULL)
     return false;
-  if (!adr_oop->is_instance())
+  if (!adr_oop->is_instance_field())
     return false; // if not a distinct instance, there may be aliases of the address
   for (DUIterator_Fast imax, i = adr->fast_outs(imax); i < imax; i++) {
     Node *use = adr->fast_out(i);
@@ -1553,9 +2081,16 @@
 
 //------------------------------Value-----------------------------------------
 const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
+  // Either input is TOP ==> the result is TOP
+  const Type *t = phase->type( in(MemNode::Memory) );
+  if( t == Type::TOP ) return Type::TOP;
+  t = phase->type( in(MemNode::Address) );
+  if( t == Type::TOP ) return Type::TOP;
+  t = phase->type( in(MemNode::ValueIn) );
+  if( t == Type::TOP ) return Type::TOP;
   // If extra input is TOP ==> the result is TOP
-  const Type *t1 = phase->type( in(MemNode::OopStore) );
-  if( t1 == Type::TOP ) return Type::TOP;
+  t = phase->type( in(MemNode::OopStore) );
+  if( t == Type::TOP ) return Type::TOP;
 
   return StoreNode::Value( phase );
 }
@@ -1596,7 +2131,7 @@
 //------------------------------Identity---------------------------------------
 // Clearing a zero length array does nothing
 Node *ClearArrayNode::Identity( PhaseTransform *phase ) {
-  return phase->type(in(2))->higher_equal(TypeInt::ZERO)  ? in(1) : this;
+  return phase->type(in(2))->higher_equal(TypeX::ZERO)  ? in(1) : this;
 }
 
 //------------------------------Idealize---------------------------------------
@@ -1669,6 +2204,11 @@
                                    Node* start_offset,
                                    Node* end_offset,
                                    PhaseGVN* phase) {
+  if (start_offset == end_offset) {
+    // nothing to do
+    return mem;
+  }
+
   Compile* C = phase->C;
   int unit = BytesPerLong;
   Node* zbase = start_offset;
@@ -1694,6 +2234,11 @@
                                    intptr_t start_offset,
                                    intptr_t end_offset,
                                    PhaseGVN* phase) {
+  if (start_offset == end_offset) {
+    // nothing to do
+    return mem;
+  }
+
   Compile* C = phase->C;
   assert((end_offset % BytesPerInt) == 0, "odd end offset");
   intptr_t done_offset = end_offset;
@@ -1998,7 +2543,7 @@
     // must have preceded the init, or else be equal to the init.
     // Even after loop optimizations (which might change control edges)
     // a store is never pinned *before* the availability of its inputs.
-    if (!MemNode::detect_dominating_control(ctl, this->in(0)))
+    if (!MemNode::all_controls_dominate(n, this))
       return false;                  // failed to prove a good control
 
   }
@@ -3019,7 +3564,7 @@
     }
   }
 
-  assert(verify_sparse(), "please, no dups of base");
+  assert(progress || verify_sparse(), "please, no dups of base");
   return progress;
 }
 
--- a/hotspot/src/share/vm/opto/memnode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/memnode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -60,15 +60,17 @@
     debug_only(_adr_type=at; adr_type();)
   }
 
+public:
   // Helpers for the optimizer.  Documented in memnode.cpp.
   static bool detect_ptr_independence(Node* p1, AllocateNode* a1,
                                       Node* p2, AllocateNode* a2,
                                       PhaseTransform* phase);
   static bool adr_phi_is_loop_invariant(Node* adr_phi, Node* cast);
 
-public:
+  static Node *optimize_simple_memory_chain(Node *mchain, const TypePtr *t_adr, PhaseGVN *phase);
+  static Node *optimize_memory_chain(Node *mchain, const TypePtr *t_adr, PhaseGVN *phase);
   // This one should probably be a phase-specific function:
-  static bool detect_dominating_control(Node* dom, Node* sub);
+  static bool all_controls_dominate(Node* dom, Node* sub);
 
   // Is this Node a MemNode or some descendent?  Default is YES.
   virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
@@ -97,7 +99,13 @@
 
   // What is the type of the value in memory?  (T_VOID mean "unspecified".)
   virtual BasicType memory_type() const = 0;
-  virtual int memory_size() const { return type2aelembytes[memory_type()]; }
+  virtual int memory_size() const {
+#ifdef ASSERT
+    return type2aelembytes(memory_type(), true);
+#else
+    return type2aelembytes(memory_type());
+#endif
+  }
 
   // Search through memory states which precede this node (load or store).
   // Look for an exact match for the address, with no intervening
@@ -141,6 +149,9 @@
   // zero out the control input.
   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 
+  // Recover original value from boxed values
+  Node *eliminate_autobox(PhaseGVN *phase);
+
   // Compute a new Type for this node.  Basically we just do the pre-check,
   // then call the virtual add() to set the type.
   virtual const Type *Value( PhaseTransform *phase ) const;
@@ -163,6 +174,9 @@
   // Map a load opcode to its corresponding store opcode.
   virtual int store_Opcode() const = 0;
 
+  // Check if the load's memory input is a Phi node with the same control.
+  bool is_instance_field_load_with_local_phi(Node* ctrl);
+
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
 #endif
--- a/hotspot/src/share/vm/opto/node.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/node.cpp	Sun May 04 07:05:42 2008 -0700
@@ -812,8 +812,7 @@
 Node* Node::uncast() const {
   // Should be inline:
   //return is_ConstraintCast() ? uncast_helper(this) : (Node*) this;
-  if (is_ConstraintCast() ||
-      (is_Type() && req() == 2 && Opcode() == Op_CheckCastPP))
+  if (is_ConstraintCast() || is_CheckCastPP())
     return uncast_helper(this);
   else
     return (Node*) this;
@@ -827,7 +826,7 @@
       break;
     } else if (p->is_ConstraintCast()) {
       p = p->in(1);
-    } else if (p->is_Type() && p->Opcode() == Op_CheckCastPP) {
+    } else if (p->is_CheckCastPP()) {
       p = p->in(1);
     } else {
       break;
@@ -1018,6 +1017,101 @@
   return false;
 };
 
+//--------------------------find_exact_control---------------------------------
+// Skip Proj and CatchProj nodes chains. Check for Null and Top.
+Node* Node::find_exact_control(Node* ctrl) {
+  if (ctrl == NULL && this->is_Region())
+    ctrl = this->as_Region()->is_copy();
+
+  if (ctrl != NULL && ctrl->is_CatchProj()) {
+    if (ctrl->as_CatchProj()->_con == CatchProjNode::fall_through_index)
+      ctrl = ctrl->in(0);
+    if (ctrl != NULL && !ctrl->is_top())
+      ctrl = ctrl->in(0);
+  }
+
+  if (ctrl != NULL && ctrl->is_Proj())
+    ctrl = ctrl->in(0);
+
+  return ctrl;
+}
+
+//--------------------------dominates------------------------------------------
+// Helper function for MemNode::all_controls_dominate().
+// Check if 'this' control node dominates or equal to 'sub' control node.
+bool Node::dominates(Node* sub, Node_List &nlist) {
+  assert(this->is_CFG(), "expecting control");
+  assert(sub != NULL && sub->is_CFG(), "expecting control");
+
+  Node* orig_sub = sub;
+  nlist.clear();
+  bool this_dominates = false;
+  uint region_input = 0;
+  while (sub != NULL) {        // walk 'sub' up the chain to 'this'
+    if (sub == this) {
+      if (nlist.size() == 0) {
+        // No Region nodes except loops were visited before and the EntryControl
+        // path was taken for loops: it did not walk in a cycle.
+        return true;
+      } else if (!this_dominates) {
+        // Region nodes were visited. Continue walk up to Start or Root
+        // to make sure that it did not walk in a cycle.
+        this_dominates = true; // first time meet
+      } else {
+        return false;          // already met before: walk in a cycle
+      }
+    }
+    if (sub->is_Start() || sub->is_Root())
+      return this_dominates;
+
+    Node* up = sub->find_exact_control(sub->in(0));
+    if (up == NULL || up->is_top())
+      return false; // Conservative answer for dead code
+
+    if (sub == up && sub->is_Loop()) {
+      up = sub->in(0); // in(LoopNode::EntryControl);
+    } else if (sub == up && sub->is_Region()) {
+      uint i = 1;
+      if (nlist.size() == 0) {
+        // No Region nodes (except Loops) were visited before.
+        // Take first valid path on the way up to 'this'.
+      } else if (nlist.at(nlist.size() - 1) == sub) {
+        // This Region node was just visited. Take other path.
+        i = region_input + 1;
+        nlist.pop();
+      } else {
+        // Was this Region node visited before?
+        uint size = nlist.size();
+        for (uint j = 0; j < size; j++) {
+          if (nlist.at(j) == sub) {
+            return false; // The Region node was visited before. Give up.
+          }
+        }
+        // The Region node was not visited before.
+        // Take first valid path on the way up to 'this'.
+      }
+      for (; i < sub->req(); i++) {
+        Node* in = sub->in(i);
+        if (in != NULL && !in->is_top() && in != sub) {
+          break;
+        }
+      }
+      if (i < sub->req()) {
+        nlist.push(sub);
+        up = sub->in(i);
+        region_input = i;
+      }
+    }
+    if (sub == up)
+      return false;    // some kind of tight cycle
+    if (orig_sub == up)
+      return false;    // walk in a cycle
+
+    sub = up;
+  }
+  return false;
+}
+
 //------------------------------remove_dead_region-----------------------------
 // This control node is dead.  Follow the subgraph below it making everything
 // using it dead as well.  This will happen normally via the usual IterGVN
@@ -1462,97 +1556,48 @@
 }
 
 //------------------------------dump_nodes-------------------------------------
-
-// Helper class  for dump_nodes. Wraps an old and new VectorSet.
-class OldNewVectorSet : public StackObj {
-   Arena*    _node_arena;
-   VectorSet _old_vset, _new_vset;
-   VectorSet* select(Node* n) {
-     return _node_arena->contains(n) ? &_new_vset : &_old_vset;
-   }
-  public:
-  OldNewVectorSet(Arena* node_arena, ResourceArea* area) :
-     _node_arena(node_arena),
-     _old_vset(area), _new_vset(area) {}
-
-  void set(Node* n)      { select(n)->set(n->_idx); }
-  bool test_set(Node* n) { return select(n)->test_set(n->_idx) != 0; }
-  bool test(Node* n)     { return select(n)->test(n->_idx) != 0; }
-  void del(Node* n)      { (*select(n)) >>= n->_idx; }
-};
-
-
 static void dump_nodes(const Node* start, int d, bool only_ctrl) {
   Node* s = (Node*)start; // remove const
   if (NotANode(s)) return;
 
+  uint depth = (uint)ABS(d);
+  int direction = d;
   Compile* C = Compile::current();
-  ResourceArea *area = Thread::current()->resource_area();
-  Node_Stack      stack(area, MIN2((uint)ABS(d), C->unique() >> 1));
-  OldNewVectorSet visited(C->node_arena(), area);
-  OldNewVectorSet on_stack(C->node_arena(), area);
-
-  visited.set(s);
-  on_stack.set(s);
-  stack.push(s, 0);
-  if (d < 0) s->dump();
-
-  // Do a depth first walk over edges
-  while (stack.is_nonempty()) {
-    Node* tp  = stack.node();
-    uint  idx = stack.index();
-    uint  limit = d > 0 ? tp->len() : tp->outcnt();
-    if (idx >= limit) {
-      // no more arcs to visit
-      if (d > 0) tp->dump();
-      on_stack.del(tp);
-      stack.pop();
-    } else {
-      // process the "idx"th arc
-      stack.set_index(idx + 1);
-      Node* n = d > 0 ? tp->in(idx) : tp->raw_out(idx);
-
-      if (NotANode(n))  continue;
-      // do not recurse through top or the root (would reach unrelated stuff)
-      if (n->is_Root() || n->is_top())  continue;
-      if (only_ctrl && !n->is_CFG()) continue;
+  GrowableArray <Node *> nstack(C->unique());
 
-      if (!visited.test_set(n)) {  // forward arc
-        // Limit depth
-        if (stack.size() < (uint)ABS(d)) {
-          if (d < 0) n->dump();
-          stack.push(n, 0);
-          on_stack.set(n);
-        }
-      } else {  // back or cross arc
-        if (on_stack.test(n)) {  // back arc
-          // print loop if there are no phis or regions in the mix
-          bool found_loop_breaker = false;
-          int k;
-          for (k = stack.size() - 1; k >= 0; k--) {
-            Node* m = stack.node_at(k);
-            if (m->is_Phi() || m->is_Region() || m->is_Root() || m->is_Start()) {
-              found_loop_breaker = true;
-              break;
-            }
-            if (m == n) // Found loop head
-              break;
-          }
-          assert(k >= 0, "n must be on stack");
+  nstack.append(s);
+  int begin = 0;
+  int end = 0;
+  for(uint i = 0; i < depth; i++) {
+    end = nstack.length();
+    for(int j = begin; j < end; j++) {
+      Node* tp  = nstack.at(j);
+      uint limit = direction > 0 ? tp->len() : tp->outcnt();
+      for(uint k = 0; k < limit; k++) {
+        Node* n = direction > 0 ? tp->in(k) : tp->raw_out(k);
 
-          if (!found_loop_breaker) {
-            tty->print("# %s LOOP FOUND:", only_ctrl ? "CONTROL" : "DATA");
-            for (int i = stack.size() - 1; i >= k; i--) {
-              Node* m = stack.node_at(i);
-              bool mnew = C->node_arena()->contains(m);
-              tty->print(" %s%d:%s", (mnew? "": "o"), m->_idx, m->Name());
-              if (i != 0) tty->print(d > 0? " <-": " ->");
-            }
-            tty->cr();
-          }
+        if (NotANode(n))  continue;
+        // do not recurse through top or the root (would reach unrelated stuff)
+        if (n->is_Root() || n->is_top())  continue;
+        if (only_ctrl && !n->is_CFG()) continue;
+
+        bool on_stack = nstack.contains(n);
+        if (!on_stack) {
+          nstack.append(n);
         }
       }
     }
+    begin = end;
+  }
+  end = nstack.length();
+  if (direction > 0) {
+    for(int j = end-1; j >= 0; j--) {
+      nstack.at(j)->dump();
+    }
+  } else {
+    for(int j = 0; j < end; j++) {
+      nstack.at(j)->dump();
+    }
   }
 }
 
--- a/hotspot/src/share/vm/opto/node.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/node.hpp	Sun May 04 07:05:42 2008 -0700
@@ -91,6 +91,7 @@
 class Node_Stack;
 class NullCheckNode;
 class OopMap;
+class ParmNode;
 class PCTableNode;
 class PhaseCCP;
 class PhaseGVN;
@@ -105,6 +106,7 @@
 class RegionNode;
 class RootNode;
 class SafePointNode;
+class SafePointScalarObjectNode;
 class StartNode;
 class State;
 class StoreNode;
@@ -557,6 +559,7 @@
       DEFINE_CLASS_ID(JumpProj,  Proj, 1)
       DEFINE_CLASS_ID(IfTrue,    Proj, 2)
       DEFINE_CLASS_ID(IfFalse,   Proj, 3)
+      DEFINE_CLASS_ID(Parm,      Proj, 4)
 
     DEFINE_CLASS_ID(Region, Node, 3)
       DEFINE_CLASS_ID(Loop, Region, 0)
@@ -573,6 +576,7 @@
       DEFINE_CLASS_ID(ConstraintCast, Type, 1)
       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
       DEFINE_CLASS_ID(CMove, Type, 3)
+      DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
 
     DEFINE_CLASS_ID(Mem,   Node, 6)
       DEFINE_CLASS_ID(Load,  Mem, 0)
@@ -712,12 +716,14 @@
   DEFINE_CLASS_QUERY(Mul)
   DEFINE_CLASS_QUERY(Multi)
   DEFINE_CLASS_QUERY(MultiBranch)
+  DEFINE_CLASS_QUERY(Parm)
   DEFINE_CLASS_QUERY(PCTable)
   DEFINE_CLASS_QUERY(Phi)
   DEFINE_CLASS_QUERY(Proj)
   DEFINE_CLASS_QUERY(Region)
   DEFINE_CLASS_QUERY(Root)
   DEFINE_CLASS_QUERY(SafePoint)
+  DEFINE_CLASS_QUERY(SafePointScalarObject)
   DEFINE_CLASS_QUERY(Start)
   DEFINE_CLASS_QUERY(Store)
   DEFINE_CLASS_QUERY(Sub)
@@ -811,6 +817,12 @@
   // for the transformations to happen.
   bool has_special_unique_user() const;
 
+  // Skip Proj and CatchProj nodes chains. Check for Null and Top.
+  Node* find_exact_control(Node* ctrl);
+
+  // Check if 'this' node dominates or equal to 'sub'.
+  bool dominates(Node* sub, Node_List &nlist);
+
 protected:
   bool remove_dead_region(PhaseGVN *phase, bool can_reshape);
 public:
@@ -1322,7 +1334,6 @@
 // Inline definition of Compile::record_for_igvn must be deferred to this point.
 inline void Compile::record_for_igvn(Node* n) {
   _for_igvn->push(n);
-  record_for_escape_analysis(n);
 }
 
 //------------------------------Node_Stack-------------------------------------
@@ -1381,7 +1392,7 @@
     _inode_top->indx = i;
   }
   uint size_max() const { return (uint)pointer_delta(_inode_max, _inodes,  sizeof(INode)); } // Max size
-  uint size() const { return (uint)pointer_delta(_inode_top, _inodes,  sizeof(INode)) + 1; } // Current size
+  uint size() const { return (uint)pointer_delta((_inode_top+1), _inodes,  sizeof(INode)); } // Current size
   bool is_nonempty() const { return (_inode_top >= _inodes); }
   bool is_empty() const { return (_inode_top < _inodes); }
   void clear() { _inode_top = _inodes - 1; } // retain storage
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/output.cpp	Sun May 04 07:05:42 2008 -0700
@@ -561,7 +561,30 @@
     : new LocationValue(Location::new_stk_loc(l_type,  ra->reg2offset(regnum)));
 }
 
-void Compile::FillLocArray( int idx, Node *local, GrowableArray<ScopeValue*> *array ) {
+
+ObjectValue*
+Compile::sv_for_node_id(GrowableArray<ScopeValue*> *objs, int id) {
+  for (int i = 0; i < objs->length(); i++) {
+    assert(objs->at(i)->is_object(), "corrupt object cache");
+    ObjectValue* sv = (ObjectValue*) objs->at(i);
+    if (sv->id() == id) {
+      return sv;
+    }
+  }
+  // Otherwise..
+  return NULL;
+}
+
+void Compile::set_sv_for_object_node(GrowableArray<ScopeValue*> *objs,
+                                     ObjectValue* sv ) {
+  assert(sv_for_node_id(objs, sv->id()) == NULL, "Precondition");
+  objs->append(sv);
+}
+
+
+void Compile::FillLocArray( int idx, MachSafePointNode* sfpt, Node *local,
+                            GrowableArray<ScopeValue*> *array,
+                            GrowableArray<ScopeValue*> *objs ) {
   assert( local, "use _top instead of null" );
   if (array->length() != idx) {
     assert(array->length() == idx + 1, "Unexpected array count");
@@ -578,6 +601,29 @@
   }
   const Type *t = local->bottom_type();
 
+  // Is it a safepoint scalar object node?
+  if (local->is_SafePointScalarObject()) {
+    SafePointScalarObjectNode* spobj = local->as_SafePointScalarObject();
+
+    ObjectValue* sv = Compile::sv_for_node_id(objs, spobj->_idx);
+    if (sv == NULL) {
+      ciKlass* cik = t->is_oopptr()->klass();
+      assert(cik->is_instance_klass() ||
+             cik->is_array_klass(), "Not supported allocation.");
+      sv = new ObjectValue(spobj->_idx,
+                           new ConstantOopWriteValue(cik->encoding()));
+      Compile::set_sv_for_object_node(objs, sv);
+
+      uint first_ind = spobj->first_index();
+      for (uint i = 0; i < spobj->n_fields(); i++) {
+        Node* fld_node = sfpt->in(first_ind+i);
+        (void)FillLocArray(sv->field_values()->length(), sfpt, fld_node, sv->field_values(), objs);
+      }
+    }
+    array->append(sv);
+    return;
+  }
+
   // Grab the register number for the local
   OptoReg::Name regnum = _regalloc->get_reg_first(local);
   if( OptoReg::is_valid(regnum) ) {// Got a register/stack?
@@ -755,6 +801,11 @@
   JVMState* youngest_jvms = sfn->jvms();
   int max_depth = youngest_jvms->depth();
 
+  // Allocate the object pool for scalar-replaced objects -- the map from
+  // small-integer keys (which can be recorded in the local and ostack
+  // arrays) to descriptions of the object state.
+  GrowableArray<ScopeValue*> *objs = new GrowableArray<ScopeValue*>();
+
   // Visit scopes from oldest to youngest.
   for (int depth = 1; depth <= max_depth; depth++) {
     JVMState* jvms = youngest_jvms->of_depth(depth);
@@ -773,13 +824,13 @@
     // Insert locals into the locarray
     GrowableArray<ScopeValue*> *locarray = new GrowableArray<ScopeValue*>(num_locs);
     for( idx = 0; idx < num_locs; idx++ ) {
-      FillLocArray( idx, sfn->local(jvms, idx), locarray );
+      FillLocArray( idx, sfn, sfn->local(jvms, idx), locarray, objs );
     }
 
     // Insert expression stack entries into the exparray
     GrowableArray<ScopeValue*> *exparray = new GrowableArray<ScopeValue*>(num_exps);
     for( idx = 0; idx < num_exps; idx++ ) {
-      FillLocArray( idx,  sfn->stack(jvms, idx), exparray );
+      FillLocArray( idx,  sfn, sfn->stack(jvms, idx), exparray, objs );
     }
 
     // Add in mappings of the monitors
@@ -803,7 +854,27 @@
 
       // Create ScopeValue for object
       ScopeValue *scval = NULL;
-      if( !obj_node->is_Con() ) {
+
+      if( obj_node->is_SafePointScalarObject() ) {
+        SafePointScalarObjectNode* spobj = obj_node->as_SafePointScalarObject();
+        scval = Compile::sv_for_node_id(objs, spobj->_idx);
+        if (scval == NULL) {
+          const Type *t = obj_node->bottom_type();
+          ciKlass* cik = t->is_oopptr()->klass();
+          assert(cik->is_instance_klass() ||
+                 cik->is_array_klass(), "Not supported allocation.");
+          ObjectValue* sv = new ObjectValue(spobj->_idx,
+                                new ConstantOopWriteValue(cik->encoding()));
+          Compile::set_sv_for_object_node(objs, sv);
+
+          uint first_ind = spobj->first_index();
+          for (uint i = 0; i < spobj->n_fields(); i++) {
+            Node* fld_node = sfn->in(first_ind+i);
+            (void)FillLocArray(sv->field_values()->length(), sfn, fld_node, sv->field_values(), objs);
+          }
+          scval = sv;
+        }
+      } else if( !obj_node->is_Con() ) {
         OptoReg::Name obj_reg = _regalloc->get_reg_first(obj_node);
         scval = new_loc_value( _regalloc, obj_reg, Location::oop );
       } else {
@@ -811,9 +882,13 @@
       }
 
       OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node);
-      monarray->append(new MonitorValue(scval, Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg))));
+      Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg));
+      monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated()));
     }
 
+    // We dump the object pool first, since deoptimization reads it in first.
+    debug_info()->dump_object_pool(objs);
+
     // Build first class objects to pass to scope
     DebugToken *locvals = debug_info()->create_scope_values(locarray);
     DebugToken *expvals = debug_info()->create_scope_values(exparray);
@@ -823,6 +898,7 @@
     ciMethod* scope_method = method ? method : _method;
     // Describe the scope here
     assert(jvms->bci() >= InvocationEntryBci && jvms->bci() <= 0x10000, "must be a valid or entry BCI");
+    // Now we can describe the scope.
     debug_info()->describe_scope(safepoint_pc_offset,scope_method,jvms->bci(),locvals,expvals,monvals);
   } // End jvms loop
 
@@ -921,11 +997,8 @@
     // blown the code cache size.
     C->record_failure("excessive request to CodeCache");
   } else {
-    UseInterpreter            = true;
-    UseCompiler               = false;
-    AlwaysCompileLoopMethods  = false;
+    // Let CompilerBroker disable further compilations.
     C->record_failure("CodeCache is full");
-    warning("CodeCache is full. Compiling has been disabled");
   }
 }
 
--- a/hotspot/src/share/vm/opto/parse.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/parse.hpp	Sun May 04 07:05:42 2008 -0700
@@ -54,9 +54,9 @@
   InlineTree *build_inline_tree_for_callee(ciMethod* callee_method,
                                            JVMState* caller_jvms,
                                            int caller_bci);
-  const char* try_to_inline(ciMethod* callee_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result);
-  const char* shouldInline(ciMethod* callee_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const;
-  const char* shouldNotInline(ciMethod* callee_method, WarmCallInfo* wci_result) const;
+  const char* try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result);
+  const char* shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const;
+  const char* shouldNotInline(ciMethod* callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const;
   void        print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const PRODUCT_RETURN;
 
   InlineTree *caller_tree()       const { return _caller_tree;  }
--- a/hotspot/src/share/vm/opto/parse1.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1836,7 +1836,7 @@
 
   PhiNode* phi = PhiNode::make(region, o, t);
   gvn().set_type(phi, t);
-  if (DoEscapeAnalysis) record_for_igvn(phi);
+  if (C->do_escape_analysis()) record_for_igvn(phi);
   map->set_req(idx, phi);
   return phi;
 }
--- a/hotspot/src/share/vm/opto/parse2.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/parse2.cpp	Sun May 04 07:05:42 2008 -0700
@@ -885,6 +885,9 @@
 void Parse::do_ifnull(BoolTest::mask btest) {
   int target_bci = iter().get_dest();
 
+  Block* branch_block = successor_for_bci(target_bci);
+  Block* next_block   = successor_for_bci(iter().next_bci());
+
   float cnt;
   float prob = branch_prediction(cnt, btest, target_bci);
   if (prob == PROB_UNKNOWN) {
@@ -902,13 +905,16 @@
     uncommon_trap(Deoptimization::Reason_unreached,
                   Deoptimization::Action_reinterpret,
                   NULL, "cold");
+    if (EliminateAutoBox) {
+      // Mark the successor blocks as parsed
+      branch_block->next_path_num();
+      next_block->next_path_num();
+    }
     return;
   }
 
   // If this is a backwards branch in the bytecodes, add Safepoint
   maybe_add_safepoint(target_bci);
-  Block* branch_block = successor_for_bci(target_bci);
-  Block* next_block   = successor_for_bci(iter().next_bci());
 
   explicit_null_checks_inserted++;
   Node* a = null();
@@ -935,6 +941,10 @@
 
     if (stopped()) {            // Path is dead?
       explicit_null_checks_elided++;
+      if (EliminateAutoBox) {
+        // Mark the successor block as parsed
+        branch_block->next_path_num();
+      }
     } else {                    // Path is live.
       // Update method data
       profile_taken_branch(target_bci);
@@ -950,6 +960,10 @@
 
   if (stopped()) {              // Path is dead?
     explicit_null_checks_elided++;
+    if (EliminateAutoBox) {
+      // Mark the successor block as parsed
+      next_block->next_path_num();
+    }
   } else  {                     // Path is live.
     // Update method data
     profile_not_taken_branch();
@@ -962,6 +976,9 @@
 void Parse::do_if(BoolTest::mask btest, Node* c) {
   int target_bci = iter().get_dest();
 
+  Block* branch_block = successor_for_bci(target_bci);
+  Block* next_block   = successor_for_bci(iter().next_bci());
+
   float cnt;
   float prob = branch_prediction(cnt, btest, target_bci);
   float untaken_prob = 1.0 - prob;
@@ -980,6 +997,11 @@
     uncommon_trap(Deoptimization::Reason_unreached,
                   Deoptimization::Action_reinterpret,
                   NULL, "cold");
+    if (EliminateAutoBox) {
+      // Mark the successor blocks as parsed
+      branch_block->next_path_num();
+      next_block->next_path_num();
+    }
     return;
   }
 
@@ -1000,10 +1022,27 @@
   Node* tst = _gvn.transform(tst0);
   BoolTest::mask taken_btest   = BoolTest::illegal;
   BoolTest::mask untaken_btest = BoolTest::illegal;
-  if (btest == BoolTest::ne) {
-    // For now, these are the only cases of btest that matter.  (More later.)
-    taken_btest   = taken_if_true ?        btest : BoolTest::eq;
-    untaken_btest = taken_if_true ? BoolTest::eq :        btest;
+
+  if (tst->is_Bool()) {
+    // Refresh c from the transformed bool node, since it may be
+    // simpler than the original c.  Also re-canonicalize btest.
+    // This wins when (Bool ne (Conv2B p) 0) => (Bool ne (CmpP p NULL)).
+    // That can arise from statements like: if (x instanceof C) ...
+    if (tst != tst0) {
+      // Canonicalize one more time since transform can change it.
+      btest = tst->as_Bool()->_test._test;
+      if (!BoolTest(btest).is_canonical()) {
+        // Reverse edges one more time...
+        tst   = _gvn.transform( tst->as_Bool()->negate(&_gvn) );
+        btest = tst->as_Bool()->_test._test;
+        assert(BoolTest(btest).is_canonical(), "sanity");
+        taken_if_true = !taken_if_true;
+      }
+      c = tst->in(1);
+    }
+    BoolTest::mask neg_btest = BoolTest(btest).negate();
+    taken_btest   = taken_if_true ?     btest : neg_btest;
+    untaken_btest = taken_if_true ? neg_btest :     btest;
   }
 
   // Generate real control flow
@@ -1018,15 +1057,17 @@
     untaken_branch = tmp;
   }
 
-  Block* branch_block = successor_for_bci(target_bci);
-  Block* next_block   = successor_for_bci(iter().next_bci());
-
   // Branch is taken:
   { PreserveJVMState pjvms(this);
     taken_branch = _gvn.transform(taken_branch);
     set_control(taken_branch);
 
-    if (!stopped()) {
+    if (stopped()) {
+      if (EliminateAutoBox) {
+        // Mark the successor block as parsed
+        branch_block->next_path_num();
+      }
+    } else {
       // Update method data
       profile_taken_branch(target_bci);
       adjust_map_after_if(taken_btest, c, prob, branch_block, next_block);
@@ -1039,7 +1080,12 @@
   set_control(untaken_branch);
 
   // Branch not taken.
-  if (!stopped()) {
+  if (stopped()) {
+    if (EliminateAutoBox) {
+      // Mark the successor block as parsed
+      next_block->next_path_num();
+    }
+  } else {
     // Update method data
     profile_not_taken_branch();
     adjust_map_after_if(untaken_btest, c, untaken_prob,
--- a/hotspot/src/share/vm/opto/phaseX.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/phaseX.cpp	Sun May 04 07:05:42 2008 -0700
@@ -587,11 +587,6 @@
       Node_Notes* loc = C->locate_node_notes(nna, x->_idx, true);
       loc->clear(); // do not put debug info on constants
     }
-    // Collect points-to information for escape analysys
-    ConnectionGraph *cgr = C->congraph();
-    if (cgr != NULL) {
-      cgr->record_escape(x, this);
-    }
   } else {
     x->destruct();              // Hit, destroy duplicate constant
     x = k;                      // use existing constant
@@ -648,79 +643,9 @@
 //=============================================================================
 //------------------------------transform--------------------------------------
 // Return a node which computes the same function as this node, but in a
-// faster or cheaper fashion.  The Node passed in here must have no other
-// pointers to it, as its storage will be reclaimed if the Node can be
-// optimized away.
+// faster or cheaper fashion.
 Node *PhaseGVN::transform( Node *n ) {
-  NOT_PRODUCT( set_transforms(); )
-
-  // Apply the Ideal call in a loop until it no longer applies
-  Node *k = n;
-  NOT_PRODUCT( uint loop_count = 0; )
-  while( 1 ) {
-    Node *i = k->Ideal(this, /*can_reshape=*/false);
-    if( !i ) break;
-    assert( i->_idx >= k->_idx, "Idealize should return new nodes, use Identity to return old nodes" );
-    // Can never reclaim storage for Ideal calls, because the Ideal call
-    // returns a new Node, bumping the High Water Mark and our old Node
-    // is caught behind the new one.
-    //if( k != i ) {
-    //k->destruct();            // Reclaim storage for recent node
-    k = i;
-    //}
-    assert(loop_count++ < K, "infinite loop in PhaseGVN::transform");
-  }
-  NOT_PRODUCT( if( loop_count != 0 ) { set_progress(); } )
-
-  // If brand new node, make space in type array.
-  ensure_type_or_null(k);
-
-  // Cache result of Value call since it can be expensive
-  // (abstract interpretation of node 'k' using phase->_types[ inputs ])
-  const Type *t = k->Value(this); // Get runtime Value set
-  assert(t != NULL, "value sanity");
-  if (type_or_null(k) != t) {
-#ifndef PRODUCT
-    // Do not record transformation or value construction on first visit
-    if (type_or_null(k) == NULL) {
-      inc_new_values();
-      set_progress();
-    }
-#endif
-    set_type(k, t);
-    // If k is a TypeNode, capture any more-precise type permanently into Node
-    k->raise_bottom_type(t);
-  }
-
-  if( t->singleton() && !k->is_Con() ) {
-    //k->destruct();              // Reclaim storage for recent node
-    NOT_PRODUCT( set_progress(); )
-    return makecon(t);          // Turn into a constant
-  }
-
-  // Now check for Identities
-  Node *i = k->Identity(this);  // Look for a nearby replacement
-  if( i != k ) {                // Found? Return replacement!
-    //k->destruct();              // Reclaim storage for recent node
-    NOT_PRODUCT( set_progress(); )
-    return i;
-  }
-
-  // Try Global Value Numbering
-  i = hash_find_insert(k);      // Found older value when i != NULL
-  if( i && i != k ) {           // Hit? Return the old guy
-    NOT_PRODUCT( set_progress(); )
-    return i;
-  }
-
-  // Collect points-to information for escape analysys
-  ConnectionGraph *cgr = C->congraph();
-  if (cgr != NULL) {
-    cgr->record_escape(k, this);
-  }
-
-  // Return Idealized original
-  return k;
+  return transform_no_reclaim(n);
 }
 
 //------------------------------transform--------------------------------------
@@ -1309,7 +1234,7 @@
 
     uint use_op = use->Opcode();
     // If changed Cast input, check Phi users for simple cycles
-    if( use->is_ConstraintCast() || use->Opcode() == Op_CheckCastPP ) {
+    if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
         Node* u = use->fast_out(i2);
         if (u->is_Phi())
--- a/hotspot/src/share/vm/opto/phaseX.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/phaseX.hpp	Sun May 04 07:05:42 2008 -0700
@@ -439,6 +439,13 @@
   void add_users_to_worklist0( Node *n );
   void add_users_to_worklist ( Node *n );
 
+  // Replace old node with new one.
+  void replace_node( Node *old, Node *nn ) {
+    add_users_to_worklist(old);
+    hash_delete(old);
+    subsume_node(old, nn);
+  }
+
 #ifndef PRODUCT
 protected:
   // Sub-quadratic implementation of VerifyIterativeGVN.
--- a/hotspot/src/share/vm/opto/postaloc.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/postaloc.cpp	Sun May 04 07:05:42 2008 -0700
@@ -253,7 +253,8 @@
 // nodes can represent the same constant so the type and rule of the
 // MachNode must be checked to ensure equivalence.
 //
-bool PhaseChaitin::eliminate_copy_of_constant(Node* val, Block *current_block,
+bool PhaseChaitin::eliminate_copy_of_constant(Node* val, Node* n,
+                                              Block *current_block,
                                               Node_List& value, Node_List& regnd,
                                               OptoReg::Name nreg, OptoReg::Name nreg2) {
   if (value[nreg] != val && val->is_Con() &&
@@ -269,12 +270,12 @@
     // Since they are equivalent the second one if redundant and can
     // be removed.
     //
-    // val will be replaced with the old value but val might have
+    // n will be replaced with the old value but n might have
     // kills projections associated with it so remove them now so that
     // yank_if_dead will be able to elminate the copy once the uses
     // have been transferred to the old[value].
-    for (DUIterator_Fast imax, i = val->fast_outs(imax); i < imax; i++) {
-      Node* use = val->fast_out(i);
+    for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
+      Node* use = n->fast_out(i);
       if (use->is_Proj() && use->outcnt() == 0) {
         // Kill projections have no users and one input
         use->set_req(0, C->top());
@@ -521,7 +522,7 @@
         // then 'n' is a useless copy.  Do not update the register->node
         // mapping so 'n' will go dead.
         if( value[nreg] != val ) {
-          if (eliminate_copy_of_constant(val, b, value, regnd, nreg, OptoReg::Bad)) {
+          if (eliminate_copy_of_constant(val, n, b, value, regnd, nreg, OptoReg::Bad)) {
             n->replace_by(regnd[nreg]);
             j -= yank_if_dead(n,b,&value,&regnd);
           } else {
@@ -549,7 +550,7 @@
           nreg_lo = tmp.find_first_elem();
         }
         if( value[nreg] != val || value[nreg_lo] != val ) {
-          if (eliminate_copy_of_constant(n, b, value, regnd, nreg, nreg_lo)) {
+          if (eliminate_copy_of_constant(val, n, b, value, regnd, nreg, nreg_lo)) {
             n->replace_by(regnd[nreg]);
             j -= yank_if_dead(n,b,&value,&regnd);
           } else {
--- a/hotspot/src/share/vm/opto/subnode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -614,6 +614,13 @@
   const TypeOopPtr* p0 = r0->isa_oopptr();
   const TypeOopPtr* p1 = r1->isa_oopptr();
   if (p0 && p1) {
+    Node* in1 = in(1)->uncast();
+    Node* in2 = in(2)->uncast();
+    AllocateNode* alloc1 = AllocateNode::Ideal_allocation(in1, NULL);
+    AllocateNode* alloc2 = AllocateNode::Ideal_allocation(in2, NULL);
+    if (MemNode::detect_ptr_independence(in1, alloc1, in2, alloc2, NULL)) {
+      return TypeInt::CC_GT;  // different pointers
+    }
     ciKlass* klass0 = p0->klass();
     bool    xklass0 = p0->klass_is_exact();
     ciKlass* klass1 = p1->klass();
--- a/hotspot/src/share/vm/opto/superword.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/superword.cpp	Sun May 04 07:05:42 2008 -0700
@@ -159,7 +159,8 @@
   Node_List memops;
   for (int i = 0; i < _block.length(); i++) {
     Node* n = _block.at(i);
-    if (n->is_Mem() && in_bb(n)) {
+    if (n->is_Mem() && in_bb(n) &&
+        is_java_primitive(n->as_Mem()->memory_type())) {
       int align = memory_alignment(n->as_Mem(), 0);
       if (align != bottom_align) {
         memops.push(n);
@@ -182,8 +183,8 @@
 
 #ifndef PRODUCT
   if (TraceSuperWord)
-    tty->print_cr("\noffset = %d iv_adjustment = %d  elt_align = %d",
-                  offset, iv_adjustment, align_to_ref_p.memory_size());
+    tty->print_cr("\noffset = %d iv_adjustment = %d  elt_align = %d scale = %d iv_stride = %d",
+                  offset, iv_adjustment, align_to_ref_p.memory_size(), align_to_ref_p.scale_in_bytes(), iv_stride());
 #endif
 
   // Set alignment relative to "align_to_ref"
@@ -570,7 +571,7 @@
 int SuperWord::data_size(Node* s) {
   const Type* t = velt_type(s);
   BasicType  bt = t->array_element_basic_type();
-  int bsize = type2aelembytes[bt];
+  int bsize = type2aelembytes(bt);
   assert(bsize != 0, "valid size");
   return bsize;
 }
@@ -1542,7 +1543,7 @@
   Node *pre_opaq1 = pre_end->limit();
   assert(pre_opaq1->Opcode() == Op_Opaque1, "");
   Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1;
-  Node *pre_limit = pre_opaq->in(1);
+  Node *lim0 = pre_opaq->in(1);
 
   // Where we put new limit calculations
   Node *pre_ctrl = pre_end->loopnode()->in(LoopNode::EntryControl);
@@ -1554,64 +1555,116 @@
 
   SWPointer align_to_ref_p(align_to_ref, this);
 
-  // Let l0 == original pre_limit, l == new pre_limit, V == v_align
+  // Given:
+  //     lim0 == original pre loop limit
+  //     V == v_align (power of 2)
+  //     invar == extra invariant piece of the address expression
+  //     e == k [ +/- invar ]
+  //
+  // When reassociating expressions involving '%' the basic rules are:
+  //     (a - b) % k == 0   =>  a % k == b % k
+  // and:
+  //     (a + b) % k == 0   =>  a % k == (k - b) % k
+  //
+  // For stride > 0 && scale > 0,
+  //   Derive the new pre-loop limit "lim" such that the two constraints:
+  //     (1) lim = lim0 + N           (where N is some positive integer < V)
+  //     (2) (e + lim) % V == 0
+  //   are true.
+  //
+  //   Substituting (1) into (2),
+  //     (e + lim0 + N) % V == 0
+  //   solve for N:
+  //     N = (V - (e + lim0)) % V
+  //   substitute back into (1), so that new limit
+  //     lim = lim0 + (V - (e + lim0)) % V
   //
-  // For stride > 0
-  //   Need l such that l > l0 && (l+k)%V == 0
-  //   Find n such that l = (l0 + n)
-  //   (l0 + n + k) % V == 0
-  //   n = [V - (l0 + k)%V]%V
-  //   new limit = l0 + [V - (l0 + k)%V]%V
-  // For stride < 0
-  //   Need l such that l < l0 && (l+k)%V == 0
-  //   Find n such that l = (l0 - n)
-  //   (l0 - n + k) % V == 0
-  //   n = (l0 + k)%V
-  //   new limit = l0 - (l0 + k)%V
+  // For stride > 0 && scale < 0
+  //   Constraints:
+  //     lim = lim0 + N
+  //     (e - lim) % V == 0
+  //   Solving for lim:
+  //     (e - lim0 - N) % V == 0
+  //     N = (e - lim0) % V
+  //     lim = lim0 + (e - lim0) % V
+  //
+  // For stride < 0 && scale > 0
+  //   Constraints:
+  //     lim = lim0 - N
+  //     (e + lim) % V == 0
+  //   Solving for lim:
+  //     (e + lim0 - N) % V == 0
+  //     N = (e + lim0) % V
+  //     lim = lim0 - (e + lim0) % V
+  //
+  // For stride < 0 && scale < 0
+  //   Constraints:
+  //     lim = lim0 - N
+  //     (e - lim) % V == 0
+  //   Solving for lim:
+  //     (e - lim0 + N) % V == 0
+  //     N = (V - (e - lim0)) % V
+  //     lim = lim0 - (V - (e - lim0)) % V
 
+  int stride   = iv_stride();
+  int scale    = align_to_ref_p.scale_in_bytes();
   int elt_size = align_to_ref_p.memory_size();
   int v_align  = vector_width_in_bytes() / elt_size;
   int k        = align_to_ref_p.offset_in_bytes() / elt_size;
 
   Node *kn   = _igvn.intcon(k);
-  Node *limk = new (_phase->C, 3) AddINode(pre_limit, kn);
-  _phase->_igvn.register_new_node_with_optimizer(limk);
-  _phase->set_ctrl(limk, pre_ctrl);
+
+  Node *e = kn;
   if (align_to_ref_p.invar() != NULL) {
+    // incorporate any extra invariant piece producing k +/- invar >>> log2(elt)
     Node* log2_elt = _igvn.intcon(exact_log2(elt_size));
     Node* aref     = new (_phase->C, 3) URShiftINode(align_to_ref_p.invar(), log2_elt);
     _phase->_igvn.register_new_node_with_optimizer(aref);
     _phase->set_ctrl(aref, pre_ctrl);
-    if (!align_to_ref_p.negate_invar()) {
-      limk = new (_phase->C, 3) AddINode(limk, aref);
+    if (align_to_ref_p.negate_invar()) {
+      e = new (_phase->C, 3) SubINode(e, aref);
     } else {
-      limk = new (_phase->C, 3) SubINode(limk, aref);
+      e = new (_phase->C, 3) AddINode(e, aref);
     }
-    _phase->_igvn.register_new_node_with_optimizer(limk);
-    _phase->set_ctrl(limk, pre_ctrl);
+    _phase->_igvn.register_new_node_with_optimizer(e);
+    _phase->set_ctrl(e, pre_ctrl);
   }
-  Node* va_msk = _igvn.intcon(v_align - 1);
-  Node* n      = new (_phase->C, 3) AndINode(limk, va_msk);
-  _phase->_igvn.register_new_node_with_optimizer(n);
-  _phase->set_ctrl(n, pre_ctrl);
-  Node* newlim;
-  if (iv_stride() > 0) {
+
+  // compute e +/- lim0
+  if (scale < 0) {
+    e = new (_phase->C, 3) SubINode(e, lim0);
+  } else {
+    e = new (_phase->C, 3) AddINode(e, lim0);
+  }
+  _phase->_igvn.register_new_node_with_optimizer(e);
+  _phase->set_ctrl(e, pre_ctrl);
+
+  if (stride * scale > 0) {
+    // compute V - (e +/- lim0)
     Node* va  = _igvn.intcon(v_align);
-    Node* adj = new (_phase->C, 3) SubINode(va, n);
-    _phase->_igvn.register_new_node_with_optimizer(adj);
-    _phase->set_ctrl(adj, pre_ctrl);
-    Node* adj2 = new (_phase->C, 3) AndINode(adj, va_msk);
-    _phase->_igvn.register_new_node_with_optimizer(adj2);
-    _phase->set_ctrl(adj2, pre_ctrl);
-    newlim = new (_phase->C, 3) AddINode(pre_limit, adj2);
+    e = new (_phase->C, 3) SubINode(va, e);
+    _phase->_igvn.register_new_node_with_optimizer(e);
+    _phase->set_ctrl(e, pre_ctrl);
+  }
+  // compute N = (exp) % V
+  Node* va_msk = _igvn.intcon(v_align - 1);
+  Node* N = new (_phase->C, 3) AndINode(e, va_msk);
+  _phase->_igvn.register_new_node_with_optimizer(N);
+  _phase->set_ctrl(N, pre_ctrl);
+
+  //   substitute back into (1), so that new limit
+  //     lim = lim0 + N
+  Node* lim;
+  if (stride < 0) {
+    lim = new (_phase->C, 3) SubINode(lim0, N);
   } else {
-    newlim = new (_phase->C, 3) SubINode(pre_limit, n);
+    lim = new (_phase->C, 3) AddINode(lim0, N);
   }
-  _phase->_igvn.register_new_node_with_optimizer(newlim);
-  _phase->set_ctrl(newlim, pre_ctrl);
+  _phase->_igvn.register_new_node_with_optimizer(lim);
+  _phase->set_ctrl(lim, pre_ctrl);
   Node* constrained =
-    (iv_stride() > 0) ? (Node*) new (_phase->C,3) MinINode(newlim, orig_limit)
-                      : (Node*) new (_phase->C,3) MaxINode(newlim, orig_limit);
+    (stride > 0) ? (Node*) new (_phase->C,3) MinINode(lim, orig_limit)
+                 : (Node*) new (_phase->C,3) MaxINode(lim, orig_limit);
   _phase->_igvn.register_new_node_with_optimizer(constrained);
   _phase->set_ctrl(constrained, pre_ctrl);
   _igvn.hash_delete(pre_opaq);
--- a/hotspot/src/share/vm/opto/type.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/type.cpp	Sun May 04 07:05:42 2008 -0700
@@ -3164,7 +3164,7 @@
     case TopPTR:
       // Compute new klass on demand, do not use tap->_klass
       xk = (tap->_klass_is_exact | this->_klass_is_exact);
-      return make( ptr, const_oop(), tary, lazy_klass, xk, off );
+      return make( ptr, const_oop(), tary, lazy_klass, xk, off, iid );
     case Constant: {
       ciObject* o = const_oop();
       if( _ptr == Constant ) {
@@ -3176,7 +3176,7 @@
         o = tap->const_oop();
       }
       xk = true;
-      return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off );
+      return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off, iid );
     }
     case NotNull:
     case BotPTR:
@@ -3263,14 +3263,21 @@
     break;
   }
 
-  st->print("*");
+  if( _offset != 0 ) {
+    int header_size = objArrayOopDesc::header_size() * wordSize;
+    if( _offset == OffsetTop )       st->print("+undefined");
+    else if( _offset == OffsetBot )  st->print("+any");
+    else if( _offset < header_size ) st->print("+%d", _offset);
+    else {
+      BasicType basic_elem_type = elem()->basic_type();
+      int array_base = arrayOopDesc::base_offset_in_bytes(basic_elem_type);
+      int elem_size = type2aelembytes(basic_elem_type);
+      st->print("[%d]", (_offset - array_base)/elem_size);
+    }
+  }
+  st->print(" *");
   if (_instance_id != UNKNOWN_INSTANCE)
     st->print(",iid=%d",_instance_id);
-  if( !_offset ) return;
-  if( _offset == OffsetTop )      st->print("+undefined");
-  else if( _offset == OffsetBot ) st->print("+any");
-  else if( _offset < 12 )         st->print("+%d",_offset);
-  else                            st->print("[%d]", (_offset-12)/4 );
 }
 #endif
 
--- a/hotspot/src/share/vm/opto/type.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/type.hpp	Sun May 04 07:05:42 2008 -0700
@@ -686,6 +686,7 @@
   bool klass_is_exact()    const { return _klass_is_exact; }
   bool is_instance()       const { return _instance_id != UNKNOWN_INSTANCE; }
   uint instance_id()       const { return _instance_id; }
+  bool is_instance_field() const { return _instance_id != UNKNOWN_INSTANCE && _offset >= 0; }
 
   virtual intptr_t get_con() const;
 
@@ -1070,6 +1071,7 @@
 #define LShiftXNode  LShiftLNode
 // For object size computation:
 #define AddXNode     AddLNode
+#define RShiftXNode  RShiftLNode
 // For card marks and hashcodes
 #define URShiftXNode URShiftLNode
 // Opcodes
@@ -1108,6 +1110,7 @@
 #define LShiftXNode  LShiftINode
 // For object size computation:
 #define AddXNode     AddINode
+#define RShiftXNode  RShiftINode
 // For card marks and hashcodes
 #define URShiftXNode URShiftINode
 // Opcodes
--- a/hotspot/src/share/vm/opto/vectornode.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/vectornode.cpp	Sun May 04 07:05:42 2008 -0700
@@ -135,7 +135,7 @@
   int mid = lo + ct/2;
   Node* n1 = ct == 2 ? in(lo)   : binaryTreePack(C, lo,  mid);
   Node* n2 = ct == 2 ? in(lo+1) : binaryTreePack(C, mid, hi );
-  int rslt_bsize = ct * type2aelembytes[elt_basic_type()];
+  int rslt_bsize = ct * type2aelembytes(elt_basic_type());
   if (bottom_type()->is_floatingpoint()) {
     switch (rslt_bsize) {
     case  8: return new (C, 3) PackFNode(n1, n2);
--- a/hotspot/src/share/vm/opto/vectornode.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/opto/vectornode.hpp	Sun May 04 07:05:42 2008 -0700
@@ -48,7 +48,7 @@
   uint length() const { return _length; } // Vector length
 
   static uint max_vlen(BasicType bt) { // max vector length
-    return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes[bt]);
+    return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes(bt));
   }
 
   // Element and vector type
@@ -392,7 +392,7 @@
 
   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(); }
   virtual BasicType memory_type() const { return T_VOID; }
-  virtual int memory_size() const { return length()*type2aelembytes[elt_basic_type()]; }
+  virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
 
   // Vector opcode from scalar opcode
   static int opcode(int sopc, uint vlen);
@@ -620,7 +620,7 @@
 
   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(); }
   virtual BasicType memory_type() const { return T_VOID; }
-  virtual int memory_size() const { return length()*type2aelembytes[elt_basic_type()]; }
+  virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
 
   // Vector opcode from scalar opcode
   static int opcode(int sopc, uint vlen);
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClassesTrace.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClassesTrace.hpp	Sun May 04 07:05:42 2008 -0700
@@ -64,7 +64,7 @@
 //    0x01000000 |   16777216 - impl details: nmethod evolution info
 //    0x02000000 |   33554432 - impl details: annotation updates
 //    0x04000000 |   67108864 - impl details: StackMapTable updates
-//    0x08000000 |  134217728 - unused
+//    0x08000000 |  134217728 - impl details: OopMapCache updates
 //    0x10000000 |  268435456 - unused
 //    0x20000000 |  536870912 - unused
 //    0x40000000 | 1073741824 - unused
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Sun May 04 07:05:42 2008 -0700
@@ -924,10 +924,18 @@
 void Arguments::set_parnew_gc_flags() {
   assert(!UseSerialGC && !UseParallelGC, "control point invariant");
 
+  // Turn off AdaptiveSizePolicy by default for parnew until it is
+  // complete.
+  if (UseParNewGC &&
+      FLAG_IS_DEFAULT(UseAdaptiveSizePolicy)) {
+    FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
+  }
+
   if (FLAG_IS_DEFAULT(UseParNewGC) && ParallelGCThreads > 1) {
     FLAG_SET_DEFAULT(UseParNewGC, true);
   } else if (UseParNewGC && ParallelGCThreads == 0) {
-    FLAG_SET_DEFAULT(ParallelGCThreads, nof_parallel_gc_threads());
+    FLAG_SET_DEFAULT(ParallelGCThreads,
+                     Abstract_VM_Version::parallel_worker_threads());
     if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
       FLAG_SET_DEFAULT(UseParNewGC, false);
     }
@@ -956,25 +964,6 @@
   }
 }
 
-// CAUTION: this code is currently shared by UseParallelGC, UseParNewGC and
-// UseconcMarkSweepGC. Further tuning of individual collectors might
-// dictate refinement on a per-collector basis.
-int Arguments::nof_parallel_gc_threads() {
-  if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
-    // For very large machines, there are diminishing returns
-    // for large numbers of worker threads.  Instead of
-    // hogging the whole system, use 5/8ths of a worker for every
-    // processor after the first 8.  For example, on a 72 cpu
-    // machine use 8 + (72 - 8) * (5/8) == 48 worker threads.
-    // This is just a start and needs further tuning and study in
-    // Tiger.
-    int ncpus = os::active_processor_count();
-    return (ncpus <= 8) ? ncpus : 3 + ((ncpus * 5) / 8);
-  } else {
-    return ParallelGCThreads;
-  }
-}
-
 // Adjust some sizes to suit CMS and/or ParNew needs; these work well on
 // sparc/solaris for certain applications, but would gain from
 // further optimization and tuning efforts, and would almost
@@ -984,26 +973,24 @@
     return;
   }
 
+  assert(UseConcMarkSweepGC, "CMS is expected to be on here");
+
   // If we are using CMS, we prefer to UseParNewGC,
   // unless explicitly forbidden.
-  if (UseConcMarkSweepGC && !UseParNewGC && FLAG_IS_DEFAULT(UseParNewGC)) {
-    FLAG_SET_DEFAULT(UseParNewGC, true);
+  if (!UseParNewGC && FLAG_IS_DEFAULT(UseParNewGC)) {
+    FLAG_SET_ERGO(bool, UseParNewGC, true);
   }
 
   // Turn off AdaptiveSizePolicy by default for cms until it is
-  // complete.  Also turn it off in general if the
-  // parnew collector has been selected.
-  if ((UseConcMarkSweepGC || UseParNewGC) &&
-      FLAG_IS_DEFAULT(UseAdaptiveSizePolicy)) {
+  // complete.
+  if (FLAG_IS_DEFAULT(UseAdaptiveSizePolicy)) {
     FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
   }
 
   // In either case, adjust ParallelGCThreads and/or UseParNewGC
   // as needed.
-  set_parnew_gc_flags();
-
-  if (!UseConcMarkSweepGC) {
-    return;
+  if (UseParNewGC) {
+    set_parnew_gc_flags();
   }
 
   // Now make adjustments for CMS
@@ -1013,7 +1000,7 @@
   intx tenuring_default;
   if (CMSUseOldDefaults) {  // old defaults: "old" as of 6.0
     if FLAG_IS_DEFAULT(CMSYoungGenPerWorker) {
-      FLAG_SET_DEFAULT(CMSYoungGenPerWorker, 4*M);
+      FLAG_SET_ERGO(intx, CMSYoungGenPerWorker, 4*M);
     }
     young_gen_per_worker = 4*M;
     new_ratio = (intx)15;
@@ -1038,16 +1025,20 @@
   // for "short" pauses ~ 4M*ParallelGCThreads
   if (FLAG_IS_DEFAULT(MaxNewSize)) {  // MaxNewSize not set at command-line
     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
-      FLAG_SET_DEFAULT(MaxNewSize, MAX2(NewSize, preferred_max_new_size));
+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
     } else {
-      FLAG_SET_DEFAULT(MaxNewSize, preferred_max_new_size);
+      FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
     }
+    if(PrintGCDetails && Verbose) {
+      // Too early to use gclog_or_tty
+      tty->print_cr("Ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize);
+  }
   }
   // Unless explicitly requested otherwise, prefer a large
   // Old to Young gen size so as to shift the collection load
   // to the old generation concurrent collector
   if (FLAG_IS_DEFAULT(NewRatio)) {
-    FLAG_SET_DEFAULT(NewRatio, MAX2(NewRatio, new_ratio));
+    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
 
     size_t min_new  = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size());
     size_t prev_initial_size = initial_heap_size();
@@ -1065,19 +1056,34 @@
     size_t max_heap = align_size_down(MaxHeapSize,
                                       CardTableRS::ct_max_alignment_constraint());
 
+    if(PrintGCDetails && Verbose) {
+      // Too early to use gclog_or_tty
+      tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
+           " initial_heap_size:  " SIZE_FORMAT
+           " max_heap: " SIZE_FORMAT,
+           min_heap_size(), initial_heap_size(), max_heap);
+    }
     if (max_heap > min_new) {
       // Unless explicitly requested otherwise, make young gen
       // at least min_new, and at most preferred_max_new_size.
       if (FLAG_IS_DEFAULT(NewSize)) {
-        FLAG_SET_DEFAULT(NewSize, MAX2(NewSize, min_new));
-        FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, NewSize));
+        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
+        if(PrintGCDetails && Verbose) {
+          // Too early to use gclog_or_tty
+          tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
+        }
       }
       // Unless explicitly requested otherwise, size old gen
       // so that it's at least 3X of NewSize to begin with;
       // later NewRatio will decide how it grows; see above.
       if (FLAG_IS_DEFAULT(OldSize)) {
         if (max_heap > NewSize) {
-          FLAG_SET_DEFAULT(OldSize, MIN2(3*NewSize,  max_heap - NewSize));
+          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize,  max_heap - NewSize));
+          if(PrintGCDetails && Verbose) {
+            // Too early to use gclog_or_tty
+            tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
+          }
         }
       }
     }
@@ -1086,14 +1092,14 @@
   // promote all objects surviving "tenuring_default" scavenges.
   if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
       FLAG_IS_DEFAULT(SurvivorRatio)) {
-    FLAG_SET_DEFAULT(MaxTenuringThreshold, tenuring_default);
+    FLAG_SET_ERGO(intx, MaxTenuringThreshold, tenuring_default);
   }
   // If we decided above (or user explicitly requested)
   // `promote all' (via MaxTenuringThreshold := 0),
   // prefer minuscule survivor spaces so as not to waste
   // space for (non-existent) survivors
   if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) {
-    FLAG_SET_DEFAULT(SurvivorRatio, MAX2((intx)1024, SurvivorRatio));
+    FLAG_SET_ERGO(intx, SurvivorRatio, MAX2((intx)1024, SurvivorRatio));
   }
   // If OldPLABSize is set and CMSParPromoteBlocksToClaim is not,
   // set CMSParPromoteBlocksToClaim equal to OldPLABSize.
@@ -1102,7 +1108,11 @@
   // See CR 6362902.
   if (!FLAG_IS_DEFAULT(OldPLABSize)) {
     if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
-      FLAG_SET_CMDLINE(uintx, CMSParPromoteBlocksToClaim, OldPLABSize);
+      // OldPLABSize is not the default value but CMSParPromoteBlocksToClaim
+      // is.  In this situtation let CMSParPromoteBlocksToClaim follow
+      // the value (either from the command line or ergonomics) of
+      // OldPLABSize.  Following OldPLABSize is an ergonomics decision.
+      FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, OldPLABSize);
     }
     else {
       // OldPLABSize and CMSParPromoteBlocksToClaim are both set.
@@ -1147,17 +1157,11 @@
         FLAG_IS_DEFAULT(UseParallelGC)) {
       if (should_auto_select_low_pause_collector()) {
         FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true);
-        set_cms_and_parnew_gc_flags();
       } else {
         FLAG_SET_ERGO(bool, UseParallelGC, true);
       }
       no_shared_spaces();
     }
-
-    // This is here because the parallel collector could
-    // have been selected so this initialization should
-    // still be done.
-    set_parallel_gc_flags();
   }
 }
 
@@ -1170,6 +1174,9 @@
   // If no heap maximum was requested explicitly, use some reasonable fraction
   // of the physical memory, up to a maximum of 1GB.
   if (UseParallelGC) {
+    FLAG_SET_ERGO(uintx, ParallelGCThreads,
+                  Abstract_VM_Version::parallel_worker_threads());
+
     if (FLAG_IS_DEFAULT(MaxHeapSize)) {
       const uint64_t reasonable_fraction =
         os::physical_memory() / DefaultMaxRAMFraction;
@@ -1227,12 +1234,13 @@
 
     if (UseParallelOldGC) {
       // Par compact uses lower default values since they are treated as
-      // minimums.
+      // minimums.  These are different defaults because of the different
+      // interpretation and are not ergonomically set.
       if (FLAG_IS_DEFAULT(MarkSweepDeadRatio)) {
-        MarkSweepDeadRatio = 1;
+        FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
       }
       if (FLAG_IS_DEFAULT(PermMarkSweepDeadRatio)) {
-        PermMarkSweepDeadRatio = 5;
+        FLAG_SET_DEFAULT(PermMarkSweepDeadRatio, 5);
       }
     }
   }
@@ -1254,13 +1262,30 @@
 
 // Aggressive optimization flags  -XX:+AggressiveOpts
 void Arguments::set_aggressive_opts_flags() {
+#ifdef COMPILER2
+  if (AggressiveOpts || !FLAG_IS_DEFAULT(AutoBoxCacheMax)) {
+    if (FLAG_IS_DEFAULT(EliminateAutoBox)) {
+      FLAG_SET_DEFAULT(EliminateAutoBox, true);
+    }
+    if (FLAG_IS_DEFAULT(AutoBoxCacheMax)) {
+      FLAG_SET_DEFAULT(AutoBoxCacheMax, 20000);
+    }
+
+    // Feed the cache size setting into the JDK
+    char buffer[1024];
+    sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax);
+    add_property(buffer);
+  }
+  if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
+    FLAG_SET_DEFAULT(DoEscapeAnalysis, true);
+  }
+#endif
+
   if (AggressiveOpts) {
-NOT_WINDOWS(
-    // No measured benefit on Windows
-    if (FLAG_IS_DEFAULT(CacheTimeMillis)) {
-      FLAG_SET_DEFAULT(CacheTimeMillis, true);
-    }
-)
+// Sample flag setting code
+//    if (FLAG_IS_DEFAULT(EliminateZeroing)) {
+//      FLAG_SET_DEFAULT(EliminateZeroing, true);
+//    }
   }
 }
 
@@ -1312,6 +1337,31 @@
           UseParallelOldGC));
 }
 
+// Check consistency of GC selection
+bool Arguments::check_gc_consistency() {
+  bool status = true;
+  // Ensure that the user has not selected conflicting sets
+  // of collectors. [Note: this check is merely a user convenience;
+  // collectors over-ride each other so that only a non-conflicting
+  // set is selected; however what the user gets is not what they
+  // may have expected from the combination they asked for. It's
+  // better to reduce user confusion by not allowing them to
+  // select conflicting combinations.
+  uint i = 0;
+  if (UseSerialGC)                       i++;
+  if (UseConcMarkSweepGC || UseParNewGC) i++;
+  if (UseParallelGC || UseParallelOldGC) i++;
+  if (i > 1) {
+    jio_fprintf(defaultStream::error_stream(),
+                "Conflicting collector combinations in option list; "
+                "please refer to the release notes for the combinations "
+                "allowed\n");
+    status = false;
+  }
+
+  return status;
+}
+
 // Check the consistency of vm_init_args
 bool Arguments::check_vm_args_consistency() {
   // Method for adding checks for flag consistency.
@@ -1354,14 +1404,14 @@
     status = false;
   }
 
-  status &= verify_percentage(MaxLiveObjectEvacuationRatio,
+  status = status && verify_percentage(MaxLiveObjectEvacuationRatio,
                               "MaxLiveObjectEvacuationRatio");
-  status &= verify_percentage(AdaptiveSizePolicyWeight,
+  status = status && verify_percentage(AdaptiveSizePolicyWeight,
                               "AdaptiveSizePolicyWeight");
-  status &= verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight");
-  status &= verify_percentage(ThresholdTolerance, "ThresholdTolerance");
-  status &= verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio");
-  status &= verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio");
+  status = status && verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight");
+  status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance");
+  status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio");
+  status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio");
 
   if (MinHeapFreeRatio > MaxHeapFreeRatio) {
     jio_fprintf(defaultStream::error_stream(),
@@ -1377,14 +1427,14 @@
     MarkSweepAlwaysCompactCount = 1;  // Move objects every gc.
   }
 
-  status &= verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
-  status &= verify_percentage(GCTimeLimit, "GCTimeLimit");
+  status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
+  status = status && verify_percentage(GCTimeLimit, "GCTimeLimit");
   if (GCTimeLimit == 100) {
     // Turn off gc-overhead-limit-exceeded checks
     FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
   }
 
-  status &= verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
+  status = status && verify_percentage(GCHeapFreeLimit, "GCHeapFreeLimit");
 
   // Check user specified sharing option conflict with Parallel GC
   bool cannot_share = (UseConcMarkSweepGC || UseParallelGC ||
@@ -1402,24 +1452,7 @@
     }
   }
 
-  // Ensure that the user has not selected conflicting sets
-  // of collectors. [Note: this check is merely a user convenience;
-  // collectors over-ride each other so that only a non-conflicting
-  // set is selected; however what the user gets is not what they
-  // may have expected from the combination they asked for. It's
-  // better to reduce user confusion by not allowing them to
-  // select conflicting combinations.
-  uint i = 0;
-  if (UseSerialGC)                       i++;
-  if (UseConcMarkSweepGC || UseParNewGC) i++;
-  if (UseParallelGC || UseParallelOldGC) i++;
-  if (i > 1) {
-    jio_fprintf(defaultStream::error_stream(),
-                "Conflicting collector combinations in option list; "
-                "please refer to the release notes for the combinations "
-                "allowed\n");
-    status = false;
-  }
+  status = status && check_gc_consistency();
 
   if (_has_alloc_profile) {
     if (UseParallelGC || UseParallelOldGC) {
@@ -1451,15 +1484,15 @@
                   "allocation buffers\n(-XX:+UseTLAB).\n");
       status = false;
     } else {
-      status &= verify_percentage(CMSIncrementalDutyCycle,
+      status = status && verify_percentage(CMSIncrementalDutyCycle,
                                   "CMSIncrementalDutyCycle");
-      status &= verify_percentage(CMSIncrementalDutyCycleMin,
+      status = status && verify_percentage(CMSIncrementalDutyCycleMin,
                                   "CMSIncrementalDutyCycleMin");
-      status &= verify_percentage(CMSIncrementalSafetyFactor,
+      status = status && verify_percentage(CMSIncrementalSafetyFactor,
                                   "CMSIncrementalSafetyFactor");
-      status &= verify_percentage(CMSIncrementalOffset,
+      status = status && verify_percentage(CMSIncrementalOffset,
                                   "CMSIncrementalOffset");
-      status &= verify_percentage(CMSExpAvgFactor,
+      status = status && verify_percentage(CMSExpAvgFactor,
                                   "CMSExpAvgFactor");
       // If it was not set on the command line, set
       // CMSInitiatingOccupancyFraction to 1 so icms can initiate cycles early.
@@ -2064,7 +2097,8 @@
 
       // Enable parallel GC and adaptive generation sizing
       FLAG_SET_CMDLINE(bool, UseParallelGC, true);
-      FLAG_SET_DEFAULT(ParallelGCThreads, nof_parallel_gc_threads());
+      FLAG_SET_DEFAULT(ParallelGCThreads,
+                       Abstract_VM_Version::parallel_worker_threads());
 
       // Encourage steady state memory management
       FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100);
@@ -2451,15 +2485,25 @@
   no_shared_spaces();
 #endif // KERNEL
 
-  // Set some flags for ParallelGC if needed.
-  set_parallel_gc_flags();
-
-  // Set some flags for CMS and/or ParNew collectors, as needed.
-  set_cms_and_parnew_gc_flags();
-
   // Set flags based on ergonomics.
   set_ergonomics_flags();
 
+  // Check the GC selections again.
+  if (!check_gc_consistency()) {
+    return JNI_EINVAL;
+  }
+
+  if (UseParallelGC || UseParallelOldGC) {
+    // Set some flags for ParallelGC if needed.
+    set_parallel_gc_flags();
+  } else if (UseConcMarkSweepGC) {
+    // Set some flags for CMS
+    set_cms_and_parnew_gc_flags();
+  } else if (UseParNewGC) {
+    // Set some flags for ParNew
+    set_parnew_gc_flags();
+  }
+
 #ifdef SERIALGC
   assert(verify_serial_gc_flags(), "SerialGC unset");
 #endif // SERIALGC
@@ -2479,6 +2523,12 @@
     CommandLineFlags::printSetFlags();
   }
 
+#ifdef ASSERT
+  if (PrintFlagsFinal) {
+    CommandLineFlags::printFlags();
+  }
+#endif
+
   return JNI_OK;
 }
 
--- a/hotspot/src/share/vm/runtime/arguments.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/arguments.hpp	Sun May 04 07:05:42 2008 -0700
@@ -291,8 +291,6 @@
   static bool _CIDynamicCompilePriority;
   static intx _Tier2CompileThreshold;
 
-  // GC processing
-  static int nof_parallel_gc_threads();
   // CMS/ParNew garbage collectors
   static void set_parnew_gc_flags();
   static void set_cms_and_parnew_gc_flags();
@@ -385,6 +383,8 @@
  public:
   // Parses the arguments
   static jint parse(const JavaVMInitArgs* args);
+  // Check for consistency in the selection of the garbage collector.
+  static bool check_gc_consistency();
   // Check consistecy or otherwise of VM argument settings
   static bool check_vm_args_consistency();
   // Used by os_solaris
--- a/hotspot/src/share/vm/runtime/biasedLocking.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,9 +36,14 @@
 }
 
 class VM_EnableBiasedLocking: public VM_Operation {
+ private:
+  bool _is_cheap_allocated;
  public:
-  VM_EnableBiasedLocking() {}
-  VMOp_Type type() const   { return VMOp_EnableBiasedLocking; }
+  VM_EnableBiasedLocking(bool is_cheap_allocated) { _is_cheap_allocated = is_cheap_allocated; }
+  VMOp_Type type() const          { return VMOp_EnableBiasedLocking; }
+  Mode evaluation_mode() const    { return _is_cheap_allocated ? _async_safepoint : _safepoint; }
+  bool is_cheap_allocated() const { return _is_cheap_allocated; }
+
   void doit() {
     // Iterate the system dictionary enabling biased locking for all
     // currently loaded classes
@@ -62,8 +66,10 @@
   EnableBiasedLockingTask(size_t interval_time) : PeriodicTask(interval_time) {}
 
   virtual void task() {
-    VM_EnableBiasedLocking op;
-    VMThread::execute(&op);
+    // Use async VM operation to avoid blocking the Watcher thread.
+    // VM Thread will free C heap storage.
+    VM_EnableBiasedLocking *op = new VM_EnableBiasedLocking(true);
+    VMThread::execute(op);
 
     // Reclaim our storage and disenroll ourself
     delete this;
@@ -84,7 +90,7 @@
       EnableBiasedLockingTask* task = new EnableBiasedLockingTask(BiasedLockingStartupDelay);
       task->enroll();
     } else {
-      VM_EnableBiasedLocking op;
+      VM_EnableBiasedLocking op(false);
       VMThread::execute(&op);
     }
   }
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Sun May 04 07:05:42 2008 -0700
@@ -141,41 +141,53 @@
 #ifdef COMPILER2
   // Reallocate the non-escaping objects and restore their fields. Then
   // relock objects if synchronization on them was eliminated.
-  if (DoEscapeAnalysis && EliminateAllocations) {
-    GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects();
-    bool reallocated = false;
-    if (objects != NULL) {
-      JRT_BLOCK
-        reallocated = realloc_objects(thread, &deoptee, objects, THREAD);
-      JRT_END
-    }
-    if (reallocated) {
-      reassign_fields(&deoptee, &map, objects);
-#ifndef PRODUCT
-      if (TraceDeoptimization) {
-        ttyLocker ttyl;
-        tty->print_cr("REALLOC OBJECTS in thread " INTPTR_FORMAT, thread);
-        print_objects(objects);
+  if (DoEscapeAnalysis) {
+    if (EliminateAllocations) {
+      assert (chunk->at(0)->scope() != NULL,"expect only compiled java frames");
+      GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects();
+      bool reallocated = false;
+      if (objects != NULL) {
+        JRT_BLOCK
+          reallocated = realloc_objects(thread, &deoptee, objects, THREAD);
+        JRT_END
       }
-#endif
-    }
-    for (int i = 0; i < chunk->length(); i++) {
-      GrowableArray<MonitorValue*>* monitors = chunk->at(i)->scope()->monitors();
-      if (monitors != NULL) {
-        relock_objects(&deoptee, &map, monitors);
+      if (reallocated) {
+        reassign_fields(&deoptee, &map, objects);
 #ifndef PRODUCT
         if (TraceDeoptimization) {
           ttyLocker ttyl;
-          tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread);
-          for (int j = 0; i < monitors->length(); i++) {
-            MonitorValue* mv = monitors->at(i);
-            if (mv->eliminated()) {
-              StackValue* owner = StackValue::create_stack_value(&deoptee, &map, mv->owner());
-              tty->print_cr("     object <" INTPTR_FORMAT "> locked", owner->get_obj()());
+          tty->print_cr("REALLOC OBJECTS in thread " INTPTR_FORMAT, thread);
+          print_objects(objects);
+      }
+#endif
+      }
+    }
+    if (EliminateLocks) {
+#ifndef PRODUCT
+      bool first = true;
+#endif
+      for (int i = 0; i < chunk->length(); i++) {
+        compiledVFrame* cvf = chunk->at(i);
+        assert (cvf->scope() != NULL,"expect only compiled java frames");
+        GrowableArray<MonitorInfo*>* monitors = cvf->monitors();
+        if (monitors->is_nonempty()) {
+          relock_objects(monitors, thread);
+#ifndef PRODUCT
+          if (TraceDeoptimization) {
+            ttyLocker ttyl;
+            for (int j = 0; j < monitors->length(); j++) {
+              MonitorInfo* mi = monitors->at(j);
+              if (mi->eliminated()) {
+                if (first) {
+                  first = false;
+                  tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread);
+                }
+                tty->print_cr("     object <" INTPTR_FORMAT "> locked", mi->owner());
+              }
             }
           }
+#endif
         }
-#endif
       }
     }
   }
@@ -656,6 +668,7 @@
 
 
   void do_field(fieldDescriptor* fd) {
+    intptr_t val;
     StackValue* value =
       StackValue::create_stack_value(_fr, _reg_map, _sv->field_at(i()));
     int offset = fd->offset();
@@ -669,24 +682,36 @@
       assert(value->type() == T_INT, "Agreement.");
       StackValue* low =
         StackValue::create_stack_value(_fr, _reg_map, _sv->field_at(++_i));
+#ifdef _LP64
+      jlong res = (jlong)low->get_int();
+#else
+#ifdef SPARC
+      // For SPARC we have to swap high and low words.
+      jlong res = jlong_from((jint)low->get_int(), (jint)value->get_int());
+#else
       jlong res = jlong_from((jint)value->get_int(), (jint)low->get_int());
+#endif //SPARC
+#endif
       _obj->long_field_put(offset, res);
       break;
     }
-
+    // Have to cast to INT (32 bits) pointer to avoid little/big-endian problem.
     case T_INT: case T_FLOAT: // 4 bytes.
       assert(value->type() == T_INT, "Agreement.");
-      _obj->int_field_put(offset, (jint)value->get_int());
+      val = value->get_int();
+      _obj->int_field_put(offset, (jint)*((jint*)&val));
       break;
 
     case T_SHORT: case T_CHAR: // 2 bytes
       assert(value->type() == T_INT, "Agreement.");
-      _obj->short_field_put(offset, (jshort)value->get_int());
+      val = value->get_int();
+      _obj->short_field_put(offset, (jshort)*((jint*)&val));
       break;
 
-    case T_BOOLEAN: // 1 byte
+    case T_BOOLEAN: case T_BYTE: // 1 byte
       assert(value->type() == T_INT, "Agreement.");
-      _obj->bool_field_put(offset, (jboolean)value->get_int());
+      val = value->get_int();
+      _obj->bool_field_put(offset, (jboolean)*((jint*)&val));
       break;
 
     default:
@@ -698,25 +723,49 @@
 
 // restore elements of an eliminated type array
 void Deoptimization::reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type) {
-  StackValue* low;
-  jlong lval;
   int index = 0;
+  intptr_t val;
 
   for (int i = 0; i < sv->field_size(); i++) {
     StackValue* value = StackValue::create_stack_value(fr, reg_map, sv->field_at(i));
     switch(type) {
-      case T_BOOLEAN: obj->bool_at_put (index, (jboolean) value->get_int()); break;
-      case T_BYTE:    obj->byte_at_put (index, (jbyte)    value->get_int()); break;
-      case T_CHAR:    obj->char_at_put (index, (jchar)    value->get_int()); break;
-      case T_SHORT:   obj->short_at_put(index, (jshort)   value->get_int()); break;
-      case T_INT:     obj->int_at_put  (index, (jint)     value->get_int()); break;
-      case T_FLOAT:   obj->float_at_put(index, (jfloat)   value->get_int()); break;
-      case T_LONG:
-      case T_DOUBLE:
-        low = StackValue::create_stack_value(fr, reg_map, sv->field_at(++i));
-        lval = jlong_from((jint)value->get_int(), (jint)low->get_int());
-        sv->value()->long_field_put(index, lval);
-        break;
+    case T_LONG: case T_DOUBLE: {
+      assert(value->type() == T_INT, "Agreement.");
+      StackValue* low =
+        StackValue::create_stack_value(fr, reg_map, sv->field_at(++i));
+#ifdef _LP64
+      jlong res = (jlong)low->get_int();
+#else
+#ifdef SPARC
+      // For SPARC we have to swap high and low words.
+      jlong res = jlong_from((jint)low->get_int(), (jint)value->get_int());
+#else
+      jlong res = jlong_from((jint)value->get_int(), (jint)low->get_int());
+#endif //SPARC
+#endif
+      obj->long_at_put(index, res);
+      break;
+    }
+
+    // Have to cast to INT (32 bits) pointer to avoid little/big-endian problem.
+    case T_INT: case T_FLOAT: // 4 bytes.
+      assert(value->type() == T_INT, "Agreement.");
+      val = value->get_int();
+      obj->int_at_put(index, (jint)*((jint*)&val));
+      break;
+
+    case T_SHORT: case T_CHAR: // 2 bytes
+      assert(value->type() == T_INT, "Agreement.");
+      val = value->get_int();
+      obj->short_at_put(index, (jshort)*((jint*)&val));
+      break;
+
+    case T_BOOLEAN: case T_BYTE: // 1 byte
+      assert(value->type() == T_INT, "Agreement.");
+      val = value->get_int();
+      obj->bool_at_put(index, (jboolean)*((jint*)&val));
+      break;
+
       default:
         ShouldNotReachHere();
     }
@@ -758,18 +807,27 @@
 
 
 // relock objects for which synchronization was eliminated
-void Deoptimization::relock_objects(frame* fr, RegisterMap* reg_map, GrowableArray<MonitorValue*>* monitors) {
+void Deoptimization::relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread) {
   for (int i = 0; i < monitors->length(); i++) {
-    MonitorValue* mv = monitors->at(i);
-    StackValue* owner = StackValue::create_stack_value(fr, reg_map, mv->owner());
-    if (mv->eliminated()) {
-      Handle obj = owner->get_obj();
-      assert(obj.not_null(), "reallocation was missed");
-      BasicLock* lock = StackValue::resolve_monitor_lock(fr, mv->basic_lock());
-      lock->set_displaced_header(obj->mark());
-      obj->set_mark((markOop) lock);
+    MonitorInfo* mon_info = monitors->at(i);
+    if (mon_info->eliminated()) {
+      assert(mon_info->owner() != NULL, "reallocation was missed");
+      Handle obj = Handle(mon_info->owner());
+      markOop mark = obj->mark();
+      if (UseBiasedLocking && mark->has_bias_pattern()) {
+        // New allocated objects may have the mark set to anonymously biased.
+        // Also the deoptimized method may called methods with synchronization
+        // where the thread-local object is bias locked to the current thread.
+        assert(mark->is_biased_anonymously() ||
+               mark->biased_locker() == thread, "should be locked to current thread");
+        // Reset mark word to unbiased prototype.
+        markOop unbiased_prototype = markOopDesc::prototype()->set_age(mark->age());
+        obj->set_mark(unbiased_prototype);
+      }
+      BasicLock* lock = mon_info->lock();
+      ObjectSynchronizer::slow_enter(obj, lock, thread);
     }
-    assert(owner->get_obj()->is_locked(), "object must be locked now");
+    assert(mon_info->owner()->is_locked(), "object must be locked now");
   }
 }
 
@@ -875,7 +933,7 @@
   GrowableArray<MonitorInfo*>* monitors = cvf->monitors();
   for (int i = 0; i < monitors->length(); i++) {
     MonitorInfo* mon_info = monitors->at(i);
-    if (mon_info->owner() != NULL) {
+    if (mon_info->owner() != NULL && !mon_info->eliminated()) {
       objects_to_revoke->append(Handle(mon_info->owner()));
     }
   }
--- a/hotspot/src/share/vm/runtime/deoptimization.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/deoptimization.hpp	Sun May 04 07:05:42 2008 -0700
@@ -105,7 +105,7 @@
   static void reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type);
   static void reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj);
   static void reassign_fields(frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects);
-  static void relock_objects(frame* fr, RegisterMap* reg_map, GrowableArray<MonitorValue*>* monitors);
+  static void relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread);
   NOT_PRODUCT(static void print_objects(GrowableArray<ScopeValue*>* objects);)
 #endif // COMPILER2
 
--- a/hotspot/src/share/vm/runtime/globals.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/globals.cpp	Sun May 04 07:05:42 2008 -0700
@@ -205,6 +205,18 @@
   return (f->origin == DEFAULT);
 }
 
+bool CommandLineFlagsEx::is_ergo(CommandLineFlag flag) {
+  assert((size_t)flag < Flag::numFlags, "bad command line flag index");
+  Flag* f = &Flag::flags[flag];
+  return (f->origin == ERGONOMIC);
+}
+
+bool CommandLineFlagsEx::is_cmdline(CommandLineFlag flag) {
+  assert((size_t)flag < Flag::numFlags, "bad command line flag index");
+  Flag* f = &Flag::flags[flag];
+  return (f->origin == COMMAND_LINE);
+}
+
 bool CommandLineFlags::wasSetOnCmdline(const char* name, bool* value) {
   Flag* result = Flag::find_flag((char*)name, strlen(name));
   if (result == NULL) return false;
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Sun May 04 07:05:42 2008 -0700
@@ -344,12 +344,6 @@
   product(bool, ForceTimeHighResolution, false,                             \
           "Using high time resolution(For Win32 only)")                     \
                                                                             \
-  product(bool, CacheTimeMillis, false,                                     \
-          "Cache os::javaTimeMillis with CacheTimeMillisGranularity")       \
-                                                                            \
-  diagnostic(uintx, CacheTimeMillisGranularity, 50,                         \
-          "Granularity for CacheTimeMillis")                                \
-                                                                            \
   develop(bool, TraceItables, false,                                        \
           "Trace initialization and use of itables")                        \
                                                                             \
@@ -586,7 +580,7 @@
   develop(bool, ZapJNIHandleArea, trueInDebug,                              \
           "Zap freed JNI handle space with 0xFEFEFEFE")                     \
                                                                             \
-  develop(bool, ZapUnusedHeapArea, trueInDebug,                             \
+  develop(bool, ZapUnusedHeapArea, false,                                   \
           "Zap unused heap space with 0xBAADBABE")                          \
                                                                             \
   develop(bool, PrintVMMessages, true,                                      \
@@ -949,6 +943,12 @@
   product(bool, UseXmmRegToRegMoveAll, false,                               \
           "Copy all XMM register bits when moving value between registers") \
                                                                             \
+  product(bool, UseXmmI2D, false,                                           \
+          "Use SSE2 CVTDQ2PD instruction to convert Integer to Double")     \
+                                                                            \
+  product(bool, UseXmmI2F, false,                                           \
+          "Use SSE2 CVTDQ2PS instruction to convert Integer to Float")      \
+                                                                            \
   product(intx, FieldsAllocationStyle, 1,                                   \
           "0 - type based with oops first, 1 - with oops last")             \
                                                                             \
@@ -1794,6 +1794,9 @@
           "number of times a GC thread (minus the coordinator) "            \
           "will sleep while yielding before giving up and resuming GC")     \
                                                                             \
+  notproduct(bool, PrintFlagsFinal, false,                                  \
+          "Print all command line flags after argument processing")         \
+                                                                            \
   /* gc tracing */                                                          \
   manageable(bool, PrintGC, false,                                          \
           "Print message at garbage collect")                               \
--- a/hotspot/src/share/vm/runtime/globals_extension.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/globals_extension.hpp	Sun May 04 07:05:42 2008 -0700
@@ -154,6 +154,8 @@
 } CommandLineFlagWithType;
 
 #define FLAG_IS_DEFAULT(name)         (CommandLineFlagsEx::is_default(FLAG_MEMBER(name)))
+#define FLAG_IS_ERGO(name)            (CommandLineFlagsEx::is_ergo(FLAG_MEMBER(name)))
+#define FLAG_IS_CMDLINE(name)         (CommandLineFlagsEx::is_cmdline(FLAG_MEMBER(name)))
 
 #define FLAG_SET_DEFAULT(name, value) ((name) = (value))
 
@@ -171,4 +173,6 @@
   static void ccstrAtPut(CommandLineFlagWithType flag, ccstr value, FlagValueOrigin origin);
 
   static bool is_default(CommandLineFlag flag);
+  static bool is_ergo(CommandLineFlag flag);
+  static bool is_cmdline(CommandLineFlag flag);
 };
--- a/hotspot/src/share/vm/runtime/java.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/java.cpp	Sun May 04 07:05:42 2008 -0700
@@ -390,11 +390,6 @@
   StatSampler::disengage();
   StatSampler::destroy();
 
-  // shut down the TimeMillisUpdateTask
-  if (CacheTimeMillis) {
-    TimeMillisUpdateTask::disengage();
-  }
-
 #ifndef SERIALGC
   // stop CMS threads
   if (UseConcMarkSweepGC) {
--- a/hotspot/src/share/vm/runtime/mutex.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/mutex.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1119,10 +1119,15 @@
   assert ((UNS(_owner)|UNS(_LockWord.FullWord)|UNS(_EntryList)|UNS(_WaitSet)|UNS(_OnDeck)) == 0, "") ;
 }
 
-void Monitor::ClearMonitor (Monitor * m) {
+void Monitor::ClearMonitor (Monitor * m, const char *name) {
   m->_owner             = NULL ;
   m->_snuck             = false ;
-  m->_name              = "UNKNOWN" ;
+  if (name == NULL) {
+    strcpy(m->_name, "UNKNOWN") ;
+  } else {
+    strncpy(m->_name, name, MONITOR_NAME_LEN - 1);
+    m->_name[MONITOR_NAME_LEN - 1] = '\0';
+  }
   m->_LockWord.FullWord = 0 ;
   m->_EntryList         = NULL ;
   m->_OnDeck            = NULL ;
@@ -1133,7 +1138,7 @@
 Monitor::Monitor() { ClearMonitor(this); }
 
 Monitor::Monitor (int Rank, const char * name, bool allow_vm_block) {
-  ClearMonitor (this) ;
+  ClearMonitor (this, name) ;
 #ifdef ASSERT
   _allow_vm_block  = allow_vm_block;
   _rank            = Rank ;
@@ -1145,7 +1150,7 @@
 }
 
 Mutex::Mutex (int Rank, const char * name, bool allow_vm_block) {
-  ClearMonitor ((Monitor *) this) ;
+  ClearMonitor ((Monitor *) this, name) ;
 #ifdef ASSERT
  _allow_vm_block   = allow_vm_block;
  _rank             = Rank ;
--- a/hotspot/src/share/vm/runtime/mutex.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/mutex.hpp	Sun May 04 07:05:42 2008 -0700
@@ -82,6 +82,9 @@
 // *in that order*.  If their implementations change such that these
 // assumptions are violated, a whole lot of code will break.
 
+// The default length of monitor name is choosen to be 64 to avoid false sharing.
+static const int MONITOR_NAME_LEN = 64;
+
 class Monitor : public CHeapObj {
 
  public:
@@ -126,9 +129,8 @@
   volatile intptr_t _WaitLock [1] ;      // Protects _WaitSet
   ParkEvent * volatile  _WaitSet ;       // LL of ParkEvents
   volatile bool     _snuck;              // Used for sneaky locking (evil).
-  const char * _name;                    // Name of mutex
   int NotifyCount ;                      // diagnostic assist
-  double pad [8] ;                       // avoid false sharing
+  char _name[MONITOR_NAME_LEN];          // Name of mutex
 
   // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode)
 #ifndef PRODUCT
@@ -170,7 +172,7 @@
    int  ILocked () ;
 
  protected:
-   static void ClearMonitor (Monitor * m) ;
+   static void ClearMonitor (Monitor * m, const char* name = NULL) ;
    Monitor() ;
 
  public:
--- a/hotspot/src/share/vm/runtime/mutexLocker.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp	Sun May 04 07:05:42 2008 -0700
@@ -188,10 +188,6 @@
 
   def(Safepoint_lock               , Monitor, safepoint,   true ); // locks SnippetCache_lock/Threads_lock
 
-  if (!UseMembar) {
-    def(SerializePage_lock         , Monitor, leaf,        true );
-  }
-
   def(Threads_lock                 , Monitor, barrier,     true );
 
   def(VMOperationQueue_lock        , Monitor, nonleaf,     true ); // VM_thread allowed to block on these
--- a/hotspot/src/share/vm/runtime/mutexLocker.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp	Sun May 04 07:05:42 2008 -0700
@@ -52,7 +52,6 @@
 extern Monitor* VMOperationQueue_lock;           // a lock on queue of vm_operations waiting to execute
 extern Monitor* VMOperationRequest_lock;         // a lock on Threads waiting for a vm_operation to terminate
 extern Monitor* Safepoint_lock;                  // a lock used by the safepoint abstraction
-extern Monitor* SerializePage_lock;              // a lock used when VMThread changing serialize memory page permission during safepoint
 extern Monitor* Threads_lock;                    // a lock on the Threads table of active Java threads
                                                  // (also used by Safepoints too to block threads creation/destruction)
 extern Monitor* CGC_lock;                        // used for coordination between
--- a/hotspot/src/share/vm/runtime/os.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/os.cpp	Sun May 04 07:05:42 2008 -0700
@@ -33,9 +33,6 @@
 uintptr_t         os::_serialize_page_mask = 0;
 long              os::_rand_seed          = 1;
 int               os::_processor_count    = 0;
-volatile jlong    os::_global_time        = 0;
-volatile int      os::_global_time_lock   = 0;
-bool              os::_use_global_time    = false;
 size_t            os::_page_sizes[os::page_sizes_max];
 
 #ifndef PRODUCT
@@ -44,74 +41,6 @@
 int os::num_frees = 0;              // # of calls to free
 #endif
 
-// Atomic read of a jlong is assured by a seqlock; see update_global_time()
-jlong os::read_global_time() {
-#ifdef _LP64
-  return _global_time;
-#else
-  volatile int lock;
-  volatile jlong current_time;
-  int ctr = 0;
-
-  for (;;) {
-    lock = _global_time_lock;
-
-    // spin while locked
-    while ((lock & 0x1) != 0) {
-      ++ctr;
-      if ((ctr & 0xFFF) == 0) {
-        // Guarantee writer progress.  Can't use yield; yield is advisory
-        // and has almost no effect on some platforms.  Don't need a state
-        // transition - the park call will return promptly.
-        assert(Thread::current() != NULL, "TLS not initialized");
-        assert(Thread::current()->_ParkEvent != NULL, "sync not initialized");
-        Thread::current()->_ParkEvent->park(1);
-      }
-      lock = _global_time_lock;
-    }
-
-    OrderAccess::loadload();
-    current_time = _global_time;
-    OrderAccess::loadload();
-
-    // ratify seqlock value
-    if (lock == _global_time_lock) {
-      return current_time;
-    }
-  }
-#endif
-}
-
-//
-// NOTE - Assumes only one writer thread!
-//
-// We use a seqlock to guarantee that jlong _global_time is updated
-// atomically on 32-bit platforms.  A locked value is indicated by
-// the lock variable LSB == 1.  Readers will initially read the lock
-// value, spinning until the LSB == 0.  They then speculatively read
-// the global time value, then re-read the lock value to ensure that
-// it hasn't changed.  If the lock value has changed, the entire read
-// sequence is retried.
-//
-// Writers simply set the LSB = 1 (i.e. increment the variable),
-// update the global time, then release the lock and bump the version
-// number (i.e. increment the variable again.)  In this case we don't
-// even need a CAS since we ensure there's only one writer.
-//
-void os::update_global_time() {
-#ifdef _LP64
-  _global_time = timeofday();
-#else
-  assert((_global_time_lock & 0x1) == 0, "multiple writers?");
-  jlong current_time = timeofday();
-  _global_time_lock++; // lock
-  OrderAccess::storestore();
-  _global_time = current_time;
-  OrderAccess::storestore();
-  _global_time_lock++; // unlock
-#endif
-}
-
 // Fill in buffer with current local time as an ISO-8601 string.
 // E.g., yyyy-mm-ddThh:mm:ss-zzzz.
 // Returns buffer, or NULL if it failed.
@@ -138,7 +67,7 @@
     return NULL;
   }
   // Get the current time
-  jlong milliseconds_since_19700101 = timeofday();
+  jlong milliseconds_since_19700101 = javaTimeMillis();
   const int milliseconds_per_microsecond = 1000;
   const time_t seconds_since_19700101 =
     milliseconds_since_19700101 / milliseconds_per_microsecond;
@@ -956,7 +885,6 @@
     return true;
 }
 
-
 void os::set_memory_serialize_page(address page) {
   int count = log2_intptr(sizeof(class JavaThread)) - log2_intptr(64);
   _mem_serialize_page = (volatile int32_t *)page;
@@ -967,6 +895,8 @@
   set_serialize_page_mask((uintptr_t)(vm_page_size() - sizeof(int32_t)));
 }
 
+static volatile intptr_t SerializePageLock = 0;
+
 // This method is called from signal handler when SIGSEGV occurs while the current
 // thread tries to store to the "read-only" memory serialize page during state
 // transition.
@@ -974,15 +904,14 @@
   if (TraceSafepoint) {
     tty->print_cr("Block until the serialize page permission restored");
   }
-  // When VMThread is holding the SerializePage_lock during modifying the
+  // When VMThread is holding the SerializePageLock during modifying the
   // access permission of the memory serialize page, the following call
   // will block until the permission of that page is restored to rw.
   // Generally, it is unsafe to manipulate locks in signal handlers, but in
   // this case, it's OK as the signal is synchronous and we know precisely when
-  // it can occur. SerializePage_lock is a transiently-held leaf lock, so
-  // lock_without_safepoint_check should be safe.
-  SerializePage_lock->lock_without_safepoint_check();
-  SerializePage_lock->unlock();
+  // it can occur.
+  Thread::muxAcquire(&SerializePageLock, "set_memory_serialize_page");
+  Thread::muxRelease(&SerializePageLock);
 }
 
 // Serialize all thread state variables
@@ -990,14 +919,12 @@
   // On some platforms such as Solaris & Linux, the time duration of the page
   // permission restoration is observed to be much longer than expected  due to
   // scheduler starvation problem etc. To avoid the long synchronization
-  // time and expensive page trap spinning, 'SerializePage_lock' is used to block
-  // the mutator thread if such case is encountered. Since this method is always
-  // called by VMThread during safepoint, lock_without_safepoint_check is used
-  // instead. See bug 6546278.
-  SerializePage_lock->lock_without_safepoint_check();
+  // time and expensive page trap spinning, 'SerializePageLock' is used to block
+  // the mutator thread if such case is encountered. See bug 6546278 for details.
+  Thread::muxAcquire(&SerializePageLock, "serialize_thread_states");
   os::protect_memory( (char *)os::get_memory_serialize_page(), os::vm_page_size() );
   os::unguard_memory( (char *)os::get_memory_serialize_page(), os::vm_page_size() );
-  SerializePage_lock->unlock();
+  Thread::muxRelease(&SerializePageLock);
 }
 
 // Returns true if the current stack pointer is above the stack shadow
--- a/hotspot/src/share/vm/runtime/os.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/os.hpp	Sun May 04 07:05:42 2008 -0700
@@ -66,9 +66,6 @@
   static address            _polling_page;
   static volatile int32_t * _mem_serialize_page;
   static uintptr_t          _serialize_page_mask;
-  static volatile jlong     _global_time;
-  static volatile int       _global_time_lock;
-  static bool               _use_global_time;
   static size_t             _page_sizes[page_sizes_max];
 
   static void init_page_sizes(size_t default_page_size) {
@@ -88,11 +85,6 @@
   static bool getenv(const char* name, char* buffer, int len);
   static bool have_special_privileges();
 
-  static jlong  timeofday();
-  static void   enable_global_time()   { _use_global_time = true; }
-  static void   disable_global_time()  { _use_global_time = false; }
-  static jlong  read_global_time();
-  static void   update_global_time();
   static jlong  javaTimeMillis();
   static jlong  javaTimeNanos();
   static void   javaTimeNanos_info(jvmtiTimerInfo *info_ptr);
@@ -236,6 +228,7 @@
   static bool   large_page_init();
   static size_t large_page_size();
   static bool   can_commit_large_page_memory();
+  static bool   can_execute_large_page_memory();
 
   // OS interface to polling page
   static address get_polling_page()             { return _polling_page; }
--- a/hotspot/src/share/vm/runtime/reflection.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/reflection.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1548,10 +1548,11 @@
   }
 
   instanceKlassHandle klass(THREAD, java_lang_Class::as_klassOop(mirror));
-  if (!klass->methods()->is_within_bounds(slot)) {
+  methodOop m = klass->method_with_idnum(slot);
+  if (m == NULL) {
     THROW_MSG_0(vmSymbols::java_lang_InternalError(), "invoke");
   }
-  methodHandle method(THREAD, methodOop(klass->methods()->obj_at(slot)));
+  methodHandle method(THREAD, m);
 
   return invoke(klass, method, receiver, override, ptypes, rtype, args, true, THREAD);
 }
@@ -1564,10 +1565,11 @@
   objArrayHandle ptypes(THREAD, objArrayOop(java_lang_reflect_Constructor::parameter_types(constructor_mirror)));
 
   instanceKlassHandle klass(THREAD, java_lang_Class::as_klassOop(mirror));
-  if (!klass->methods()->is_within_bounds(slot)) {
+  methodOop m = klass->method_with_idnum(slot);
+  if (m == NULL) {
     THROW_MSG_0(vmSymbols::java_lang_InternalError(), "invoke");
   }
-  methodHandle method(THREAD, methodOop(klass->methods()->obj_at(slot)));
+  methodHandle method(THREAD, m);
   assert(method->name() == vmSymbols::object_initializer_name(), "invalid constructor");
 
   // Make sure klass gets initialize
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Sun May 04 07:05:42 2008 -0700
@@ -467,6 +467,11 @@
   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_AbstractMethodError());
 JRT_END
 
+JRT_ENTRY(void, SharedRuntime::throw_IncompatibleClassChangeError(JavaThread* thread))
+  // These errors occur only at call sites
+  throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IncompatibleClassChangeError(), "vtable stub");
+JRT_END
+
 JRT_ENTRY(void, SharedRuntime::throw_ArithmeticException(JavaThread* thread))
   throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArithmeticException(), "/ by zero");
 JRT_END
@@ -1481,11 +1486,9 @@
   const char* desc = " cannot be cast to ";
   size_t msglen = strlen(objName) + strlen(desc) + strlen(targetKlassName) + 1;
 
-  char* message = NEW_C_HEAP_ARRAY(char, msglen);
+  char* message = NEW_RESOURCE_ARRAY(char, msglen);
   if (NULL == message) {
-    // out of memory - can't use a detailed message.  Since caller is
-    // using a resource mark to free memory, returning this should be
-    // safe (caller won't explicitly delete it).
+    // Shouldn't happen, but don't cause even more problems if it does
     message = const_cast<char*>(objName);
   } else {
     jio_snprintf(message, msglen, "%s%s%s", objName, desc, targetKlassName);
@@ -1834,7 +1837,25 @@
                                                                         regs);
 
     B = BufferBlob::create(AdapterHandlerEntry::name, &buffer);
-    if (B == NULL)  return -2;          // Out of CodeCache space
+    if (B == NULL) {
+      // CodeCache is full, disable compilation
+      // Ought to log this but compile log is only per compile thread
+      // and we're some non descript Java thread.
+      UseInterpreter = true;
+      if (UseCompiler || AlwaysCompileLoopMethods ) {
+#ifndef PRODUCT
+        warning("CodeCache is full. Compiler has been disabled");
+        if (CompileTheWorld || ExitOnFullCodeCache) {
+          before_exit(JavaThread::current());
+          exit_globals(); // will delete tty
+          vm_direct_exit(CompileTheWorld ? 0 : 1);
+        }
+#endif
+        UseCompiler               = false;
+        AlwaysCompileLoopMethods  = false;
+      }
+      return 0; // Out of CodeCache space (_handlers[0] == NULL)
+    }
     entry->relocate(B->instructions_begin());
 #ifndef PRODUCT
     // debugging suppport
--- a/hotspot/src/share/vm/runtime/sharedRuntime.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.hpp	Sun May 04 07:05:42 2008 -0700
@@ -104,6 +104,7 @@
     STACK_OVERFLOW
   };
   static void    throw_AbstractMethodError(JavaThread* thread);
+  static void    throw_IncompatibleClassChangeError(JavaThread* thread);
   static void    throw_ArithmeticException(JavaThread* thread);
   static void    throw_NullPointerException(JavaThread* thread);
   static void    throw_NullPointerException_at_call(JavaThread* thread);
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp	Sun May 04 07:05:42 2008 -0700
@@ -40,6 +40,7 @@
 address StubRoutines::_catch_exception_entry                    = NULL;
 address StubRoutines::_forward_exception_entry                  = NULL;
 address StubRoutines::_throw_AbstractMethodError_entry          = NULL;
+address StubRoutines::_throw_IncompatibleClassChangeError_entry = NULL;
 address StubRoutines::_throw_ArithmeticException_entry          = NULL;
 address StubRoutines::_throw_NullPointerException_entry         = NULL;
 address StubRoutines::_throw_NullPointerException_at_call_entry = NULL;
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp	Sun May 04 07:05:42 2008 -0700
@@ -84,6 +84,7 @@
   static address _forward_exception_entry;
   static address _catch_exception_entry;
   static address _throw_AbstractMethodError_entry;
+  static address _throw_IncompatibleClassChangeError_entry;
   static address _throw_ArithmeticException_entry;
   static address _throw_NullPointerException_entry;
   static address _throw_NullPointerException_at_call_entry;
@@ -184,6 +185,7 @@
   static address forward_exception_entry()                 { return _forward_exception_entry; }
   // Implicit exceptions
   static address throw_AbstractMethodError_entry()         { return _throw_AbstractMethodError_entry; }
+  static address throw_IncompatibleClassChangeError_entry(){ return _throw_IncompatibleClassChangeError_entry; }
   static address throw_ArithmeticException_entry()         { return _throw_ArithmeticException_entry; }
   static address throw_NullPointerException_entry()        { return _throw_NullPointerException_entry; }
   static address throw_NullPointerException_at_call_entry(){ return _throw_NullPointerException_at_call_entry; }
--- a/hotspot/src/share/vm/runtime/task.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/task.cpp	Sun May 04 07:05:42 2008 -0700
@@ -107,25 +107,3 @@
     _tasks[index] = _tasks[index+1];
   }
 }
-
-TimeMillisUpdateTask* TimeMillisUpdateTask::_task = NULL;
-
-void TimeMillisUpdateTask::task() {
-  os::update_global_time();
-}
-
-void TimeMillisUpdateTask::engage() {
-  assert(_task == NULL, "init twice?");
-  os::update_global_time(); // initial update
-  os::enable_global_time();
-  _task = new TimeMillisUpdateTask(CacheTimeMillisGranularity);
-  _task->enroll();
-}
-
-void TimeMillisUpdateTask::disengage() {
-  assert(_task != NULL, "uninit twice?");
-  os::disable_global_time();
-  _task->disenroll();
-  delete _task;
-  _task = NULL;
-}
--- a/hotspot/src/share/vm/runtime/task.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/task.hpp	Sun May 04 07:05:42 2008 -0700
@@ -113,13 +113,3 @@
   // The task to perform at each period
   virtual void task() = 0;
 };
-
-class TimeMillisUpdateTask : public PeriodicTask {
- private:
-  static TimeMillisUpdateTask* _task;
- public:
-  TimeMillisUpdateTask(int interval) : PeriodicTask(interval) {}
-  void task();
-  static void engage();
-  static void disengage();
-};
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Sun May 04 07:05:42 2008 -0700
@@ -1317,10 +1317,6 @@
   ThreadSafepointState::destroy(this);
   if (_thread_profiler != NULL) delete _thread_profiler;
   if (_thread_stat != NULL) delete _thread_stat;
-
-  if (jvmti_thread_state() != NULL) {
-    JvmtiExport::cleanup_thread(this);
-  }
 }
 
 
@@ -1571,6 +1567,10 @@
     tlab().make_parsable(true);  // retire TLAB
   }
 
+  if (jvmti_thread_state() != NULL) {
+    JvmtiExport::cleanup_thread(this);
+  }
+
   // Remove from list of active threads list, and notify VM thread if we are the last non-daemon thread
   Threads::remove(this);
 }
@@ -2925,6 +2925,25 @@
       warning("java.lang.String not initialized");
     }
 
+    if (AggressiveOpts) {
+      // Forcibly initialize java/util/HashMap and mutate the private
+      // static final "frontCacheEnabled" field before we start creating instances
+#ifdef ASSERT
+      klassOop tmp_k = SystemDictionary::find(vmSymbolHandles::java_util_HashMap(), Handle(), Handle(), CHECK_0);
+      assert(tmp_k == NULL, "java/util/HashMap should not be loaded yet");
+#endif
+      klassOop k_o = SystemDictionary::resolve_or_null(vmSymbolHandles::java_util_HashMap(), Handle(), Handle(), CHECK_0);
+      KlassHandle k = KlassHandle(THREAD, k_o);
+      guarantee(k.not_null(), "Must find java/util/HashMap");
+      instanceKlassHandle ik = instanceKlassHandle(THREAD, k());
+      ik->initialize(CHECK_0);
+      fieldDescriptor fd;
+      // Possible we might not find this field; if so, don't break
+      if (ik->find_local_field(vmSymbols::frontCacheEnabled_name(), vmSymbols::bool_signature(), &fd)) {
+        k()->bool_field_put(fd.offset(), true);
+      }
+    }
+
     // Initialize java_lang.System (needed before creating the thread)
     if (InitializeJavaLangSystem) {
       initialize_class(vmSymbolHandles::java_lang_System(), CHECK_0);
@@ -3066,7 +3085,6 @@
   if (MemProfiling)                   MemProfiler::engage();
   StatSampler::engage();
   if (CheckJNICalls)                  JniPeriodicChecker::engage();
-  if (CacheTimeMillis)                TimeMillisUpdateTask::engage();
 
   BiasedLocking::init();
 
--- a/hotspot/src/share/vm/runtime/vframe.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/vframe.cpp	Sun May 04 07:05:42 2008 -0700
@@ -206,7 +206,7 @@
   for (BasicObjectLock* current = (fr().previous_monitor_in_interpreter_frame(fr().interpreter_frame_monitor_begin()));
        current >= fr().interpreter_frame_monitor_end();
        current = fr().previous_monitor_in_interpreter_frame(current)) {
-    result->push(new MonitorInfo(current->obj(), current->lock()));
+    result->push(new MonitorInfo(current->obj(), current->lock(), false));
   }
   return result;
 }
--- a/hotspot/src/share/vm/runtime/vframe.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/vframe.hpp	Sun May 04 07:05:42 2008 -0700
@@ -230,15 +230,18 @@
  private:
   oop        _owner; // the object owning the monitor
   BasicLock* _lock;
+  bool       _eliminated;
  public:
   // Constructor
-  MonitorInfo(oop owner, BasicLock* lock) {
+  MonitorInfo(oop owner, BasicLock* lock, bool eliminated) {
     _owner = owner;
     _lock  = lock;
+    _eliminated = eliminated;
   }
   // Accessors
   oop        owner() const { return _owner; }
   BasicLock* lock()  const { return _lock;  }
+  bool eliminated()  const { return _eliminated; }
 };
 
 class vframeStreamCommon : StackObj {
--- a/hotspot/src/share/vm/runtime/vframe_hp.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/vframe_hp.cpp	Sun May 04 07:05:42 2008 -0700
@@ -190,7 +190,7 @@
     // Casting away const
     frame& fr = (frame&) _fr;
     MonitorInfo* info = new MonitorInfo(fr.compiled_synchronized_native_monitor_owner(nm),
-                                        fr.compiled_synchronized_native_monitor(nm));
+                                        fr.compiled_synchronized_native_monitor(nm), false);
     monitors->push(info);
     return monitors;
   }
@@ -202,7 +202,7 @@
   for (int index = 0; index < monitors->length(); index++) {
     MonitorValue* mv = monitors->at(index);
     StackValue *owner_sv = create_stack_value(mv->owner()); // it is an oop
-    result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock())));
+    result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), mv->eliminated()));
   }
   return result;
 }
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Sun May 04 07:05:42 2008 -0700
@@ -52,6 +52,8 @@
 int Abstract_VM_Version::_vm_minor_version = 0;
 int Abstract_VM_Version::_vm_build_number = 0;
 bool Abstract_VM_Version::_initialized = false;
+int Abstract_VM_Version::_parallel_worker_threads = 0;
+bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
 
 void Abstract_VM_Version::initialize() {
   if (_initialized) {
@@ -210,3 +212,43 @@
   }
 #endif
 }
+
+unsigned int Abstract_VM_Version::nof_parallel_worker_threads(
+                                                      unsigned int num,
+                                                      unsigned int den,
+                                                      unsigned int switch_pt) {
+  if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
+    assert(ParallelGCThreads == 0, "Default ParallelGCThreads is not 0");
+    // For very large machines, there are diminishing returns
+    // for large numbers of worker threads.  Instead of
+    // hogging the whole system, use a fraction of the workers for every
+    // processor after the first 8.  For example, on a 72 cpu machine
+    // and a chosen fraction of 5/8
+    // use 8 + (72 - 8) * (5/8) == 48 worker threads.
+    unsigned int ncpus = (unsigned int) os::active_processor_count();
+    return (ncpus <= switch_pt) ?
+           ncpus :
+          (switch_pt + ((ncpus - switch_pt) * num) / den);
+  } else {
+    return ParallelGCThreads;
+  }
+}
+
+unsigned int Abstract_VM_Version::calc_parallel_worker_threads() {
+  return nof_parallel_worker_threads(5, 8, 8);
+}
+
+
+// Does not set the _initialized flag since it is
+// a global flag.
+unsigned int Abstract_VM_Version::parallel_worker_threads() {
+  if (!_parallel_worker_threads_initialized) {
+    if (FLAG_IS_DEFAULT(ParallelGCThreads)) {
+      _parallel_worker_threads = VM_Version::calc_parallel_worker_threads();
+    } else {
+      _parallel_worker_threads = ParallelGCThreads;
+    }
+    _parallel_worker_threads_initialized = true;
+  }
+  return _parallel_worker_threads;
+}
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Sun May 04 07:05:42 2008 -0700
@@ -36,6 +36,12 @@
   static int          _vm_minor_version;
   static int          _vm_build_number;
   static bool         _initialized;
+  static int          _parallel_worker_threads;
+  static bool         _parallel_worker_threads_initialized;
+
+  static unsigned int nof_parallel_worker_threads(unsigned int num,
+                                                  unsigned int dem,
+                                                  unsigned int switch_pt);
  public:
   static void initialize();
 
@@ -69,4 +75,13 @@
   // subclasses should define new versions to hide this one as needed.  Note
   // that the O/S may support more sizes, but at most this many are used.
   static uint page_size_count() { return 2; }
+
+  // Returns the number of parallel threads to be used for VM
+  // work.  If that number has not been calculated, do so and
+  // save it.  Returns ParallelGCThreads if it is set on the
+  // command line.
+  static unsigned int parallel_worker_threads();
+  // Calculates and returns the number of parallel threads.  May
+  // be VM version specific.
+  static unsigned int calc_parallel_worker_threads();
 };
--- a/hotspot/src/share/vm/services/heapDumper.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/services/heapDumper.cpp	Sun May 04 07:05:42 2008 -0700
@@ -997,7 +997,7 @@
   }
 
   // If the byte ordering is big endian then we can copy most types directly
-  int length_in_bytes = array->length() * type2aelembytes[type];
+  int length_in_bytes = array->length() * type2aelembytes(type);
   assert(length_in_bytes > 0, "nothing to copy");
 
   switch (type) {
--- a/hotspot/src/share/vm/utilities/globalDefinitions.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.cpp	Sun May 04 07:05:42 2008 -0700
@@ -214,7 +214,7 @@
 };
 
 
-int type2aelembytes[T_CONFLICT+1] = {
+int _type2aelembytes[T_CONFLICT+1] = {
   0,                      // 0
   0,                      // 1
   0,                      // 2
@@ -230,10 +230,16 @@
   T_OBJECT_aelem_bytes,   // T_OBJECT   = 12,
   T_ARRAY_aelem_bytes,    // T_ARRAY    = 13,
   0,                      // T_VOID     = 14,
-  T_INT_aelem_bytes,      // T_ADDRESS  = 15,
+  T_OBJECT_aelem_bytes,   // T_ADDRESS  = 15,
   0                       // T_CONFLICT = 16,
 };
 
+#ifdef ASSERT
+int type2aelembytes(BasicType t, bool allow_address) {
+  assert(allow_address || t != T_ADDRESS, " ");
+  return _type2aelembytes[t];
+}
+#endif
 
 // Support for 64-bit integer arithmetic
 
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Sun May 04 07:05:42 2008 -0700
@@ -392,6 +392,10 @@
   T_ILLEGAL  = 99
 };
 
+inline bool is_java_primitive(BasicType t) {
+  return T_BOOLEAN <= t && t <= T_LONG;
+}
+
 // Convert a char from a classfile signature to a BasicType
 inline BasicType char2type(char c) {
   switch( c ) {
@@ -464,7 +468,12 @@
   T_VOID_aelem_bytes    = 0
 };
 
-extern int type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element
+extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element
+#ifdef ASSERT
+extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts
+#else
+inline int type2aelembytes(BasicType t) { return _type2aelembytes[t]; }
+#endif
 
 
 // JavaValue serves as a container for arbitrary Java values.
--- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Sun May 04 07:05:42 2008 -0700
@@ -37,23 +37,45 @@
 # include <stdlib.h>
 # include <wchar.h>
 # include <stdarg.h>
+#ifdef SOLARIS
 # include <ieeefp.h>
+#endif
 # include <math.h>
+#ifdef LINUX
+#ifndef FP_PZERO
+  // Linux doesn't have positive/negative zero
+  #define FP_PZERO FP_ZERO
+#endif
+#ifndef fpclass
+  #define fpclass fpclassify
+#endif
+#endif
 # include <time.h>
 # include <fcntl.h>
 # include <dlfcn.h>
 # include <pthread.h>
+#ifdef SOLARIS
 # include <thread.h>
+#endif
 # include <limits.h>
 # include <errno.h>
+#ifdef SOLARIS
 # include <sys/trap.h>
 # include <sys/regset.h>
 # include <sys/procset.h>
 # include <ucontext.h>
 # include <setjmp.h>
+#endif
 # ifdef SOLARIS_MUTATOR_LIBTHREAD
 # include <sys/procfs.h>
 # endif
+#ifdef LINUX
+# include <inttypes.h>
+# include <signal.h>
+# include <ucontext.h>
+# include <sys/time.h>
+#endif
+
 
 // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures
 // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in
@@ -68,6 +90,11 @@
 // pointer when it extracts the argument, then we have a problem.
 //
 // Solution: For 64-bit architectures, redefine NULL as 64-bit constant 0.
+//
+// Note: this fix doesn't work well on Linux because NULL will be overwritten
+// whenever a system header file is included. Linux handles NULL correctly
+// through a special type '__null'.
+#ifdef SOLARIS
 #ifdef _LP64
 #undef NULL
 #define NULL 0L
@@ -76,13 +103,25 @@
 #define NULL 0
 #endif
 #endif
+#endif
 
 // NULL vs NULL_WORD:
 // On Linux NULL is defined as a special type '__null'. Assigning __null to
 // integer variable will cause gcc warning. Use NULL_WORD in places where a
-// pointer is stored as integer value.
-#define NULL_WORD NULL
+// pointer is stored as integer value. On some platforms, sizeof(intptr_t) >
+// sizeof(void*), so here we want something which is integer type, but has the
+// same size as a pointer.
+#ifdef LINUX
+  #ifdef _LP64
+    #define NULL_WORD  0L
+  #else
+    #define NULL_WORD  0
+  #endif
+#else
+  #define NULL_WORD  NULL
+#endif
 
+#ifndef LINUX
 // Compiler-specific primitive types
 typedef unsigned short     uint16_t;
 #ifndef _UINT32_T
@@ -100,6 +139,7 @@
 // If this gets an error, figure out a symbol XXX that implies the
 // prior definition of intptr_t, and add "&& !defined(XXX)" above.
 #endif
+#endif
 
 // Additional Java basic types
 
@@ -128,7 +168,7 @@
 const jlong min_jlong = CONST64(0x8000000000000000);
 const jlong max_jlong = CONST64(0x7fffffffffffffff);
 
-
+#ifdef SOLARIS
 //----------------------------------------------------------------------------------------------------
 // ANSI C++ fixes
 // NOTE:In the ANSI committee's continuing attempt to make each version
@@ -162,7 +202,7 @@
    typedef int (*int_fnP_cond_tP_i_vP)(cond_t *cv, int scope, void *arg);
    typedef int (*int_fnP_cond_tP)(cond_t *cv);
 };
-
+#endif
 
 //----------------------------------------------------------------------------------------------------
 // Debugging
@@ -173,7 +213,7 @@
 #define BREAKPOINT ::breakpoint()
 
 // checking for nanness
-
+#ifdef SOLARIS
 #ifdef SPARC
 inline int g_isnan(float  f) { return isnanf(f); }
 #else
@@ -182,6 +222,12 @@
 #endif
 
 inline int g_isnan(double f) { return isnand(f); }
+#elif LINUX
+inline int g_isnan(float  f) { return isnanf(f); }
+inline int g_isnan(double f) { return isnan(f); }
+#else
+#error "missing platform-specific definition here"
+#endif
 
 // Checking for finiteness
 
@@ -195,9 +241,11 @@
 
 
 // Misc
+// NOTE: This one leads to an infinite recursion on Linux
+#ifndef LINUX
 int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr);
 #define vsnprintf local_vsnprintf
-
+#endif
 
 // Portability macros
 #define PRAGMA_INTERFACE
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Sun May 04 07:05:42 2008 -0700
@@ -829,7 +829,7 @@
   server.sin_port = htons(port);
 
   server.sin_addr.s_addr = inet_addr(ip);
-  if (server.sin_addr.s_addr == (unsigned long)-1) {
+  if (server.sin_addr.s_addr == (uint32_t)-1) {
 #ifdef _WINDOWS
     struct hostent* host = hpi::get_host_by_name((char*)ip);
 #else
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Wed Apr 23 14:35:26 2008 +0400
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Sun May 04 07:05:42 2008 -0700
@@ -170,7 +170,8 @@
   out->print_raw_cr(Arguments::java_vendor_url_bug());
   // If the crash is in native code, encourage user to submit a bug to the
   // provider of that code.
-  if (thread && thread->is_Java_thread()) {
+  if (thread && thread->is_Java_thread() &&
+      !thread->is_hidden_from_external_view()) {
     JavaThread* jt = (JavaThread*)thread;
     if (jt->thread_state() == _thread_in_native) {
       out->print_cr("# The crash happened outside the Java Virtual Machine in native code.\n# See problematic frame for where to report the bug.");
@@ -249,10 +250,10 @@
 
   BEGIN
 
-  STEP(10, "(printing unexpected error message)")
+  STEP(10, "(printing fatal error message)")
 
      st->print_cr("#");
-     st->print_cr("# An unexpected error has been detected by Java Runtime Environment:");
+     st->print_cr("# A fatal error has been detected by the Java Runtime Environment:");
 
   STEP(15, "(printing type of error)")
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6659207/Test.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+/*
+ * @test
+ * @bug 6659207
+ * @summary access violation in CompilerThread0
+ */
+
+public class Test {
+    static int[] array = new int[12];
+
+    static int index(int i) {
+        if (i == 0) return 0;
+        for (int n = 0; n < array.length; n++)
+            if (i < array[n]) return n;
+        return -1;
+    }
+
+    static int test(int i) {
+        int result = 0;
+        i = index(i);
+        if (i >= 0)
+            if (array[i] != 0)
+                result++;
+
+        if (i != -1)
+            array[i]++;
+
+        return result;
+    }
+
+    public static void main(String[] args) {
+        int total = 0;
+        for (int i = 0; i < 100000; i++) {
+            total += test(10);
+        }
+        System.out.println(total);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6661247/Test.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+/*
+ * @test
+ * @bug 6661247
+ * @summary Internal bug in 32-bit HotSpot optimizer while bit manipulations
+ */
+
+import java.util.Random;
+import java.nio.*;
+
+// This isn't a completely reliable test for 6661247 since the results
+// depend on what the local schedule looks like but it does reproduce
+// the issue in current builds.
+
+public class Test {
+
+    public static void test(boolean[] src, int srcPos, LongBuffer dest, long destPos, int count) {
+        int countStart = (destPos & 63) == 0 ? 0 : 64 - (int)(destPos & 63);
+        if (countStart > count)
+            countStart = count;
+        for (int srcPosMax = srcPos + countStart; srcPos < srcPosMax; srcPos++, destPos++) {
+            if (src[srcPos])
+                dest.put((int)(destPos >>> 6), dest.get((int)(destPos >>> 6)) | 1L << (destPos & 63));
+            else
+                dest.put((int)(destPos >>> 6), dest.get((int)(destPos >>> 6)) & ~(1L << (destPos & 63)));
+        }
+        count -= countStart;
+        int cnt = count >>> 6;
+        for (int k = (int)(destPos >>> 6), kMax = k + cnt; k < kMax; k++) {
+            int low = (src[srcPos] ? 1 : 0)
+                | (src[srcPos + 1] ? 1 << 1 : 0)
+                | (src[srcPos + 2] ? 1 << 2 : 0)
+                | (src[srcPos + 3] ? 1 << 3 : 0)
+                | (src[srcPos + 4] ? 1 << 4 : 0)
+                | (src[srcPos + 5] ? 1 << 5 : 0)
+                | (src[srcPos + 6] ? 1 << 6 : 0)
+                | (src[srcPos + 7] ? 1 << 7 : 0)
+                | (src[srcPos + 8] ? 1 << 8 : 0)
+                | (src[srcPos + 9] ? 1 << 9 : 0)
+                | (src[srcPos + 10] ? 1 << 10 : 0)
+                | (src[srcPos + 11] ? 1 << 11 : 0)
+                | (src[srcPos + 12] ? 1 << 12 : 0)
+                | (src[srcPos + 13] ? 1 << 13 : 0)
+                | (src[srcPos + 14] ? 1 << 14 : 0)
+                | (src[srcPos + 15] ? 1 << 15 : 0)
+                | (src[srcPos + 16] ? 1 << 16 : 0)
+                | (src[srcPos + 17] ? 1 << 17 : 0)
+                | (src[srcPos + 18] ? 1 << 18 : 0)
+                | (src[srcPos + 19] ? 1 << 19 : 0)
+                | (src[srcPos + 20] ? 1 << 20 : 0)
+                | (src[srcPos + 21] ? 1 << 21 : 0)
+                | (src[srcPos + 22] ? 1 << 22 : 0)
+                | (src[srcPos + 23] ? 1 << 23 : 0)
+                | (src[srcPos + 24] ? 1 << 24 : 0)
+                | (src[srcPos + 25] ? 1 << 25 : 0)
+                | (src[srcPos + 26] ? 1 << 26 : 0)
+                | (src[srcPos + 27] ? 1 << 27 : 0)
+                | (src[srcPos + 28] ? 1 << 28 : 0)
+                | (src[srcPos + 29] ? 1 << 29 : 0)
+                | (src[srcPos + 30] ? 1 << 30 : 0)
+                | (src[srcPos + 31] ? 1 << 31 : 0)
+                ;
+            srcPos += 32;
+            int high = (src[srcPos] ? 1 : 0)        // PROBLEM!
+                | (src[srcPos + 1] ? 1 << 1 : 0)
+                | (src[srcPos + 2] ? 1 << 2 : 0)
+                | (src[srcPos + 3] ? 1 << 3 : 0)
+                | (src[srcPos + 4] ? 1 << 4 : 0)
+                | (src[srcPos + 5] ? 1 << 5 : 0)
+                | (src[srcPos + 6] ? 1 << 6 : 0)
+                | (src[srcPos + 7] ? 1 << 7 : 0)
+                | (src[srcPos + 8] ? 1 << 8 : 0)
+                | (src[srcPos + 9] ? 1 << 9 : 0)
+                | (src[srcPos + 10] ? 1 << 10 : 0)
+                | (src[srcPos + 11] ? 1 << 11 : 0)
+                | (src[srcPos + 12] ? 1 << 12 : 0)
+                | (src[srcPos + 13] ? 1 << 13 : 0)
+                | (src[srcPos + 14] ? 1 << 14 : 0)
+                | (src[srcPos + 15] ? 1 << 15 : 0)
+                | (src[srcPos + 16] ? 1 << 16 : 0)
+                | (src[srcPos + 17] ? 1 << 17 : 0)
+                | (src[srcPos + 18] ? 1 << 18 : 0)
+                | (src[srcPos + 19] ? 1 << 19 : 0)
+                | (src[srcPos + 20] ? 1 << 20 : 0)
+                | (src[srcPos + 21] ? 1 << 21 : 0)
+                | (src[srcPos + 22] ? 1 << 22 : 0)
+                | (src[srcPos + 23] ? 1 << 23 : 0)
+                | (src[srcPos + 24] ? 1 << 24 : 0)
+                | (src[srcPos + 25] ? 1 << 25 : 0)
+                | (src[srcPos + 26] ? 1 << 26 : 0)
+                | (src[srcPos + 27] ? 1 << 27 : 0)
+                | (src[srcPos + 28] ? 1 << 28 : 0)
+                | (src[srcPos + 29] ? 1 << 29 : 0)
+                | (src[srcPos + 30] ? 1 << 30 : 0)
+                | (src[srcPos + 31] ? 1 << 31 : 0)
+                ;
+            srcPos += 32;
+            dest.put(k, ((long)low & 0xFFFFFFFFL) | (((long)high) << 32));
+            destPos += 64;
+        }
+        int countFinish = count & 63;
+        for (int srcPosMax = srcPos + countFinish; srcPos < srcPosMax; srcPos++, destPos++) {
+            if (src[srcPos])
+                dest.put((int)(destPos >>> 6), dest.get((int)(destPos >>> 6)) | 1L << (destPos & 63));
+            else
+                dest.put((int)(destPos >>> 6), dest.get((int)(destPos >>> 6)) & ~(1L << (destPos & 63)));
+        }
+    }
+    public static void main(String[] args) {
+        Random r = new Random();
+        int entries = 1000;
+        boolean[] src = new boolean[entries * 64];
+        long[] dest = new long[entries];
+        long[] result = new long[entries];
+
+        for (int c = 0; c < 2000; c++) {
+            for (int i = 0; i < entries; i++) {
+                long l = r.nextLong();
+                for (int bit = 0; bit < 64; bit++) {
+                    src[i * 64 + bit] = (l & (1L << bit)) != 0;
+                }
+                dest[i] = 0;
+                result[i] = l;
+            }
+            test(src, 0, LongBuffer.wrap(dest, 0, dest.length), 0, src.length);
+            for (int i = 0; i < entries; i++) {
+                if (dest[i] != result[i]) {
+                    throw new InternalError(i + ": " + Long.toHexString(dest[i]) + " != " + Long.toHexString(result[i]));
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/6663621/IVTest.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+/**
+ * @test
+ * @bug 6663621
+ * @summary JVM crashes while trying to execute api/java_security/Signature/SignatureTests.html#initSign tests.
+ */
+
+public class IVTest {
+    static int paddedSize;
+
+    static void padV15(byte[] padded) {
+        int psSize = padded.length;
+        int k = 0;
+        while (psSize-- > 0) {
+            padded[k++] = (byte)0xff;
+        }
+    }
+
+    static void padV15_2(int paddedSize) {
+        byte[] padded = new byte[paddedSize];
+        int psSize = padded.length;
+        int k = 0;
+        while (psSize-- > 0) {
+            padded[k++] = (byte)0xff;
+        }
+    }
+
+    static void padV15_3() {
+        byte[] padded = new byte[paddedSize];
+        int psSize = padded.length;
+        int k = 0;
+        while (psSize-- > 0) {
+            padded[k++] = (byte)0xff;
+        }
+    }
+
+    static void padV15_4() {
+        byte[] padded = new byte[paddedSize];
+        int psSize = padded.length;
+        for (int k = 0;psSize > 0; psSize--) {
+            int i = padded.length - psSize;
+            padded[i] = (byte)0xff;
+        }
+    }
+
+    static void padV15_5() {
+        byte[] padded = new byte[paddedSize];
+        int psSize = padded.length;
+        int k = psSize - 1;
+        for (int i = 0; i < psSize; i++) {
+            padded[k--] = (byte)0xff;
+        }
+    }
+
+    public static void main(String argv[]) {
+        int bounds = 1024;
+        int lim = 500000;
+        long start = System.currentTimeMillis();
+        for (int j = 0; j < lim; j++) {
+            paddedSize = j % bounds;
+            padV15(new byte[paddedSize]);
+        }
+        long end = System.currentTimeMillis();
+        System.out.println(end - start);
+        start = System.currentTimeMillis();
+        for (int j = 0; j < lim; j++) {
+            paddedSize = j % bounds;
+            padV15_2(paddedSize);
+        }
+        end = System.currentTimeMillis();
+        System.out.println(end - start);
+        start = System.currentTimeMillis();
+        for (int j = 0; j < lim; j++) {
+            paddedSize = j % bounds;
+            padV15_3();
+        }
+        end = System.currentTimeMillis();
+        System.out.println(end - start);
+        start = System.currentTimeMillis();
+        for (int j = 0; j < lim; j++) {
+            paddedSize = j % bounds;
+            padV15_4();
+        }
+        end = System.currentTimeMillis();
+        System.out.println(end - start);
+        start = System.currentTimeMillis();
+        for (int j = 0; j < lim; j++) {
+            paddedSize = j % bounds;
+            padV15_5();
+        }
+        end = System.currentTimeMillis();
+        System.out.println(end - start);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+6ce5f4757bde08f7470cbb9f0b46da8f2f3d4f56 jdk7-b24
+a3b3ba7d6034dc754b51ddc3d281399ac1cae5f1 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/jaxp/make/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jaxp/make/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -90,7 +90,6 @@
 else
   OUTPUTDIR = ..
 endif
-ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
 
 ifdef ALT_LANGTOOLS_DIST
   ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
@@ -127,7 +126,11 @@
 	$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
 
 # Targets for Sun's internal JPRT build system
+JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
 jprt_build_product jprt_build_debug jprt_build_fastdebug: all
+	$(RM) $(JPRT_ARCHIVE_BUNDLE)
+	( cd $(OUTPUTDIR)/dist && \
+	  zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 # Declare these phony (not filenames)
 .PHONY: $(ANT_TARGETS) all clobber \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+0961a4a211765fea071b8dac419003ee0c3d5973 jdk7-b24
+59fd8224ba2da5c2d8d4c68e33cf33ab41ce8de0 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/jaxws/make/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jaxws/make/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -69,7 +69,7 @@
   endif
 endif
 
-# Note: j2se/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
+# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
 # and the somewhat misnamed CLASS_VERSION (-target NN)
 ifdef TARGET_CLASS_VERSION
   ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
@@ -90,7 +90,6 @@
 else
   OUTPUTDIR = ..
 endif
-ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
 
 ifdef ALT_LANGTOOLS_DIST
   ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
@@ -127,7 +126,11 @@
 	$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
 
 # Targets for Sun's internal JPRT build system
+JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
 jprt_build_product jprt_build_debug jprt_build_fastdebug: all
+	$(RM) $(JPRT_ARCHIVE_BUNDLE)
+	( cd $(OUTPUTDIR)/dist && \
+	   zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
 
 # Declare these phony (not filenames)
 .PHONY: $(ANT_TARGETS) all clobber \
--- a/jdk/.hgtags	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -1,1 +1,3 @@
 37a05a11f281b4d238e2f9e7ebb67c63f64d0e77 jdk7-b24
+75fca0b0ab83ab1392e615910cea020f66535390 jdk7-b25
+fb57027902e04ecafceae31a605e69b436c23d57 jdk7-b26
--- a/jdk/make/com/sun/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/com/sun/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -41,7 +41,7 @@
 # Omit mirror since it's built with the apt tool.
 SUBDIRS = $(SCRIPT_SUBDIR) image security crypto/provider jndi jmx \
     java inputmethods org xml rowset net/httpserver net/ssl demo \
-    tools jarsigner
+    tools jarsigner tracing
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/jdk/make/com/sun/crypto/provider/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/com/sun/crypto/provider/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2008 Sun Microsystems, Inc.  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
@@ -87,8 +87,7 @@
 #     sign			Alias for sign-jar
 #	  sign-jar		Builds/signs sunjce_provider.jar (no install)
 #
-#     obfus			Builds/obfuscates/signs/installs
-#				sunjce_provider.jar
+#     obfus			Builds/obfuscates/signs sunjce_provider.jar
 #
 #     release			Builds all targets in preparation
 #				for workspace integration.
@@ -101,8 +100,25 @@
 BUILDDIR = ../../../..
 PACKAGE = com.sun.crypto.provider
 PRODUCT = sun
+
+#
+# The following is for when we need to do postprocessing
+# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
+# isn't writable, the build currently crashes out.
+#
+ifndef OPENJDK
+  ifdef ALT_JCE_BUILD_DIR
+    # =====================================================
+    # Where to place the output, in case we're building from a read-only
+    # build area.  (e.g. a release engineering build.)
+    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
+    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
+  else
+    JCE_BUILD_DIR=${TEMPDIR}
+  endif
+endif
+
 include $(BUILDDIR)/common/Defs.gmk
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
 
 #
 # Location for the newly built classfiles.
@@ -147,6 +163,8 @@
 #
 UNSIGNED_DIR = $(TEMPDIR)/unsigned
 
+include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
+
 
 # =====================================================
 # Build the unsigned sunjce_provider.jar file.
@@ -184,44 +202,66 @@
 # Sign the provider jar file.  Not needed for OpenJDK.
 #
 
-SIGNED_DIR = $(TEMPDIR)/signed
+SIGNED_DIR = $(JCE_BUILD_DIR)/signed
 
 sign: sign-jar
 
 sign-jar: $(SIGNED_DIR)/sunjce_provider.jar
 
+ifndef ALT_JCE_BUILD_DIR
 $(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar
-	$(sign-file)
+else
+#
+# We have to remove the build dependency, otherwise, we'll try to rebuild it
+# which we can't do on a read-only filesystem.
+#
+$(SIGNED_DIR)/sunjce_provider.jar:
+	@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \
+	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \
+	    exit 1; \
+	fi
+endif
+	$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
 
 # =====================================================
 # Obfuscate/sign/install the JDK build.  Not needed for OpenJDK.
 #
 
-OBFUS_DIR = $(TEMPDIR)/obfus
+OBFUS_DIR = $(JCE_BUILD_DIR)/obfus/sunjce
 
 CLOSED_DIR = $(BUILDDIR)/closed/com/sun/crypto/provider
 
 obfus: $(OBFUS_DIR)/sunjce_provider.jar
 	$(release-warning)
 
-$(OBFUS_DIR)/sunjce_provider.jar: build-jar $(JCE_MANIFEST_FILE)
+ifndef ALT_JCE_BUILD_DIR
+$(OBFUS_DIR)/sunjce_provider.jar: build-jar $(JCE_MANIFEST_FILE) \
+	    $(OBFUS_DIR)/sunjce.dox
+else
+$(OBFUS_DIR)/sunjce_provider.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/sunjce.dox
+	@if [ ! -d $(CLASSDESTDIR) ] ; then \
+	    $(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
+	    exit 1; \
+	fi
+endif
+	@$(ECHO) ">>>Obfuscating SunJCE Provider..."
 	$(presign)
 	$(preobfus)
-	@$(ECHO) ">>>Obfuscating Sun JCE Provider..."
 	$(prep-target)
 	$(CD) $(OBFUS_DIR); \
-	$(OBFUSCATOR) -fv \
-	    $(CURRENT_DIRECTORY)/$(CLOSED_DIR)/obfus/sunjce.dox
+	$(OBFUSCATOR) -fv sunjce.dox
 	@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
 	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ \
 	    -C $(OBFUS_DIR)/build com \
 	    $(JAR_JFLAGS)
 	$(sign-target)
-	$(MKDIR) -p $(dir $(JAR_DESTFILE))
-	$(RM) $(JAR_DESTFILE)
-	$(CP) $@ $(JAR_DESTFILE)
 	@$(java-vm-cleanup)
 
+$(OBFUS_DIR)/sunjce.dox: $(CLOSED_DIR)/obfus/sunjce.dox
+	@$(ECHO) ">>>Creating sunjce.dox"
+	$(prep-target)
+	$(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
+
 #
 # The current obfuscator has a limitation in that it currently only
 # supports up to v49 class file format.  Force v49 classfiles in our
@@ -235,9 +275,9 @@
 #
 
 release: $(OBFUS_DIR)/sunjce_provider.jar
-	$(RM) $(RELEASE_DIR)/sunjce_provider.jar
-	$(MKDIR) -p $(RELEASE_DIR)
-	$(CP) $(OBFUS_DIR)/sunjce_provider.jar $(RELEASE_DIR)
+	$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
+	$(MKDIR) -p $(JCE_BUILD_DIR)/release
+	$(CP) $(OBFUS_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
 	$(release-warning)
 
 endif # OPENJDK
@@ -275,7 +315,7 @@
 #
 
 clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR)
+	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
 
 .PHONY: build-jar jar install-jar
 ifndef OPENJDK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/com/sun/tracing/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,26 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+#
+
+#
+# Makefile for building tracing classes
+#
+
+BUILDDIR = ../../..
+PACKAGE = com.sun.tracing
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = dtrace 
+all build:
+	$(SUBDIRS-loop)
+clean clobber::
+	$(SUBDIRS-loop)
+
+AUTO_FILES_JAVA_DIRS = com/sun/tracing
+
+#
+# Rules.
+#
+include $(BUILDDIR)/common/Classes.gmk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/com/sun/tracing/dtrace/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,19 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+#
+
+#
+# Makefile for building dtrace extension
+#
+BUILDDIR = ../../../..
+PACKAGE = com.sun.tracing.dtrace
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+AUTO_FILES_JAVA_DIRS = com/sun/tracing/dtrace
+
+#
+# Rules.
+#
+include $(BUILDDIR)/common/Classes.gmk
--- a/jdk/make/common/Defs.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/Defs.gmk	Sun May 04 07:05:42 2008 -0700
@@ -32,6 +32,13 @@
 #          So when it includes other files, it must use JDK_TOPDIR.
 #
 
+# Check for strange explicit settings (change to empty or true)
+ifdef OPENJDK
+  ifneq ($(OPENJDK),true)
+    x:=$(error "OPENJDK (if defined) can only be set to true")
+  endif
+endif
+
 #
 # On Solaris, the 'make' utility from Sun will not work with these makefiles.
 #    This little rule is only understood by Sun's make, and is harmless
@@ -87,19 +94,6 @@
   OPENJDK = true
 endif
 
-# Check for strange explicit settings (change to empty or true)
-ifdef OPENJDK
-  ifeq ($(OPENJDK),false)
-    # Silently treat as not defined
-    OPENJDK =
-  else
-    ifneq ($(OPENJDK),true)
-      dummy := $(warning "WARNING: OPENKJDK=$(OPENJDK) being treated as true")
-      OPENJDK = true
-    endif
-  endif
-endif
-
 # Define where closed directories are
 ifdef OPENJDK
   CLOSED_SRC =
@@ -309,6 +303,8 @@
 # for build tool jar files
 BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
 ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
+# for generated tool class files
+BUILDTOOLBINDIR     = $(OUTPUTDIR)/btbins
 # for generated java source files
 GENSRCDIR           = $(OUTPUTDIR)/gensrc
 # for generated C source files (not javah)
--- a/jdk/make/common/Rules.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/Rules.gmk	Sun May 04 07:05:42 2008 -0700
@@ -231,12 +231,14 @@
 
 .compile.classlist : $(JAVA_SOURCE_LIST)
 	@$(MKDIR) -p $(CLASSDESTDIR)
-	@if [ `$(CAT) $(JAVA_SOURCE_LIST) | $(WC) -l` -ge 1 ] ; then \
-	  $(ECHO) "# Java sources to be compiled: (listed in file $(JAVA_SOURCE_LIST))"; \
-	  $(CAT) $(JAVA_SOURCE_LIST); \
+	@$(RM) $<.filtered
+	@$(CAT) $< | $(NAWK) 'length>0' | $(SORT) -u > $<.filtered
+	@if [ `$(CAT) $<.filtered | $(WC) -l` -ge 1 ] ; then \
+	  $(ECHO) "# Java sources to be compiled: (listed in file $<)"; \
+	  $(CAT) $<.filtered; \
 	  $(ECHO) "# Running javac:"; \
-	  $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
-	  $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$(JAVA_SOURCE_LIST); \
+	  $(ECHO) $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
+	  $(JAVAC_CMD) -sourcepath "$(SOURCEPATH)" -d $(CLASSDESTDIR) @$<.filtered; \
 	fi
 	@$(java-vm-cleanup)
 
--- a/jdk/make/common/shared/Compiler-gcc.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Compiler-gcc.gmk	Sun May 04 07:05:42 2008 -0700
@@ -45,10 +45,8 @@
   NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
   ifeq ($(ARCH_DATA_MODEL), 32)
     CC_VER  = UNKNOWN
-    CC_TYPE = UNKNOWN
   else
     CC_VER  = UNKNOWN
-    CC_TYPE = UNKNOWN
   endif
   _LINK_VER :=$(shell $(LINK) 2>&1 | $(HEAD) -n 1)
   LINK_VER  :=$(call GetVersion,"$(_LINK_VER)")
--- a/jdk/make/common/shared/Compiler-msvc.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Compiler-msvc.gmk	Sun May 04 07:05:42 2008 -0700
@@ -47,13 +47,13 @@
   # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake
   NMAKE          = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo
 
+  # Compiler version and type (Always get word after "Version")
+  CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(SED) 's/.*\(Version.*\)/\1/' | $(NAWK) '{print $$2}')
+  
   # SDK-64 and MSVC6 put REBASE.EXE in a different places - go figure...
   ifeq ($(ARCH_DATA_MODEL), 32)
-    CC_VER  := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$8}')
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
-    REQUIRED_CCTYPE = Optimizing
     REQUIRED_CC_VER = 13.10.3077
     REQUIRED_LINK_VER = 7.10.3077
     ifeq ($(CC_MAJORVER), 12)
@@ -85,9 +85,7 @@
       endif
     endif
   else
-    CC_VER := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$7}')
     LINK_VER := $(shell $(LINK) | $(HEAD) -n 1 | $(NAWK) '{print $$6}')
-    CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$4}')
     CC_MAJORVER :=$(call MajorVersion,$(CC_VER))
     CC_MINORVER :=$(call MinorVersion,$(CC_VER))
     CC_MICROVER :=$(call MicroVersion,$(CC_VER))
--- a/jdk/make/common/shared/Defs-control.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Defs-control.gmk	Sun May 04 07:05:42 2008 -0700
@@ -69,9 +69,8 @@
 # Get shared platform settings
 include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
 
-# Default output directory
+# Default directory immediately above the "build" output directory (OUTPUTDIR)
 BUILD_PARENT_DIRECTORY=$(TOPDIR)
-_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
 
 # Get platform specific settings
 include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
--- a/jdk/make/common/shared/Defs-utils.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Defs-utils.gmk	Sun May 04 07:05:42 2008 -0700
@@ -67,16 +67,6 @@
   UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
 endif
 
-# Utilities ant and findbugs
-ifndef ANT_HOME
-  ANT_HOME = $(JDK_DEVTOOLS_DIR)/share/ant/latest
-endif
-ANT = $(ANT_HOME)/bin/ant
-ifndef FINDBUGS_HOME
-  FINDBUGS_HOME = $(JDK_DEVTOOLS_DIR)/share/findbugs/latest
-endif
-FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs
-
 # Utilities
 ADB            = $(UTILS_COMMAND_PATH)adb
 AR             = $(UTILS_CCS_BIN_PATH)ar
--- a/jdk/make/common/shared/Defs.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Defs.gmk	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc.  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
@@ -265,7 +265,9 @@
   FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
 else
   BUILD_NUMBER = b00
-  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
+  BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
+  CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
+  USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
   FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
 endif
 
@@ -449,11 +451,20 @@
 # Check for spaces and null value
 OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
 OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
+
+#
+# When signing the JCE framework and provider, we could be using built
+# bits on a read-only filesystem.  If so, this test will fail and crash
+# the build.
+#
+ifndef IGNORE_WRITABLE_OUTPUTDIR_TEST
 # Create the output directory and make sure it exists and is writable
 _create_outputdir:=$(shell $(MKDIR) -p "$(OUTPUTDIR)" > $(DEV_NULL) 2>&1)
 ifeq ($(call WriteDirExists,$(OUTPUTDIR),/dev/null),/dev/null)
   _outputdir_error:=$(error "ERROR: OUTPUTDIR '$(OUTPUTDIR)' not created or not writable")
 endif
+endif
+
 # Define absolute path if needed and check for spaces and null value
 ifndef ABS_OUTPUTDIR
   ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
@@ -503,6 +514,24 @@
   endif
 endif
 
+# Utilities ant and findbugs
+ifeq ($(ANT_HOME),)
+  ANT_HOME := $(call DirExists,/usr/share/ant,$(JDK_DEVTOOLS_DIR)/share/ant/latest,)
+endif
+ifeq ($(ANT_HOME),)
+  ANT = ant
+else
+  ANT = $(ANT_HOME)/bin/ant
+endif
+ifeq ($(FINDBUGS_HOME),)
+  FINDBUGS_HOME := $(call DirExists,/usr/share/findbugs,$(JDK_DEVTOOLS_DIR)/share/findbugs/latest,)
+endif
+ifeq ($(FINDBUGS_HOME),)
+  FINDBUGS = findbugs
+else
+  FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs
+endif
+
 ifdef ALT_COPYRIGHT_YEAR
   COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
 else
--- a/jdk/make/common/shared/Platform.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Platform.gmk	Sun May 04 07:05:42 2008 -0700
@@ -270,7 +270,7 @@
     REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
   endif
   # How much RAM does this machine have:
-  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
+  MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
 endif
 
 # Windows with and without CYGWIN will be slightly different
@@ -374,45 +374,35 @@
   REQUIRED_DXSDK_VER = 0x0700
   OS_VENDOR = Microsoft
   # How much RAM does this machine have:
-  MB_OF_MEMORY := $(shell \
-    if [ -f "C:/cygwin/bin/free.exe" ] ; then \
-      ( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
-	grep Mem: | \
-	sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
-    else \
-      echo "512"; \
-    fi)
-endif
-
-# Machines with 512Mb or less of real memory are considered low memory
-#    build machines and adjustments will be made to prevent excessing
-#    system swapping during the build.
-#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
-#    Don't set VM max over 1024-128=896.
-ifneq ($(MB_OF_MEMORY),)
-  LOW_MEMORY_MACHINE := $(shell \
-    if [ $(MB_OF_MEMORY) -le 512 ] ; then \
-      echo "true"; \
-    else \
-      echo "false"; \
-    fi)
-  MAX_VM_MEMORY := $(shell \
-    if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
-      expr $(MB_OF_MEMORY) '-' 128 ; \
-    else \
-      echo "896"; \
-    fi)
-  MIN_VM_MEMORY := $(shell \
-    if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
-      expr $(MAX_VM_MEMORY) '-' 8 ; \
-    else \
-      echo "128"; \
-    fi)
-else
-  MB_OF_MEMORY       := unknown
-  LOW_MEMORY_MACHINE := true
-  MAX_VM_MEMORY      := 384
-  MIN_VM_MEMORY      := 128
+  ifeq ($(USING_CYGWIN),true)
+    # CYGWIN has the 'free' utility
+    _MB_OF_MEMORY := \
+	 $(shell free -m | grep Mem: | awk '{print $$2;}' )
+  else
+    # Windows 2000 has the mem utility, but two memory areas
+    #    extended memory is what is beyond 1024M
+    _B_OF_EXT_MEMORY := \
+	 $(shell mem 2> $(DEV_NULL) | grep 'total contiguous extended memory' | awk '{print $$1;}')
+    ifeq ($(_B_OF_EXT_MEMORY),)
+      _B_OF_MEMORY := \
+	 $(shell mem 2> $(DEV_NULL) | grep 'total conventional memory' | awk '{print $$1;}')
+    else
+      _B_OF_MEMORY := \
+         $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
+    endif
+    ifeq ($(_B_OF_MEMORY),)
+      # Windows 2003 has the systeminfo utility use it if mem doesn't work
+      _MB_OF_MEMORY := \
+	  $(shell systeminfo 2> $(DEV_NULL) | grep 'Total Physical Memory:' | awk '{print $$4;}' | sed -e 's@,@@')
+    else
+      _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
+    endif
+  endif
+  ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
+    MB_OF_MEMORY := $(_MB_OF_MEMORY)
+  else
+    MB_OF_MEMORY := 512
+  endif
 endif
 
 REQUIRED_ZIP_VER = 2.2
@@ -452,6 +442,37 @@
   ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
 endif
 
+# Machines with 512Mb or less of real memory are considered low memory
+#    build machines and adjustments will be made to prevent excessing
+#    system swapping during the build.
+#    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
+#    Don't set VM max over 1024-128=896.
+ifneq ($(MB_OF_MEMORY),)
+  LOW_MEMORY_MACHINE := $(shell \
+    if [ $(MB_OF_MEMORY) -le 512 ] ; then \
+      echo "true"; \
+    else \
+      echo "false"; \
+    fi)
+  MAX_VM_MEMORY := $(shell \
+    if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
+      expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
+    else \
+      echo "896"; \
+    fi)
+  MIN_VM_MEMORY := $(shell \
+    if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
+      expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \
+    else \
+      echo "128"; \
+    fi)
+else
+  MB_OF_MEMORY       := unknown
+  LOW_MEMORY_MACHINE := true
+  MAX_VM_MEMORY      := 384
+  MIN_VM_MEMORY      := 128
+endif
+
 # If blanks in the username, use the first 4 words and pack them together
 _USER1:=$(subst ', ,$(_USER))
 _USER2:=$(subst ", ,$(_USER1))
--- a/jdk/make/common/shared/Sanity.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/common/shared/Sanity.gmk	Sun May 04 07:05:42 2008 -0700
@@ -105,13 +105,21 @@
 UNZIP_VER  :=$(call GetVersion,"$(_UNZIP_VER)")
 BOOT_VER   :=$(call GetVersion,"$(_BOOT_VER)")
 
-REQUIRED_ANT_VER      := 1.6.3
-_ANT_VER              :=$(shell $(ANT) -version 2>&1 )
-ANT_VER               :=$(call GetVersion,"$(_ANT_VER)")
+REQUIRED_ANT_VER := 1.6.3
+ifeq ($(ANT_HOME),)
+  _ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" $(ANT) -version 2>&1 )
+else
+  _ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" ANT_HOME="$(ANT_HOME)" $(ANT) -version 2>&1 )
+endif
+ANT_VER:=$(call GetVersion,"$(_ANT_VER)")
 
-REQUIRED_FINDBUGS_VER := 1.1
-_FINDBUGS_VER         :=$(shell $(FINDBUGS) -version 2>&1 )
-FINDBUGS_VER          :=$(call GetVersion,"$(_FINDBUGS_VER)")
+REQUIRED_FINDBUGS_VER := 1.2
+ifeq ($(FINDBUGS_HOME),)
+  _FINDBUGS_VER:=$(shell $(FINDBUGS) -javahome "$(BOOTDIR)" -textui -version 2>&1 )
+else
+  _FINDBUGS_VER:=$(shell FINDBUGS_HOME="$(FINDBUGS_HOME)" $(FINDBUGS) -javahome "$(BOOTDIR)" -textui -version 2>&1 )
+endif
+FINDBUGS_VER:=$(call GetVersion,"$(_FINDBUGS_VER)")
 
 ifdef ALT_BINDIR
   ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1  | $(NAWK) -F'"' '{ print $$2 }')
@@ -780,21 +788,17 @@
 
 ifdef OPENJDK
 
-#name of test program that prints out "Failed" if freetype is not good enough
-FREETYPE_VERSION_CHECK_NAME = freetype_versioncheck
-FREETYPE_VERSION_CHECK = $(TEMPDIR)/$(FREETYPE_VERSION_CHECK_NAME)$(EXE_SUFFIX)
+# The freetypecheck Makefile prints out "Failed" if not good enough
+$(TEMPDIR)/freetypeinfo: FRC
+	@$(prep-target)
+	@(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
+	    $(ECHO) "Failed to build freetypecheck." ) > $@
 
-sane-freetype:
-	@-($(CD) $(BUILDDIR)/tools/freetypecheck && \
-	$(MAKE) REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION) \
-	        FT_TEST=$(FREETYPE_VERSION_CHECK_NAME) \
-	        FT_HEADERS=$(FREETYPE_HEADERS_PATH) \
-	        FT_LIB=$(FREETYPE_LIB_PATH) \
-	        XARCH=$(XARCH))
-	@if [ ! -r $(FREETYPE_VERSION_CHECK) -o \
-	  "`$(FREETYPE_VERSION_CHECK) | $(GREP) Fail`" != "" ]; then \
+sane-freetype: $(TEMPDIR)/freetypeinfo
+	@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
 	  $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
-	          "or higher is required. \n" >> $(ERROR_FILE) ; \
+	          " or higher is required. \n" \
+		  "`$(CAT) $<`  \n" >> $(ERROR_FILE) ; \
 	fi
 
 else
@@ -1331,7 +1335,7 @@
 ifndef OPENJDK
 	@if [ "$(CC_CHECK)" != "same" ]; then \
 	      $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
-	      "      Specifically the $(COMPILER_NAME) $(CC_TYPE) compiler. \n " \
+	      "      Specifically the $(COMPILER_NAME) compiler. \n " \
 	      "      $(YOU_ARE_USING) compiler version: $(CC_VER) \n" \
 	      "      The compiler was obtained from the following location: \n" \
 	      "          $(COMPILER_PATH) \n" \
@@ -1564,31 +1568,31 @@
 endif
 
 
-######################################################
-# SECURITY_BASELINE_142 test
-######################################################
-security_baseline_142:
-ifeq ($(PLATFORM), windows)
-	@if [ -z "$(SECURITY_BASELINE_142)" ]; then \
-	    $(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
-		"        Setting it to the default value of 1.4.2_10.\n" \
-		"        It is recommended to set SECURITY_BASELINE_142.\n" \
-		"" >> $(WARNING_FILE) ; \
-	fi
-endif
-
-######################################################
-# SECURITY_BASELINE_150 test
-######################################################
-security_baseline_150:
-ifeq ($(PLATFORM), windows)
-	@if [ -z "$(SECURITY_BASELINE_150)" ]; then \
-	    $(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
-		"        Setting it to the default value of 1.5.0_07.\n" \
-		"        It is recommended to set SECURITY_BASELINE_150.\n" \
-		"" >> $(WARNING_FILE) ; \
-	fi
-endif
+######################################################
+# SECURITY_BASELINE_142 test
+######################################################
+security_baseline_142:
+ifeq ($(PLATFORM), windows)
+	@if [ -z "$(SECURITY_BASELINE_142)" ]; then \
+	    $(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
+		"        Setting it to the default value of 1.4.2_10.\n" \
+		"        It is recommended to set SECURITY_BASELINE_142.\n" \
+		"" >> $(WARNING_FILE) ; \
+	fi
+endif
+
+######################################################
+# SECURITY_BASELINE_150 test
+######################################################
+security_baseline_150:
+ifeq ($(PLATFORM), windows)
+	@if [ -z "$(SECURITY_BASELINE_150)" ]; then \
+	    $(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
+		"        Setting it to the default value of 1.5.0_07.\n" \
+		"        It is recommended to set SECURITY_BASELINE_150.\n" \
+		"" >> $(WARNING_FILE) ; \
+	fi
+endif
 
 
 ######################################################
--- a/jdk/make/docs/CORE_PKGS.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/docs/CORE_PKGS.gmk	Sun May 04 07:05:42 2008 -0700
@@ -49,8 +49,8 @@
 # ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
 # one that is doing its own review. These packages are not included when
 # creating diff pages for the platform's JCP process.
-# 
-#       (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
+# 
+#       (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
 # Note:
 # This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
 #
@@ -72,13 +72,13 @@
 # CORE_PKGS is the list of packages that form the
 # Java API Specification.
 #
-### ***IMPORTANT NOTE***
-### There is also a "REGEXP" variable in the docs/makefile that
-### determines which table the packages go in on the main page.
-### Currently, there is only table ("Platform Packages") and
-### everything goes in it, so REGEXP is "*". But if that policy
-### changes, packages added will need to be reflected in  that
-### list of wildcard expressions, as well.
+### ***IMPORTANT NOTE***
+### There is also a "REGEXP" variable in the docs/makefile that
+### determines which table the packages go in on the main page.
+### Currently, there is only table ("Platform Packages") and
+### everything goes in it, so REGEXP is "*". But if that policy
+### changes, packages added will need to be reflected in  that
+### list of wildcard expressions, as well.
 ###
 CORE_PKGS =                                      \
   java.applet                                    \
--- a/jdk/make/docs/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/docs/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -273,6 +273,28 @@
 # SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk
 
 #
+# Variables used by TRACING target
+#
+
+TRACING_SOURCEPATH  = $(TOPDIR)/src/share/classes
+TRACING_DOCDIR	 = $(DOCSDIR)/jre/api/tracing
+
+TRACING_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS)			    \
+		   -encoding ascii			            \
+                   -nodeprecatedlist                                \
+                   -d $(TRACING_DOCDIR)				    \
+                   -sourcepath $(TRACING_SOURCEPATH)                \
+                   -windowtitle $(TRACING_WINDOWTITLE)              \
+                   -doctitle $(TRACING_DOCTITLE)                    \
+                   -header $(TRACING_JAVADOCHEADER)                 \
+                   -linkoffline ../../../../../api $(DOCSDIR)/api/
+
+TRACING_WINDOWTITLE = "Tracing"
+TRACING_DOCTITLE    = "Java$(TRADEMARK) Platform Tracing"
+TRACING_JAVADOCHEADER      = "Platform Tracing"
+# TRACING_PKGS is located in NON_CORE_PKGS.gmk
+
+#
 # Variables used by HTTPSERVER target
 #
 
@@ -420,6 +442,7 @@
     jaasdocs \
     jgssdocs \
     smartcardiodocs \
+    tracingdocs \
     httpserverdocs  \
     mgmtdocs \
     attachdocs \
@@ -585,6 +608,14 @@
 	$(JAVADOC_CMD) $(SMARTCARDIO_JAVADOCFLAGS)                     \
 		   $(SMARTCARDIO_PKGS)
 
+.PHONY: tracingdocs
+tracingdocs:
+	@# ######## api-tracing ############################
+	$(RM) -r $(TRACING_DOCDIR)
+	$(MKDIR) -p $(TRACING_DOCDIR)
+	$(JAVADOC) $(TRACING_JAVADOCFLAGS)                     \
+		   $(TRACING_PKGS)
+
 .PHONY: httpserverdocs
 httpserverdocs:
 	@# ######## api-httpserver #######################
--- a/jdk/make/docs/NON_CORE_PKGS.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/docs/NON_CORE_PKGS.gmk	Sun May 04 07:05:42 2008 -0700
@@ -84,6 +84,9 @@
 
 SMARTCARDIO_PKGS = javax.smartcardio
 
+TRACING_PKGS     = com.sun.tracing         \
+                   com.sun.tracing.dtrace
+
 # non-core packages in rt.jar
 NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                    $(MGMT_PKGS) \
@@ -91,4 +94,5 @@
                    $(JGSS_PKGS) \
                    $(OLD_JSSE_PKGS) \
                    $(HTTPSERVER_PKGS) \
-                   $(SMARTCARDIO_PKGS)
+                   $(SMARTCARDIO_PKGS) \
+                   $(TRACING_PKGS)
--- a/jdk/make/java/java/genlocales.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/java/java/genlocales.gmk	Sun May 04 07:05:42 2008 -0700
@@ -80,7 +80,8 @@
 	@$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro;	
 	@$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro;
 	@$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro;
-	NAWK=$(NAWK) SED=$(SED) $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
 		$@.tmp.noneuro $< $@
 	@$(RM) $@.tmp.euro $@.tmp.noneuro;
 	
--- a/jdk/make/java/java/localegen.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/java/java/localegen.sh	Sun May 04 07:05:42 2008 -0700
@@ -29,7 +29,7 @@
 # This script is to generate the supported locale list string and replace the
 # LocaleDataMetaInfo-XLocales.java in <ws>/src/share/classes/sun/util
 # 
-# NAWK & SED is passed in as environment variables.
+# SORT, NAWK & SED is passed in as environment variables.
 #
 
 # A list of resource base name list;
@@ -47,7 +47,7 @@
 localelist=
 getlocalelist() {
     localelist=""
-    localelist=`$NAWK -F$1_ '{print $2}' $2 | sort`
+    localelist=`$NAWK -F$1_ '{print $2}' $2 | $SORT`
 }
 
 sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" " 
--- a/jdk/make/java/sun_nio/FILES_java.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/java/sun_nio/FILES_java.gmk	Sun May 04 07:05:42 2008 -0700
@@ -33,6 +33,7 @@
     sun/nio/cs/AbstractCharsetProvider.java \
     sun/nio/cs/HistoricallyNamedCharset.java \
     sun/nio/cs/Surrogate.java \
+    sun/nio/cs/CharsetMapping.java \
     sun/nio/cs/SingleByteEncoder.java \
     sun/nio/cs/SingleByteDecoder.java \
     sun/nio/cs/UnicodeEncoder.java \
--- a/jdk/make/javax/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/javax/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -30,24 +30,10 @@
 BUILDDIR = ..
 include $(BUILDDIR)/common/Defs.gmk
 
-#
-# Files to compile
-#
-AUTO_FILES_JAVA_DIRS =       \
-    javax/naming             \
-    com/sun/naming/internal  \
-    javax/net                \
-    javax/script             \
-    javax/security/auth      \
-    javax/security/cert      \
-    javax/security/sasl      \
-    javax/smartcardio        \
-    javax/tools              \
-    javax/xml
-
 # imageio uses xml, so build it last
 
 SUBDIRS = \
+	others \
 	accessibility \
 	print \
 	swing \
@@ -63,8 +49,3 @@
 clean clobber::
 	$(SUBDIRS-loop)
 
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
--- a/jdk/make/javax/crypto/Defs-jce.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/javax/crypto/Defs-jce.gmk	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2008 Sun Microsystems, Inc.  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,7 +31,7 @@
 JCE_MANIFEST_FILE    = $(TEMPDIR)/manifest.mf
 $(JCE_MANIFEST_FILE): $(MAINMANIFEST)
 	$(prep-target)
-	( $(SED) "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST); \
+	( $(SED) "s/@@RELEASE@@/$(RELEASE)/" $<; \
 	    $(ECHO) "Extension-Name: javax.crypto"; \
 	    $(ECHO) "Implementation-Vendor-Id: com.sun"; ) > $@
 
@@ -75,6 +75,7 @@
 define sign-target
 	$(BOOT_JARSIGNER_CMD) -keystore $(SIGNING_KEYSTORE) \
 	    $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
+	@$(java-vm-cleanup)
 	@$(ECHO) "\nJar codesigning finished."
 endef
 
@@ -88,13 +89,15 @@
 endef
 
 #
-# Convenience macro for steps needed to sign a jar file.
+# Convenience macros for signing a jar file.
+#
+# Call through $(call sign-file, target file)
 #
 define sign-file
 	$(presign)
-	$(install-file)
+	$(prep-target)
+	$(CP) $1 $@
 	$(sign-target)
-	@$(java-vm-cleanup)
 endef
 
 #
--- a/jdk/make/javax/crypto/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/javax/crypto/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007-2008 Sun Microsystems, Inc.  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
@@ -96,7 +96,7 @@
 #	  sign-jar		Builds/signs jce.jar file (no install)
 #	  sign-policy		Builds/signs policy files (no install)
 #
-#     obfus			Builds/obfuscates/signs/installs jce.jar
+#     obfus			Builds/obfuscates/signs jce.jar
 #
 #     release			Builds all targets in preparation
 #				for workspace integration.
@@ -110,8 +110,24 @@
 PACKAGE = javax.crypto
 PRODUCT = sun
 
+#
+# The following is for when we need to do postprocessing
+# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
+# isn't writable, the build currently crashes out.
+#
+ifndef OPENJDK
+  ifdef ALT_JCE_BUILD_DIR
+    # =====================================================
+    # Where to place the output, in case we're building from a read-only
+    # build area.  (e.g. a release engineering build.)
+    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
+    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
+  else
+    JCE_BUILD_DIR=${TEMPDIR}
+  endif
+endif
+
 include $(BUILDDIR)/common/Defs.gmk
-include Defs-jce.gmk
 
 #
 # Location for the newly built classfiles.
@@ -158,6 +174,8 @@
 #
 UNSIGNED_DIR = $(TEMPDIR)/unsigned
 
+include Defs-jce.gmk
+
 
 # =====================================================
 # Build the unsigned jce.jar file.  Signing/obfuscation comes later.
@@ -299,7 +317,7 @@
 # Sign the various jar files.  Not needed for OpenJDK.
 #
 
-SIGNED_DIR		= $(TEMPDIR)/signed
+SIGNED_DIR		= $(JCE_BUILD_DIR)/signed
 SIGNED_POLICY_BUILDDIR	= $(SIGNED_DIR)/policy
 
 SIGNED_POLICY_FILES = \
@@ -312,61 +330,87 @@
 
 sign-policy: $(SIGNED_POLICY_FILES)
 
+ifndef ALT_JCE_BUILD_DIR
 $(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar
-	$(sign-file)
+else
+#
+# We have to remove the build dependency, otherwise, we'll try to rebuild it
+# which we can't do on a read-only filesystem.
+#
+$(SIGNED_DIR)/jce.jar:
+	@if [ ! -r $(UNSIGNED_DIR)/jce.jar ] ; then \
+	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/jce.jar"; \
+	    exit 1; \
+	fi
+endif
+	$(call sign-file, $(UNSIGNED_DIR)/jce.jar)
 
 $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:	\
-$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
-	$(sign-file)
+	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
+	$(call sign-file, $<)
 
 $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:		\
-$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
-	$(sign-file)
+	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
+	$(call sign-file, $<)
 
 $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
-$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
-	$(sign-file)
+	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
+	$(call sign-file, $<)
 
 $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:		\
-$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
-	$(sign-file)
+	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
+	$(call sign-file, $<)
 
 
 # =====================================================
 # Obfuscate/sign/install the JDK build.  Not needed for OpenJDK.
 #
 
-OBFUS_DIR = $(TEMPDIR)/obfus
+OBFUS_DIR = $(JCE_BUILD_DIR)/obfus/jce
 
 CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
 
 obfus: $(OBFUS_DIR)/jce.jar
 	$(release-warning)
 
-$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE)
+ifndef ALT_JCE_BUILD_DIR
+$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
+else
+#
+# We have to remove the build dependency, otherwise, we'll try to rebuild it
+# which we can't do on a read-only filesystem.
+#
+$(OBFUS_DIR)/jce.jar: $(JCE_MANIFEST_FILE) $(OBFUS_DIR)/framework.dox
+	@if [ ! -d $(CLASSDESTDIR) ] ; then \
+	    $(ECHO) "Couldn't find $(CLASSDESTDIR)"; \
+	    exit 1; \
+	fi
+endif
+	@$(ECHO) ">>>Obfuscating JCE framework..."
 	$(presign)
 	$(preobfus)
-	@$(ECHO) ">>>Obfuscating JCE framework..."
 	$(prep-target)
 	$(CD) $(OBFUS_DIR); \
-	$(OBFUSCATOR) -fv \
-	    $(CURRENT_DIRECTORY)/$(CLOSED_DIR)/obfus/framework.dox
+	$(OBFUSCATOR) -fv framework.dox
 	@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
+	@#
 	@# The sun.security.internal classes are currently not obfuscated
 	@# due to an obfus problem. Manually copy them to the build directory
 	@# so that they are included in the jce.jar file.
+	@#
 	$(CP) -r $(CLASSDESTDIR)/sun $(OBFUS_DIR)/build
-	$(RM) $(UNSIGNED_DIR)/jce.jar
 	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@	\
 	    -C $(OBFUS_DIR)/build javax			\
 	    -C $(OBFUS_DIR)/build sun			\
 	    $(JAR_JFLAGS)
 	$(sign-target)
-	$(MKDIR) -p $(dir $(JAR_DESTFILE))
-	$(RM) $(JAR_DESTFILE)
-	$(CP) $@ $(JAR_DESTFILE)
 	@$(java-vm-cleanup)
 
+$(OBFUS_DIR)/framework.dox: $(CLOSED_DIR)/obfus/framework.dox
+	@$(ECHO) ">>>Creating framework.dox"
+	$(prep-target)
+	$(SED) "s:@@TEMPDIR@@:$(ABS_TEMPDIR):" $< > $@
+
 #
 # The current obfuscator has a limitation in that it currently only
 # supports up to v49 class file format.  Force v49 classfiles in our
@@ -380,26 +424,27 @@
 # unlimited policy file distribution, etc.
 #
 
-release: $(OBFUS_DIR)/jce.jar sign-policy
+release: $(OBFUS_DIR)/jce.jar sign-policy $(CLOSED_DIR)/doc/COPYRIGHT.html \
+         $(CLOSED_DIR)/doc/README.txt
 	$(RM) -r \
-	    $(RELEASE_DIR)/UnlimitedJCEPolicy \
-	    $(RELEASE_DIR)/jce.jar \
-	    $(RELEASE_DIR)/US_export_policy.jar \
-	    $(RELEASE_DIR)/local_policy.jar \
-	    $(RELEASE_DIR)/UnlimitedJCEPolicy.zip
-	$(MKDIR) -p $(RELEASE_DIR)/UnlimitedJCEPolicy
-	$(CP) $(OBFUS_DIR)/jce.jar $(RELEASE_DIR)
-	$(CP) -r \
-	    $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
-	    $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \
-	    $(RELEASE_DIR)
+	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy              \
+	    $(JCE_BUILD_DIR)/release/jce.jar                         \
+	    $(JCE_BUILD_DIR)/release/US_export_policy.jar            \
+	    $(JCE_BUILD_DIR)/release/local_policy.jar                \
+	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy.zip
+	$(MKDIR) -p $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
+	$(CP) $(OBFUS_DIR)/jce.jar $(JCE_BUILD_DIR)/release
+	$(CP) \
+	    $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar   \
+	    $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar       \
+	    $(JCE_BUILD_DIR)/release
 	$(CP) \
 	    $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
-	    $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \
-	    $(RELEASE_DIR)/UnlimitedJCEPolicy
-	$(CP) $(CLOSED_DIR)/doc/COPYRIGHT.html \
-	    $(CLOSED_DIR)/doc/README.txt $(RELEASE_DIR)/UnlimitedJCEPolicy
-	cd $(RELEASE_DIR) ; \
+	    $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar     \
+	    $(CLOSED_DIR)/doc/COPYRIGHT.html                         \
+	    $(CLOSED_DIR)/doc/README.txt                             \
+	    $(JCE_BUILD_DIR)/release/UnlimitedJCEPolicy
+	cd $(JCE_BUILD_DIR)/release ; \
 	$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
 	$(release-warning)
 
@@ -478,7 +523,8 @@
 
 clobber clean::
 	$(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \
-	    $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR)
+	    $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR) \
+	    $(JCE_BUILD_DIR)
 
 .PHONY: build-jar jar build-policy unlimited limited install-jar \
 	install-limited install-unlimited
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/javax/others/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,52 @@
+#
+# Copyright 1998-2007 Sun Microsystems, Inc.  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.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Makefile for building javax (other classes)
+#
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files to compile
+#
+AUTO_FILES_JAVA_DIRS =       \
+    javax/naming             \
+    com/sun/naming/internal  \
+    javax/net                \
+    javax/script             \
+    javax/security/auth      \
+    javax/security/cert      \
+    javax/security/sasl      \
+    javax/smartcardio        \
+    javax/tools              \
+    javax/xml
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
+
--- a/jdk/make/sun/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/sun/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -63,7 +63,7 @@
           $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
 	  font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
 	  jawt text nio launcher management $(ORG_SUBDIR) \
-          native2ascii serialver tools jconsole
+          native2ascii serialver tools jconsole tracing
 
 all build clean clobber::
 	$(SUBDIRS-loop)
--- a/jdk/make/sun/nio/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/sun/nio/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 1996-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 1996-2008 Sun Microsystems, Inc.  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
@@ -73,11 +73,21 @@
 SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
 SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
 
+GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
+FILES_MAP = $(GENCSDATASRC)/sjis0213.map
+FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
+CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
+
+$(FILES_DAT): $(FILES_MAP)
+	@$(prep-target)
+	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
+		$(FILES_MAP) $(FILES_DAT)
+
 $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
   $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
 	$(install-file)
 
-$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH)
+$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
 	$(BOOT_JAR_CMD) cf $(CHARSETS_JAR) \
 	      -C $(CLASSDESTDIR) sun \
 	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
--- a/jdk/make/sun/security/mscapi/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/sun/security/mscapi/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2005-2008 Sun Microsystems, Inc.  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
@@ -92,8 +92,25 @@
 PACKAGE = sun.security.mscapi
 LIBRARY = sunmscapi
 PRODUCT = sun
+
+#
+# The following is for when we need to do postprocessing
+# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
+# isn't writable, the build currently crashes out.
+#
+ifndef OPENJDK
+  ifdef ALT_JCE_BUILD_DIR
+    # =====================================================
+    # Where to place the output, in case we're building from a read-only
+    # build area.  (e.g. a release engineering build.)
+    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
+    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
+  else
+    JCE_BUILD_DIR=${TEMPDIR}
+  endif
+endif
+
 include $(BUILDDIR)/common/Defs.gmk
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
 
 CPLUSPLUSLIBRARY=true
 
@@ -163,6 +180,8 @@
 	$(build-warning)
 endif
 
+include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
+
 
 # =====================================================
 # Build the unsigned sunmscapi.jar file.
@@ -200,14 +219,26 @@
 # Sign the provider jar file.  Not needed for OpenJDK.
 #
 
-SIGNED_DIR = $(TEMPDIR)/signed
+SIGNED_DIR = $(JCE_BUILD_DIR)/signed
 
 sign: sign-jar
 
 sign-jar: $(SIGNED_DIR)/sunmscapi.jar
 
+ifndef ALT_JCE_BUILD_DIR
 $(SIGNED_DIR)/sunmscapi.jar: $(UNSIGNED_DIR)/sunmscapi.jar
-	$(sign-file)
+else
+#
+# We have to remove the build dependency, otherwise, we'll try to rebuild it
+# which we can't do on a read-only filesystem.
+#
+$(SIGNED_DIR)/sunmscapi.jar:
+	@if [ ! -r $(UNSIGNED_DIR)/sunmscapi.jar ] ; then \
+	    $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunmscapi.jar"; \
+	    exit 1; \
+	fi
+endif
+	$(call sign-file, $(UNSIGNED_DIR)/sunmscapi.jar)
 
 
 # =====================================================
@@ -215,9 +246,9 @@
 #
 
 release: $(SIGNED_DIR)/sunmscapi.jar
-	$(RM) $(RELEASE_DIR)/sunmscapi.jar
-	$(MKDIR) -p $(RELEASE_DIR)
-	$(CP) $(SIGNED_DIR)/sunmscapi.jar $(RELEASE_DIR)
+	$(RM) $(JCE_BUILD_DIR)/release/sunmscapi.jar
+	$(MKDIR) -p $(JCE_BUILD_DIR)/release
+	$(CP) $(SIGNED_DIR)/sunmscapi.jar $(JCE_BUILD_DIR)/release
 	$(release-warning)
 
 endif # OPENJDK
@@ -255,7 +286,7 @@
 #
 
 clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR)
+	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
 
 .PHONY: build-jar jar install-jar
 ifndef OPENJDK
--- a/jdk/make/sun/security/pkcs11/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/sun/security/pkcs11/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -92,8 +92,25 @@
 PACKAGE = sun.security.pkcs11
 LIBRARY = j2pkcs11
 PRODUCT = sun
+
+#
+# The following is for when we need to do postprocessing
+# (signing/obfuscation) against a read-only build.  If the OUTPUTDIR
+# isn't writable, the build currently crashes out.
+#
+ifndef OPENJDK
+  ifdef ALT_JCE_BUILD_DIR
+    # =====================================================
+    # Where to place the output, in case we're building from a read-only
+    # build area.  (e.g. a release engineering build.)
+    JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
+    IGNORE_WRITABLE_OUTPUTDIR_TEST=true
+  else
+    JCE_BUILD_DIR=${TEMPDIR}
+  endif
+endif
+
 include $(BUILDDIR)/common/Defs.gmk
-include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
 
 #
 # C and Java Files
@@ -163,6 +180,8 @@
 	$(build-warning)
 endif
 
+include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
+
 
 # =====================================================
 # Build the unsigned sunpkcs11.jar file.
@@ -200,14 +219,26 @@
 # Sign the provider jar file.  Not needed for OpenJDK.
 #
 
-SIGNED_DIR = $(TEMPDIR)/signed
+SIGNED_DIR = $(JCE_BUILD_DIR)/signed
 
 sign: sign-jar
 
 sign-jar: $(SIGNED_DIR)/sunpkcs11.jar
 
+ifndef ALT_JCE_BUILD_DIR
 $(SIGNED_DIR)/sunpkcs11.jar: $(UNSIGNED_DIR)/sunpkcs11.jar
-	$(sign-file)
+else
+#
+# We have to remove the build dependency, otherwise, we'll try to rebuild it
+# which we can't do on a read-only filesystem.
+#
+$(SIGNED_DIR)/sunpkcs11.jar:
+	@if [ ! -r $(UNSIGNED_DIR)/sunpkcs11.jar ] ; then \
+            $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunpkcs11.jar"; \
+            exit 1; \
+        fi
+endif
+	$(call sign-file, $(UNSIGNED_DIR)/sunpkcs11.jar)
 
 
 # =====================================================
@@ -215,9 +246,9 @@
 #
 
 release: $(SIGNED_DIR)/sunpkcs11.jar
-	$(RM) $(RELEASE_DIR)/sunpkcs11.jar
-	$(MKDIR) -p $(RELEASE_DIR)
-	$(CP) $(SIGNED_DIR)/sunpkcs11.jar $(RELEASE_DIR)
+	$(RM) $(JCE_BUILD_DIR)/release/sunpkcs11.jar
+	$(MKDIR) -p $(JCE_BUILD_DIR)/release
+	$(CP) $(SIGNED_DIR)/sunpkcs11.jar $(JCE_BUILD_DIR)/release
 	$(release-warning)
 
 endif # OPENJDK
@@ -255,7 +286,7 @@
 #
 
 clobber clean::
-	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR)
+	$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
 
 .PHONY: build-jar jar install-jar
 ifndef OPENJDK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/sun/tracing/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,26 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+#
+
+#
+# Makefile for building tracing package implementation classes
+#
+
+BUILDDIR = ../..
+PACKAGE = sun.tracing
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = dtrace 
+all build:
+	$(SUBDIRS-loop)
+clean clobber::
+	$(SUBDIRS-loop)
+
+AUTO_FILES_JAVA_DIRS = sun/tracing
+
+#
+# Rules.
+#
+include $(BUILDDIR)/common/Classes.gmk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/sun/tracing/dtrace/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,59 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+#
+
+#
+# Makefile for building dtrace extension
+#
+BUILDDIR = ../../..
+PACKAGE = sun.tracing.dtrace
+LIBRARY = jsdt
+PRODUCT = sun
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Use mapfile
+#
+FILES_m = mapfile-vers
+include $(BUILDDIR)/common/Mapfile-vers.gmk
+
+NATIVE_DTRACE_DIR=native/sun/tracing/dtrace
+
+SRCDIR=$(SHARE_SRC)/$(NATIVE_DTRACE_DIR)
+PSRCDIR=$(PLATFORM_SRC)/$(NATIVE_DTRACE_DIR)
+
+FILES_c = JVM.c jvm_symbols_md.c
+
+FILES_java = \
+    sun/tracing/dtrace/Activation.java \
+    sun/tracing/dtrace/DTraceProvider.java \
+    sun/tracing/dtrace/DTraceProbe.java \
+    sun/tracing/dtrace/DTraceProviderFactory.java \
+    sun/tracing/dtrace/JVM.java 
+
+FILES_export = $(FILES_java)
+
+ifeq ($(PLATFORM), linux)
+OTHER_LDLIBS += -ldl
+endif
+
+#
+# Use JNI for generating header files
+#
+JAVAHFLAGS += -jni
+
+#
+# Don't need to link against -ljava
+#
+JAVALIB= 
+
+#
+# Rules.
+#
+include $(BUILDDIR)/common/Library.gmk
+
+#
+# Add to ambient vpath so we pick up the library files
+#
+vpath %.c $(SRCDIR):$(PSRCDIR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/sun/tracing/dtrace/mapfile-vers	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,19 @@
+#
+#ident "@(#)mapfile-vers	1.1 07/08/14"
+# 
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+#
+
+# Define library interface.
+
+SUNWprivate_1.1 {
+    global:
+        Java_sun_tracing_dtrace_JVM_isSupported0;
+        Java_sun_tracing_dtrace_JVM_activate0;
+        Java_sun_tracing_dtrace_JVM_dispose0;
+        Java_sun_tracing_dtrace_JVM_isEnabled0;
+        Java_sun_tracing_dtrace_JVM_defineClass0;
+    local:
+        *;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,43 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+#
+# Makefile for building the charsetmapping tool
+#
+
+BUILDDIR = ../..
+PACKAGE = build.tools.charsetmapping
+PRODUCT = tools
+PROGRAM = charsetmapping
+include $(BUILDDIR)/common/Defs.gmk
+
+BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
+BUILDTOOL_MAIN        = $(PKGDIR)/GenerateMapping.java
+
+#
+# Build tool jar rules.
+#
+include $(BUILDDIR)/common/BuildToolJar.gmk
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/sjis0213.map	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,11471 @@
+## Shift_JIS-2004 (JIS X 0213:2004 Appendix 1) vs Unicode mapping table
+## 
+## Date: 13 May 2006
+## License:
+## 	Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.
+## 	Copyright (C) 2001 I'O, All Rights Reserved.
+## 	Copyright (C) 2006 Project X0213, All Rights Reserved.
+## 	You can use, modify, distribute this table freely.
+## Note:
+## 	[1983]	JIS codepoint defined by JIS X 0208-1983
+## 	[1990]	JIS codepoint defined by JIS X 0208-1990
+## 	[2000]	JIS codepoint defined by JIS X 0213:2000
+## 	[2004]	JIS codepoint defined by JIS X 0213:2004
+## 	[Unicode3.1]	UCS codepoint defined by Unicode 3.1
+## 	[Unicode3.2]	UCS codepoint defined by Unicode 3.2
+## 	Fullwidth	UCS fullwidth form (U+Fxxx)
+## 	Windows 	Windows (CP932) mapping
+## 	Some 0213 character can't represent by one UCS character.
+## 	In this table, such characters are described as 'U+xxxx+xxxx'.
+##
+##
+##	(1)Added JIS0213 entries
+##	(2)Updated 2 entries
+##	   0x81b0 -> u+ff5e
+## 	   0x815f -> u+ff3c
+##
+## JIS	Unicode	Name	Note
+##
+## Note: Block f09f--f0fc has been moved to the correct(sorted) position
+##
+## <RegEx Pattern="0x(\p{XDigit}++)\s++U\+(\p{XDigit}++)(?:\+(\p{XDigit}++))?\s++#.*"> GDB=1 GC=2 GCC=3>
+##
+#
+#  sjis0201
+#
+0x20	U+0020	# SPACE
+0x21	U+0021	# EXCLAMATION MARK
+0x22	U+0022	# QUOTATION MARK
+0x23	U+0023	# NUMBER SIGN
+0x24	U+0024	# DOLLAR SIGN
+0x25	U+0025	# PERCENT SIGN
+0x26	U+0026	# AMPERSAND
+0x27	U+0027	# APOSTROPHE
+0x28	U+0028	# LEFT PARENTHESIS
+0x29	U+0029	# RIGHT PARENTHESIS
+0x2A	U+002A	# ASTERISK
+0x2B	U+002B	# PLUS SIGN
+0x2C	U+002C	# COMMA
+0x2D	U+002D	# HYPHEN-MINUS
+0x2E	U+002E	# FULL STOP
+0x2F	U+002F	# SOLIDUS
+0x30	U+0030	# DIGIT ZERO
+0x31	U+0031	# DIGIT ONE
+0x32	U+0032	# DIGIT TWO
+0x33	U+0033	# DIGIT THREE
+0x34	U+0034	# DIGIT FOUR
+0x35	U+0035	# DIGIT FIVE
+0x36	U+0036	# DIGIT SIX
+0x37	U+0037	# DIGIT SEVEN
+0x38	U+0038	# DIGIT EIGHT
+0x39	U+0039	# DIGIT NINE
+0x3A	U+003A	# COLON
+0x3B	U+003B	# SEMICOLON
+0x3C	U+003C	# LESS-THAN SIGN
+0x3D	U+003D	# EQUALS SIGN
+0x3E	U+003E	# GREATER-THAN SIGN
+0x3F	U+003F	# QUESTION MARK
+0x40	U+0040	# COMMERCIAL AT
+0x41	U+0041	# LATIN CAPITAL LETTER A
+0x42	U+0042	# LATIN CAPITAL LETTER B
+0x43	U+0043	# LATIN CAPITAL LETTER C
+0x44	U+0044	# LATIN CAPITAL LETTER D
+0x45	U+0045	# LATIN CAPITAL LETTER E
+0x46	U+0046	# LATIN CAPITAL LETTER F
+0x47	U+0047	# LATIN CAPITAL LETTER G
+0x48	U+0048	# LATIN CAPITAL LETTER H
+0x49	U+0049	# LATIN CAPITAL LETTER I
+0x4A	U+004A	# LATIN CAPITAL LETTER J
+0x4B	U+004B	# LATIN CAPITAL LETTER K
+0x4C	U+004C	# LATIN CAPITAL LETTER L
+0x4D	U+004D	# LATIN CAPITAL LETTER M
+0x4E	U+004E	# LATIN CAPITAL LETTER N
+0x4F	U+004F	# LATIN CAPITAL LETTER O
+0x50	U+0050	# LATIN CAPITAL LETTER P
+0x51	U+0051	# LATIN CAPITAL LETTER Q
+0x52	U+0052	# LATIN CAPITAL LETTER R
+0x53	U+0053	# LATIN CAPITAL LETTER S
+0x54	U+0054	# LATIN CAPITAL LETTER T
+0x55	U+0055	# LATIN CAPITAL LETTER U
+0x56	U+0056	# LATIN CAPITAL LETTER V
+0x57	U+0057	# LATIN CAPITAL LETTER W
+0x58	U+0058	# LATIN CAPITAL LETTER X
+0x59	U+0059	# LATIN CAPITAL LETTER Y
+0x5A	U+005A	# LATIN CAPITAL LETTER Z
+0x5B	U+005B	# LEFT SQUARE BRACKET
+0x5C	U+005C	# YEN SIGN
+0x5D	U+005D	# RIGHT SQUARE BRACKET
+0x5E	U+005E	# CIRCUMFLEX ACCENT
+0x5F	U+005F	# LOW LINE
+0x60	U+0060	# GRAVE ACCENT
+0x61	U+0061	# LATIN SMALL LETTER A
+0x62	U+0062	# LATIN SMALL LETTER B
+0x63	U+0063	# LATIN SMALL LETTER C
+0x64	U+0064	# LATIN SMALL LETTER D
+0x65	U+0065	# LATIN SMALL LETTER E
+0x66	U+0066	# LATIN SMALL LETTER F
+0x67	U+0067	# LATIN SMALL LETTER G
+0x68	U+0068	# LATIN SMALL LETTER H
+0x69	U+0069	# LATIN SMALL LETTER I
+0x6A	U+006A	# LATIN SMALL LETTER J
+0x6B	U+006B	# LATIN SMALL LETTER K
+0x6C	U+006C	# LATIN SMALL LETTER L
+0x6D	U+006D	# LATIN SMALL LETTER M
+0x6E	U+006E	# LATIN SMALL LETTER N
+0x6F	U+006F	# LATIN SMALL LETTER O
+0x70	U+0070	# LATIN SMALL LETTER P
+0x71	U+0071	# LATIN SMALL LETTER Q
+0x72	U+0072	# LATIN SMALL LETTER R
+0x73	U+0073	# LATIN SMALL LETTER S
+0x74	U+0074	# LATIN SMALL LETTER T
+0x75	U+0075	# LATIN SMALL LETTER U
+0x76	U+0076	# LATIN SMALL LETTER V
+0x77	U+0077	# LATIN SMALL LETTER W
+0x78	U+0078	# LATIN SMALL LETTER X
+0x79	U+0079	# LATIN SMALL LETTER Y
+0x7A	U+007A	# LATIN SMALL LETTER Z
+0x7B	U+007B	# LEFT CURLY BRACKET
+0x7C	U+007C	# VERTICAL LINE
+0x7D	U+007D	# RIGHT CURLY BRACKET
+0x7E	U+007E	# OVERLINE
+0x7F	U+007F	# DELETE
+0xA1	U+FF61	# HALFWIDTH IDEOGRAPHIC FULL STOP
+0xA2	U+FF62	# HALFWIDTH LEFT CORNER BRACKET
+0xA3	U+FF63	# HALFWIDTH RIGHT CORNER BRACKET
+0xA4	U+FF64	# HALFWIDTH IDEOGRAPHIC COMMA
+0xA5	U+FF65	# HALFWIDTH KATAKANA MIDDLE DOT
+0xA6	U+FF66	# HALFWIDTH KATAKANA LETTER WO
+0xA7	U+FF67	# HALFWIDTH KATAKANA LETTER SMALL A
+0xA8	U+FF68	# HALFWIDTH KATAKANA LETTER SMALL I
+0xA9	U+FF69	# HALFWIDTH KATAKANA LETTER SMALL U
+0xAA	U+FF6A	# HALFWIDTH KATAKANA LETTER SMALL E
+0xAB	U+FF6B	# HALFWIDTH KATAKANA LETTER SMALL O
+0xAC	U+FF6C	# HALFWIDTH KATAKANA LETTER SMALL YA
+0xAD	U+FF6D	# HALFWIDTH KATAKANA LETTER SMALL YU
+0xAE	U+FF6E	# HALFWIDTH KATAKANA LETTER SMALL YO
+0xAF	U+FF6F	# HALFWIDTH KATAKANA LETTER SMALL TU
+0xB0	U+FF70	# HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
+0xB1	U+FF71	# HALFWIDTH KATAKANA LETTER A
+0xB2	U+FF72	# HALFWIDTH KATAKANA LETTER I
+0xB3	U+FF73	# HALFWIDTH KATAKANA LETTER U
+0xB4	U+FF74	# HALFWIDTH KATAKANA LETTER E
+0xB5	U+FF75	# HALFWIDTH KATAKANA LETTER O
+0xB6	U+FF76	# HALFWIDTH KATAKANA LETTER KA
+0xB7	U+FF77	# HALFWIDTH KATAKANA LETTER KI
+0xB8	U+FF78	# HALFWIDTH KATAKANA LETTER KU
+0xB9	U+FF79	# HALFWIDTH KATAKANA LETTER KE
+0xBA	U+FF7A	# HALFWIDTH KATAKANA LETTER KO
+0xBB	U+FF7B	# HALFWIDTH KATAKANA LETTER SA
+0xBC	U+FF7C	# HALFWIDTH KATAKANA LETTER SI
+0xBD	U+FF7D	# HALFWIDTH KATAKANA LETTER SU
+0xBE	U+FF7E	# HALFWIDTH KATAKANA LETTER SE
+0xBF	U+FF7F	# HALFWIDTH KATAKANA LETTER SO
+0xC0	U+FF80	# HALFWIDTH KATAKANA LETTER TA
+0xC1	U+FF81	# HALFWIDTH KATAKANA LETTER TI
+0xC2	U+FF82	# HALFWIDTH KATAKANA LETTER TU
+0xC3	U+FF83	# HALFWIDTH KATAKANA LETTER TE
+0xC4	U+FF84	# HALFWIDTH KATAKANA LETTER TO
+0xC5	U+FF85	# HALFWIDTH KATAKANA LETTER NA
+0xC6	U+FF86	# HALFWIDTH KATAKANA LETTER NI
+0xC7	U+FF87	# HALFWIDTH KATAKANA LETTER NU
+0xC8	U+FF88	# HALFWIDTH KATAKANA LETTER NE
+0xC9	U+FF89	# HALFWIDTH KATAKANA LETTER NO
+0xCA	U+FF8A	# HALFWIDTH KATAKANA LETTER HA
+0xCB	U+FF8B	# HALFWIDTH KATAKANA LETTER HI
+0xCC	U+FF8C	# HALFWIDTH KATAKANA LETTER HU
+0xCD	U+FF8D	# HALFWIDTH KATAKANA LETTER HE
+0xCE	U+FF8E	# HALFWIDTH KATAKANA LETTER HO
+0xCF	U+FF8F	# HALFWIDTH KATAKANA LETTER MA
+0xD0	U+FF90	# HALFWIDTH KATAKANA LETTER MI
+0xD1	U+FF91	# HALFWIDTH KATAKANA LETTER MU
+0xD2	U+FF92	# HALFWIDTH KATAKANA LETTER ME
+0xD3	U+FF93	# HALFWIDTH KATAKANA LETTER MO
+0xD4	U+FF94	# HALFWIDTH KATAKANA LETTER YA
+0xD5	U+FF95	# HALFWIDTH KATAKANA LETTER YU
+0xD6	U+FF96	# HALFWIDTH KATAKANA LETTER YO
+0xD7	U+FF97	# HALFWIDTH KATAKANA LETTER RA
+0xD8	U+FF98	# HALFWIDTH KATAKANA LETTER RI
+0xD9	U+FF99	# HALFWIDTH KATAKANA LETTER RU
+0xDA	U+FF9A	# HALFWIDTH KATAKANA LETTER RE
+0xDB	U+FF9B	# HALFWIDTH KATAKANA LETTER RO
+0xDC	U+FF9C	# HALFWIDTH KATAKANA LETTER WA
+0xDD	U+FF9D	# HALFWIDTH KATAKANA LETTER N
+0xDE	U+FF9E	# HALFWIDTH KATAKANA VOICED SOUND MARK
+0xDF	U+FF9F	# HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+#
+#  sjis0213    
+#
+0x8140	U+3000	# IDEOGRAPHIC SPACE
+0x8141	U+3001	# IDEOGRAPHIC COMMA
+0x8142	U+3002	# IDEOGRAPHIC FULL STOP
+0x8143	U+FF0C	# FULLWIDTH COMMA
+0x8144	U+FF0E	# FULLWIDTH FULL STOP
+0x8145	U+30FB	# KATAKANA MIDDLE DOT
+0x8146	U+FF1A	# FULLWIDTH COLON
+0x8147	U+FF1B	# FULLWIDTH SEMICOLON
+0x8148	U+FF1F	# FULLWIDTH QUESTION MARK
+0x8149	U+FF01	# FULLWIDTH EXCLAMATION MARK
+0x814A	U+309B	# KATAKANA-HIRAGANA VOICED SOUND MARK
+0x814B	U+309C	# KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+0x814C	U+00B4	# ACUTE ACCENT
+0x814D	U+FF40	# FULLWIDTH GRAVE ACCENT
+0x814E	U+00A8	# DIAERESIS
+0x814F	U+FF3E	# FULLWIDTH CIRCUMFLEX ACCENT
+0x8150	U+FFE3	# FULLWIDTH MACRON 
+0x8151	U+FF3F	# FULLWIDTH LOW LINE
+0x8152	U+30FD	# KATAKANA ITERATION MARK
+0x8153	U+30FE	# KATAKANA VOICED ITERATION MARK
+0x8154	U+309D	# HIRAGANA ITERATION MARK
+0x8155	U+309E	# HIRAGANA VOICED ITERATION MARK
+0x8156	U+3003	# DITTO MARK
+0x8157	U+4EDD	# <cjk>
+0x8158	U+3005	# IDEOGRAPHIC ITERATION MARK
+0x8159	U+3006	# IDEOGRAPHIC CLOSING MARK
+0x815A	U+3007	# IDEOGRAPHIC NUMBER ZERO
+0x815B	U+30FC	# KATAKANA-HIRAGANA PROLONGED SOUND MARK
+0x815C	U+2014	# EM DASH	Windows: U+2015
+0x815D	U+2010	# HYPHEN
+0x815E	U+FF0F	# FULLWIDTH SOLIDUS
+#0x815F	U+005C	# REVERSE SOLIDUS	Fullwidth: U+FF3C
+0x815F	U+FF3C	# REVERSE SOLIDUS	Fullwidth: U+FF3C
+0x8160	U+301C	# WAVE DASH	Windows: U+FF5E
+0x8161	U+2016	# DOUBLE VERTICAL LINE	Windows: U+2225
+0x8162	U+FF5C	# FULLWIDTH VERTICAL LINE
+0x8163	U+2026	# HORIZONTAL ELLIPSIS
+0x8164	U+2025	# TWO DOT LEADER
+0x8165	U+2018	# LEFT SINGLE QUOTATION MARK
+0x8166	U+2019	# RIGHT SINGLE QUOTATION MARK
+0x8167	U+201C	# LEFT DOUBLE QUOTATION MARK
+0x8168	U+201D	# RIGHT DOUBLE QUOTATION MARK
+0x8169	U+FF08	# FULLWIDTH LEFT PARENTHESIS
+0x816A	U+FF09	# FULLWIDTH RIGHT PARENTHESIS
+0x816B	U+3014	# LEFT TORTOISE SHELL BRACKET
+0x816C	U+3015	# RIGHT TORTOISE SHELL BRACKET
+0x816D	U+FF3B	# FULLWIDTH LEFT SQUARE BRACKET
+0x816E	U+FF3D	# FULLWIDTH RIGHT SQUARE BRACKET
+0x816F	U+FF5B	# FULLWIDTH LEFT CURLY BRACKET
+0x8170	U+FF5D	# FULLWIDTH RIGHT CURLY BRACKET
+0x8171	U+3008	# LEFT ANGLE BRACKET
+0x8172	U+3009	# RIGHT ANGLE BRACKET
+0x8173	U+300A	# LEFT DOUBLE ANGLE BRACKET
+0x8174	U+300B	# RIGHT DOUBLE ANGLE BRACKET
+0x8175	U+300C	# LEFT CORNER BRACKET
+0x8176	U+300D	# RIGHT CORNER BRACKET
+0x8177	U+300E	# LEFT WHITE CORNER BRACKET
+0x8178	U+300F	# RIGHT WHITE CORNER BRACKET
+0x8179	U+3010	# LEFT BLACK LENTICULAR BRACKET
+0x817A	U+3011	# RIGHT BLACK LENTICULAR BRACKET
+0x817B	U+FF0B	# FULLWIDTH PLUS SIGN
+0x817C	U+2212	# MINUS SIGN	Windows: U+FF0D
+0x817D	U+00B1	# PLUS-MINUS SIGN
+0x817E	U+00D7	# MULTIPLICATION SIGN
+0x8180	U+00F7	# DIVISION SIGN
+0x8181	U+FF1D	# FULLWIDTH EQUALS SIGN
+0x8182	U+2260	# NOT EQUAL TO
+0x8183	U+FF1C	# FULLWIDTH LESS-THAN SIGN
+0x8184	U+FF1E	# FULLWIDTH GREATER-THAN SIGN
+0x8185	U+2266	# LESS-THAN OVER EQUAL TO
+0x8186	U+2267	# GREATER-THAN OVER EQUAL TO
+0x8187	U+221E	# INFINITY
+0x8188	U+2234	# THEREFORE
+0x8189	U+2642	# MALE SIGN
+0x818A	U+2640	# FEMALE SIGN
+0x818B	U+00B0	# DEGREE SIGN
+0x818C	U+2032	# PRIME
+0x818D	U+2033	# DOUBLE PRIME
+0x818E	U+2103	# DEGREE CELSIUS
+0x818F	U+FFE5	# FULLWIDTH YEN SIGN
+0x8190	U+FF04	# FULLWIDTH DOLLAR SIGN
+0x8191	U+00A2	# CENT SIGN	Windows: U+FFE0
+0x8192	U+00A3	# POUND SIGN	Windows: U+FFE1
+0x8193	U+FF05	# FULLWIDTH PERCENT SIGN
+0x8194	U+FF03	# FULLWIDTH NUMBER SIGN
+0x8195	U+FF06	# FULLWIDTH AMPERSAND
+0x8196	U+FF0A	# FULLWIDTH ASTERISK
+0x8197	U+FF20	# FULLWIDTH COMMERCIAL AT
+0x8198	U+00A7	# SECTION SIGN
+0x8199	U+2606	# WHITE STAR
+0x819A	U+2605	# BLACK STAR
+0x819B	U+25CB	# WHITE CIRCLE
+0x819C	U+25CF	# BLACK CIRCLE
+0x819D	U+25CE	# BULLSEYE
+0x819E	U+25C7	# WHITE DIAMOND
+0x819F	U+25C6	# BLACK DIAMOND
+0x81A0	U+25A1	# WHITE SQUARE
+0x81A1	U+25A0	# BLACK SQUARE
+0x81A2	U+25B3	# WHITE UP-POINTING TRIANGLE
+0x81A3	U+25B2	# BLACK UP-POINTING TRIANGLE
+0x81A4	U+25BD	# WHITE DOWN-POINTING TRIANGLE
+0x81A5	U+25BC	# BLACK DOWN-POINTING TRIANGLE
+0x81A6	U+203B	# REFERENCE MARK
+0x81A7	U+3012	# POSTAL MARK
+0x81A8	U+2192	# RIGHTWARDS ARROW
+0x81A9	U+2190	# LEFTWARDS ARROW
+0x81AA	U+2191	# UPWARDS ARROW
+0x81AB	U+2193	# DOWNWARDS ARROW
+0x81AC	U+3013	# GETA MARK
+0x81AD	U+FF07	# FULLWIDTH APOSTROPHE
+0x81AE	U+FF02	# FULLWIDTH QUOTATION MARK	[2000]
+0x81AF	U+FF0D	# FULLWIDTH HYPHEN-MINUS	[2000]
+#0x81B0	U+007E	# TILDE	[2000]	Fullwidth: U+FF5E
+0x81B0	U+FF5E	# TILDE	[2000]	Fullwidth: U+FF5E
+0x81B1	U+3033	# VERTICAL KANA REPEAT MARK UPPER HALF	[2000]
+0x81B2	U+3034	# VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF	[2000]
+0x81B3	U+3035	# VERTICAL KANA REPEAT MARK LOWER HALF	[2000]
+0x81B4	U+303B	# VERTICAL IDEOGRAPHIC ITERATION MARK	[2000]	[Unicode3.2]
+0x81B5	U+303C	# MASU MARK	[2000]	[Unicode3.2]
+0x81B6	U+30FF	# KATAKANA DIGRAPH KOTO	[2000]	[Unicode3.2]
+0x81B7	U+309F	# HIRAGANA DIGRAPH YORI	[2000]	[Unicode3.2]
+0x81B8	U+2208	# ELEMENT OF	[1983]
+0x81B9	U+220B	# CONTAINS AS MEMBER	[1983]
+0x81BA	U+2286	# SUBSET OF OR EQUAL TO	[1983]
+0x81BB	U+2287	# SUPERSET OF OR EQUAL TO	[1983]
+0x81BC	U+2282	# SUBSET OF	[1983]
+0x81BD	U+2283	# SUPERSET OF	[1983]
+0x81BE	U+222A	# UNION	[1983]
+0x81BF	U+2229	# INTERSECTION	[1983]
+0x81C0	U+2284	# NOT A SUBSET OF	[2000]
+0x81C1	U+2285	# NOT A SUPERSET OF	[2000]
+0x81C2	U+228A	# SUBSET OF WITH NOT EQUAL TO	[2000]
+0x81C3	U+228B	# SUPERSET OF WITH NOT EQUAL TO	[2000]
+0x81C4	U+2209	# NOT AN ELEMENT OF	[2000]
+0x81C5	U+2205	# EMPTY SET	[2000]
+0x81C6	U+2305	# PROJECTIVE	[2000]
+0x81C7	U+2306	# PERSPECTIVE	[2000]
+0x81C8	U+2227	# LOGICAL AND	[1983]
+0x81C9	U+2228	# LOGICAL OR	[1983]
+0x81CA	U+00AC	# NOT SIGN	[1983]	Windows: U+FFE2
+0x81CB	U+21D2	# RIGHTWARDS DOUBLE ARROW	[1983]
+0x81CC	U+21D4	# LEFT RIGHT DOUBLE ARROW	[1983]
+0x81CD	U+2200	# FOR ALL	[1983]
+0x81CE	U+2203	# THERE EXISTS	[1983]
+0x81CF	U+2295	# CIRCLED PLUS	[2000]
+0x81D0	U+2296	# CIRCLED MINUS	[2000]
+0x81D1	U+2297	# CIRCLED TIMES	[2000]
+0x81D2	U+2225	# PARALLEL TO	[2000]
+0x81D3	U+2226	# NOT PARALLEL TO	[2000]
+0x81D4	U+FF5F	# FULLWIDTH LEFT WHITE PARENTHESIS	[2000]	[Unicode3.2]
+0x81D5	U+FF60	# FULLWIDTH RIGHT WHITE PARENTHESIS	[2000]	[Unicode3.2]
+0x81D6	U+3018	# LEFT WHITE TORTOISE SHELL BRACKET	[2000]
+0x81D7	U+3019	# RIGHT WHITE TORTOISE SHELL BRACKET	[2000]
+0x81D8	U+3016	# LEFT WHITE LENTICULAR BRACKET	[2000]
+0x81D9	U+3017	# RIGHT WHITE LENTICULAR BRACKET	[2000]
+0x81DA	U+2220	# ANGLE	[1983]
+0x81DB	U+22A5	# UP TACK	[1983]
+0x81DC	U+2312	# ARC	[1983]
+0x81DD	U+2202	# PARTIAL DIFFERENTIAL	[1983]
+0x81DE	U+2207	# NABLA	[1983]
+0x81DF	U+2261	# IDENTICAL TO	[1983]
+0x81E0	U+2252	# APPROXIMATELY EQUAL TO OR THE IMAGE OF	[1983]
+0x81E1	U+226A	# MUCH LESS-THAN	[1983]
+0x81E2	U+226B	# MUCH GREATER-THAN	[1983]
+0x81E3	U+221A	# SQUARE ROOT	[1983]
+0x81E4	U+223D	# REVERSED TILDE 	[1983]
+0x81E5	U+221D	# PROPORTIONAL TO	[1983]
+0x81E6	U+2235	# BECAUSE	[1983]
+0x81E7	U+222B	# INTEGRAL	[1983]
+0x81E8	U+222C	# DOUBLE INTEGRAL	[1983]
+0x81E9	U+2262	# NOT IDENTICAL TO	[2000]
+0x81EA	U+2243	# ASYMPTOTICALLY EQUAL TO	[2000]
+0x81EB	U+2245	# APPROXIMATELY EQUAL TO	[2000]
+0x81EC	U+2248	# ALMOST EQUAL TO	[2000]
+0x81ED	U+2276	# LESS-THAN OR GREATER-THAN	[2000]
+0x81EE	U+2277	# GREATER-THAN OR LESS-THAN	[2000]
+0x81EF	U+2194	# LEFT RIGHT ARROW	[2000]
+0x81F0	U+212B	# ANGSTROM SIGN	[1983]
+0x81F1	U+2030	# PER MILLE SIGN	[1983]
+0x81F2	U+266F	# MUSIC SHARP SIGN	[1983]
+0x81F3	U+266D	# MUSIC FLAT SIGN	[1983]
+0x81F4	U+266A	# EIGHTH NOTE	[1983]
+0x81F5	U+2020	# DAGGER	[1983]
+0x81F6	U+2021	# DOUBLE DAGGER	[1983]
+0x81F7	U+00B6	# PILCROW SIGN	[1983]
+0x81F8	U+266E	# MUSIC NATURAL SIGN	[2000]
+0x81F9	U+266B	# BEAMED EIGHTH NOTES	[2000]
+0x81FA	U+266C	# BEAMED SIXTEENTH NOTES	[2000]
+0x81FB	U+2669	# QUARTER NOTE	[2000]
+0x81FC	U+25EF	# LARGE CIRCLE	[1983]
+0x8240	U+25B7	# WHITE RIGHT-POINTING TRIANGLE	[2000]
+0x8241	U+25B6	# BLACK RIGHT-POINTING TRIANGLE	[2000]
+0x8242	U+25C1	# WHITE LEFT-POINTING TRIANGLE	[2000]
+0x8243	U+25C0	# BLACK LEFT-POINTING TRIANGLE	[2000]
+0x8244	U+2197	# NORTH EAST ARROW	[2000]
+0x8245	U+2198	# SOUTH EAST ARROW	[2000]
+0x8246	U+2196	# NORTH WEST ARROW	[2000]
+0x8247	U+2199	# SOUTH WEST ARROW	[2000]
+0x8248	U+21C4	# RIGHTWARDS ARROW OVER LEFTWARDS ARROW	[2000]
+0x8249	U+21E8	# RIGHTWARDS WHITE ARROW	[2000]
+0x824A	U+21E6	# LEFTWARDS WHITE ARROW	[2000]
+0x824B	U+21E7	# UPWARDS WHITE ARROW	[2000]
+0x824C	U+21E9	# DOWNWARDS WHITE ARROW	[2000]
+0x824D	U+2934	# ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS	[2000]	[Unicode3.2]
+0x824E	U+2935	# ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS	[2000]	[Unicode3.2]
+0x824F	U+FF10	# FULLWIDTH DIGIT ZERO
+0x8250	U+FF11	# FULLWIDTH DIGIT ONE
+0x8251	U+FF12	# FULLWIDTH DIGIT TWO
+0x8252	U+FF13	# FULLWIDTH DIGIT THREE
+0x8253	U+FF14	# FULLWIDTH DIGIT FOUR
+0x8254	U+FF15	# FULLWIDTH DIGIT FIVE
+0x8255	U+FF16	# FULLWIDTH DIGIT SIX
+0x8256	U+FF17	# FULLWIDTH DIGIT SEVEN
+0x8257	U+FF18	# FULLWIDTH DIGIT EIGHT
+0x8258	U+FF19	# FULLWIDTH DIGIT NINE
+0x8259	U+29BF	# CIRCLED BULLET	[2000]	[Unicode3.2]
+0x825A	U+25C9	# FISHEYE	[2000]
+0x825B	U+303D	# PART ALTERNATION MARK	[2000]	[Unicode3.2]
+0x825C	U+FE46	# WHITE SESAME DOT	[2000]	[Unicode3.2]
+0x825D	U+FE45	# SESAME DOT	[2000]	[Unicode3.2]
+0x825E	U+25E6	# WHITE BULLET	[2000]
+0x825F	U+2022	# BULLET	[2000]
+0x8260	U+FF21	# FULLWIDTH LATIN CAPITAL LETTER A
+0x8261	U+FF22	# FULLWIDTH LATIN CAPITAL LETTER B
+0x8262	U+FF23	# FULLWIDTH LATIN CAPITAL LETTER C
+0x8263	U+FF24	# FULLWIDTH LATIN CAPITAL LETTER D
+0x8264	U+FF25	# FULLWIDTH LATIN CAPITAL LETTER E
+0x8265	U+FF26	# FULLWIDTH LATIN CAPITAL LETTER F
+0x8266	U+FF27	# FULLWIDTH LATIN CAPITAL LETTER G
+0x8267	U+FF28	# FULLWIDTH LATIN CAPITAL LETTER H
+0x8268	U+FF29	# FULLWIDTH LATIN CAPITAL LETTER I
+0x8269	U+FF2A	# FULLWIDTH LATIN CAPITAL LETTER J
+0x826A	U+FF2B	# FULLWIDTH LATIN CAPITAL LETTER K
+0x826B	U+FF2C	# FULLWIDTH LATIN CAPITAL LETTER L
+0x826C	U+FF2D	# FULLWIDTH LATIN CAPITAL LETTER M
+0x826D	U+FF2E	# FULLWIDTH LATIN CAPITAL LETTER N
+0x826E	U+FF2F	# FULLWIDTH LATIN CAPITAL LETTER O
+0x826F	U+FF30	# FULLWIDTH LATIN CAPITAL LETTER P
+0x8270	U+FF31	# FULLWIDTH LATIN CAPITAL LETTER Q
+0x8271	U+FF32	# FULLWIDTH LATIN CAPITAL LETTER R
+0x8272	U+FF33	# FULLWIDTH LATIN CAPITAL LETTER S
+0x8273	U+FF34	# FULLWIDTH LATIN CAPITAL LETTER T
+0x8274	U+FF35	# FULLWIDTH LATIN CAPITAL LETTER U
+0x8275	U+FF36	# FULLWIDTH LATIN CAPITAL LETTER V
+0x8276	U+FF37	# FULLWIDTH LATIN CAPITAL LETTER W
+0x8277	U+FF38	# FULLWIDTH LATIN CAPITAL LETTER X
+0x8278	U+FF39	# FULLWIDTH LATIN CAPITAL LETTER Y
+0x8279	U+FF3A	# FULLWIDTH LATIN CAPITAL LETTER Z
+0x827A	U+2213	# MINUS-OR-PLUS SIGN	[2000]
+0x827B	U+2135	# ALEF SYMBOL	[2000]
+0x827C	U+210F	# PLANCK CONSTANT OVER TWO PI	[2000]
+0x827D	U+33CB	# SQUARE HP	[2000]
+0x827E	U+2113	# SCRIPT SMALL L	[2000]
+0x8280	U+2127	# INVERTED OHM SIGN	[2000]
+0x8281	U+FF41	# FULLWIDTH LATIN SMALL LETTER A
+0x8282	U+FF42	# FULLWIDTH LATIN SMALL LETTER B
+0x8283	U+FF43	# FULLWIDTH LATIN SMALL LETTER C
+0x8284	U+FF44	# FULLWIDTH LATIN SMALL LETTER D
+0x8285	U+FF45	# FULLWIDTH LATIN SMALL LETTER E
+0x8286	U+FF46	# FULLWIDTH LATIN SMALL LETTER F
+0x8287	U+FF47	# FULLWIDTH LATIN SMALL LETTER G
+0x8288	U+FF48	# FULLWIDTH LATIN SMALL LETTER H
+0x8289	U+FF49	# FULLWIDTH LATIN SMALL LETTER I
+0x828A	U+FF4A	# FULLWIDTH LATIN SMALL LETTER J
+0x828B	U+FF4B	# FULLWIDTH LATIN SMALL LETTER K
+0x828C	U+FF4C	# FULLWIDTH LATIN SMALL LETTER L
+0x828D	U+FF4D	# FULLWIDTH LATIN SMALL LETTER M
+0x828E	U+FF4E	# FULLWIDTH LATIN SMALL LETTER N
+0x828F	U+FF4F	# FULLWIDTH LATIN SMALL LETTER O
+0x8290	U+FF50	# FULLWIDTH LATIN SMALL LETTER P
+0x8291	U+FF51	# FULLWIDTH LATIN SMALL LETTER Q
+0x8292	U+FF52	# FULLWIDTH LATIN SMALL LETTER R
+0x8293	U+FF53	# FULLWIDTH LATIN SMALL LETTER S
+0x8294	U+FF54	# FULLWIDTH LATIN SMALL LETTER T
+0x8295	U+FF55	# FULLWIDTH LATIN SMALL LETTER U
+0x8296	U+FF56	# FULLWIDTH LATIN SMALL LETTER V
+0x8297	U+FF57	# FULLWIDTH LATIN SMALL LETTER W
+0x8298	U+FF58	# FULLWIDTH LATIN SMALL LETTER X
+0x8299	U+FF59	# FULLWIDTH LATIN SMALL LETTER Y
+0x829A	U+FF5A	# FULLWIDTH LATIN SMALL LETTER Z
+0x829B	U+30A0	# KATAKANA-HIRAGANA DOUBLE HYPHEN	[2000]	[Unicode3.2]
+0x829C	U+2013	# EN DASH	[2000]
+0x829D	U+29FA	# DOUBLE PLUS	[2000]	[Unicode3.2]
+0x829E	U+29FB	# TRIPLE PLUS	[2000]	[Unicode3.2]
+0x829F	U+3041	# HIRAGANA LETTER SMALL A
+0x82A0	U+3042	# HIRAGANA LETTER A
+0x82A1	U+3043	# HIRAGANA LETTER SMALL I
+0x82A2	U+3044	# HIRAGANA LETTER I
+0x82A3	U+3045	# HIRAGANA LETTER SMALL U
+0x82A4	U+3046	# HIRAGANA LETTER U
+0x82A5	U+3047	# HIRAGANA LETTER SMALL E
+0x82A6	U+3048	# HIRAGANA LETTER E
+0x82A7	U+3049	# HIRAGANA LETTER SMALL O
+0x82A8	U+304A	# HIRAGANA LETTER O
+0x82A9	U+304B	# HIRAGANA LETTER KA
+0x82AA	U+304C	# HIRAGANA LETTER GA
+0x82AB	U+304D	# HIRAGANA LETTER KI
+0x82AC	U+304E	# HIRAGANA LETTER GI
+0x82AD	U+304F	# HIRAGANA LETTER KU
+0x82AE	U+3050	# HIRAGANA LETTER GU
+0x82AF	U+3051	# HIRAGANA LETTER KE
+0x82B0	U+3052	# HIRAGANA LETTER GE
+0x82B1	U+3053	# HIRAGANA LETTER KO
+0x82B2	U+3054	# HIRAGANA LETTER GO
+0x82B3	U+3055	# HIRAGANA LETTER SA
+0x82B4	U+3056	# HIRAGANA LETTER ZA
+0x82B5	U+3057	# HIRAGANA LETTER SI
+0x82B6	U+3058	# HIRAGANA LETTER ZI
+0x82B7	U+3059	# HIRAGANA LETTER SU
+0x82B8	U+305A	# HIRAGANA LETTER ZU
+0x82B9	U+305B	# HIRAGANA LETTER SE
+0x82BA	U+305C	# HIRAGANA LETTER ZE
+0x82BB	U+305D	# HIRAGANA LETTER SO
+0x82BC	U+305E	# HIRAGANA LETTER ZO
+0x82BD	U+305F	# HIRAGANA LETTER TA
+0x82BE	U+3060	# HIRAGANA LETTER DA
+0x82BF	U+3061	# HIRAGANA LETTER TI
+0x82C0	U+3062	# HIRAGANA LETTER DI
+0x82C1	U+3063	# HIRAGANA LETTER SMALL TU
+0x82C2	U+3064	# HIRAGANA LETTER TU
+0x82C3	U+3065	# HIRAGANA LETTER DU
+0x82C4	U+3066	# HIRAGANA LETTER TE
+0x82C5	U+3067	# HIRAGANA LETTER DE
+0x82C6	U+3068	# HIRAGANA LETTER TO
+0x82C7	U+3069	# HIRAGANA LETTER DO
+0x82C8	U+306A	# HIRAGANA LETTER NA
+0x82C9	U+306B	# HIRAGANA LETTER NI
+0x82CA	U+306C	# HIRAGANA LETTER NU
+0x82CB	U+306D	# HIRAGANA LETTER NE
+0x82CC	U+306E	# HIRAGANA LETTER NO
+0x82CD	U+306F	# HIRAGANA LETTER HA
+0x82CE	U+3070	# HIRAGANA LETTER BA
+0x82CF	U+3071	# HIRAGANA LETTER PA
+0x82D0	U+3072	# HIRAGANA LETTER HI
+0x82D1	U+3073	# HIRAGANA LETTER BI
+0x82D2	U+3074	# HIRAGANA LETTER PI
+0x82D3	U+3075	# HIRAGANA LETTER HU
+0x82D4	U+3076	# HIRAGANA LETTER BU
+0x82D5	U+3077	# HIRAGANA LETTER PU
+0x82D6	U+3078	# HIRAGANA LETTER HE
+0x82D7	U+3079	# HIRAGANA LETTER BE
+0x82D8	U+307A	# HIRAGANA LETTER PE
+0x82D9	U+307B	# HIRAGANA LETTER HO
+0x82DA	U+307C	# HIRAGANA LETTER BO
+0x82DB	U+307D	# HIRAGANA LETTER PO
+0x82DC	U+307E	# HIRAGANA LETTER MA
+0x82DD	U+307F	# HIRAGANA LETTER MI
+0x82DE	U+3080	# HIRAGANA LETTER MU
+0x82DF	U+3081	# HIRAGANA LETTER ME
+0x82E0	U+3082	# HIRAGANA LETTER MO
+0x82E1	U+3083	# HIRAGANA LETTER SMALL YA
+0x82E2	U+3084	# HIRAGANA LETTER YA
+0x82E3	U+3085	# HIRAGANA LETTER SMALL YU
+0x82E4	U+3086	# HIRAGANA LETTER YU
+0x82E5	U+3087	# HIRAGANA LETTER SMALL YO
+0x82E6	U+3088	# HIRAGANA LETTER YO
+0x82E7	U+3089	# HIRAGANA LETTER RA
+0x82E8	U+308A	# HIRAGANA LETTER RI
+0x82E9	U+308B	# HIRAGANA LETTER RU
+0x82EA	U+308C	# HIRAGANA LETTER RE
+0x82EB	U+308D	# HIRAGANA LETTER RO
+0x82EC	U+308E	# HIRAGANA LETTER SMALL WA
+0x82ED	U+308F	# HIRAGANA LETTER WA
+0x82EE	U+3090	# HIRAGANA LETTER WI
+0x82EF	U+3091	# HIRAGANA LETTER WE
+0x82F0	U+3092	# HIRAGANA LETTER WO
+0x82F1	U+3093	# HIRAGANA LETTER N
+0x82F2	U+3094	# HIRAGANA LETTER VU	[2000]
+0x82F3	U+3095	# HIRAGANA LETTER SMALL KA	[2000]	[Unicode3.2]
+0x82F4	U+3096	# HIRAGANA LETTER SMALL KE	[2000]	[Unicode3.2]
+0x82F5	U+304B+309A	# 	[2000]
+0x82F6	U+304D+309A	# 	[2000]
+0x82F7	U+304F+309A	# 	[2000]
+0x82F8	U+3051+309A	# 	[2000]
+0x82F9	U+3053+309A	# 	[2000]
+0x82FA		# <reserved>
+0x82FB		# <reserved>
+0x82FC		# <reserved>
+0x8340	U+30A1	# KATAKANA LETTER SMALL A
+0x8341	U+30A2	# KATAKANA LETTER A
+0x8342	U+30A3	# KATAKANA LETTER SMALL I
+0x8343	U+30A4	# KATAKANA LETTER I
+0x8344	U+30A5	# KATAKANA LETTER SMALL U
+0x8345	U+30A6	# KATAKANA LETTER U
+0x8346	U+30A7	# KATAKANA LETTER SMALL E
+0x8347	U+30A8	# KATAKANA LETTER E
+0x8348	U+30A9	# KATAKANA LETTER SMALL O
+0x8349	U+30AA	# KATAKANA LETTER O
+0x834A	U+30AB	# KATAKANA LETTER KA
+0x834B	U+30AC	# KATAKANA LETTER GA
+0x834C	U+30AD	# KATAKANA LETTER KI
+0x834D	U+30AE	# KATAKANA LETTER GI
+0x834E	U+30AF	# KATAKANA LETTER KU
+0x834F	U+30B0	# KATAKANA LETTER GU
+0x8350	U+30B1	# KATAKANA LETTER KE
+0x8351	U+30B2	# KATAKANA LETTER GE
+0x8352	U+30B3	# KATAKANA LETTER KO
+0x8353	U+30B4	# KATAKANA LETTER GO
+0x8354	U+30B5	# KATAKANA LETTER SA
+0x8355	U+30B6	# KATAKANA LETTER ZA
+0x8356	U+30B7	# KATAKANA LETTER SI
+0x8357	U+30B8	# KATAKANA LETTER ZI
+0x8358	U+30B9	# KATAKANA LETTER SU
+0x8359	U+30BA	# KATAKANA LETTER ZU
+0x835A	U+30BB	# KATAKANA LETTER SE
+0x835B	U+30BC	# KATAKANA LETTER ZE
+0x835C	U+30BD	# KATAKANA LETTER SO
+0x835D	U+30BE	# KATAKANA LETTER ZO
+0x835E	U+30BF	# KATAKANA LETTER TA
+0x835F	U+30C0	# KATAKANA LETTER DA
+0x8360	U+30C1	# KATAKANA LETTER TI
+0x8361	U+30C2	# KATAKANA LETTER DI
+0x8362	U+30C3	# KATAKANA LETTER SMALL TU
+0x8363	U+30C4	# KATAKANA LETTER TU
+0x8364	U+30C5	# KATAKANA LETTER DU
+0x8365	U+30C6	# KATAKANA LETTER TE
+0x8366	U+30C7	# KATAKANA LETTER DE
+0x8367	U+30C8	# KATAKANA LETTER TO
+0x8368	U+30C9	# KATAKANA LETTER DO
+0x8369	U+30CA	# KATAKANA LETTER NA
+0x836A	U+30CB	# KATAKANA LETTER NI
+0x836B	U+30CC	# KATAKANA LETTER NU
+0x836C	U+30CD	# KATAKANA LETTER NE
+0x836D	U+30CE	# KATAKANA LETTER NO
+0x836E	U+30CF	# KATAKANA LETTER HA
+0x836F	U+30D0	# KATAKANA LETTER BA
+0x8370	U+30D1	# KATAKANA LETTER PA
+0x8371	U+30D2	# KATAKANA LETTER HI
+0x8372	U+30D3	# KATAKANA LETTER BI
+0x8373	U+30D4	# KATAKANA LETTER PI
+0x8374	U+30D5	# KATAKANA LETTER HU
+0x8375	U+30D6	# KATAKANA LETTER BU
+0x8376	U+30D7	# KATAKANA LETTER PU
+0x8377	U+30D8	# KATAKANA LETTER HE
+0x8378	U+30D9	# KATAKANA LETTER BE
+0x8379	U+30DA	# KATAKANA LETTER PE
+0x837A	U+30DB	# KATAKANA LETTER HO
+0x837B	U+30DC	# KATAKANA LETTER BO
+0x837C	U+30DD	# KATAKANA LETTER PO
+0x837D	U+30DE	# KATAKANA LETTER MA
+0x837E	U+30DF	# KATAKANA LETTER MI
+0x8380	U+30E0	# KATAKANA LETTER MU
+0x8381	U+30E1	# KATAKANA LETTER ME
+0x8382	U+30E2	# KATAKANA LETTER MO
+0x8383	U+30E3	# KATAKANA LETTER SMALL YA
+0x8384	U+30E4	# KATAKANA LETTER YA
+0x8385	U+30E5	# KATAKANA LETTER SMALL YU
+0x8386	U+30E6	# KATAKANA LETTER YU
+0x8387	U+30E7	# KATAKANA LETTER SMALL YO
+0x8388	U+30E8	# KATAKANA LETTER YO
+0x8389	U+30E9	# KATAKANA LETTER RA
+0x838A	U+30EA	# KATAKANA LETTER RI
+0x838B	U+30EB	# KATAKANA LETTER RU
+0x838C	U+30EC	# KATAKANA LETTER RE
+0x838D	U+30ED	# KATAKANA LETTER RO
+0x838E	U+30EE	# KATAKANA LETTER SMALL WA
+0x838F	U+30EF	# KATAKANA LETTER WA
+0x8390	U+30F0	# KATAKANA LETTER WI
+0x8391	U+30F1	# KATAKANA LETTER WE
+0x8392	U+30F2	# KATAKANA LETTER WO
+0x8393	U+30F3	# KATAKANA LETTER N
+0x8394	U+30F4	# KATAKANA LETTER VU
+0x8395	U+30F5	# KATAKANA LETTER SMALL KA
+0x8396	U+30F6	# KATAKANA LETTER SMALL KE
+0x8397	U+30AB+309A	# 	[2000]
+0x8398	U+30AD+309A	# 	[2000]
+0x8399	U+30AF+309A	# 	[2000]
+0x839A	U+30B1+309A	# 	[2000]
+0x839B	U+30B3+309A	# 	[2000]
+0x839C	U+30BB+309A	# 	[2000]
+0x839D	U+30C4+309A	# 	[2000]
+0x839E	U+30C8+309A	# 	[2000]
+0x839F	U+0391	# GREEK CAPITAL LETTER ALPHA
+0x83A0	U+0392	# GREEK CAPITAL LETTER BETA
+0x83A1	U+0393	# GREEK CAPITAL LETTER GAMMA
+0x83A2	U+0394	# GREEK CAPITAL LETTER DELTA
+0x83A3	U+0395	# GREEK CAPITAL LETTER EPSILON
+0x83A4	U+0396	# GREEK CAPITAL LETTER ZETA
+0x83A5	U+0397	# GREEK CAPITAL LETTER ETA
+0x83A6	U+0398	# GREEK CAPITAL LETTER THETA
+0x83A7	U+0399	# GREEK CAPITAL LETTER IOTA
+0x83A8	U+039A	# GREEK CAPITAL LETTER KAPPA
+0x83A9	U+039B	# GREEK CAPITAL LETTER LAMDA
+0x83AA	U+039C	# GREEK CAPITAL LETTER MU
+0x83AB	U+039D	# GREEK CAPITAL LETTER NU
+0x83AC	U+039E	# GREEK CAPITAL LETTER XI
+0x83AD	U+039F	# GREEK CAPITAL LETTER OMICRON
+0x83AE	U+03A0	# GREEK CAPITAL LETTER PI
+0x83AF	U+03A1	# GREEK CAPITAL LETTER RHO
+0x83B0	U+03A3	# GREEK CAPITAL LETTER SIGMA
+0x83B1	U+03A4	# GREEK CAPITAL LETTER TAU
+0x83B2	U+03A5	# GREEK CAPITAL LETTER UPSILON
+0x83B3	U+03A6	# GREEK CAPITAL LETTER PHI
+0x83B4	U+03A7	# GREEK CAPITAL LETTER CHI
+0x83B5	U+03A8	# GREEK CAPITAL LETTER PSI
+0x83B6	U+03A9	# GREEK CAPITAL LETTER OMEGA
+0x83B7	U+2664	# WHITE SPADE SUIT	[2000]
+0x83B8	U+2660	# BLACK SPADE SUIT	[2000]
+0x83B9	U+2662	# WHITE DIAMOND SUIT	[2000]
+0x83BA	U+2666	# BLACK DIAMOND SUIT	[2000]
+0x83BB	U+2661	# WHITE HEART SUIT	[2000]
+0x83BC	U+2665	# BLACK HEART SUIT	[2000]
+0x83BD	U+2667	# WHITE CLUB SUIT	[2000]
+0x83BE	U+2663	# BLACK CLUB SUIT	[2000]
+0x83BF	U+03B1	# GREEK SMALL LETTER ALPHA
+0x83C0	U+03B2	# GREEK SMALL LETTER BETA
+0x83C1	U+03B3	# GREEK SMALL LETTER GAMMA
+0x83C2	U+03B4	# GREEK SMALL LETTER DELTA
+0x83C3	U+03B5	# GREEK SMALL LETTER EPSILON
+0x83C4	U+03B6	# GREEK SMALL LETTER ZETA
+0x83C5	U+03B7	# GREEK SMALL LETTER ETA
+0x83C6	U+03B8	# GREEK SMALL LETTER THETA
+0x83C7	U+03B9	# GREEK SMALL LETTER IOTA
+0x83C8	U+03BA	# GREEK SMALL LETTER KAPPA
+0x83C9	U+03BB	# GREEK SMALL LETTER LAMDA
+0x83CA	U+03BC	# GREEK SMALL LETTER MU
+0x83CB	U+03BD	# GREEK SMALL LETTER NU
+0x83CC	U+03BE	# GREEK SMALL LETTER XI
+0x83CD	U+03BF	# GREEK SMALL LETTER OMICRON
+0x83CE	U+03C0	# GREEK SMALL LETTER PI
+0x83CF	U+03C1	# GREEK SMALL LETTER RHO
+0x83D0	U+03C3	# GREEK SMALL LETTER SIGMA
+0x83D1	U+03C4	# GREEK SMALL LETTER TAU
+0x83D2	U+03C5	# GREEK SMALL LETTER UPSILON
+0x83D3	U+03C6	# GREEK SMALL LETTER PHI
+0x83D4	U+03C7	# GREEK SMALL LETTER CHI
+0x83D5	U+03C8	# GREEK SMALL LETTER PSI
+0x83D6	U+03C9	# GREEK SMALL LETTER OMEGA
+0x83D7	U+03C2	# GREEK SMALL LETTER FINAL SIGMA	[2000]
+0x83D8	U+24F5	# DOUBLE CIRCLED DIGIT ONE	[2000]	[Unicode3.2]
+0x83D9	U+24F6	# DOUBLE CIRCLED DIGIT TWO	[2000]	[Unicode3.2]
+0x83DA	U+24F7	# DOUBLE CIRCLED DIGIT THREE	[2000]	[Unicode3.2]
+0x83DB	U+24F8	# DOUBLE CIRCLED DIGIT FOUR	[2000]	[Unicode3.2]
+0x83DC	U+24F9	# DOUBLE CIRCLED DIGIT FIVE	[2000]	[Unicode3.2]
+0x83DD	U+24FA	# DOUBLE CIRCLED DIGIT SIX	[2000]	[Unicode3.2]
+0x83DE	U+24FB	# DOUBLE CIRCLED DIGIT SEVEN	[2000]	[Unicode3.2]
+0x83DF	U+24FC	# DOUBLE CIRCLED DIGIT EIGHT	[2000]	[Unicode3.2]
+0x83E0	U+24FD	# DOUBLE CIRCLED DIGIT NINE	[2000]	[Unicode3.2]
+0x83E1	U+24FE	# DOUBLE CIRCLED NUMBER TEN	[2000]	[Unicode3.2]
+0x83E2	U+2616	# WHITE SHOGI PIECE	[2000]	[Unicode3.2]
+0x83E3	U+2617	# BLACK SHOGI PIECE	[2000]	[Unicode3.2]
+0x83E4	U+3020	# POSTAL MARK FACE	[2000]
+0x83E5	U+260E	# BLACK TELEPHONE	[2000]
+0x83E6	U+2600	# BLACK SUN WITH RAYS	[2000]
+0x83E7	U+2601	# CLOUD	[2000]
+0x83E8	U+2602	# UMBRELLA	[2000]
+0x83E9	U+2603	# SNOWMAN	[2000]
+0x83EA	U+2668	# HOT SPRINGS	[2000]
+0x83EB	U+25B1	# WHITE PARALLELOGRAM	[2000]
+0x83EC	U+31F0	# KATAKANA LETTER SMALL KU	[2000]	[Unicode3.2]
+0x83ED	U+31F1	# KATAKANA LETTER SMALL SI	[2000]	[Unicode3.2]
+0x83EE	U+31F2	# KATAKANA LETTER SMALL SU	[2000]	[Unicode3.2]
+0x83EF	U+31F3	# KATAKANA LETTER SMALL TO	[2000]	[Unicode3.2]
+0x83F0	U+31F4	# KATAKANA LETTER SMALL NU	[2000]	[Unicode3.2]
+0x83F1	U+31F5	# KATAKANA LETTER SMALL HA	[2000]	[Unicode3.2]
+0x83F2	U+31F6	# KATAKANA LETTER SMALL HI	[2000]	[Unicode3.2]
+0x83F3	U+31F7	# KATAKANA LETTER SMALL HU	[2000]	[Unicode3.2]
+0x83F4	U+31F8	# KATAKANA LETTER SMALL HE	[2000]	[Unicode3.2]
+0x83F5	U+31F9	# KATAKANA LETTER SMALL HO	[2000]	[Unicode3.2]
+0x83F6	U+31F7+309A	# 	[2000]
+0x83F7	U+31FA	# KATAKANA LETTER SMALL MU	[2000]	[Unicode3.2]
+0x83F8	U+31FB	# KATAKANA LETTER SMALL RA	[2000]	[Unicode3.2]
+0x83F9	U+31FC	# KATAKANA LETTER SMALL RI	[2000]	[Unicode3.2]
+0x83FA	U+31FD	# KATAKANA LETTER SMALL RU	[2000]	[Unicode3.2]
+0x83FB	U+31FE	# KATAKANA LETTER SMALL RE	[2000]	[Unicode3.2]
+0x83FC	U+31FF	# KATAKANA LETTER SMALL RO	[2000]	[Unicode3.2]
+0x8440	U+0410	# CYRILLIC CAPITAL LETTER A
+0x8441	U+0411	# CYRILLIC CAPITAL LETTER BE
+0x8442	U+0412	# CYRILLIC CAPITAL LETTER VE
+0x8443	U+0413	# CYRILLIC CAPITAL LETTER GHE
+0x8444	U+0414	# CYRILLIC CAPITAL LETTER DE
+0x8445	U+0415	# CYRILLIC CAPITAL LETTER IE
+0x8446	U+0401	# CYRILLIC CAPITAL LETTER IO
+0x8447	U+0416	# CYRILLIC CAPITAL LETTER ZHE
+0x8448	U+0417	# CYRILLIC CAPITAL LETTER ZE
+0x8449	U+0418	# CYRILLIC CAPITAL LETTER I
+0x844A	U+0419	# CYRILLIC CAPITAL LETTER SHORT I
+0x844B	U+041A	# CYRILLIC CAPITAL LETTER KA
+0x844C	U+041B	# CYRILLIC CAPITAL LETTER EL
+0x844D	U+041C	# CYRILLIC CAPITAL LETTER EM
+0x844E	U+041D	# CYRILLIC CAPITAL LETTER EN
+0x844F	U+041E	# CYRILLIC CAPITAL LETTER O
+0x8450	U+041F	# CYRILLIC CAPITAL LETTER PE
+0x8451	U+0420	# CYRILLIC CAPITAL LETTER ER
+0x8452	U+0421	# CYRILLIC CAPITAL LETTER ES
+0x8453	U+0422	# CYRILLIC CAPITAL LETTER TE
+0x8454	U+0423	# CYRILLIC CAPITAL LETTER U
+0x8455	U+0424	# CYRILLIC CAPITAL LETTER EF
+0x8456	U+0425	# CYRILLIC CAPITAL LETTER HA
+0x8457	U+0426	# CYRILLIC CAPITAL LETTER TSE
+0x8458	U+0427	# CYRILLIC CAPITAL LETTER CHE
+0x8459	U+0428	# CYRILLIC CAPITAL LETTER SHA
+0x845A	U+0429	# CYRILLIC CAPITAL LETTER SHCHA
+0x845B	U+042A	# CYRILLIC CAPITAL LETTER HARD SIGN
+0x845C	U+042B	# CYRILLIC CAPITAL LETTER YERU
+0x845D	U+042C	# CYRILLIC CAPITAL LETTER SOFT SIGN
+0x845E	U+042D	# CYRILLIC CAPITAL LETTER E
+0x845F	U+042E	# CYRILLIC CAPITAL LETTER YU
+0x8460	U+042F	# CYRILLIC CAPITAL LETTER YA
+0x8461	U+23BE	# DENTISTRY SYMBOL LIGHT VERTICAL AND TOP RIGHT	[2000]	[Unicode3.2]
+0x8462	U+23BF	# DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM RIGHT	[2000]	[Unicode3.2]
+0x8463	U+23C0	# DENTISTRY SYMBOL LIGHT VERTICAL WITH CIRCLE	[2000]	[Unicode3.2]
+0x8464	U+23C1	# DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH CIRCLE	[2000]	[Unicode3.2]
+0x8465	U+23C2	# DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH CIRCLE	[2000]	[Unicode3.2]
+0x8466	U+23C3	# DENTISTRY SYMBOL LIGHT VERTICAL WITH TRIANGLE	[2000]	[Unicode3.2]
+0x8467	U+23C4	# DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH TRIANGLE	[2000]	[Unicode3.2]
+0x8468	U+23C5	# DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH TRIANGLE	[2000]	[Unicode3.2]
+0x8469	U+23C6	# DENTISTRY SYMBOL LIGHT VERTICAL AND WAVE	[2000]	[Unicode3.2]
+0x846A	U+23C7	# DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH WAVE	[2000]	[Unicode3.2]
+0x846B	U+23C8	# DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH WAVE	[2000]	[Unicode3.2]
+0x846C	U+23C9	# DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL	[2000]	[Unicode3.2]
+0x846D	U+23CA	# DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL	[2000]	[Unicode3.2]
+0x846E	U+23CB	# DENTISTRY SYMBOL LIGHT VERTICAL AND TOP LEFT	[2000]	[Unicode3.2]
+0x846F	U+23CC	# DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM LEFT	[2000]	[Unicode3.2]
+0x8470	U+0430	# CYRILLIC SMALL LETTER A
+0x8471	U+0431	# CYRILLIC SMALL LETTER BE
+0x8472	U+0432	# CYRILLIC SMALL LETTER VE
+0x8473	U+0433	# CYRILLIC SMALL LETTER GHE
+0x8474	U+0434	# CYRILLIC SMALL LETTER DE
+0x8475	U+0435	# CYRILLIC SMALL LETTER IE
+0x8476	U+0451	# CYRILLIC SMALL LETTER IO
+0x8477	U+0436	# CYRILLIC SMALL LETTER ZHE
+0x8478	U+0437	# CYRILLIC SMALL LETTER ZE
+0x8479	U+0438	# CYRILLIC SMALL LETTER I
+0x847A	U+0439	# CYRILLIC SMALL LETTER SHORT I
+0x847B	U+043A	# CYRILLIC SMALL LETTER KA
+0x847C	U+043B	# CYRILLIC SMALL LETTER EL
+0x847D	U+043C	# CYRILLIC SMALL LETTER EM
+0x847E	U+043D	# CYRILLIC SMALL LETTER EN
+0x8480	U+043E	# CYRILLIC SMALL LETTER O
+0x8481	U+043F	# CYRILLIC SMALL LETTER PE
+0x8482	U+0440	# CYRILLIC SMALL LETTER ER
+0x8483	U+0441	# CYRILLIC SMALL LETTER ES
+0x8484	U+0442	# CYRILLIC SMALL LETTER TE
+0x8485	U+0443	# CYRILLIC SMALL LETTER U
+0x8486	U+0444	# CYRILLIC SMALL LETTER EF
+0x8487	U+0445	# CYRILLIC SMALL LETTER HA
+0x8488	U+0446	# CYRILLIC SMALL LETTER TSE
+0x8489	U+0447	# CYRILLIC SMALL LETTER CHE
+0x848A	U+0448	# CYRILLIC SMALL LETTER SHA
+0x848B	U+0449	# CYRILLIC SMALL LETTER SHCHA
+0x848C	U+044A	# CYRILLIC SMALL LETTER HARD SIGN
+0x848D	U+044B	# CYRILLIC SMALL LETTER YERU
+0x848E	U+044C	# CYRILLIC SMALL LETTER SOFT SIGN
+0x848F	U+044D	# CYRILLIC SMALL LETTER E
+0x8490	U+044E	# CYRILLIC SMALL LETTER YU
+0x8491	U+044F	# CYRILLIC SMALL LETTER YA
+0x8492	U+30F7	# KATAKANA LETTER VA	[2000]
+0x8493	U+30F8	# KATAKANA LETTER VI	[2000]
+0x8494	U+30F9	# KATAKANA LETTER VE	[2000]
+0x8495	U+30FA	# KATAKANA LETTER VO	[2000]
+0x8496	U+22DA	# LESS-THAN EQUAL TO OR GREATER-THAN	[2000]
+0x8497	U+22DB	# GREATER-THAN EQUAL TO OR LESS-THAN	[2000]
+0x8498	U+2153	# VULGAR FRACTION ONE THIRD	[2000]
+0x8499	U+2154	# VULGAR FRACTION TWO THIRDS	[2000]
+0x849A	U+2155	# VULGAR FRACTION ONE FIFTH	[2000]
+0x849B	U+2713	# CHECK MARK	[2000]
+0x849C	U+2318	# PLACE OF INTEREST SIGN	[2000]
+0x849D	U+2423	# OPEN BOX	[2000]
+0x849E	U+23CE	# RETURN SYMBOL	[2000]	[Unicode3.2]
+0x849F	U+2500	# BOX DRAWINGS LIGHT HORIZONTAL	[1983]
+0x84A0	U+2502	# BOX DRAWINGS LIGHT VERTICAL	[1983]
+0x84A1	U+250C	# BOX DRAWINGS LIGHT DOWN AND RIGHT	[1983]
+0x84A2	U+2510	# BOX DRAWINGS LIGHT DOWN AND LEFT	[1983]
+0x84A3	U+2518	# BOX DRAWINGS LIGHT UP AND LEFT	[1983]
+0x84A4	U+2514	# BOX DRAWINGS LIGHT UP AND RIGHT	[1983]
+0x84A5	U+251C	# BOX DRAWINGS LIGHT VERTICAL AND RIGHT	[1983]
+0x84A6	U+252C	# BOX DRAWINGS LIGHT DOWN AND HORIZONTAL	[1983]
+0x84A7	U+2524	# BOX DRAWINGS LIGHT VERTICAL AND LEFT	[1983]
+0x84A8	U+2534	# BOX DRAWINGS LIGHT UP AND HORIZONTAL	[1983]
+0x84A9	U+253C	# BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL	[1983]
+0x84AA	U+2501	# BOX DRAWINGS HEAVY HORIZONTAL	[1983]
+0x84AB	U+2503	# BOX DRAWINGS HEAVY VERTICAL	[1983]
+0x84AC	U+250F	# BOX DRAWINGS HEAVY DOWN AND RIGHT	[1983]
+0x84AD	U+2513	# BOX DRAWINGS HEAVY DOWN AND LEFT	[1983]
+0x84AE	U+251B	# BOX DRAWINGS HEAVY UP AND LEFT	[1983]
+0x84AF	U+2517	# BOX DRAWINGS HEAVY UP AND RIGHT	[1983]
+0x84B0	U+2523	# BOX DRAWINGS HEAVY VERTICAL AND RIGHT	[1983]
+0x84B1	U+2533	# BOX DRAWINGS HEAVY DOWN AND HORIZONTAL	[1983]
+0x84B2	U+252B	# BOX DRAWINGS HEAVY VERTICAL AND LEFT	[1983]
+0x84B3	U+253B	# BOX DRAWINGS HEAVY UP AND HORIZONTAL	[1983]
+0x84B4	U+254B	# BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL	[1983]
+0x84B5	U+2520	# BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT	[1983]
+0x84B6	U+252F	# BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY	[1983]
+0x84B7	U+2528	# BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT	[1983]
+0x84B8	U+2537	# BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY	[1983]
+0x84B9	U+253F	# BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY	[1983]
+0x84BA	U+251D	# BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY	[1983]
+0x84BB	U+2530	# BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT	[1983]
+0x84BC	U+2525	# BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY	[1983]
+0x84BD	U+2538	# BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT	[1983]
+0x84BE	U+2542	# BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT	[1983]
+0x84BF	U+3251	# CIRCLED NUMBER TWENTY ONE	[2000]	[Unicode3.2]
+0x84C0	U+3252	# CIRCLED NUMBER TWENTY TWO	[2000]	[Unicode3.2]
+0x84C1	U+3253	# CIRCLED NUMBER TWENTY THREE	[2000]	[Unicode3.2]
+0x84C2	U+3254	# CIRCLED NUMBER TWENTY FOUR	[2000]	[Unicode3.2]
+0x84C3	U+3255	# CIRCLED NUMBER TWENTY FIVE	[2000]	[Unicode3.2]
+0x84C4	U+3256	# CIRCLED NUMBER TWENTY SIX	[2000]	[Unicode3.2]
+0x84C5	U+3257	# CIRCLED NUMBER TWENTY SEVEN	[2000]	[Unicode3.2]
+0x84C6	U+3258	# CIRCLED NUMBER TWENTY EIGHT	[2000]	[Unicode3.2]
+0x84C7	U+3259	# CIRCLED NUMBER TWENTY NINE	[2000]	[Unicode3.2]
+0x84C8	U+325A	# CIRCLED NUMBER THIRTY	[2000]	[Unicode3.2]
+0x84C9	U+325B	# CIRCLED NUMBER THIRTY ONE	[2000]	[Unicode3.2]
+0x84CA	U+325C	# CIRCLED NUMBER THIRTY TWO	[2000]	[Unicode3.2]
+0x84CB	U+325D	# CIRCLED NUMBER THIRTY THREE	[2000]	[Unicode3.2]
+0x84CC	U+325E	# CIRCLED NUMBER THIRTY FOUR	[2000]	[Unicode3.2]
+0x84CD	U+325F	# CIRCLED NUMBER THIRTY FIVE	[2000]	[Unicode3.2]
+0x84CE	U+32B1	# CIRCLED NUMBER THIRTY SIX	[2000]	[Unicode3.2]
+0x84CF	U+32B2	# CIRCLED NUMBER THIRTY SEVEN	[2000]	[Unicode3.2]
+0x84D0	U+32B3	# CIRCLED NUMBER THIRTY EIGHT	[2000]	[Unicode3.2]
+0x84D1	U+32B4	# CIRCLED NUMBER THIRTY NINE	[2000]	[Unicode3.2]
+0x84D2	U+32B5	# CIRCLED NUMBER FORTY	[2000]	[Unicode3.2]
+0x84D3	U+32B6	# CIRCLED NUMBER FORTY ONE	[2000]	[Unicode3.2]
+0x84D4	U+32B7	# CIRCLED NUMBER FORTY TWO	[2000]	[Unicode3.2]
+0x84D5	U+32B8	# CIRCLED NUMBER FORTY THREE	[2000]	[Unicode3.2]
+0x84D6	U+32B9	# CIRCLED NUMBER FORTY FOUR	[2000]	[Unicode3.2]
+0x84D7	U+32BA	# CIRCLED NUMBER FORTY FIVE	[2000]	[Unicode3.2]
+0x84D8	U+32BB	# CIRCLED NUMBER FORTY SIX	[2000]	[Unicode3.2]
+0x84D9	U+32BC	# CIRCLED NUMBER FORTY SEVEN	[2000]	[Unicode3.2]
+0x84DA	U+32BD	# CIRCLED NUMBER FORTY EIGHT	[2000]	[Unicode3.2]
+0x84DB	U+32BE	# CIRCLED NUMBER FORTY NINE	[2000]	[Unicode3.2]
+0x84DC	U+32BF	# CIRCLED NUMBER FIFTY	[2000]	[Unicode3.2]
+0x84DD		# <reserved>
+0x84DE		# <reserved>
+0x84DF		# <reserved>
+0x84E0		# <reserved>
+0x84E1		# <reserved>
+0x84E2		# <reserved>
+0x84E3		# <reserved>
+0x84E4		# <reserved>
+0x84E5	U+25D0	# CIRCLE WITH LEFT HALF BLACK	[2000]
+0x84E6	U+25D1	# CIRCLE WITH RIGHT HALF BLACK	[2000]
+0x84E7	U+25D2	# CIRCLE WITH LOWER HALF BLACK	[2000]
+0x84E8	U+25D3	# CIRCLE WITH UPPER HALF BLACK	[2000]
+0x84E9	U+203C	# DOUBLE EXCLAMATION MARK	[2000]
+0x84EA	U+2047	# DOUBLE QUESTION MARK	[2000]	[Unicode3.2]
+0x84EB	U+2048	# QUESTION EXCLAMATION MARK	[2000]
+0x84EC	U+2049	# EXCLAMATION QUESTION MARK	[2000]
+0x84ED	U+01CD	# LATIN CAPITAL LETTER A WITH CARON	[2000]
+0x84EE	U+01CE	# LATIN SMALL LETTER A WITH CARON	[2000]
+0x84EF	U+01D0	# LATIN SMALL LETTER I WITH CARON	[2000]
+0x84F0	U+1E3E	# LATIN CAPITAL LETTER M WITH ACUTE	[2000]
+0x84F1	U+1E3F	# LATIN SMALL LETTER M WITH ACUTE	[2000]
+0x84F2	U+01F8	# LATIN CAPITAL LETTER N WITH GRAVE	[2000]
+0x84F3	U+01F9	# LATIN SMALL LETTER N WITH GRAVE	[2000]
+0x84F4	U+01D1	# LATIN CAPITAL LETTER O WITH CARON	[2000]
+0x84F5	U+01D2	# LATIN SMALL LETTER O WITH CARON	[2000]
+0x84F6	U+01D4	# LATIN SMALL LETTER U WITH CARON	[2000]
+0x84F7	U+01D6	# LATIN SMALL LETTER U WITH DIAERESIS AND MACRON	[2000]
+0x84F8	U+01D8	# LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE	[2000]
+0x84F9	U+01DA	# LATIN SMALL LETTER U WITH DIAERESIS AND CARON	[2000]
+0x84FA	U+01DC	# LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE	[2000]
+0x84FB		# <reserved>
+0x84FC		# <reserved>
+0x8540	U+20AC	# EURO SIGN	[2000]
+0x8541	U+00A0	# NO-BREAK SPACE	[2000]
+0x8542	U+00A1	# INVERTED EXCLAMATION MARK	[2000]
+0x8543	U+00A4	# CURRENCY SIGN	[2000]
+0x8544	U+00A6	# BROKEN BAR	[2000]
+0x8545	U+00A9	# COPYRIGHT SIGN	[2000]
+0x8546	U+00AA	# FEMININE ORDINAL INDICATOR	[2000]
+0x8547	U+00AB	# LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 	[2000]
+0x8548	U+00AD	# SOFT HYPHEN	[2000]
+0x8549	U+00AE	# REGISTERED SIGN	[2000]
+0x854A	U+00AF	# MACRON	[2000]
+0x854B	U+00B2	# SUPERSCRIPT TWO	[2000]
+0x854C	U+00B3	# SUPERSCRIPT THREE	[2000]
+0x854D	U+00B7	# MIDDLE DOT	[2000]
+0x854E	U+00B8	# CEDILLA	[2000]
+0x854F	U+00B9	# SUPERSCRIPT ONE	[2000]
+0x8550	U+00BA	# MASCULINE ORDINAL INDICATOR	[2000]
+0x8551	U+00BB	# RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK 	[2000]
+0x8552	U+00BC	# VULGAR FRACTION ONE QUARTER	[2000]
+0x8553	U+00BD	# VULGAR FRACTION ONE HALF	[2000]
+0x8554	U+00BE	# VULGAR FRACTION THREE QUARTERS	[2000]
+0x8555	U+00BF	# INVERTED QUESTION MARK	[2000]
+0x8556	U+00C0	# LATIN CAPITAL LETTER A WITH GRAVE	[2000]
+0x8557	U+00C1	# LATIN CAPITAL LETTER A WITH ACUTE	[2000]
+0x8558	U+00C2	# LATIN CAPITAL LETTER A WITH CIRCUMFLEX	[2000]
+0x8559	U+00C3	# LATIN CAPITAL LETTER A WITH TILDE	[2000]
+0x855A	U+00C4	# LATIN CAPITAL LETTER A WITH DIAERESIS	[2000]
+0x855B	U+00C5	# LATIN CAPITAL LETTER A WITH RING ABOVE	[2000]
+0x855C	U+00C6	# LATIN CAPITAL LETTER AE 	[2000]
+0x855D	U+00C7	# LATIN CAPITAL LETTER C WITH CEDILLA	[2000]
+0x855E	U+00C8	# LATIN CAPITAL LETTER E WITH GRAVE	[2000]
+0x855F	U+00C9	# LATIN CAPITAL LETTER E WITH ACUTE	[2000]
+0x8560	U+00CA	# LATIN CAPITAL LETTER E WITH CIRCUMFLEX	[2000]
+0x8561	U+00CB	# LATIN CAPITAL LETTER E WITH DIAERESIS	[2000]
+0x8562	U+00CC	# LATIN CAPITAL LETTER I WITH GRAVE	[2000]
+0x8563	U+00CD	# LATIN CAPITAL LETTER I WITH ACUTE	[2000]
+0x8564	U+00CE	# LATIN CAPITAL LETTER I WITH CIRCUMFLEX	[2000]
+0x8565	U+00CF	# LATIN CAPITAL LETTER I WITH DIAERESIS	[2000]
+0x8566	U+00D0	# LATIN CAPITAL LETTER ETH 	[2000]
+0x8567	U+00D1	# LATIN CAPITAL LETTER N WITH TILDE	[2000]
+0x8568	U+00D2	# LATIN CAPITAL LETTER O WITH GRAVE	[2000]
+0x8569	U+00D3	# LATIN CAPITAL LETTER O WITH ACUTE	[2000]
+0x856A	U+00D4	# LATIN CAPITAL LETTER O WITH CIRCUMFLEX	[2000]
+0x856B	U+00D5	# LATIN CAPITAL LETTER O WITH TILDE	[2000]
+0x856C	U+00D6	# LATIN CAPITAL LETTER O WITH DIAERESIS	[2000]
+0x856D	U+00D8	# LATIN CAPITAL LETTER O WITH STROKE	[2000]
+0x856E	U+00D9	# LATIN CAPITAL LETTER U WITH GRAVE	[2000]
+0x856F	U+00DA	# LATIN CAPITAL LETTER U WITH ACUTE	[2000]
+0x8570	U+00DB	# LATIN CAPITAL LETTER U WITH CIRCUMFLEX	[2000]
+0x8571	U+00DC	# LATIN CAPITAL LETTER U WITH DIAERESIS	[2000]
+0x8572	U+00DD	# LATIN CAPITAL LETTER Y WITH ACUTE	[2000]
+0x8573	U+00DE	# LATIN CAPITAL LETTER THORN 	[2000]
+0x8574	U+00DF	# LATIN SMALL LETTER SHARP S 	[2000]
+0x8575	U+00E0	# LATIN SMALL LETTER A WITH GRAVE	[2000]
+0x8576	U+00E1	# LATIN SMALL LETTER A WITH ACUTE	[2000]
+0x8577	U+00E2	# LATIN SMALL LETTER A WITH CIRCUMFLEX	[2000]
+0x8578	U+00E3	# LATIN SMALL LETTER A WITH TILDE	[2000]
+0x8579	U+00E4	# LATIN SMALL LETTER A WITH DIAERESIS	[2000]
+0x857A	U+00E5	# LATIN SMALL LETTER A WITH RING ABOVE	[2000]
+0x857B	U+00E6	# LATIN SMALL LETTER AE 	[2000]
+0x857C	U+00E7	# LATIN SMALL LETTER C WITH CEDILLA	[2000]
+0x857D	U+00E8	# LATIN SMALL LETTER E WITH GRAVE	[2000]
+0x857E	U+00E9	# LATIN SMALL LETTER E WITH ACUTE	[2000]
+0x8580	U+00EA	# LATIN SMALL LETTER E WITH CIRCUMFLEX	[2000]
+0x8581	U+00EB	# LATIN SMALL LETTER E WITH DIAERESIS	[2000]
+0x8582	U+00EC	# LATIN SMALL LETTER I WITH GRAVE	[2000]
+0x8583	U+00ED	# LATIN SMALL LETTER I WITH ACUTE	[2000]
+0x8584	U+00EE	# LATIN SMALL LETTER I WITH CIRCUMFLEX	[2000]
+0x8585	U+00EF	# LATIN SMALL LETTER I WITH DIAERESIS	[2000]
+0x8586	U+00F0	# LATIN SMALL LETTER ETH 	[2000]
+0x8587	U+00F1	# LATIN SMALL LETTER N WITH TILDE	[2000]
+0x8588	U+00F2	# LATIN SMALL LETTER O WITH GRAVE	[2000]
+0x8589	U+00F3	# LATIN SMALL LETTER O WITH ACUTE	[2000]
+0x858A	U+00F4	# LATIN SMALL LETTER O WITH CIRCUMFLEX	[2000]
+0x858B	U+00F5	# LATIN SMALL LETTER O WITH TILDE	[2000]
+0x858C	U+00F6	# LATIN SMALL LETTER O WITH DIAERESIS	[2000]
+0x858D	U+00F8	# LATIN SMALL LETTER O WITH STROKE	[2000]
+0x858E	U+00F9	# LATIN SMALL LETTER U WITH GRAVE	[2000]
+0x858F	U+00FA	# LATIN SMALL LETTER U WITH ACUTE	[2000]
+0x8590	U+00FB	# LATIN SMALL LETTER U WITH CIRCUMFLEX	[2000]
+0x8591	U+00FC	# LATIN SMALL LETTER U WITH DIAERESIS	[2000]
+0x8592	U+00FD	# LATIN SMALL LETTER Y WITH ACUTE	[2000]
+0x8593	U+00FE	# LATIN SMALL LETTER THORN 	[2000]
+0x8594	U+00FF	# LATIN SMALL LETTER Y WITH DIAERESIS	[2000]
+0x8595	U+0100	# LATIN CAPITAL LETTER A WITH MACRON	[2000]
+0x8596	U+012A	# LATIN CAPITAL LETTER I WITH MACRON	[2000]
+0x8597	U+016A	# LATIN CAPITAL LETTER U WITH MACRON	[2000]
+0x8598	U+0112	# LATIN CAPITAL LETTER E WITH MACRON	[2000]
+0x8599	U+014C	# LATIN CAPITAL LETTER O WITH MACRON	[2000]
+0x859A	U+0101	# LATIN SMALL LETTER A WITH MACRON	[2000]
+0x859B	U+012B	# LATIN SMALL LETTER I WITH MACRON	[2000]
+0x859C	U+016B	# LATIN SMALL LETTER U WITH MACRON	[2000]
+0x859D	U+0113	# LATIN SMALL LETTER E WITH MACRON	[2000]
+0x859E	U+014D	# LATIN SMALL LETTER O WITH MACRON	[2000]
+0x859F	U+0104	# LATIN CAPITAL LETTER A WITH OGONEK	[2000]
+0x85A0	U+02D8	# BREVE	[2000]
+0x85A1	U+0141	# LATIN CAPITAL LETTER L WITH STROKE	[2000]
+0x85A2	U+013D	# LATIN CAPITAL LETTER L WITH CARON	[2000]
+0x85A3	U+015A	# LATIN CAPITAL LETTER S WITH ACUTE	[2000]
+0x85A4	U+0160	# LATIN CAPITAL LETTER S WITH CARON	[2000]
+0x85A5	U+015E	# LATIN CAPITAL LETTER S WITH CEDILLA 	[2000]
+0x85A6	U+0164	# LATIN CAPITAL LETTER T WITH CARON	[2000]
+0x85A7	U+0179	# LATIN CAPITAL LETTER Z WITH ACUTE	[2000]
+0x85A8	U+017D	# LATIN CAPITAL LETTER Z WITH CARON	[2000]
+0x85A9	U+017B	# LATIN CAPITAL LETTER Z WITH DOT ABOVE	[2000]
+0x85AA	U+0105	# LATIN SMALL LETTER A WITH OGONEK	[2000]
+0x85AB	U+02DB	# OGONEK	[2000]
+0x85AC	U+0142	# LATIN SMALL LETTER L WITH STROKE	[2000]
+0x85AD	U+013E	# LATIN SMALL LETTER L WITH CARON	[2000]
+0x85AE	U+015B	# LATIN SMALL LETTER S WITH ACUTE	[2000]
+0x85AF	U+02C7	# CARON 	[2000]
+0x85B0	U+0161	# LATIN SMALL LETTER S WITH CARON	[2000]
+0x85B1	U+015F	# LATIN SMALL LETTER S WITH CEDILLA 	[2000]
+0x85B2	U+0165	# LATIN SMALL LETTER T WITH CARON	[2000]
+0x85B3	U+017A	# LATIN SMALL LETTER Z WITH ACUTE	[2000]
+0x85B4	U+02DD	# DOUBLE ACUTE ACCENT	[2000]
+0x85B5	U+017E	# LATIN SMALL LETTER Z WITH CARON	[2000]
+0x85B6	U+017C	# LATIN SMALL LETTER Z WITH DOT ABOVE	[2000]
+0x85B7	U+0154	# LATIN CAPITAL LETTER R WITH ACUTE	[2000]
+0x85B8	U+0102	# LATIN CAPITAL LETTER A WITH BREVE	[2000]
+0x85B9	U+0139	# LATIN CAPITAL LETTER L WITH ACUTE	[2000]
+0x85BA	U+0106	# LATIN CAPITAL LETTER C WITH ACUTE	[2000]
+0x85BB	U+010C	# LATIN CAPITAL LETTER C WITH CARON	[2000]
+0x85BC	U+0118	# LATIN CAPITAL LETTER E WITH OGONEK	[2000]
+0x85BD	U+011A	# LATIN CAPITAL LETTER E WITH CARON	[2000]
+0x85BE	U+010E	# LATIN CAPITAL LETTER D WITH CARON	[2000]
+0x85BF	U+0143	# LATIN CAPITAL LETTER N WITH ACUTE	[2000]
+0x85C0	U+0147	# LATIN CAPITAL LETTER N WITH CARON	[2000]
+0x85C1	U+0150	# LATIN CAPITAL LETTER O WITH DOUBLE ACUTE	[2000]
+0x85C2	U+0158	# LATIN CAPITAL LETTER R WITH CARON	[2000]
+0x85C3	U+016E	# LATIN CAPITAL LETTER U WITH RING ABOVE	[2000]
+0x85C4	U+0170	# LATIN CAPITAL LETTER U WITH DOUBLE ACUTE	[2000]
+0x85C5	U+0162	# LATIN CAPITAL LETTER T WITH CEDILLA 	[2000]
+0x85C6	U+0155	# LATIN SMALL LETTER R WITH ACUTE	[2000]
+0x85C7	U+0103	# LATIN SMALL LETTER A WITH BREVE	[2000]
+0x85C8	U+013A	# LATIN SMALL LETTER L WITH ACUTE	[2000]
+0x85C9	U+0107	# LATIN SMALL LETTER C WITH ACUTE	[2000]
+0x85CA	U+010D	# LATIN SMALL LETTER C WITH CARON	[2000]
+0x85CB	U+0119	# LATIN SMALL LETTER E WITH OGONEK	[2000]
+0x85CC	U+011B	# LATIN SMALL LETTER E WITH CARON	[2000]
+0x85CD	U+010F	# LATIN SMALL LETTER D WITH CARON	[2000]
+0x85CE	U+0111	# LATIN SMALL LETTER D WITH STROKE	[2000]
+0x85CF	U+0144	# LATIN SMALL LETTER N WITH ACUTE	[2000]
+0x85D0	U+0148	# LATIN SMALL LETTER N WITH CARON	[2000]
+0x85D1	U+0151	# LATIN SMALL LETTER O WITH DOUBLE ACUTE	[2000]
+0x85D2	U+0159	# LATIN SMALL LETTER R WITH CARON	[2000]
+0x85D3	U+016F	# LATIN SMALL LETTER U WITH RING ABOVE	[2000]
+0x85D4	U+0171	# LATIN SMALL LETTER U WITH DOUBLE ACUTE	[2000]
+0x85D5	U+0163	# LATIN SMALL LETTER T WITH CEDILLA 	[2000]
+0x85D6	U+02D9	# DOT ABOVE 	[2000]
+0x85D7	U+0108	# LATIN CAPITAL LETTER C WITH CIRCUMFLEX	[2000]
+0x85D8	U+011C	# LATIN CAPITAL LETTER G WITH CIRCUMFLEX	[2000]
+0x85D9	U+0124	# LATIN CAPITAL LETTER H WITH CIRCUMFLEX	[2000]
+0x85DA	U+0134	# LATIN CAPITAL LETTER J WITH CIRCUMFLEX	[2000]
+0x85DB	U+015C	# LATIN CAPITAL LETTER S WITH CIRCUMFLEX	[2000]
+0x85DC	U+016C	# LATIN CAPITAL LETTER U WITH BREVE	[2000]
+0x85DD	U+0109	# LATIN SMALL LETTER C WITH CIRCUMFLEX	[2000]
+0x85DE	U+011D	# LATIN SMALL LETTER G WITH CIRCUMFLEX	[2000]
+0x85DF	U+0125	# LATIN SMALL LETTER H WITH CIRCUMFLEX	[2000]
+0x85E0	U+0135	# LATIN SMALL LETTER J WITH CIRCUMFLEX	[2000]
+0x85E1	U+015D	# LATIN SMALL LETTER S WITH CIRCUMFLEX	[2000]
+0x85E2	U+016D	# LATIN SMALL LETTER U WITH BREVE	[2000]
+0x85E3	U+0271	# LATIN SMALL LETTER M WITH HOOK	[2000]
+0x85E4	U+028B	# LATIN SMALL LETTER V WITH HOOK	[2000]
+0x85E5	U+027E	# LATIN SMALL LETTER R WITH FISHHOOK	[2000]
+0x85E6	U+0283	# LATIN SMALL LETTER ESH	[2000]
+0x85E7	U+0292	# LATIN SMALL LETTER EZH	[2000]
+0x85E8	U+026C	# LATIN SMALL LETTER L WITH BELT	[2000]
+0x85E9	U+026E	# LATIN SMALL LETTER LEZH	[2000]
+0x85EA	U+0279	# LATIN SMALL LETTER TURNED R	[2000]
+0x85EB	U+0288	# LATIN SMALL LETTER T WITH RETROFLEX HOOK	[2000]
+0x85EC	U+0256	# LATIN SMALL LETTER D WITH TAIL	[2000]
+0x85ED	U+0273	# LATIN SMALL LETTER N WITH RETROFLEX HOOK	[2000]
+0x85EE	U+027D	# LATIN SMALL LETTER R WITH TAIL	[2000]
+0x85EF	U+0282	# LATIN SMALL LETTER S WITH HOOK	[2000]
+0x85F0	U+0290	# LATIN SMALL LETTER Z WITH RETROFLEX HOOK	[2000]
+0x85F1	U+027B	# LATIN SMALL LETTER TURNED R WITH HOOK	[2000]
+0x85F2	U+026D	# LATIN SMALL LETTER L WITH RETROFLEX HOOK	[2000]
+0x85F3	U+025F	# LATIN SMALL LETTER DOTLESS J WITH STROKE	[2000]
+0x85F4	U+0272	# LATIN SMALL LETTER N WITH LEFT HOOK	[2000]
+0x85F5	U+029D	# LATIN SMALL LETTER J WITH CROSSED-TAIL	[2000]
+0x85F6	U+028E	# LATIN SMALL LETTER TURNED Y	[2000]
+0x85F7	U+0261	# LATIN SMALL LETTER SCRIPT G	[2000]
+0x85F8	U+014B	# LATIN SMALL LETTER ENG 	[2000]
+0x85F9	U+0270	# LATIN SMALL LETTER TURNED M WITH LONG LEG	[2000]
+0x85FA	U+0281	# LATIN LETTER SMALL CAPITAL INVERTED R	[2000]
+0x85FB	U+0127	# LATIN SMALL LETTER H WITH STROKE	[2000]
+0x85FC	U+0295	# LATIN LETTER PHARYNGEAL VOICED FRICATIVE	[2000]
+0x8640	U+0294	# LATIN LETTER GLOTTAL STOP	[2000]
+0x8641	U+0266	# LATIN SMALL LETTER H WITH HOOK	[2000]
+0x8642	U+0298	# LATIN LETTER BILABIAL CLICK	[2000]
+0x8643	U+01C2	# LATIN LETTER ALVEOLAR CLICK	[2000]
+0x8644	U+0253	# LATIN SMALL LETTER B WITH HOOK	[2000]
+0x8645	U+0257	# LATIN SMALL LETTER D WITH HOOK	[2000]
+0x8646	U+0284	# LATIN SMALL LETTER DOTLESS J WITH STROKE AND HOOK	[2000]
+0x8647	U+0260	# LATIN SMALL LETTER G WITH HOOK	[2000]
+0x8648	U+0193	# LATIN CAPITAL LETTER G WITH HOOK	[2000]
+0x8649	U+0153	# LATIN SMALL LIGATURE OE	[2000]
+0x864A	U+0152	# LATIN CAPITAL LIGATURE OE	[2000]
+0x864B	U+0268	# LATIN SMALL LETTER I WITH STROKE	[2000]
+0x864C	U+0289	# LATIN SMALL LETTER U BAR	[2000]
+0x864D	U+0258	# LATIN SMALL LETTER REVERSED E	[2000]
+0x864E	U+0275	# LATIN SMALL LETTER BARRED O	[2000]
+0x864F	U+0259	# LATIN SMALL LETTER SCHWA	[2000]
+0x8650	U+025C	# LATIN SMALL LETTER REVERSED OPEN E	[2000]
+0x8651	U+025E	# LATIN SMALL LETTER CLOSED REVERSED OPEN E	[2000]
+0x8652	U+0250	# LATIN SMALL LETTER TURNED A	[2000]
+0x8653	U+026F	# LATIN SMALL LETTER TURNED M	[2000]
+0x8654	U+028A	# LATIN SMALL LETTER UPSILON	[2000]
+0x8655	U+0264	# LATIN SMALL LETTER RAMS HORN	[2000]
+0x8656	U+028C	# LATIN SMALL LETTER TURNED V	[2000]
+0x8657	U+0254	# LATIN SMALL LETTER OPEN O	[2000]
+0x8658	U+0251	# LATIN SMALL LETTER ALPHA	[2000]
+0x8659	U+0252	# LATIN SMALL LETTER TURNED ALPHA	[2000]
+0x865A	U+028D	# LATIN SMALL LETTER TURNED W	[2000]
+0x865B	U+0265	# LATIN SMALL LETTER TURNED H	[2000]
+0x865C	U+02A2	# LATIN LETTER REVERSED GLOTTAL STOP WITH STROKE	[2000]
+0x865D	U+02A1	# LATIN LETTER GLOTTAL STOP WITH STROKE	[2000]
+0x865E	U+0255	# LATIN SMALL LETTER C WITH CURL	[2000]
+0x865F	U+0291	# LATIN SMALL LETTER Z WITH CURL	[2000]
+0x8660	U+027A	# LATIN SMALL LETTER TURNED R WITH LONG LEG	[2000]
+0x8661	U+0267	# LATIN SMALL LETTER HENG WITH HOOK	[2000]
+0x8662	U+025A	# LATIN SMALL LETTER SCHWA WITH HOOK	[2000]
+0x8663	U+00E6+0300	# 	[2000]
+0x8664	U+01FD	# LATIN SMALL LETTER AE WITH ACUTE 	[2000]
+0x8665	U+1F70	# GREEK SMALL LETTER ALPHA WITH VARIA	[2000]
+0x8666	U+1F71	# GREEK SMALL LETTER ALPHA WITH OXIA	[2000]
+0x8667	U+0254+0300	# 	[2000]
+0x8668	U+0254+0301	# 	[2000]
+0x8669	U+028C+0300	# 	[2000]
+0x866A	U+028C+0301	# 	[2000]
+0x866B	U+0259+0300	# 	[2000]
+0x866C	U+0259+0301	# 	[2000]
+0x866D	U+025A+0300	# 	[2000]
+0x866E	U+025A+0301	# 	[2000]
+0x866F	U+1F72	# GREEK SMALL LETTER EPSILON WITH VARIA	[2000]
+0x8670	U+1F73	# GREEK SMALL LETTER EPSILON WITH OXIA	[2000]
+0x8671	U+0361	# COMBINING DOUBLE INVERTED BREVE	[2000]
+0x8672	U+02C8	# MODIFIER LETTER VERTICAL LINE	[2000]
+0x8673	U+02CC	# MODIFIER LETTER LOW VERTICAL LINE	[2000]
+0x8674	U+02D0	# MODIFIER LETTER TRIANGULAR COLON	[2000]
+0x8675	U+02D1	# MODIFIER LETTER HALF TRIANGULAR COLON	[2000]
+0x8676	U+0306	# COMBINING BREVE 	[2000]
+0x8677	U+203F	# UNDERTIE 	[2000]
+0x8678	U+030B	# COMBINING DOUBLE ACUTE ACCENT	[2000]
+0x8679	U+0301	# COMBINING ACUTE ACCENT 	[2000]
+0x867A	U+0304	# COMBINING MACRON	[2000]
+0x867B	U+0300	# COMBINING GRAVE ACCENT 	[2000]
+0x867C	U+030F	# COMBINING DOUBLE GRAVE ACCENT	[2000]
+0x867D	U+030C	# COMBINING CARON	[2000]
+0x867E	U+0302	# COMBINING CIRCUMFLEX ACCENT	[2000]
+0x8680	U+02E5	# MODIFIER LETTER EXTRA-HIGH TONE BAR	[2000]
+0x8681	U+02E6	# MODIFIER LETTER HIGH TONE BAR	[2000]
+0x8682	U+02E7	# MODIFIER LETTER MID TONE BAR	[2000]
+0x8683	U+02E8	# MODIFIER LETTER LOW TONE BAR	[2000]
+0x8684	U+02E9	# MODIFIER LETTER EXTRA-LOW TONE BAR	[2000]
+0x8685	U+02E9+02E5	# 	[2000]
+0x8686	U+02E5+02E9	# 	[2000]
+0x8687	U+0325	# COMBINING RING BELOW	[2000]
+0x8688	U+032C	# COMBINING CARON BELOW	[2000]
+0x8689	U+0339	# COMBINING RIGHT HALF RING BELOW	[2000]
+0x868A	U+031C	# COMBINING LEFT HALF RING BELOW	[2000]
+0x868B	U+031F	# COMBINING PLUS SIGN BELOW	[2000]
+0x868C	U+0320	# COMBINING MINUS SIGN BELOW	[2000]
+0x868D	U+0308	# COMBINING DIAERESIS 	[2000]
+0x868E	U+033D	# COMBINING X ABOVE	[2000]
+0x868F	U+0329	# COMBINING VERTICAL LINE BELOW	[2000]
+0x8690	U+032F	# COMBINING INVERTED BREVE BELOW	[2000]
+0x8691	U+02DE	# MODIFIER LETTER RHOTIC HOOK	[2000]
+0x8692	U+0324	# COMBINING DIAERESIS BELOW	[2000]
+0x8693	U+0330	# COMBINING TILDE BELOW	[2000]
+0x8694	U+033C	# COMBINING SEAGULL BELOW	[2000]
+0x8695	U+0334	# COMBINING TILDE OVERLAY	[2000]
+0x8696	U+031D	# COMBINING UP TACK BELOW	[2000]
+0x8697	U+031E	# COMBINING DOWN TACK BELOW	[2000]
+0x8698	U+0318	# COMBINING LEFT TACK BELOW	[2000]
+0x8699	U+0319	# COMBINING RIGHT TACK BELOW	[2000]
+0x869A	U+032A	# COMBINING BRIDGE BELOW	[2000]
+0x869B	U+033A	# COMBINING INVERTED BRIDGE BELOW	[2000]
+0x869C	U+033B	# COMBINING SQUARE BELOW	[2000]
+0x869D	U+0303	# COMBINING TILDE	[2000]
+0x869E	U+031A	# COMBINING LEFT ANGLE ABOVE	[2000]
+0x869F	U+2776	# DINGBAT NEGATIVE CIRCLED DIGIT ONE	[2000]
+0x86A0	U+2777	# DINGBAT NEGATIVE CIRCLED DIGIT TWO	[2000]
+0x86A1	U+2778	# DINGBAT NEGATIVE CIRCLED DIGIT THREE	[2000]
+0x86A2	U+2779	# DINGBAT NEGATIVE CIRCLED DIGIT FOUR	[2000]
+0x86A3	U+277A	# DINGBAT NEGATIVE CIRCLED DIGIT FIVE	[2000]
+0x86A4	U+277B	# DINGBAT NEGATIVE CIRCLED DIGIT SIX	[2000]
+0x86A5	U+277C	# DINGBAT NEGATIVE CIRCLED DIGIT SEVEN	[2000]
+0x86A6	U+277D	# DINGBAT NEGATIVE CIRCLED DIGIT EIGHT	[2000]
+0x86A7	U+277E	# DINGBAT NEGATIVE CIRCLED DIGIT NINE	[2000]
+0x86A8	U+277F	# DINGBAT NEGATIVE CIRCLED NUMBER TEN	[2000]
+0x86A9	U+24EB	# NEGATIVE CIRCLED NUMBER ELEVEN	[2000]	[Unicode3.2]
+0x86AA	U+24EC	# NEGATIVE CIRCLED NUMBER TWELVE	[2000]	[Unicode3.2]
+0x86AB	U+24ED	# NEGATIVE CIRCLED NUMBER THIRTEEN	[2000]	[Unicode3.2]
+0x86AC	U+24EE	# NEGATIVE CIRCLED NUMBER FOURTEEN	[2000]	[Unicode3.2]
+0x86AD	U+24EF	# NEGATIVE CIRCLED NUMBER FIFTEEN	[2000]	[Unicode3.2]
+0x86AE	U+24F0	# NEGATIVE CIRCLED NUMBER SIXTEEN	[2000]	[Unicode3.2]
+0x86AF	U+24F1	# NEGATIVE CIRCLED NUMBER SEVENTEEN	[2000]	[Unicode3.2]
+0x86B0	U+24F2	# NEGATIVE CIRCLED NUMBER EIGHTEEN	[2000]	[Unicode3.2]
+0x86B1	U+24F3	# NEGATIVE CIRCLED NUMBER NINETEEN	[2000]	[Unicode3.2]
+0x86B2	U+24F4	# NEGATIVE CIRCLED NUMBER TWENTY	[2000]	[Unicode3.2]
+0x86B3	U+2170	# SMALL ROMAN NUMERAL ONE	[2000]
+0x86B4	U+2171	# SMALL ROMAN NUMERAL TWO	[2000]
+0x86B5	U+2172	# SMALL ROMAN NUMERAL THREE	[2000]
+0x86B6	U+2173	# SMALL ROMAN NUMERAL FOUR	[2000]
+0x86B7	U+2174	# SMALL ROMAN NUMERAL FIVE	[2000]
+0x86B8	U+2175	# SMALL ROMAN NUMERAL SIX	[2000]
+0x86B9	U+2176	# SMALL ROMAN NUMERAL SEVEN	[2000]
+0x86BA	U+2177	# SMALL ROMAN NUMERAL EIGHT	[2000]
+0x86BB	U+2178	# SMALL ROMAN NUMERAL NINE	[2000]
+0x86BC	U+2179	# SMALL ROMAN NUMERAL TEN	[2000]
+0x86BD	U+217A	# SMALL ROMAN NUMERAL ELEVEN	[2000]
+0x86BE	U+217B	# SMALL ROMAN NUMERAL TWELVE	[2000]
+0x86BF	U+24D0	# CIRCLED LATIN SMALL LETTER A	[2000]
+0x86C0	U+24D1	# CIRCLED LATIN SMALL LETTER B	[2000]
+0x86C1	U+24D2	# CIRCLED LATIN SMALL LETTER C	[2000]
+0x86C2	U+24D3	# CIRCLED LATIN SMALL LETTER D	[2000]
+0x86C3	U+24D4	# CIRCLED LATIN SMALL LETTER E	[2000]
+0x86C4	U+24D5	# CIRCLED LATIN SMALL LETTER F	[2000]
+0x86C5	U+24D6	# CIRCLED LATIN SMALL LETTER G	[2000]
+0x86C6	U+24D7	# CIRCLED LATIN SMALL LETTER H	[2000]
+0x86C7	U+24D8	# CIRCLED LATIN SMALL LETTER I	[2000]
+0x86C8	U+24D9	# CIRCLED LATIN SMALL LETTER J	[2000]
+0x86C9	U+24DA	# CIRCLED LATIN SMALL LETTER K	[2000]
+0x86CA	U+24DB	# CIRCLED LATIN SMALL LETTER L	[2000]
+0x86CB	U+24DC	# CIRCLED LATIN SMALL LETTER M	[2000]
+0x86CC	U+24DD	# CIRCLED LATIN SMALL LETTER N	[2000]
+0x86CD	U+24DE	# CIRCLED LATIN SMALL LETTER O	[2000]
+0x86CE	U+24DF	# CIRCLED LATIN SMALL LETTER P	[2000]
+0x86CF	U+24E0	# CIRCLED LATIN SMALL LETTER Q	[2000]
+0x86D0	U+24E1	# CIRCLED LATIN SMALL LETTER R	[2000]
+0x86D1	U+24E2	# CIRCLED LATIN SMALL LETTER S	[2000]
+0x86D2	U+24E3	# CIRCLED LATIN SMALL LETTER T	[2000]
+0x86D3	U+24E4	# CIRCLED LATIN SMALL LETTER U	[2000]
+0x86D4	U+24E5	# CIRCLED LATIN SMALL LETTER V	[2000]
+0x86D5	U+24E6	# CIRCLED LATIN SMALL LETTER W	[2000]
+0x86D6	U+24E7	# CIRCLED LATIN SMALL LETTER X	[2000]
+0x86D7	U+24E8	# CIRCLED LATIN SMALL LETTER Y	[2000]
+0x86D8	U+24E9	# CIRCLED LATIN SMALL LETTER Z	[2000]
+0x86D9	U+32D0	# CIRCLED KATAKANA A	[2000]
+0x86DA	U+32D1	# CIRCLED KATAKANA I	[2000]
+0x86DB	U+32D2	# CIRCLED KATAKANA U	[2000]
+0x86DC	U+32D3	# CIRCLED KATAKANA E	[2000]
+0x86DD	U+32D4	# CIRCLED KATAKANA O	[2000]
+0x86DE	U+32D5	# CIRCLED KATAKANA KA	[2000]
+0x86DF	U+32D6	# CIRCLED KATAKANA KI	[2000]
+0x86E0	U+32D7	# CIRCLED KATAKANA KU	[2000]
+0x86E1	U+32D8	# CIRCLED KATAKANA KE	[2000]
+0x86E2	U+32D9	# CIRCLED KATAKANA KO	[2000]
+0x86E3	U+32DA	# CIRCLED KATAKANA SA	[2000]
+0x86E4	U+32DB	# CIRCLED KATAKANA SI	[2000]
+0x86E5	U+32DC	# CIRCLED KATAKANA SU	[2000]
+0x86E6	U+32DD	# CIRCLED KATAKANA SE	[2000]
+0x86E7	U+32DE	# CIRCLED KATAKANA SO	[2000]
+0x86E8	U+32DF	# CIRCLED KATAKANA TA	[2000]
+0x86E9	U+32E0	# CIRCLED KATAKANA TI	[2000]
+0x86EA	U+32E1	# CIRCLED KATAKANA TU	[2000]
+0x86EB	U+32E2	# CIRCLED KATAKANA TE	[2000]
+0x86EC	U+32E3	# CIRCLED KATAKANA TO	[2000]
+0x86ED	U+32FA	# CIRCLED KATAKANA RO	[2000]
+0x86EE	U+32E9	# CIRCLED KATAKANA HA	[2000]
+0x86EF	U+32E5	# CIRCLED KATAKANA NI	[2000]
+0x86F0	U+32ED	# CIRCLED KATAKANA HO	[2000]
+0x86F1	U+32EC	# CIRCLED KATAKANA HE	[2000]
+0x86F2		# <reserved>
+0x86F3		# <reserved>
+0x86F4		# <reserved>
+0x86F5		# <reserved>
+0x86F6		# <reserved>
+0x86F7		# <reserved>
+0x86F8		# <reserved>
+0x86F9		# <reserved>
+0x86FA		# <reserved>
+0x86FB	U+2051	# TWO ASTERISKS ALIGNED VERTICALLY	[2000]	[Unicode3.2]
+0x86FC	U+2042	# ASTERISM	[2000]
+0x8740	U+2460	# CIRCLED DIGIT ONE	[2000]
+0x8741	U+2461	# CIRCLED DIGIT TWO	[2000]
+0x8742	U+2462	# CIRCLED DIGIT THREE	[2000]
+0x8743	U+2463	# CIRCLED DIGIT FOUR	[2000]
+0x8744	U+2464	# CIRCLED DIGIT FIVE	[2000]
+0x8745	U+2465	# CIRCLED DIGIT SIX	[2000]
+0x8746	U+2466	# CIRCLED DIGIT SEVEN	[2000]
+0x8747	U+2467	# CIRCLED DIGIT EIGHT	[2000]
+0x8748	U+2468	# CIRCLED DIGIT NINE	[2000]
+0x8749	U+2469	# CIRCLED NUMBER TEN	[2000]
+0x874A	U+246A	# CIRCLED NUMBER ELEVEN	[2000]
+0x874B	U+246B	# CIRCLED NUMBER TWELVE	[2000]
+0x874C	U+246C	# CIRCLED NUMBER THIRTEEN	[2000]
+0x874D	U+246D	# CIRCLED NUMBER FOURTEEN	[2000]
+0x874E	U+246E	# CIRCLED NUMBER FIFTEEN	[2000]
+0x874F	U+246F	# CIRCLED NUMBER SIXTEEN	[2000]
+0x8750	U+2470	# CIRCLED NUMBER SEVENTEEN	[2000]
+0x8751	U+2471	# CIRCLED NUMBER EIGHTEEN	[2000]
+0x8752	U+2472	# CIRCLED NUMBER NINETEEN	[2000]
+0x8753	U+2473	# CIRCLED NUMBER TWENTY	[2000]
+0x8754	U+2160	# ROMAN NUMERAL ONE	[2000]
+0x8755	U+2161	# ROMAN NUMERAL TWO	[2000]
+0x8756	U+2162	# ROMAN NUMERAL THREE	[2000]
+0x8757	U+2163	# ROMAN NUMERAL FOUR	[2000]
+0x8758	U+2164	# ROMAN NUMERAL FIVE	[2000]
+0x8759	U+2165	# ROMAN NUMERAL SIX	[2000]
+0x875A	U+2166	# ROMAN NUMERAL SEVEN	[2000]
+0x875B	U+2167	# ROMAN NUMERAL EIGHT	[2000]
+0x875C	U+2168	# ROMAN NUMERAL NINE	[2000]
+0x875D	U+2169	# ROMAN NUMERAL TEN	[2000]
+0x875E	U+216A	# ROMAN NUMERAL ELEVEN	[2000]
+0x875F	U+3349	# SQUARE MIRI	[2000]
+0x8760	U+3314	# SQUARE KIRO	[2000]
+0x8761	U+3322	# SQUARE SENTI	[2000]
+0x8762	U+334D	# SQUARE MEETORU	[2000]
+0x8763	U+3318	# SQUARE GURAMU	[2000]
+0x8764	U+3327	# SQUARE TON	[2000]
+0x8765	U+3303	# SQUARE AARU	[2000]
+0x8766	U+3336	# SQUARE HEKUTAARU	[2000]
+0x8767	U+3351	# SQUARE RITTORU	[2000]
+0x8768	U+3357	# SQUARE WATTO	[2000]
+0x8769	U+330D	# SQUARE KARORII	[2000]
+0x876A	U+3326	# SQUARE DORU	[2000]
+0x876B	U+3323	# SQUARE SENTO	[2000]
+0x876C	U+332B	# SQUARE PAASENTO	[2000]
+0x876D	U+334A	# SQUARE MIRIBAARU	[2000]
+0x876E	U+333B	# SQUARE PEEZI	[2000]
+0x876F	U+339C	# SQUARE MM	[2000]
+0x8770	U+339D	# SQUARE CM	[2000]
+0x8771	U+339E	# SQUARE KM	[2000]
+0x8772	U+338E	# SQUARE MG	[2000]
+0x8773	U+338F	# SQUARE KG	[2000]
+0x8774	U+33C4	# SQUARE CC	[2000]
+0x8775	U+33A1	# SQUARE M SQUARED	[2000]
+0x8776	U+216B	# ROMAN NUMERAL TWELVE	[2000]
+0x8777		# <reserved>
+0x8778		# <reserved>
+0x8779		# <reserved>
+0x877A		# <reserved>
+0x877B		# <reserved>
+0x877C		# <reserved>
+0x877D		# <reserved>
+0x877E	U+337B	# SQUARE ERA NAME HEISEI	[2000]
+0x8780	U+301D	# REVERSED DOUBLE PRIME QUOTATION MARK	[2000]
+0x8781	U+301F	# LOW DOUBLE PRIME QUOTATION MARK	[2000]
+0x8782	U+2116	# NUMERO SIGN	[2000]
+0x8783	U+33CD	# SQUARE KK	[2000]
+0x8784	U+2121	# TELEPHONE SIGN	[2000]
+0x8785	U+32A4	# CIRCLED IDEOGRAPH HIGH	[2000]
+0x8786	U+32A5	# CIRCLED IDEOGRAPH CENTRE	[2000]
+0x8787	U+32A6	# CIRCLED IDEOGRAPH LOW	[2000]
+0x8788	U+32A7	# CIRCLED IDEOGRAPH LEFT	[2000]
+0x8789	U+32A8	# CIRCLED IDEOGRAPH RIGHT	[2000]
+0x878A	U+3231	# PARENTHESIZED IDEOGRAPH STOCK	[2000]
+0x878B	U+3232	# PARENTHESIZED IDEOGRAPH HAVE	[2000]
+0x878C	U+3239	# PARENTHESIZED IDEOGRAPH REPRESENT	[2000]
+0x878D	U+337E	# SQUARE ERA NAME MEIZI	[2000]
+0x878E	U+337D	# SQUARE ERA NAME TAISYOU	[2000]
+0x878F	U+337C	# SQUARE ERA NAME SYOUWA	[2000]
+0x8790		# <reserved>	Windows: U+2252
+0x8791		# <reserved>	Windows: U+2261
+0x8792		# <reserved>	Windows: U+222B
+0x8793	U+222E	# CONTOUR INTEGRAL	[2000]
+0x8794		# <reserved>	Windows: U+2211
+0x8795		# <reserved>	Windows: U+221A
+0x8796		# <reserved>	Windows: U+22A5
+0x8797		# <reserved>	Windows: U+2220
+0x8798	U+221F	# RIGHT ANGLE	[2000]
+0x8799	U+22BF	# RIGHT TRIANGLE	[2000]
+0x879A		# <reserved>	Windows: U+2235
+0x879B		# <reserved>	Windows: U+2229
+0x879C		# <reserved>	Windows: U+222A
+0x879D	U+2756	# BLACK DIAMOND MINUS WHITE X	[2000]
+0x879E	U+261E	# WHITE RIGHT POINTING INDEX	[2000]
+0x879F	U+4FF1	# <cjk>	[2004]
+0x87A0	U+2000B	# <cjk>	[2000]	[Unicode3.1]
+0x87A1	U+3402	# <cjk>	[2000]
+0x87A2	U+4E28	# <cjk>	[2000]
+0x87A3	U+4E2F	# <cjk>	[2000]
+0x87A4	U+4E30	# <cjk>	[2000]
+0x87A5	U+4E8D	# <cjk>	[2000]
+0x87A6	U+4EE1	# <cjk>	[2000]
+0x87A7	U+4EFD	# <cjk>	[2000]
+0x87A8	U+4EFF	# <cjk>	[2000]
+0x87A9	U+4F03	# <cjk>	[2000]
+0x87AA	U+4F0B	# <cjk>	[2000]
+0x87AB	U+4F60	# <cjk>	[2000]
+0x87AC	U+4F48	# <cjk>	[2000]
+0x87AD	U+4F49	# <cjk>	[2000]
+0x87AE	U+4F56	# <cjk>	[2000]
+0x87AF	U+4F5F	# <cjk>	[2000]
+0x87B0	U+4F6A	# <cjk>	[2000]
+0x87B1	U+4F6C	# <cjk>	[2000]
+0x87B2	U+4F7E	# <cjk>	[2000]
+0x87B3	U+4F8A	# <cjk>	[2000]
+0x87B4	U+4F94	# <cjk>	[2000]
+0x87B5	U+4F97	# <cjk>	[2000]
+0x87B6	U+FA30	# CJK COMPATIBILITY IDEOGRAPH-FA30	[2000]	[Unicode3.2]
+0x87B7	U+4FC9	# <cjk>	[2000]
+0x87B8	U+4FE0	# <cjk>	[2000]
+0x87B9	U+5001	# <cjk>	[2000]
+0x87BA	U+5002	# <cjk>	[2000]
+0x87BB	U+500E	# <cjk>	[2000]
+0x87BC	U+5018	# <cjk>	[2000]
+0x87BD	U+5027	# <cjk>	[2000]
+0x87BE	U+502E	# <cjk>	[2000]
+0x87BF	U+5040	# <cjk>	[2000]
+0x87C0	U+503B	# <cjk>	[2000]
+0x87C1	U+5041	# <cjk>	[2000]
+0x87C2	U+5094	# <cjk>	[2000]
+0x87C3	U+50CC	# <cjk>	[2000]
+0x87C4	U+50F2	# <cjk>	[2000]
+0x87C5	U+50D0	# <cjk>	[2000]
+0x87C6	U+50E6	# <cjk>	[2000]
+0x87C7	U+FA31	# CJK COMPATIBILITY IDEOGRAPH-FA31	[2000]	[Unicode3.2]
+0x87C8	U+5106	# <cjk>	[2000]
+0x87C9	U+5103	# <cjk>	[2000]
+0x87CA	U+510B	# <cjk>	[2000]
+0x87CB	U+511E	# <cjk>	[2000]
+0x87CC	U+5135	# <cjk>	[2000]
+0x87CD	U+514A	# <cjk>	[2000]
+0x87CE	U+FA32	# CJK COMPATIBILITY IDEOGRAPH-FA32	[2000]	[Unicode3.2]
+0x87CF	U+5155	# <cjk>	[2000]
+0x87D0	U+5157	# <cjk>	[2000]
+0x87D1	U+34B5	# <cjk>	[2000]
+0x87D2	U+519D	# <cjk>	[2000]
+0x87D3	U+51C3	# <cjk>	[2000]
+0x87D4	U+51CA	# <cjk>	[2000]
+0x87D5	U+51DE	# <cjk>	[2000]
+0x87D6	U+51E2	# <cjk>	[2000]
+0x87D7	U+51EE	# <cjk>	[2000]
+0x87D8	U+5201	# <cjk>	[2000]
+0x87D9	U+34DB	# <cjk>	[2000]
+0x87DA	U+5213	# <cjk>	[2000]
+0x87DB	U+5215	# <cjk>	[2000]
+0x87DC	U+5249	# <cjk>	[2000]
+0x87DD	U+5257	# <cjk>	[2000]
+0x87DE	U+5261	# <cjk>	[2000]
+0x87DF	U+5293	# <cjk>	[2000]
+0x87E0	U+52C8	# <cjk>	[2000]
+0x87E1	U+FA33	# CJK COMPATIBILITY IDEOGRAPH-FA33	[2000]	[Unicode3.2]
+0x87E2	U+52CC	# <cjk>	[2000]
+0x87E3	U+52D0	# <cjk>	[2000]
+0x87E4	U+52D6	# <cjk>	[2000]
+0x87E5	U+52DB	# <cjk>	[2000]
+0x87E6	U+FA34	# CJK COMPATIBILITY IDEOGRAPH-FA34	[2000]	[Unicode3.2]
+0x87E7	U+52F0	# <cjk>	[2000]
+0x87E8	U+52FB	# <cjk>	[2000]
+0x87E9	U+5300	# <cjk>	[2000]
+0x87EA	U+5307	# <cjk>	[2000]
+0x87EB	U+531C	# <cjk>	[2000]
+0x87EC	U+FA35	# CJK COMPATIBILITY IDEOGRAPH-FA35	[2000]	[Unicode3.2]
+0x87ED	U+5361	# <cjk>	[2000]
+0x87EE	U+5363	# <cjk>	[2000]
+0x87EF	U+537D	# <cjk>	[2000]
+0x87F0	U+5393	# <cjk>	[2000]
+0x87F1	U+539D	# <cjk>	[2000]
+0x87F2	U+53B2	# <cjk>	[2000]
+0x87F3	U+5412	# <cjk>	[2000]
+0x87F4	U+5427	# <cjk>	[2000]
+0x87F5	U+544D	# <cjk>	[2000]
+0x87F6	U+549C	# <cjk>	[2000]
+0x87F7	U+546B	# <cjk>	[2000]
+0x87F8	U+5474	# <cjk>	[2000]
+0x87F9	U+547F	# <cjk>	[2000]
+0x87FA	U+5488	# <cjk>	[2000]
+0x87FB	U+5496	# <cjk>	[2000]
+0x87FC	U+54A1	# <cjk>	[2000]
+0x8840	U+54A9	# <cjk>	[2000]
+0x8841	U+54C6	# <cjk>	[2000]
+0x8842	U+54FF	# <cjk>	[2000]
+0x8843	U+550E	# <cjk>	[2000]
+0x8844	U+552B	# <cjk>	[2000]
+0x8845	U+5535	# <cjk>	[2000]
+0x8846	U+5550	# <cjk>	[2000]
+0x8847	U+555E	# <cjk>	[2000]
+0x8848	U+5581	# <cjk>	[2000]
+0x8849	U+5586	# <cjk>	[2000]
+0x884A	U+558E	# <cjk>	[2000]
+0x884B	U+FA36	# CJK COMPATIBILITY IDEOGRAPH-FA36	[2000]	[Unicode3.2]
+0x884C	U+55AD	# <cjk>	[2000]
+0x884D	U+55CE	# <cjk>	[2000]
+0x884E	U+FA37	# CJK COMPATIBILITY IDEOGRAPH-FA37	[2000]	[Unicode3.2]
+0x884F	U+5608	# <cjk>	[2000]
+0x8850	U+560E	# <cjk>	[2000]
+0x8851	U+563B	# <cjk>	[2000]
+0x8852	U+5649	# <cjk>	[2000]
+0x8853	U+5676	# <cjk>	[2000]
+0x8854	U+5666	# <cjk>	[2000]
+0x8855	U+FA38	# CJK COMPATIBILITY IDEOGRAPH-FA38	[2000]	[Unicode3.2]
+0x8856	U+566F	# <cjk>	[2000]
+0x8857	U+5671	# <cjk>	[2000]
+0x8858	U+5672	# <cjk>	[2000]
+0x8859	U+5699	# <cjk>	[2000]
+0x885A	U+569E	# <cjk>	[2000]
+0x885B	U+56A9	# <cjk>	[2000]
+0x885C	U+56AC	# <cjk>	[2000]
+0x885D	U+56B3	# <cjk>	[2000]
+0x885E	U+56C9	# <cjk>	[2000]
+0x885F	U+56CA	# <cjk>	[2000]
+0x8860	U+570A	# <cjk>	[2000]
+0x8861	U+2123D	# <cjk>	[2000]	[Unicode3.1]
+0x8862	U+5721	# <cjk>	[2000]
+0x8863	U+572F	# <cjk>	[2000]
+0x8864	U+5733	# <cjk>	[2000]
+0x8865	U+5734	# <cjk>	[2000]
+0x8866	U+5770	# <cjk>	[2000]
+0x8867	U+5777	# <cjk>	[2000]
+0x8868	U+577C	# <cjk>	[2000]
+0x8869	U+579C	# <cjk>	[2000]
+0x886A	U+FA0F	# CJK COMPATIBILITY IDEOGRAPH-FA0F	[2000]
+0x886B	U+2131B	# <cjk>	[2000]	[Unicode3.1]
+0x886C	U+57B8	# <cjk>	[2000]
+0x886D	U+57C7	# <cjk>	[2000]
+0x886E	U+57C8	# <cjk>	[2000]
+0x886F	U+57CF	# <cjk>	[2000]
+0x8870	U+57E4	# <cjk>	[2000]
+0x8871	U+57ED	# <cjk>	[2000]
+0x8872	U+57F5	# <cjk>	[2000]
+0x8873	U+57F6	# <cjk>	[2000]
+0x8874	U+57FF	# <cjk>	[2000]
+0x8875	U+5809	# <cjk>	[2000]
+0x8876	U+FA10	# CJK COMPATIBILITY IDEOGRAPH-FA10	[2000]
+0x8877	U+5861	# <cjk>	[2000]
+0x8878	U+5864	# <cjk>	[2000]
+0x8879	U+FA39	# CJK COMPATIBILITY IDEOGRAPH-FA39	[2000]	[Unicode3.2]
+0x887A	U+587C	# <cjk>	[2000]
+0x887B	U+5889	# <cjk>	[2000]
+0x887C	U+589E	# <cjk>	[2000]
+0x887D	U+FA3A	# CJK COMPATIBILITY IDEOGRAPH-FA3A	[2000]	[Unicode3.2]
+0x887E	U+58A9	# <cjk>	[2000]
+0x8880	U+2146E	# <cjk>	[2000]	[Unicode3.1]
+0x8881	U+58D2	# <cjk>	[2000]
+0x8882	U+58CE	# <cjk>	[2000]
+0x8883	U+58D4	# <cjk>	[2000]
+0x8884	U+58DA	# <cjk>	[2000]
+0x8885	U+58E0	# <cjk>	[2000]
+0x8886	U+58E9	# <cjk>	[2000]
+0x8887	U+590C	# <cjk>	[2000]
+0x8888	U+8641	# <cjk>	[2000]
+0x8889	U+595D	# <cjk>	[2000]
+0x888A	U+596D	# <cjk>	[2000]
+0x888B	U+598B	# <cjk>	[2000]
+0x888C	U+5992	# <cjk>	[2000]
+0x888D	U+59A4	# <cjk>	[2000]
+0x888E	U+59C3	# <cjk>	[2000]
+0x888F	U+59D2	# <cjk>	[2000]
+0x8890	U+59DD	# <cjk>	[2000]
+0x8891	U+5A13	# <cjk>	[2000]
+0x8892	U+5A23	# <cjk>	[2000]
+0x8893	U+5A67	# <cjk>	[2000]
+0x8894	U+5A6D	# <cjk>	[2000]
+0x8895	U+5A77	# <cjk>	[2000]
+0x8896	U+5A7E	# <cjk>	[2000]
+0x8897	U+5A84	# <cjk>	[2000]
+0x8898	U+5A9E	# <cjk>	[2000]
+0x8899	U+5AA7	# <cjk>	[2000]
+0x889A	U+5AC4	# <cjk>	[2000]
+0x889B	U+218BD	# <cjk>	[2000]	[Unicode3.1]
+0x889C	U+5B19	# <cjk>	[2000]
+0x889D	U+5B25	# <cjk>	[2000]
+0x889E	U+525D	# <cjk>	[2004]
+0x889F	U+4E9C	# <cjk>
+0x88A0	U+5516	# <cjk>
+0x88A1	U+5A03	# <cjk>
+0x88A2	U+963F	# <cjk>
+0x88A3	U+54C0	# <cjk>
+0x88A4	U+611B	# <cjk>
+0x88A5	U+6328	# <cjk>
+0x88A6	U+59F6	# <cjk>
+0x88A7	U+9022	# <cjk>
+0x88A8	U+8475	# <cjk>
+0x88A9	U+831C	# <cjk>
+0x88AA	U+7A50	# <cjk>
+0x88AB	U+60AA	# <cjk>
+0x88AC	U+63E1	# <cjk>
+0x88AD	U+6E25	# <cjk>
+0x88AE	U+65ED	# <cjk>
+0x88AF	U+8466	# <cjk>
+0x88B0	U+82A6	# <cjk>
+0x88B1	U+9BF5	# <cjk>
+0x88B2	U+6893	# <cjk>
+0x88B3	U+5727	# <cjk>
+0x88B4	U+65A1	# <cjk>
+0x88B5	U+6271	# <cjk>
+0x88B6	U+5B9B	# <cjk>
+0x88B7	U+59D0	# <cjk>
+0x88B8	U+867B	# <cjk>
+0x88B9	U+98F4	# <cjk>
+0x88BA	U+7D62	# <cjk>
+0x88BB	U+7DBE	# <cjk>
+0x88BC	U+9B8E	# <cjk>
+0x88BD	U+6216	# <cjk>
+0x88BE	U+7C9F	# <cjk>
+0x88BF	U+88B7	# <cjk>
+0x88C0	U+5B89	# <cjk>
+0x88C1	U+5EB5	# <cjk>
+0x88C2	U+6309	# <cjk>
+0x88C3	U+6697	# <cjk>
+0x88C4	U+6848	# <cjk>
+0x88C5	U+95C7	# <cjk>
+0x88C6	U+978D	# <cjk>
+0x88C7	U+674F	# <cjk>
+0x88C8	U+4EE5	# <cjk>
+0x88C9	U+4F0A	# <cjk>
+0x88CA	U+4F4D	# <cjk>
+0x88CB	U+4F9D	# <cjk>
+0x88CC	U+5049	# <cjk>
+0x88CD	U+56F2	# <cjk>
+0x88CE	U+5937	# <cjk>
+0x88CF	U+59D4	# <cjk>
+0x88D0	U+5A01	# <cjk>
+0x88D1	U+5C09	# <cjk>
+0x88D2	U+60DF	# <cjk>
+0x88D3	U+610F	# <cjk>
+0x88D4	U+6170	# <cjk>
+0x88D5	U+6613	# <cjk>
+0x88D6	U+6905	# <cjk>
+0x88D7	U+70BA	# <cjk>
+0x88D8	U+754F	# <cjk>
+0x88D9	U+7570	# <cjk>
+0x88DA	U+79FB	# <cjk>
+0x88DB	U+7DAD	# <cjk>
+0x88DC	U+7DEF	# <cjk>
+0x88DD	U+80C3	# <cjk>
+0x88DE	U+840E	# <cjk>
+0x88DF	U+8863	# <cjk>
+0x88E0	U+8B02	# <cjk>
+0x88E1	U+9055	# <cjk>
+0x88E2	U+907A	# <cjk>
+0x88E3	U+533B	# <cjk>
+0x88E4	U+4E95	# <cjk>
+0x88E5	U+4EA5	# <cjk>
+0x88E6	U+57DF	# <cjk>
+0x88E7	U+80B2	# <cjk>
+0x88E8	U+90C1	# <cjk>
+0x88E9	U+78EF	# <cjk>
+0x88EA	U+4E00	# <cjk>
+0x88EB	U+58F1	# <cjk>
+0x88EC	U+6EA2	# <cjk>
+0x88ED	U+9038	# <cjk>
+0x88EE	U+7A32	# <cjk>
+0x88EF	U+8328	# <cjk>
+0x88F0	U+828B	# <cjk>
+0x88F1	U+9C2F	# <cjk>
+0x88F2	U+5141	# <cjk>
+0x88F3	U+5370	# <cjk>
+0x88F4	U+54BD	# <cjk>
+0x88F5	U+54E1	# <cjk>
+0x88F6	U+56E0	# <cjk>
+0x88F7	U+59FB	# <cjk>
+0x88F8	U+5F15	# <cjk>
+0x88F9	U+98F2	# <cjk>
+0x88FA	U+6DEB	# <cjk>
+0x88FB	U+80E4	# <cjk>
+0x88FC	U+852D	# <cjk>
+0x8940	U+9662	# <cjk>
+0x8941	U+9670	# <cjk>
+0x8942	U+96A0	# <cjk>
+0x8943	U+97FB	# <cjk>
+0x8944	U+540B	# <cjk>
+0x8945	U+53F3	# <cjk>
+0x8946	U+5B87	# <cjk>
+0x8947	U+70CF	# <cjk>
+0x8948	U+7FBD	# <cjk>
+0x8949	U+8FC2	# <cjk>
+0x894A	U+96E8	# <cjk>
+0x894B	U+536F	# <cjk>
+0x894C	U+9D5C	# <cjk>
+0x894D	U+7ABA	# <cjk>
+0x894E	U+4E11	# <cjk>
+0x894F	U+7893	# <cjk>
+0x8950	U+81FC	# <cjk>
+0x8951	U+6E26	# <cjk>
+0x8952	U+5618	# <cjk>
+0x8953	U+5504	# <cjk>
+0x8954	U+6B1D	# <cjk>
+0x8955	U+851A	# <cjk>
+0x8956	U+9C3B	# <cjk>
+0x8957	U+59E5	# <cjk>
+0x8958	U+53A9	# <cjk>
+0x8959	U+6D66	# <cjk>
+0x895A	U+74DC	# <cjk>
+0x895B	U+958F	# <cjk>
+0x895C	U+5642	# <cjk>
+0x895D	U+4E91	# <cjk>
+0x895E	U+904B	# <cjk>
+0x895F	U+96F2	# <cjk>
+0x8960	U+834F	# <cjk>
+0x8961	U+990C	# <cjk>
+0x8962	U+53E1	# <cjk>
+0x8963	U+55B6	# <cjk>
+0x8964	U+5B30	# <cjk>
+0x8965	U+5F71	# <cjk>
+0x8966	U+6620	# <cjk>
+0x8967	U+66F3	# <cjk>
+0x8968	U+6804	# <cjk>
+0x8969	U+6C38	# <cjk>
+0x896A	U+6CF3	# <cjk>
+0x896B	U+6D29	# <cjk>
+0x896C	U+745B	# <cjk>
+0x896D	U+76C8	# <cjk>
+0x896E	U+7A4E	# <cjk>
+0x896F	U+9834	# <cjk>
+0x8970	U+82F1	# <cjk>
+0x8971	U+885B	# <cjk>
+0x8972	U+8A60	# <cjk>
+0x8973	U+92ED	# <cjk>
+0x8974	U+6DB2	# <cjk>
+0x8975	U+75AB	# <cjk>
+0x8976	U+76CA	# <cjk>
+0x8977	U+99C5	# <cjk>
+0x8978	U+60A6	# <cjk>
+0x8979	U+8B01	# <cjk>
+0x897A	U+8D8A	# <cjk>
+0x897B	U+95B2	# <cjk>
+0x897C	U+698E	# <cjk>
+0x897D	U+53AD	# <cjk>
+0x897E	U+5186	# <cjk>
+0x8980	U+5712	# <cjk>
+0x8981	U+5830	# <cjk>
+0x8982	U+5944	# <cjk>
+0x8983	U+5BB4	# <cjk>
+0x8984	U+5EF6	# <cjk>
+0x8985	U+6028	# <cjk>
+0x8986	U+63A9	# <cjk>
+0x8987	U+63F4	# <cjk>
+0x8988	U+6CBF	# <cjk>
+0x8989	U+6F14	# <cjk>
+0x898A	U+708E	# <cjk>
+0x898B	U+7114	# <cjk>
+0x898C	U+7159	# <cjk>
+0x898D	U+71D5	# <cjk>
+0x898E	U+733F	# <cjk>
+0x898F	U+7E01	# <cjk>
+0x8990	U+8276	# <cjk>
+0x8991	U+82D1	# <cjk>
+0x8992	U+8597	# <cjk>
+0x8993	U+9060	# <cjk>
+0x8994	U+925B	# <cjk>
+0x8995	U+9D1B	# <cjk>
+0x8996	U+5869	# <cjk>
+0x8997	U+65BC	# <cjk>
+0x8998	U+6C5A	# <cjk>
+0x8999	U+7525	# <cjk>
+0x899A	U+51F9	# <cjk>
+0x899B	U+592E	# <cjk>
+0x899C	U+5965	# <cjk>
+0x899D	U+5F80	# <cjk>
+0x899E	U+5FDC	# <cjk>
+0x899F	U+62BC	# <cjk>
+0x89A0	U+65FA	# <cjk>
+0x89A1	U+6A2A	# <cjk>
+0x89A2	U+6B27	# <cjk>
+0x89A3	U+6BB4	# <cjk>
+0x89A4	U+738B	# <cjk>
+0x89A5	U+7FC1	# <cjk>
+0x89A6	U+8956	# <cjk>
+0x89A7	U+9D2C	# <cjk>
+0x89A8	U+9D0E	# <cjk>
+0x89A9	U+9EC4	# <cjk>
+0x89AA	U+5CA1	# <cjk>
+0x89AB	U+6C96	# <cjk>
+0x89AC	U+837B	# <cjk>
+0x89AD	U+5104	# <cjk>
+0x89AE	U+5C4B	# <cjk>
+0x89AF	U+61B6	# <cjk>
+0x89B0	U+81C6	# <cjk>
+0x89B1	U+6876	# <cjk>
+0x89B2	U+7261	# <cjk>
+0x89B3	U+4E59	# <cjk>
+0x89B4	U+4FFA	# <cjk>
+0x89B5	U+5378	# <cjk>
+0x89B6	U+6069	# <cjk>
+0x89B7	U+6E29	# <cjk>
+0x89B8	U+7A4F	# <cjk>
+0x89B9	U+97F3	# <cjk>
+0x89BA	U+4E0B	# <cjk>
+0x89BB	U+5316	# <cjk>
+0x89BC	U+4EEE	# <cjk>
+0x89BD	U+4F55	# <cjk>
+0x89BE	U+4F3D	# <cjk>
+0x89BF	U+4FA1	# <cjk>
+0x89C0	U+4F73	# <cjk>
+0x89C1	U+52A0	# <cjk>
+0x89C2	U+53EF	# <cjk>
+0x89C3	U+5609	# <cjk>
+0x89C4	U+590F	# <cjk>
+0x89C5	U+5AC1	# <cjk>
+0x89C6	U+5BB6	# <cjk>
+0x89C7	U+5BE1	# <cjk>
+0x89C8	U+79D1	# <cjk>
+0x89C9	U+6687	# <cjk>
+0x89CA	U+679C	# <cjk>
+0x89CB	U+67B6	# <cjk>
+0x89CC	U+6B4C	# <cjk>
+0x89CD	U+6CB3	# <cjk>
+0x89CE	U+706B	# <cjk>
+0x89CF	U+73C2	# <cjk>
+0x89D0	U+798D	# <cjk>
+0x89D1	U+79BE	# <cjk>
+0x89D2	U+7A3C	# <cjk>
+0x89D3	U+7B87	# <cjk>
+0x89D4	U+82B1	# <cjk>
+0x89D5	U+82DB	# <cjk>
+0x89D6	U+8304	# <cjk>
+0x89D7	U+8377	# <cjk>
+0x89D8	U+83EF	# <cjk>
+0x89D9	U+83D3	# <cjk>
+0x89DA	U+8766	# <cjk>
+0x89DB	U+8AB2	# <cjk>
+0x89DC	U+5629	# <cjk>
+0x89DD	U+8CA8	# <cjk>
+0x89DE	U+8FE6	# <cjk>
+0x89DF	U+904E	# <cjk>
+0x89E0	U+971E	# <cjk>
+0x89E1	U+868A	# <cjk>
+0x89E2	U+4FC4	# <cjk>
+0x89E3	U+5CE8	# <cjk>
+0x89E4	U+6211	# <cjk>
+0x89E5	U+7259	# <cjk>
+0x89E6	U+753B	# <cjk>
+0x89E7	U+81E5	# <cjk>
+0x89E8	U+82BD	# <cjk>
+0x89E9	U+86FE	# <cjk>
+0x89EA	U+8CC0	# <cjk>
+0x89EB	U+96C5	# <cjk>
+0x89EC	U+9913	# <cjk>
+0x89ED	U+99D5	# <cjk>
+0x89EE	U+4ECB	# <cjk>
+0x89EF	U+4F1A	# <cjk>
+0x89F0	U+89E3	# <cjk>
+0x89F1	U+56DE	# <cjk>
+0x89F2	U+584A	# <cjk>
+0x89F3	U+58CA	# <cjk>
+0x89F4	U+5EFB	# <cjk>
+0x89F5	U+5FEB	# <cjk>
+0x89F6	U+602A	# <cjk>
+0x89F7	U+6094	# <cjk>
+0x89F8	U+6062	# <cjk>
+0x89F9	U+61D0	# <cjk>
+0x89FA	U+6212	# <cjk>
+0x89FB	U+62D0	# <cjk>
+0x89FC	U+6539	# <cjk>
+0x8A40	U+9B41	# <cjk>
+0x8A41	U+6666	# <cjk>
+0x8A42	U+68B0	# <cjk>
+0x8A43	U+6D77	# <cjk>
+0x8A44	U+7070	# <cjk>
+0x8A45	U+754C	# <cjk>
+0x8A46	U+7686	# <cjk>
+0x8A47	U+7D75	# <cjk>
+0x8A48	U+82A5	# <cjk>
+0x8A49	U+87F9	# <cjk>
+0x8A4A	U+958B	# <cjk>
+0x8A4B	U+968E	# <cjk>
+0x8A4C	U+8C9D	# <cjk>
+0x8A4D	U+51F1	# <cjk>
+0x8A4E	U+52BE	# <cjk>
+0x8A4F	U+5916	# <cjk>
+0x8A50	U+54B3	# <cjk>
+0x8A51	U+5BB3	# <cjk>
+0x8A52	U+5D16	# <cjk>
+0x8A53	U+6168	# <cjk>
+0x8A54	U+6982	# <cjk>
+0x8A55	U+6DAF	# <cjk>
+0x8A56	U+788D	# <cjk>
+0x8A57	U+84CB	# <cjk>
+0x8A58	U+8857	# <cjk>
+0x8A59	U+8A72	# <cjk>
+0x8A5A	U+93A7	# <cjk>
+0x8A5B	U+9AB8	# <cjk>
+0x8A5C	U+6D6C	# <cjk>
+0x8A5D	U+99A8	# <cjk>
+0x8A5E	U+86D9	# <cjk>
+0x8A5F	U+57A3	# <cjk>
+0x8A60	U+67FF	# <cjk>
+0x8A61	U+86CE	# <cjk>
+0x8A62	U+920E	# <cjk>
+0x8A63	U+5283	# <cjk>
+0x8A64	U+5687	# <cjk>
+0x8A65	U+5404	# <cjk>
+0x8A66	U+5ED3	# <cjk>
+0x8A67	U+62E1	# <cjk>
+0x8A68	U+64B9	# <cjk>
+0x8A69	U+683C	# <cjk>
+0x8A6A	U+6838	# <cjk>
+0x8A6B	U+6BBB	# <cjk>
+0x8A6C	U+7372	# <cjk>
+0x8A6D	U+78BA	# <cjk>
+0x8A6E	U+7A6B	# <cjk>
+0x8A6F	U+899A	# <cjk>
+0x8A70	U+89D2	# <cjk>
+0x8A71	U+8D6B	# <cjk>
+0x8A72	U+8F03	# <cjk>
+0x8A73	U+90ED	# <cjk>
+0x8A74	U+95A3	# <cjk>
+0x8A75	U+9694	# <cjk>
+0x8A76	U+9769	# <cjk>
+0x8A77	U+5B66	# <cjk>
+0x8A78	U+5CB3	# <cjk>
+0x8A79	U+697D	# <cjk>
+0x8A7A	U+984D	# <cjk>
+0x8A7B	U+984E	# <cjk>
+0x8A7C	U+639B	# <cjk>
+0x8A7D	U+7B20	# <cjk>
+0x8A7E	U+6A2B	# <cjk>
+0x8A80	U+6A7F	# <cjk>
+0x8A81	U+68B6	# <cjk>
+0x8A82	U+9C0D	# <cjk>
+0x8A83	U+6F5F	# <cjk>
+0x8A84	U+5272	# <cjk>
+0x8A85	U+559D	# <cjk>
+0x8A86	U+6070	# <cjk>
+0x8A87	U+62EC	# <cjk>
+0x8A88	U+6D3B	# <cjk>
+0x8A89	U+6E07	# <cjk>
+0x8A8A	U+6ED1	# <cjk>
+0x8A8B	U+845B	# <cjk>
+0x8A8C	U+8910	# <cjk>
+0x8A8D	U+8F44	# <cjk>
+0x8A8E	U+4E14	# <cjk>
+0x8A8F	U+9C39	# <cjk>
+0x8A90	U+53F6	# <cjk>
+0x8A91	U+691B	# <cjk>
+0x8A92	U+6A3A	# <cjk>
+0x8A93	U+9784	# <cjk>
+0x8A94	U+682A	# <cjk>
+0x8A95	U+515C	# <cjk>
+0x8A96	U+7AC3	# <cjk>
+0x8A97	U+84B2	# <cjk>
+0x8A98	U+91DC	# <cjk>
+0x8A99	U+938C	# <cjk>
+0x8A9A	U+565B	# <cjk>
+0x8A9B	U+9D28	# <cjk>
+0x8A9C	U+6822	# <cjk>
+0x8A9D	U+8305	# <cjk>
+0x8A9E	U+8431	# <cjk>
+0x8A9F	U+7CA5	# <cjk>
+0x8AA0	U+5208	# <cjk>
+0x8AA1	U+82C5	# <cjk>
+0x8AA2	U+74E6	# <cjk>
+0x8AA3	U+4E7E	# <cjk>
+0x8AA4	U+4F83	# <cjk>
+0x8AA5	U+51A0	# <cjk>
+0x8AA6	U+5BD2	# <cjk>
+0x8AA7	U+520A	# <cjk>
+0x8AA8	U+52D8	# <cjk>
+0x8AA9	U+52E7	# <cjk>
+0x8AAA	U+5DFB	# <cjk>
+0x8AAB	U+559A	# <cjk>
+0x8AAC	U+582A	# <cjk>
+0x8AAD	U+59E6	# <cjk>
+0x8AAE	U+5B8C	# <cjk>
+0x8AAF	U+5B98	# <cjk>
+0x8AB0	U+5BDB	# <cjk>
+0x8AB1	U+5E72	# <cjk>
+0x8AB2	U+5E79	# <cjk>
+0x8AB3	U+60A3	# <cjk>
+0x8AB4	U+611F	# <cjk>
+0x8AB5	U+6163	# <cjk>
+0x8AB6	U+61BE	# <cjk>
+0x8AB7	U+63DB	# <cjk>
+0x8AB8	U+6562	# <cjk>
+0x8AB9	U+67D1	# <cjk>
+0x8ABA	U+6853	# <cjk>
+0x8ABB	U+68FA	# <cjk>
+0x8ABC	U+6B3E	# <cjk>
+0x8ABD	U+6B53	# <cjk>
+0x8ABE	U+6C57	# <cjk>
+0x8ABF	U+6F22	# <cjk>
+0x8AC0	U+6F97	# <cjk>
+0x8AC1	U+6F45	# <cjk>
+0x8AC2	U+74B0	# <cjk>
+0x8AC3	U+7518	# <cjk>
+0x8AC4	U+76E3	# <cjk>
+0x8AC5	U+770B	# <cjk>
+0x8AC6	U+7AFF	# <cjk>
+0x8AC7	U+7BA1	# <cjk>
+0x8AC8	U+7C21	# <cjk>
+0x8AC9	U+7DE9	# <cjk>
+0x8ACA	U+7F36	# <cjk>
+0x8ACB	U+7FF0	# <cjk>
+0x8ACC	U+809D	# <cjk>
+0x8ACD	U+8266	# <cjk>
+0x8ACE	U+839E	# <cjk>
+0x8ACF	U+89B3	# <cjk>
+0x8AD0	U+8ACC	# <cjk>
+0x8AD1	U+8CAB	# <cjk>
+0x8AD2	U+9084	# <cjk>
+0x8AD3	U+9451	# <cjk>
+0x8AD4	U+9593	# <cjk>
+0x8AD5	U+9591	# <cjk>
+0x8AD6	U+95A2	# <cjk>
+0x8AD7	U+9665	# <cjk>
+0x8AD8	U+97D3	# <cjk>
+0x8AD9	U+9928	# <cjk>
+0x8ADA	U+8218	# <cjk>
+0x8ADB	U+4E38	# <cjk>
+0x8ADC	U+542B	# <cjk>
+0x8ADD	U+5CB8	# <cjk>
+0x8ADE	U+5DCC	# <cjk>
+0x8ADF	U+73A9	# <cjk>
+0x8AE0	U+764C	# <cjk>
+0x8AE1	U+773C	# <cjk>
+0x8AE2	U+5CA9	# <cjk>
+0x8AE3	U+7FEB	# <cjk>
+0x8AE4	U+8D0B	# <cjk>
+0x8AE5	U+96C1	# <cjk>
+0x8AE6	U+9811	# <cjk>
+0x8AE7	U+9854	# <cjk>
+0x8AE8	U+9858	# <cjk>
+0x8AE9	U+4F01	# <cjk>
+0x8AEA	U+4F0E	# <cjk>
+0x8AEB	U+5371	# <cjk>
+0x8AEC	U+559C	# <cjk>
+0x8AED	U+5668	# <cjk>
+0x8AEE	U+57FA	# <cjk>
+0x8AEF	U+5947	# <cjk>
+0x8AF0	U+5B09	# <cjk>
+0x8AF1	U+5BC4	# <cjk>
+0x8AF2	U+5C90	# <cjk>
+0x8AF3	U+5E0C	# <cjk>
+0x8AF4	U+5E7E	# <cjk>
+0x8AF5	U+5FCC	# <cjk>
+0x8AF6	U+63EE	# <cjk>
+0x8AF7	U+673A	# <cjk>
+0x8AF8	U+65D7	# <cjk>
+0x8AF9	U+65E2	# <cjk>
+0x8AFA	U+671F	# <cjk>
+0x8AFB	U+68CB	# <cjk>
+0x8AFC	U+68C4	# <cjk>
+0x8B40	U+6A5F	# <cjk>
+0x8B41	U+5E30	# <cjk>
+0x8B42	U+6BC5	# <cjk>
+0x8B43	U+6C17	# <cjk>
+0x8B44	U+6C7D	# <cjk>
+0x8B45	U+757F	# <cjk>
+0x8B46	U+7948	# <cjk>
+0x8B47	U+5B63	# <cjk>
+0x8B48	U+7A00	# <cjk>
+0x8B49	U+7D00	# <cjk>
+0x8B4A	U+5FBD	# <cjk>
+0x8B4B	U+898F	# <cjk>
+0x8B4C	U+8A18	# <cjk>
+0x8B4D	U+8CB4	# <cjk>
+0x8B4E	U+8D77	# <cjk>
+0x8B4F	U+8ECC	# <cjk>
+0x8B50	U+8F1D	# <cjk>
+0x8B51	U+98E2	# <cjk>
+0x8B52	U+9A0E	# <cjk>
+0x8B53	U+9B3C	# <cjk>
+0x8B54	U+4E80	# <cjk>
+0x8B55	U+507D	# <cjk>
+0x8B56	U+5100	# <cjk>
+0x8B57	U+5993	# <cjk>
+0x8B58	U+5B9C	# <cjk>
+0x8B59	U+622F	# <cjk>
+0x8B5A	U+6280	# <cjk>
+0x8B5B	U+64EC	# <cjk>
+0x8B5C	U+6B3A	# <cjk>
+0x8B5D	U+72A0	# <cjk>
+0x8B5E	U+7591	# <cjk>
+0x8B5F	U+7947	# <cjk>
+0x8B60	U+7FA9	# <cjk>
+0x8B61	U+87FB	# <cjk>
+0x8B62	U+8ABC	# <cjk>
+0x8B63	U+8B70	# <cjk>
+0x8B64	U+63AC	# <cjk>
+0x8B65	U+83CA	# <cjk>
+0x8B66	U+97A0	# <cjk>
+0x8B67	U+5409	# <cjk>
+0x8B68	U+5403	# <cjk>
+0x8B69	U+55AB	# <cjk>
+0x8B6A	U+6854	# <cjk>
+0x8B6B	U+6A58	# <cjk>
+0x8B6C	U+8A70	# <cjk>
+0x8B6D	U+7827	# <cjk>
+0x8B6E	U+6775	# <cjk>
+0x8B6F	U+9ECD	# <cjk>
+0x8B70	U+5374	# <cjk>
+0x8B71	U+5BA2	# <cjk>
+0x8B72	U+811A	# <cjk>
+0x8B73	U+8650	# <cjk>
+0x8B74	U+9006	# <cjk>
+0x8B75	U+4E18	# <cjk>
+0x8B76	U+4E45	# <cjk>
+0x8B77	U+4EC7	# <cjk>
+0x8B78	U+4F11	# <cjk>
+0x8B79	U+53CA	# <cjk>
+0x8B7A	U+5438	# <cjk>
+0x8B7B	U+5BAE	# <cjk>
+0x8B7C	U+5F13	# <cjk>
+0x8B7D	U+6025	# <cjk>
+0x8B7E	U+6551	# <cjk>
+0x8B80	U+673D	# <cjk>
+0x8B81	U+6C42	# <cjk>
+0x8B82	U+6C72	# <cjk>
+0x8B83	U+6CE3	# <cjk>
+0x8B84	U+7078	# <cjk>
+0x8B85	U+7403	# <cjk>
+0x8B86	U+7A76	# <cjk>
+0x8B87	U+7AAE	# <cjk>
+0x8B88	U+7B08	# <cjk>
+0x8B89	U+7D1A	# <cjk>
+0x8B8A	U+7CFE	# <cjk>
+0x8B8B	U+7D66	# <cjk>
+0x8B8C	U+65E7	# <cjk>
+0x8B8D	U+725B	# <cjk>
+0x8B8E	U+53BB	# <cjk>
+0x8B8F	U+5C45	# <cjk>
+0x8B90	U+5DE8	# <cjk>
+0x8B91	U+62D2	# <cjk>
+0x8B92	U+62E0	# <cjk>
+0x8B93	U+6319	# <cjk>
+0x8B94	U+6E20	# <cjk>
+0x8B95	U+865A	# <cjk>
+0x8B96	U+8A31	# <cjk>
+0x8B97	U+8DDD	# <cjk>
+0x8B98	U+92F8	# <cjk>
+0x8B99	U+6F01	# <cjk>
+0x8B9A	U+79A6	# <cjk>
+0x8B9B	U+9B5A	# <cjk>
+0x8B9C	U+4EA8	# <cjk>
+0x8B9D	U+4EAB	# <cjk>
+0x8B9E	U+4EAC	# <cjk>
+0x8B9F	U+4F9B	# <cjk>
+0x8BA0	U+4FA0	# <cjk>
+0x8BA1	U+50D1	# <cjk>
+0x8BA2	U+5147	# <cjk>
+0x8BA3	U+7AF6	# <cjk>
+0x8BA4	U+5171	# <cjk>
+0x8BA5	U+51F6	# <cjk>
+0x8BA6	U+5354	# <cjk>
+0x8BA7	U+5321	# <cjk>
+0x8BA8	U+537F	# <cjk>
+0x8BA9	U+53EB	# <cjk>
+0x8BAA	U+55AC	# <cjk>
+0x8BAB	U+5883	# <cjk>
+0x8BAC	U+5CE1	# <cjk>
+0x8BAD	U+5F37	# <cjk>
+0x8BAE	U+5F4A	# <cjk>
+0x8BAF	U+602F	# <cjk>
+0x8BB0	U+6050	# <cjk>
+0x8BB1	U+606D	# <cjk>
+0x8BB2	U+631F	# <cjk>
+0x8BB3	U+6559	# <cjk>
+0x8BB4	U+6A4B	# <cjk>
+0x8BB5	U+6CC1	# <cjk>
+0x8BB6	U+72C2	# <cjk>
+0x8BB7	U+72ED	# <cjk>
+0x8BB8	U+77EF	# <cjk>
+0x8BB9	U+80F8	# <cjk>
+0x8BBA	U+8105	# <cjk>
+0x8BBB	U+8208	# <cjk>
+0x8BBC	U+854E	# <cjk>
+0x8BBD	U+90F7	# <cjk>
+0x8BBE	U+93E1	# <cjk>
+0x8BBF	U+97FF	# <cjk>
+0x8BC0	U+9957	# <cjk>
+0x8BC1	U+9A5A	# <cjk>
+0x8BC2	U+4EF0	# <cjk>
+0x8BC3	U+51DD	# <cjk>
+0x8BC4	U+5C2D	# <cjk>
+0x8BC5	U+6681	# <cjk>
+0x8BC6	U+696D	# <cjk>
+0x8BC7	U+5C40	# <cjk>
+0x8BC8	U+66F2	# <cjk>
+0x8BC9	U+6975	# <cjk>
+0x8BCA	U+7389	# <cjk>
+0x8BCB	U+6850	# <cjk>
+0x8BCC	U+7C81	# <cjk>
+0x8BCD	U+50C5	# <cjk>
+0x8BCE	U+52E4	# <cjk>
+0x8BCF	U+5747	# <cjk>
+0x8BD0	U+5DFE	# <cjk>
+0x8BD1	U+9326	# <cjk>
+0x8BD2	U+65A4	# <cjk>
+0x8BD3	U+6B23	# <cjk>
+0x8BD4	U+6B3D	# <cjk>
+0x8BD5	U+7434	# <cjk>
+0x8BD6	U+7981	# <cjk>
+0x8BD7	U+79BD	# <cjk>
+0x8BD8	U+7B4B	# <cjk>
+0x8BD9	U+7DCA	# <cjk>
+0x8BDA	U+82B9	# <cjk>
+0x8BDB	U+83CC	# <cjk>
+0x8BDC	U+887F	# <cjk>
+0x8BDD	U+895F	# <cjk>
+0x8BDE	U+8B39	# <cjk>
+0x8BDF	U+8FD1	# <cjk>
+0x8BE0	U+91D1	# <cjk>
+0x8BE1	U+541F	# <cjk>
+0x8BE2	U+9280	# <cjk>
+0x8BE3	U+4E5D	# <cjk>
+0x8BE4	U+5036	# <cjk>
+0x8BE5	U+53E5	# <cjk>
+0x8BE6	U+533A	# <cjk>
+0x8BE7	U+72D7	# <cjk>
+0x8BE8	U+7396	# <cjk>
+0x8BE9	U+77E9	# <cjk>
+0x8BEA	U+82E6	# <cjk>
+0x8BEB	U+8EAF	# <cjk>
+0x8BEC	U+99C6	# <cjk>
+0x8BED	U+99C8	# <cjk>
+0x8BEE	U+99D2	# <cjk>
+0x8BEF	U+5177	# <cjk>
+0x8BF0	U+611A	# <cjk>
+0x8BF1	U+865E	# <cjk>
+0x8BF2	U+55B0	# <cjk>
+0x8BF3	U+7A7A	# <cjk>
+0x8BF4	U+5076	# <cjk>
+0x8BF5	U+5BD3	# <cjk>
+0x8BF6	U+9047	# <cjk>
+0x8BF7	U+9685	# <cjk>
+0x8BF8	U+4E32	# <cjk>
+0x8BF9	U+6ADB	# <cjk>
+0x8BFA	U+91E7	# <cjk>
+0x8BFB	U+5C51	# <cjk>
+0x8BFC	U+5C48	# <cjk>
+0x8C40	U+6398	# <cjk>
+0x8C41	U+7A9F	# <cjk>
+0x8C42	U+6C93	# <cjk>
+0x8C43	U+9774	# <cjk>
+0x8C44	U+8F61	# <cjk>
+0x8C45	U+7AAA	# <cjk>
+0x8C46	U+718A	# <cjk>
+0x8C47	U+9688	# <cjk>
+0x8C48	U+7C82	# <cjk>
+0x8C49	U+6817	# <cjk>
+0x8C4A	U+7E70	# <cjk>
+0x8C4B	U+6851	# <cjk>
+0x8C4C	U+936C	# <cjk>
+0x8C4D	U+52F2	# <cjk>
+0x8C4E	U+541B	# <cjk>
+0x8C4F	U+85AB	# <cjk>
+0x8C50	U+8A13	# <cjk>
+0x8C51	U+7FA4	# <cjk>
+0x8C52	U+8ECD	# <cjk>
+0x8C53	U+90E1	# <cjk>
+0x8C54	U+5366	# <cjk>
+0x8C55	U+8888	# <cjk>
+0x8C56	U+7941	# <cjk>
+0x8C57	U+4FC2	# <cjk>
+0x8C58	U+50BE	# <cjk>
+0x8C59	U+5211	# <cjk>
+0x8C5A	U+5144	# <cjk>
+0x8C5B	U+5553	# <cjk>
+0x8C5C	U+572D	# <cjk>
+0x8C5D	U+73EA	# <cjk>
+0x8C5E	U+578B	# <cjk>
+0x8C5F	U+5951	# <cjk>
+0x8C60	U+5F62	# <cjk>
+0x8C61	U+5F84	# <cjk>
+0x8C62	U+6075	# <cjk>
+0x8C63	U+6176	# <cjk>
+0x8C64	U+6167	# <cjk>
+0x8C65	U+61A9	# <cjk>
+0x8C66	U+63B2	# <cjk>
+0x8C67	U+643A	# <cjk>
+0x8C68	U+656C	# <cjk>
+0x8C69	U+666F	# <cjk>
+0x8C6A	U+6842	# <cjk>
+0x8C6B	U+6E13	# <cjk>
+0x8C6C	U+7566	# <cjk>
+0x8C6D	U+7A3D	# <cjk>
+0x8C6E	U+7CFB	# <cjk>
+0x8C6F	U+7D4C	# <cjk>
+0x8C70	U+7D99	# <cjk>
+0x8C71	U+7E4B	# <cjk>
+0x8C72	U+7F6B	# <cjk>
+0x8C73	U+830E	# <cjk>
+0x8C74	U+834A	# <cjk>
+0x8C75	U+86CD	# <cjk>
+0x8C76	U+8A08	# <cjk>
+0x8C77	U+8A63	# <cjk>
+0x8C78	U+8B66	# <cjk>
+0x8C79	U+8EFD	# <cjk>
+0x8C7A	U+981A	# <cjk>
+0x8C7B	U+9D8F	# <cjk>
+0x8C7C	U+82B8	# <cjk>
+0x8C7D	U+8FCE	# <cjk>
+0x8C7E	U+9BE8	# <cjk>
+0x8C80	U+5287	# <cjk>
+0x8C81	U+621F	# <cjk>
+0x8C82	U+6483	# <cjk>
+0x8C83	U+6FC0	# <cjk>
+0x8C84	U+9699	# <cjk>
+0x8C85	U+6841	# <cjk>
+0x8C86	U+5091	# <cjk>
+0x8C87	U+6B20	# <cjk>
+0x8C88	U+6C7A	# <cjk>
+0x8C89	U+6F54	# <cjk>
+0x8C8A	U+7A74	# <cjk>
+0x8C8B	U+7D50	# <cjk>
+0x8C8C	U+8840	# <cjk>
+0x8C8D	U+8A23	# <cjk>
+0x8C8E	U+6708	# <cjk>
+0x8C8F	U+4EF6	# <cjk>
+0x8C90	U+5039	# <cjk>
+0x8C91	U+5026	# <cjk>
+0x8C92	U+5065	# <cjk>
+0x8C93	U+517C	# <cjk>
+0x8C94	U+5238	# <cjk>
+0x8C95	U+5263	# <cjk>
+0x8C96	U+55A7	# <cjk>
+0x8C97	U+570F	# <cjk>
+0x8C98	U+5805	# <cjk>
+0x8C99	U+5ACC	# <cjk>
+0x8C9A	U+5EFA	# <cjk>
+0x8C9B	U+61B2	# <cjk>
+0x8C9C	U+61F8	# <cjk>
+0x8C9D	U+62F3	# <cjk>
+0x8C9E	U+6372	# <cjk>
+0x8C9F	U+691C	# <cjk>
+0x8CA0	U+6A29	# <cjk>
+0x8CA1	U+727D	# <cjk>
+0x8CA2	U+72AC	# <cjk>
+0x8CA3	U+732E	# <cjk>
+0x8CA4	U+7814	# <cjk>
+0x8CA5	U+786F	# <cjk>
+0x8CA6	U+7D79	# <cjk>
+0x8CA7	U+770C	# <cjk>
+0x8CA8	U+80A9	# <cjk>
+0x8CA9	U+898B	# <cjk>
+0x8CAA	U+8B19	# <cjk>
+0x8CAB	U+8CE2	# <cjk>
+0x8CAC	U+8ED2	# <cjk>
+0x8CAD	U+9063	# <cjk>
+0x8CAE	U+9375	# <cjk>
+0x8CAF	U+967A	# <cjk>
+0x8CB0	U+9855	# <cjk>
+0x8CB1	U+9A13	# <cjk>
+0x8CB2	U+9E78	# <cjk>
+0x8CB3	U+5143	# <cjk>
+0x8CB4	U+539F	# <cjk>
+0x8CB5	U+53B3	# <cjk>
+0x8CB6	U+5E7B	# <cjk>
+0x8CB7	U+5F26	# <cjk>
+0x8CB8	U+6E1B	# <cjk>
+0x8CB9	U+6E90	# <cjk>
+0x8CBA	U+7384	# <cjk>
+0x8CBB	U+73FE	# <cjk>
+0x8CBC	U+7D43	# <cjk>
+0x8CBD	U+8237	# <cjk>
+0x8CBE	U+8A00	# <cjk>
+0x8CBF	U+8AFA	# <cjk>
+0x8CC0	U+9650	# <cjk>
+0x8CC1	U+4E4E	# <cjk>
+0x8CC2	U+500B	# <cjk>
+0x8CC3	U+53E4	# <cjk>
+0x8CC4	U+547C	# <cjk>
+0x8CC5	U+56FA	# <cjk>
+0x8CC6	U+59D1	# <cjk>
+0x8CC7	U+5B64	# <cjk>
+0x8CC8	U+5DF1	# <cjk>
+0x8CC9	U+5EAB	# <cjk>
+0x8CCA	U+5F27	# <cjk>
+0x8CCB	U+6238	# <cjk>
+0x8CCC	U+6545	# <cjk>
+0x8CCD	U+67AF	# <cjk>
+0x8CCE	U+6E56	# <cjk>
+0x8CCF	U+72D0	# <cjk>
+0x8CD0	U+7CCA	# <cjk>
+0x8CD1	U+88B4	# <cjk>
+0x8CD2	U+80A1	# <cjk>
+0x8CD3	U+80E1	# <cjk>
+0x8CD4	U+83F0	# <cjk>
+0x8CD5	U+864E	# <cjk>
+0x8CD6	U+8A87	# <cjk>
+0x8CD7	U+8DE8	# <cjk>
+0x8CD8	U+9237	# <cjk>
+0x8CD9	U+96C7	# <cjk>
+0x8CDA	U+9867	# <cjk>
+0x8CDB	U+9F13	# <cjk>
+0x8CDC	U+4E94	# <cjk>
+0x8CDD	U+4E92	# <cjk>
+0x8CDE	U+4F0D	# <cjk>
+0x8CDF	U+5348	# <cjk>
+0x8CE0	U+5449	# <cjk>
+0x8CE1	U+543E	# <cjk>
+0x8CE2	U+5A2F	# <cjk>
+0x8CE3	U+5F8C	# <cjk>
+0x8CE4	U+5FA1	# <cjk>
+0x8CE5	U+609F	# <cjk>
+0x8CE6	U+68A7	# <cjk>
+0x8CE7	U+6A8E	# <cjk>
+0x8CE8	U+745A	# <cjk>
+0x8CE9	U+7881	# <cjk>
+0x8CEA	U+8A9E	# <cjk>
+0x8CEB	U+8AA4	# <cjk>
+0x8CEC	U+8B77	# <cjk>
+0x8CED	U+9190	# <cjk>
+0x8CEE	U+4E5E	# <cjk>
+0x8CEF	U+9BC9	# <cjk>
+0x8CF0	U+4EA4	# <cjk>
+0x8CF1	U+4F7C	# <cjk>
+0x8CF2	U+4FAF	# <cjk>
+0x8CF3	U+5019	# <cjk>
+0x8CF4	U+5016	# <cjk>
+0x8CF5	U+5149	# <cjk>
+0x8CF6	U+516C	# <cjk>
+0x8CF7	U+529F	# <cjk>
+0x8CF8	U+52B9	# <cjk>
+0x8CF9	U+52FE	# <cjk>
+0x8CFA	U+539A	# <cjk>
+0x8CFB	U+53E3	# <cjk>
+0x8CFC	U+5411	# <cjk>
+0x8D40	U+540E	# <cjk>
+0x8D41	U+5589	# <cjk>
+0x8D42	U+5751	# <cjk>
+0x8D43	U+57A2	# <cjk>
+0x8D44	U+597D	# <cjk>
+0x8D45	U+5B54	# <cjk>
+0x8D46	U+5B5D	# <cjk>
+0x8D47	U+5B8F	# <cjk>
+0x8D48	U+5DE5	# <cjk>
+0x8D49	U+5DE7	# <cjk>
+0x8D4A	U+5DF7	# <cjk>
+0x8D4B	U+5E78	# <cjk>
+0x8D4C	U+5E83	# <cjk>
+0x8D4D	U+5E9A	# <cjk>
+0x8D4E	U+5EB7	# <cjk>
+0x8D4F	U+5F18	# <cjk>
+0x8D50	U+6052	# <cjk>
+0x8D51	U+614C	# <cjk>
+0x8D52	U+6297	# <cjk>
+0x8D53	U+62D8	# <cjk>
+0x8D54	U+63A7	# <cjk>
+0x8D55	U+653B	# <cjk>
+0x8D56	U+6602	# <cjk>
+0x8D57	U+6643	# <cjk>
+0x8D58	U+66F4	# <cjk>
+0x8D59	U+676D	# <cjk>
+0x8D5A	U+6821	# <cjk>
+0x8D5B	U+6897	# <cjk>
+0x8D5C	U+69CB	# <cjk>
+0x8D5D	U+6C5F	# <cjk>
+0x8D5E	U+6D2A	# <cjk>
+0x8D5F	U+6D69	# <cjk>
+0x8D60	U+6E2F	# <cjk>
+0x8D61	U+6E9D	# <cjk>
+0x8D62	U+7532	# <cjk>
+0x8D63	U+7687	# <cjk>
+0x8D64	U+786C	# <cjk>
+0x8D65	U+7A3F	# <cjk>
+0x8D66	U+7CE0	# <cjk>
+0x8D67	U+7D05	# <cjk>
+0x8D68	U+7D18	# <cjk>
+0x8D69	U+7D5E	# <cjk>
+0x8D6A	U+7DB1	# <cjk>
+0x8D6B	U+8015	# <cjk>
+0x8D6C	U+8003	# <cjk>
+0x8D6D	U+80AF	# <cjk>
+0x8D6E	U+80B1	# <cjk>
+0x8D6F	U+8154	# <cjk>
+0x8D70	U+818F	# <cjk>
+0x8D71	U+822A	# <cjk>
+0x8D72	U+8352	# <cjk>
+0x8D73	U+884C	# <cjk>
+0x8D74	U+8861	# <cjk>
+0x8D75	U+8B1B	# <cjk>
+0x8D76	U+8CA2	# <cjk>
+0x8D77	U+8CFC	# <cjk>
+0x8D78	U+90CA	# <cjk>
+0x8D79	U+9175	# <cjk>
+0x8D7A	U+9271	# <cjk>
+0x8D7B	U+783F	# <cjk>
+0x8D7C	U+92FC	# <cjk>
+0x8D7D	U+95A4	# <cjk>
+0x8D7E	U+964D	# <cjk>
+0x8D80	U+9805	# <cjk>
+0x8D81	U+9999	# <cjk>
+0x8D82	U+9AD8	# <cjk>
+0x8D83	U+9D3B	# <cjk>
+0x8D84	U+525B	# <cjk>
+0x8D85	U+52AB	# <cjk>
+0x8D86	U+53F7	# <cjk>
+0x8D87	U+5408	# <cjk>
+0x8D88	U+58D5	# <cjk>
+0x8D89	U+62F7	# <cjk>
+0x8D8A	U+6FE0	# <cjk>
+0x8D8B	U+8C6A	# <cjk>
+0x8D8C	U+8F5F	# <cjk>
+0x8D8D	U+9EB9	# <cjk>
+0x8D8E	U+514B	# <cjk>
+0x8D8F	U+523B	# <cjk>
+0x8D90	U+544A	# <cjk>
+0x8D91	U+56FD	# <cjk>
+0x8D92	U+7A40	# <cjk>
+0x8D93	U+9177	# <cjk>
+0x8D94	U+9D60	# <cjk>
+0x8D95	U+9ED2	# <cjk>
+0x8D96	U+7344	# <cjk>
+0x8D97	U+6F09	# <cjk>
+0x8D98	U+8170	# <cjk>
+0x8D99	U+7511	# <cjk>
+0x8D9A	U+5FFD	# <cjk>
+0x8D9B	U+60DA	# <cjk>
+0x8D9C	U+9AA8	# <cjk>
+0x8D9D	U+72DB	# <cjk>
+0x8D9E	U+8FBC	# <cjk>
+0x8D9F	U+6B64	# <cjk>
+0x8DA0	U+9803	# <cjk>
+0x8DA1	U+4ECA	# <cjk>
+0x8DA2	U+56F0	# <cjk>
+0x8DA3	U+5764	# <cjk>
+0x8DA4	U+58BE	# <cjk>
+0x8DA5	U+5A5A	# <cjk>
+0x8DA6	U+6068	# <cjk>
+0x8DA7	U+61C7	# <cjk>
+0x8DA8	U+660F	# <cjk>
+0x8DA9	U+6606	# <cjk>
+0x8DAA	U+6839	# <cjk>
+0x8DAB	U+68B1	# <cjk>
+0x8DAC	U+6DF7	# <cjk>
+0x8DAD	U+75D5	# <cjk>
+0x8DAE	U+7D3A	# <cjk>
+0x8DAF	U+826E	# <cjk>
+0x8DB0	U+9B42	# <cjk>
+0x8DB1	U+4E9B	# <cjk>
+0x8DB2	U+4F50	# <cjk>
+0x8DB3	U+53C9	# <cjk>
+0x8DB4	U+5506	# <cjk>
+0x8DB5	U+5D6F	# <cjk>
+0x8DB6	U+5DE6	# <cjk>
+0x8DB7	U+5DEE	# <cjk>
+0x8DB8	U+67FB	# <cjk>
+0x8DB9	U+6C99	# <cjk>
+0x8DBA	U+7473	# <cjk>
+0x8DBB	U+7802	# <cjk>
+0x8DBC	U+8A50	# <cjk>
+0x8DBD	U+9396	# <cjk>
+0x8DBE	U+88DF	# <cjk>
+0x8DBF	U+5750	# <cjk>
+0x8DC0	U+5EA7	# <cjk>
+0x8DC1	U+632B	# <cjk>
+0x8DC2	U+50B5	# <cjk>
+0x8DC3	U+50AC	# <cjk>
+0x8DC4	U+518D	# <cjk>
+0x8DC5	U+6700	# <cjk>
+0x8DC6	U+54C9	# <cjk>
+0x8DC7	U+585E	# <cjk>
+0x8DC8	U+59BB	# <cjk>
+0x8DC9	U+5BB0	# <cjk>
+0x8DCA	U+5F69	# <cjk>
+0x8DCB	U+624D	# <cjk>
+0x8DCC	U+63A1	# <cjk>
+0x8DCD	U+683D	# <cjk>
+0x8DCE	U+6B73	# <cjk>
+0x8DCF	U+6E08	# <cjk>
+0x8DD0	U+707D	# <cjk>
+0x8DD1	U+91C7	# <cjk>
+0x8DD2	U+7280	# <cjk>
+0x8DD3	U+7815	# <cjk>
+0x8DD4	U+7826	# <cjk>
+0x8DD5	U+796D	# <cjk>
+0x8DD6	U+658E	# <cjk>
+0x8DD7	U+7D30	# <cjk>
+0x8DD8	U+83DC	# <cjk>
+0x8DD9	U+88C1	# <cjk>
+0x8DDA	U+8F09	# <cjk>
+0x8DDB	U+969B	# <cjk>
+0x8DDC	U+5264	# <cjk>
+0x8DDD	U+5728	# <cjk>
+0x8DDE	U+6750	# <cjk>
+0x8DDF	U+7F6A	# <cjk>
+0x8DE0	U+8CA1	# <cjk>
+0x8DE1	U+51B4	# <cjk>
+0x8DE2	U+5742	# <cjk>
+0x8DE3	U+962A	# <cjk>
+0x8DE4	U+583A	# <cjk>
+0x8DE5	U+698A	# <cjk>
+0x8DE6	U+80B4	# <cjk>
+0x8DE7	U+54B2	# <cjk>
+0x8DE8	U+5D0E	# <cjk>
+0x8DE9	U+57FC	# <cjk>
+0x8DEA	U+7895	# <cjk>
+0x8DEB	U+9DFA	# <cjk>
+0x8DEC	U+4F5C	# <cjk>
+0x8DED	U+524A	# <cjk>
+0x8DEE	U+548B	# <cjk>
+0x8DEF	U+643E	# <cjk>
+0x8DF0	U+6628	# <cjk>
+0x8DF1	U+6714	# <cjk>
+0x8DF2	U+67F5	# <cjk>
+0x8DF3	U+7A84	# <cjk>
+0x8DF4	U+7B56	# <cjk>
+0x8DF5	U+7D22	# <cjk>
+0x8DF6	U+932F	# <cjk>
+0x8DF7	U+685C	# <cjk>
+0x8DF8	U+9BAD	# <cjk>
+0x8DF9	U+7B39	# <cjk>
+0x8DFA	U+5319	# <cjk>
+0x8DFB	U+518A	# <cjk>
+0x8DFC	U+5237	# <cjk>
+0x8E40	U+5BDF	# <cjk>
+0x8E41	U+62F6	# <cjk>
+0x8E42	U+64AE	# <cjk>
+0x8E43	U+64E6	# <cjk>
+0x8E44	U+672D	# <cjk>
+0x8E45	U+6BBA	# <cjk>
+0x8E46	U+85A9	# <cjk>
+0x8E47	U+96D1	# <cjk>
+0x8E48	U+7690	# <cjk>
+0x8E49	U+9BD6	# <cjk>
+0x8E4A	U+634C	# <cjk>
+0x8E4B	U+9306	# <cjk>
+0x8E4C	U+9BAB	# <cjk>
+0x8E4D	U+76BF	# <cjk>
+0x8E4E	U+6652	# <cjk>
+0x8E4F	U+4E09	# <cjk>
+0x8E50	U+5098	# <cjk>
+0x8E51	U+53C2	# <cjk>
+0x8E52	U+5C71	# <cjk>
+0x8E53	U+60E8	# <cjk>
+0x8E54	U+6492	# <cjk>
+0x8E55	U+6563	# <cjk>
+0x8E56	U+685F	# <cjk>
+0x8E57	U+71E6	# <cjk>
+0x8E58	U+73CA	# <cjk>
+0x8E59	U+7523	# <cjk>
+0x8E5A	U+7B97	# <cjk>
+0x8E5B	U+7E82	# <cjk>
+0x8E5C	U+8695	# <cjk>
+0x8E5D	U+8B83	# <cjk>
+0x8E5E	U+8CDB	# <cjk>
+0x8E5F	U+9178	# <cjk>
+0x8E60	U+9910	# <cjk>
+0x8E61	U+65AC	# <cjk>
+0x8E62	U+66AB	# <cjk>
+0x8E63	U+6B8B	# <cjk>
+0x8E64	U+4ED5	# <cjk>
+0x8E65	U+4ED4	# <cjk>
+0x8E66	U+4F3A	# <cjk>
+0x8E67	U+4F7F	# <cjk>
+0x8E68	U+523A	# <cjk>
+0x8E69	U+53F8	# <cjk>
+0x8E6A	U+53F2	# <cjk>
+0x8E6B	U+55E3	# <cjk>
+0x8E6C	U+56DB	# <cjk>
+0x8E6D	U+58EB	# <cjk>
+0x8E6E	U+59CB	# <cjk>
+0x8E6F	U+59C9	# <cjk>
+0x8E70	U+59FF	# <cjk>
+0x8E71	U+5B50	# <cjk>
+0x8E72	U+5C4D	# <cjk>
+0x8E73	U+5E02	# <cjk>
+0x8E74	U+5E2B	# <cjk>
+0x8E75	U+5FD7	# <cjk>
+0x8E76	U+601D	# <cjk>
+0x8E77	U+6307	# <cjk>
+0x8E78	U+652F	# <cjk>
+0x8E79	U+5B5C	# <cjk>
+0x8E7A	U+65AF	# <cjk>
+0x8E7B	U+65BD	# <cjk>
+0x8E7C	U+65E8	# <cjk>
+0x8E7D	U+679D	# <cjk>
+0x8E7E	U+6B62	# <cjk>
+0x8E80	U+6B7B	# <cjk>
+0x8E81	U+6C0F	# <cjk>
+0x8E82	U+7345	# <cjk>
+0x8E83	U+7949	# <cjk>
+0x8E84	U+79C1	# <cjk>
+0x8E85	U+7CF8	# <cjk>
+0x8E86	U+7D19	# <cjk>
+0x8E87	U+7D2B	# <cjk>
+0x8E88	U+80A2	# <cjk>
+0x8E89	U+8102	# <cjk>
+0x8E8A	U+81F3	# <cjk>
+0x8E8B	U+8996	# <cjk>
+0x8E8C	U+8A5E	# <cjk>
+0x8E8D	U+8A69	# <cjk>
+0x8E8E	U+8A66	# <cjk>
+0x8E8F	U+8A8C	# <cjk>
+0x8E90	U+8AEE	# <cjk>
+0x8E91	U+8CC7	# <cjk>
+0x8E92	U+8CDC	# <cjk>
+0x8E93	U+96CC	# <cjk>
+0x8E94	U+98FC	# <cjk>
+0x8E95	U+6B6F	# <cjk>
+0x8E96	U+4E8B	# <cjk>
+0x8E97	U+4F3C	# <cjk>
+0x8E98	U+4F8D	# <cjk>
+0x8E99	U+5150	# <cjk>
+0x8E9A	U+5B57	# <cjk>
+0x8E9B	U+5BFA	# <cjk>
+0x8E9C	U+6148	# <cjk>
+0x8E9D	U+6301	# <cjk>
+0x8E9E	U+6642	# <cjk>
+0x8E9F	U+6B21	# <cjk>
+0x8EA0	U+6ECB	# <cjk>
+0x8EA1	U+6CBB	# <cjk>
+0x8EA2	U+723E	# <cjk>
+0x8EA3	U+74BD	# <cjk>
+0x8EA4	U+75D4	# <cjk>
+0x8EA5	U+78C1	# <cjk>
+0x8EA6	U+793A	# <cjk>
+0x8EA7	U+800C	# <cjk>
+0x8EA8	U+8033	# <cjk>
+0x8EA9	U+81EA	# <cjk>
+0x8EAA	U+8494	# <cjk>
+0x8EAB	U+8F9E	# <cjk>
+0x8EAC	U+6C50	# <cjk>
+0x8EAD	U+9E7F	# <cjk>
+0x8EAE	U+5F0F	# <cjk>
+0x8EAF	U+8B58	# <cjk>
+0x8EB0	U+9D2B	# <cjk>
+0x8EB1	U+7AFA	# <cjk>
+0x8EB2	U+8EF8	# <cjk>
+0x8EB3	U+5B8D	# <cjk>
+0x8EB4	U+96EB	# <cjk>
+0x8EB5	U+4E03	# <cjk>
+0x8EB6	U+53F1	# <cjk>
+0x8EB7	U+57F7	# <cjk>
+0x8EB8	U+5931	# <cjk>
+0x8EB9	U+5AC9	# <cjk>
+0x8EBA	U+5BA4	# <cjk>
+0x8EBB	U+6089	# <cjk>
+0x8EBC	U+6E7F	# <cjk>
+0x8EBD	U+6F06	# <cjk>
+0x8EBE	U+75BE	# <cjk>
+0x8EBF	U+8CEA	# <cjk>
+0x8EC0	U+5B9F	# <cjk>
+0x8EC1	U+8500	# <cjk>
+0x8EC2	U+7BE0	# <cjk>
+0x8EC3	U+5072	# <cjk>
+0x8EC4	U+67F4	# <cjk>
+0x8EC5	U+829D	# <cjk>
+0x8EC6	U+5C61	# <cjk>
+0x8EC7	U+854A	# <cjk>
+0x8EC8	U+7E1E	# <cjk>
+0x8EC9	U+820E	# <cjk>
+0x8ECA	U+5199	# <cjk>
+0x8ECB	U+5C04	# <cjk>
+0x8ECC	U+6368	# <cjk>
+0x8ECD	U+8D66	# <cjk>
+0x8ECE	U+659C	# <cjk>
+0x8ECF	U+716E	# <cjk>
+0x8ED0	U+793E	# <cjk>
+0x8ED1	U+7D17	# <cjk>
+0x8ED2	U+8005	# <cjk>
+0x8ED3	U+8B1D	# <cjk>
+0x8ED4	U+8ECA	# <cjk>
+0x8ED5	U+906E	# <cjk>
+0x8ED6	U+86C7	# <cjk>
+0x8ED7	U+90AA	# <cjk>
+0x8ED8	U+501F	# <cjk>
+0x8ED9	U+52FA	# <cjk>
+0x8EDA	U+5C3A	# <cjk>
+0x8EDB	U+6753	# <cjk>
+0x8EDC	U+707C	# <cjk>
+0x8EDD	U+7235	# <cjk>
+0x8EDE	U+914C	# <cjk>
+0x8EDF	U+91C8	# <cjk>
+0x8EE0	U+932B	# <cjk>
+0x8EE1	U+82E5	# <cjk>
+0x8EE2	U+5BC2	# <cjk>
+0x8EE3	U+5F31	# <cjk>
+0x8EE4	U+60F9	# <cjk>
+0x8EE5	U+4E3B	# <cjk>
+0x8EE6	U+53D6	# <cjk>
+0x8EE7	U+5B88	# <cjk>
+0x8EE8	U+624B	# <cjk>
+0x8EE9	U+6731	# <cjk>
+0x8EEA	U+6B8A	# <cjk>
+0x8EEB	U+72E9	# <cjk>
+0x8EEC	U+73E0	# <cjk>
+0x8EED	U+7A2E	# <cjk>
+0x8EEE	U+816B	# <cjk>
+0x8EEF	U+8DA3	# <cjk>
+0x8EF0	U+9152	# <cjk>
+0x8EF1	U+9996	# <cjk>
+0x8EF2	U+5112	# <cjk>
+0x8EF3	U+53D7	# <cjk>
+0x8EF4	U+546A	# <cjk>
+0x8EF5	U+5BFF	# <cjk>
+0x8EF6	U+6388	# <cjk>
+0x8EF7	U+6A39	# <cjk>
+0x8EF8	U+7DAC	# <cjk>
+0x8EF9	U+9700	# <cjk>
+0x8EFA	U+56DA	# <cjk>
+0x8EFB	U+53CE	# <cjk>
+0x8EFC	U+5468	# <cjk>
+0x8F40	U+5B97	# <cjk>
+0x8F41	U+5C31	# <cjk>
+0x8F42	U+5DDE	# <cjk>
+0x8F43	U+4FEE	# <cjk>
+0x8F44	U+6101	# <cjk>
+0x8F45	U+62FE	# <cjk>
+0x8F46	U+6D32	# <cjk>
+0x8F47	U+79C0	# <cjk>
+0x8F48	U+79CB	# <cjk>
+0x8F49	U+7D42	# <cjk>
+0x8F4A	U+7E4D	# <cjk>
+0x8F4B	U+7FD2	# <cjk>
+0x8F4C	U+81ED	# <cjk>
+0x8F4D	U+821F	# <cjk>
+0x8F4E	U+8490	# <cjk>
+0x8F4F	U+8846	# <cjk>
+0x8F50	U+8972	# <cjk>
+0x8F51	U+8B90	# <cjk>
+0x8F52	U+8E74	# <cjk>
+0x8F53	U+8F2F	# <cjk>
+0x8F54	U+9031	# <cjk>
+0x8F55	U+914B	# <cjk>
+0x8F56	U+916C	# <cjk>
+0x8F57	U+96C6	# <cjk>
+0x8F58	U+919C	# <cjk>
+0x8F59	U+4EC0	# <cjk>
+0x8F5A	U+4F4F	# <cjk>
+0x8F5B	U+5145	# <cjk>
+0x8F5C	U+5341	# <cjk>
+0x8F5D	U+5F93	# <cjk>
+0x8F5E	U+620E	# <cjk>
+0x8F5F	U+67D4	# <cjk>
+0x8F60	U+6C41	# <cjk>
+0x8F61	U+6E0B	# <cjk>
+0x8F62	U+7363	# <cjk>
+0x8F63	U+7E26	# <cjk>
+0x8F64	U+91CD	# <cjk>
+0x8F65	U+9283	# <cjk>
+0x8F66	U+53D4	# <cjk>
+0x8F67	U+5919	# <cjk>
+0x8F68	U+5BBF	# <cjk>
+0x8F69	U+6DD1	# <cjk>
+0x8F6A	U+795D	# <cjk>
+0x8F6B	U+7E2E	# <cjk>
+0x8F6C	U+7C9B	# <cjk>
+0x8F6D	U+587E	# <cjk>
+0x8F6E	U+719F	# <cjk>
+0x8F6F	U+51FA	# <cjk>
+0x8F70	U+8853	# <cjk>
+0x8F71	U+8FF0	# <cjk>
+0x8F72	U+4FCA	# <cjk>
+0x8F73	U+5CFB	# <cjk>
+0x8F74	U+6625	# <cjk>
+0x8F75	U+77AC	# <cjk>
+0x8F76	U+7AE3	# <cjk>
+0x8F77	U+821C	# <cjk>
+0x8F78	U+99FF	# <cjk>
+0x8F79	U+51C6	# <cjk>
+0x8F7A	U+5FAA	# <cjk>
+0x8F7B	U+65EC	# <cjk>
+0x8F7C	U+696F	# <cjk>
+0x8F7D	U+6B89	# <cjk>
+0x8F7E	U+6DF3	# <cjk>
+0x8F80	U+6E96	# <cjk>
+0x8F81	U+6F64	# <cjk>
+0x8F82	U+76FE	# <cjk>
+0x8F83	U+7D14	# <cjk>
+0x8F84	U+5DE1	# <cjk>
+0x8F85	U+9075	# <cjk>
+0x8F86	U+9187	# <cjk>
+0x8F87	U+9806	# <cjk>
+0x8F88	U+51E6	# <cjk>
+0x8F89	U+521D	# <cjk>
+0x8F8A	U+6240	# <cjk>
+0x8F8B	U+6691	# <cjk>
+0x8F8C	U+66D9	# <cjk>
+0x8F8D	U+6E1A	# <cjk>
+0x8F8E	U+5EB6	# <cjk>
+0x8F8F	U+7DD2	# <cjk>
+0x8F90	U+7F72	# <cjk>
+0x8F91	U+66F8	# <cjk>
+0x8F92	U+85AF	# <cjk>
+0x8F93	U+85F7	# <cjk>
+0x8F94	U+8AF8	# <cjk>
+0x8F95	U+52A9	# <cjk>
+0x8F96	U+53D9	# <cjk>
+0x8F97	U+5973	# <cjk>
+0x8F98	U+5E8F	# <cjk>
+0x8F99	U+5F90	# <cjk>
+0x8F9A	U+6055	# <cjk>
+0x8F9B	U+92E4	# <cjk>
+0x8F9C	U+9664	# <cjk>
+0x8F9D	U+50B7	# <cjk>
+0x8F9E	U+511F	# <cjk>
+0x8F9F	U+52DD	# <cjk>
+0x8FA0	U+5320	# <cjk>
+0x8FA1	U+5347	# <cjk>
+0x8FA2	U+53EC	# <cjk>
+0x8FA3	U+54E8	# <cjk>
+0x8FA4	U+5546	# <cjk>
+0x8FA5	U+5531	# <cjk>
+0x8FA6	U+5617	# <cjk>
+0x8FA7	U+5968	# <cjk>
+0x8FA8	U+59BE	# <cjk>
+0x8FA9	U+5A3C	# <cjk>
+0x8FAA	U+5BB5	# <cjk>
+0x8FAB	U+5C06	# <cjk>
+0x8FAC	U+5C0F	# <cjk>
+0x8FAD	U+5C11	# <cjk>
+0x8FAE	U+5C1A	# <cjk>
+0x8FAF	U+5E84	# <cjk>
+0x8FB0	U+5E8A	# <cjk>
+0x8FB1	U+5EE0	# <cjk>
+0x8FB2	U+5F70	# <cjk>
+0x8FB3	U+627F	# <cjk>
+0x8FB4	U+6284	# <cjk>
+0x8FB5	U+62DB	# <cjk>
+0x8FB6	U+638C	# <cjk>
+0x8FB7	U+6377	# <cjk>
+0x8FB8	U+6607	# <cjk>
+0x8FB9	U+660C	# <cjk>
+0x8FBA	U+662D	# <cjk>
+0x8FBB	U+6676	# <cjk>
+0x8FBC	U+677E	# <cjk>
+0x8FBD	U+68A2	# <cjk>
+0x8FBE	U+6A1F	# <cjk>
+0x8FBF	U+6A35	# <cjk>
+0x8FC0	U+6CBC	# <cjk>
+0x8FC1	U+6D88	# <cjk>
+0x8FC2	U+6E09	# <cjk>
+0x8FC3	U+6E58	# <cjk>
+0x8FC4	U+713C	# <cjk>
+0x8FC5	U+7126	# <cjk>
+0x8FC6	U+7167	# <cjk>
+0x8FC7	U+75C7	# <cjk>
+0x8FC8	U+7701	# <cjk>
+0x8FC9	U+785D	# <cjk>
+0x8FCA	U+7901	# <cjk>
+0x8FCB	U+7965	# <cjk>
+0x8FCC	U+79F0	# <cjk>
+0x8FCD	U+7AE0	# <cjk>
+0x8FCE	U+7B11	# <cjk>
+0x8FCF	U+7CA7	# <cjk>
+0x8FD0	U+7D39	# <cjk>
+0x8FD1	U+8096	# <cjk>
+0x8FD2	U+83D6	# <cjk>
+0x8FD3	U+848B	# <cjk>
+0x8FD4	U+8549	# <cjk>
+0x8FD5	U+885D	# <cjk>
+0x8FD6	U+88F3	# <cjk>
+0x8FD7	U+8A1F	# <cjk>
+0x8FD8	U+8A3C	# <cjk>
+0x8FD9	U+8A54	# <cjk>
+0x8FDA	U+8A73	# <cjk>
+0x8FDB	U+8C61	# <cjk>
+0x8FDC	U+8CDE	# <cjk>
+0x8FDD	U+91A4	# <cjk>
+0x8FDE	U+9266	# <cjk>
+0x8FDF	U+937E	# <cjk>
+0x8FE0	U+9418	# <cjk>
+0x8FE1	U+969C	# <cjk>
+0x8FE2	U+9798	# <cjk>
+0x8FE3	U+4E0A	# <cjk>
+0x8FE4	U+4E08	# <cjk>
+0x8FE5	U+4E1E	# <cjk>
+0x8FE6	U+4E57	# <cjk>
+0x8FE7	U+5197	# <cjk>
+0x8FE8	U+5270	# <cjk>
+0x8FE9	U+57CE	# <cjk>
+0x8FEA	U+5834	# <cjk>
+0x8FEB	U+58CC	# <cjk>
+0x8FEC	U+5B22	# <cjk>
+0x8FED	U+5E38	# <cjk>
+0x8FEE	U+60C5	# <cjk>
+0x8FEF	U+64FE	# <cjk>
+0x8FF0	U+6761	# <cjk>
+0x8FF1	U+6756	# <cjk>
+0x8FF2	U+6D44	# <cjk>
+0x8FF3	U+72B6	# <cjk>
+0x8FF4	U+7573	# <cjk>
+0x8FF5	U+7A63	# <cjk>
+0x8FF6	U+84B8	# <cjk>
+0x8FF7	U+8B72	# <cjk>
+0x8FF8	U+91B8	# <cjk>
+0x8FF9	U+9320	# <cjk>
+0x8FFA	U+5631	# <cjk>
+0x8FFB	U+57F4	# <cjk>
+0x8FFC	U+98FE	# <cjk>
+0x9040	U+62ED	# <cjk>
+0x9041	U+690D	# <cjk>
+0x9042	U+6B96	# <cjk>
+0x9043	U+71ED	# <cjk>
+0x9044	U+7E54	# <cjk>
+0x9045	U+8077	# <cjk>
+0x9046	U+8272	# <cjk>
+0x9047	U+89E6	# <cjk>
+0x9048	U+98DF	# <cjk>
+0x9049	U+8755	# <cjk>
+0x904A	U+8FB1	# <cjk>
+0x904B	U+5C3B	# <cjk>
+0x904C	U+4F38	# <cjk>
+0x904D	U+4FE1	# <cjk>
+0x904E	U+4FB5	# <cjk>
+0x904F	U+5507	# <cjk>
+0x9050	U+5A20	# <cjk>
+0x9051	U+5BDD	# <cjk>
+0x9052	U+5BE9	# <cjk>
+0x9053	U+5FC3	# <cjk>
+0x9054	U+614E	# <cjk>
+0x9055	U+632F	# <cjk>
+0x9056	U+65B0	# <cjk>
+0x9057	U+664B	# <cjk>
+0x9058	U+68EE	# <cjk>
+0x9059	U+699B	# <cjk>
+0x905A	U+6D78	# <cjk>
+0x905B	U+6DF1	# <cjk>
+0x905C	U+7533	# <cjk>
+0x905D	U+75B9	# <cjk>
+0x905E	U+771F	# <cjk>
+0x905F	U+795E	# <cjk>
+0x9060	U+79E6	# <cjk>
+0x9061	U+7D33	# <cjk>
+0x9062	U+81E3	# <cjk>
+0x9063	U+82AF	# <cjk>
+0x9064	U+85AA	# <cjk>
+0x9065	U+89AA	# <cjk>
+0x9066	U+8A3A	# <cjk>
+0x9067	U+8EAB	# <cjk>
+0x9068	U+8F9B	# <cjk>
+0x9069	U+9032	# <cjk>
+0x906A	U+91DD	# <cjk>
+0x906B	U+9707	# <cjk>
+0x906C	U+4EBA	# <cjk>
+0x906D	U+4EC1	# <cjk>
+0x906E	U+5203	# <cjk>
+0x906F	U+5875	# <cjk>
+0x9070	U+58EC	# <cjk>
+0x9071	U+5C0B	# <cjk>
+0x9072	U+751A	# <cjk>
+0x9073	U+5C3D	# <cjk>
+0x9074	U+814E	# <cjk>
+0x9075	U+8A0A	# <cjk>
+0x9076	U+8FC5	# <cjk>
+0x9077	U+9663	# <cjk>
+0x9078	U+976D	# <cjk>
+0x9079	U+7B25	# <cjk>
+0x907A	U+8ACF	# <cjk>
+0x907B	U+9808	# <cjk>
+0x907C	U+9162	# <cjk>
+0x907D	U+56F3	# <cjk>
+0x907E	U+53A8	# <cjk>
+0x9080	U+9017	# <cjk>
+0x9081	U+5439	# <cjk>
+0x9082	U+5782	# <cjk>
+0x9083	U+5E25	# <cjk>
+0x9084	U+63A8	# <cjk>
+0x9085	U+6C34	# <cjk>
+0x9086	U+708A	# <cjk>
+0x9087	U+7761	# <cjk>
+0x9088	U+7C8B	# <cjk>
+0x9089	U+7FE0	# <cjk>
+0x908A	U+8870	# <cjk>
+0x908B	U+9042	# <cjk>
+0x908C	U+9154	# <cjk>
+0x908D	U+9310	# <cjk>
+0x908E	U+9318	# <cjk>
+0x908F	U+968F	# <cjk>
+0x9090	U+745E	# <cjk>
+0x9091	U+9AC4	# <cjk>
+0x9092	U+5D07	# <cjk>
+0x9093	U+5D69	# <cjk>
+0x9094	U+6570	# <cjk>
+0x9095	U+67A2	# <cjk>
+0x9096	U+8DA8	# <cjk>
+0x9097	U+96DB	# <cjk>
+0x9098	U+636E	# <cjk>
+0x9099	U+6749	# <cjk>
+0x909A	U+6919	# <cjk>
+0x909B	U+83C5	# <cjk>
+0x909C	U+9817	# <cjk>
+0x909D	U+96C0	# <cjk>
+0x909E	U+88FE	# <cjk>
+0x909F	U+6F84	# <cjk>
+0x90A0	U+647A	# <cjk>
+0x90A1	U+5BF8	# <cjk>
+0x90A2	U+4E16	# <cjk>
+0x90A3	U+702C	# <cjk>
+0x90A4	U+755D	# <cjk>
+0x90A5	U+662F	# <cjk>
+0x90A6	U+51C4	# <cjk>
+0x90A7	U+5236	# <cjk>
+0x90A8	U+52E2	# <cjk>
+0x90A9	U+59D3	# <cjk>
+0x90AA	U+5F81	# <cjk>
+0x90AB	U+6027	# <cjk>
+0x90AC	U+6210	# <cjk>
+0x90AD	U+653F	# <cjk>
+0x90AE	U+6574	# <cjk>
+0x90AF	U+661F	# <cjk>
+0x90B0	U+6674	# <cjk>
+0x90B1	U+68F2	# <cjk>
+0x90B2	U+6816	# <cjk>
+0x90B3	U+6B63	# <cjk>
+0x90B4	U+6E05	# <cjk>
+0x90B5	U+7272	# <cjk>
+0x90B6	U+751F	# <cjk>
+0x90B7	U+76DB	# <cjk>
+0x90B8	U+7CBE	# <cjk>
+0x90B9	U+8056	# <cjk>
+0x90BA	U+58F0	# <cjk>
+0x90BB	U+88FD	# <cjk>
+0x90BC	U+897F	# <cjk>
+0x90BD	U+8AA0	# <cjk>
+0x90BE	U+8A93	# <cjk>
+0x90BF	U+8ACB	# <cjk>
+0x90C0	U+901D	# <cjk>
+0x90C1	U+9192	# <cjk>
+0x90C2	U+9752	# <cjk>
+0x90C3	U+9759	# <cjk>
+0x90C4	U+6589	# <cjk>
+0x90C5	U+7A0E	# <cjk>
+0x90C6	U+8106	# <cjk>
+0x90C7	U+96BB	# <cjk>
+0x90C8	U+5E2D	# <cjk>
+0x90C9	U+60DC	# <cjk>
+0x90CA	U+621A	# <cjk>
+0x90CB	U+65A5	# <cjk>
+0x90CC	U+6614	# <cjk>
+0x90CD	U+6790	# <cjk>
+0x90CE	U+77F3	# <cjk>
+0x90CF	U+7A4D	# <cjk>
+0x90D0	U+7C4D	# <cjk>
+0x90D1	U+7E3E	# <cjk>
+0x90D2	U+810A	# <cjk>
+0x90D3	U+8CAC	# <cjk>
+0x90D4	U+8D64	# <cjk>
+0x90D5	U+8DE1	# <cjk>
+0x90D6	U+8E5F	# <cjk>
+0x90D7	U+78A9	# <cjk>
+0x90D8	U+5207	# <cjk>
+0x90D9	U+62D9	# <cjk>
+0x90DA	U+63A5	# <cjk>
+0x90DB	U+6442	# <cjk>
+0x90DC	U+6298	# <cjk>
+0x90DD	U+8A2D	# <cjk>
+0x90DE	U+7A83	# <cjk>
+0x90DF	U+7BC0	# <cjk>
+0x90E0	U+8AAC	# <cjk>
+0x90E1	U+96EA	# <cjk>
+0x90E2	U+7D76	# <cjk>
+0x90E3	U+820C	# <cjk>
+0x90E4	U+8749	# <cjk>
+0x90E5	U+4ED9	# <cjk>
+0x90E6	U+5148	# <cjk>
+0x90E7	U+5343	# <cjk>
+0x90E8	U+5360	# <cjk>
+0x90E9	U+5BA3	# <cjk>
+0x90EA	U+5C02	# <cjk>
+0x90EB	U+5C16	# <cjk>
+0x90EC	U+5DDD	# <cjk>
+0x90ED	U+6226	# <cjk>
+0x90EE	U+6247	# <cjk>
+0x90EF	U+64B0	# <cjk>
+0x90F0	U+6813	# <cjk>
+0x90F1	U+6834	# <cjk>
+0x90F2	U+6CC9	# <cjk>
+0x90F3	U+6D45	# <cjk>
+0x90F4	U+6D17	# <cjk>
+0x90F5	U+67D3	# <cjk>
+0x90F6	U+6F5C	# <cjk>
+0x90F7	U+714E	# <cjk>
+0x90F8	U+717D	# <cjk>
+0x90F9	U+65CB	# <cjk>
+0x90FA	U+7A7F	# <cjk>
+0x90FB	U+7BAD	# <cjk>
+0x90FC	U+7DDA	# <cjk>
+0x9140	U+7E4A	# <cjk>
+0x9141	U+7FA8	# <cjk>
+0x9142	U+817A	# <cjk>
+0x9143	U+821B	# <cjk>
+0x9144	U+8239	# <cjk>
+0x9145	U+85A6	# <cjk>
+0x9146	U+8A6E	# <cjk>
+0x9147	U+8CCE	# <cjk>
+0x9148	U+8DF5	# <cjk>
+0x9149	U+9078	# <cjk>
+0x914A	U+9077	# <cjk>
+0x914B	U+92AD	# <cjk>
+0x914C	U+9291	# <cjk>
+0x914D	U+9583	# <cjk>
+0x914E	U+9BAE	# <cjk>
+0x914F	U+524D	# <cjk>
+0x9150	U+5584	# <cjk>
+0x9151	U+6F38	# <cjk>
+0x9152	U+7136	# <cjk>
+0x9153	U+5168	# <cjk>
+0x9154	U+7985	# <cjk>
+0x9155	U+7E55	# <cjk>
+0x9156	U+81B3	# <cjk>
+0x9157	U+7CCE	# <cjk>
+0x9158	U+564C	# <cjk>
+0x9159	U+5851	# <cjk>
+0x915A	U+5CA8	# <cjk>
+0x915B	U+63AA	# <cjk>
+0x915C	U+66FE	# <cjk>
+0x915D	U+66FD	# <cjk>
+0x915E	U+695A	# <cjk>
+0x915F	U+72D9	# <cjk>
+0x9160	U+758F	# <cjk>
+0x9161	U+758E	# <cjk>
+0x9162	U+790E	# <cjk>
+0x9163	U+7956	# <cjk>
+0x9164	U+79DF	# <cjk>
+0x9165	U+7C97	# <cjk>
+0x9166	U+7D20	# <cjk>
+0x9167	U+7D44	# <cjk>
+0x9168	U+8607	# <cjk>
+0x9169	U+8A34	# <cjk>
+0x916A	U+963B	# <cjk>
+0x916B	U+9061	# <cjk>
+0x916C	U+9F20	# <cjk>
+0x916D	U+50E7	# <cjk>
+0x916E	U+5275	# <cjk>
+0x916F	U+53CC	# <cjk>
+0x9170	U+53E2	# <cjk>
+0x9171	U+5009	# <cjk>
+0x9172	U+55AA	# <cjk>
+0x9173	U+58EE	# <cjk>
+0x9174	U+594F	# <cjk>
+0x9175	U+723D	# <cjk>
+0x9176	U+5B8B	# <cjk>
+0x9177	U+5C64	# <cjk>
+0x9178	U+531D	# <cjk>
+0x9179	U+60E3	# <cjk>
+0x917A	U+60F3	# <cjk>
+0x917B	U+635C	# <cjk>
+0x917C	U+6383	# <cjk>
+0x917D	U+633F	# <cjk>
+0x917E	U+63BB	# <cjk>
+0x9180	U+64CD	# <cjk>
+0x9181	U+65E9	# <cjk>
+0x9182	U+66F9	# <cjk>
+0x9183	U+5DE3	# <cjk>
+0x9184	U+69CD	# <cjk>
+0x9185	U+69FD	# <cjk>
+0x9186	U+6F15	# <cjk>
+0x9187	U+71E5	# <cjk>
+0x9188	U+4E89	# <cjk>
+0x9189	U+75E9	# <cjk>
+0x918A	U+76F8	# <cjk>
+0x918B	U+7A93	# <cjk>
+0x918C	U+7CDF	# <cjk>
+0x918D	U+7DCF	# <cjk>
+0x918E	U+7D9C	# <cjk>
+0x918F	U+8061	# <cjk>
+0x9190	U+8349	# <cjk>
+0x9191	U+8358	# <cjk>
+0x9192	U+846C	# <cjk>
+0x9193	U+84BC	# <cjk>
+0x9194	U+85FB	# <cjk>
+0x9195	U+88C5	# <cjk>
+0x9196	U+8D70	# <cjk>
+0x9197	U+9001	# <cjk>
+0x9198	U+906D	# <cjk>
+0x9199	U+9397	# <cjk>
+0x919A	U+971C	# <cjk>
+0x919B	U+9A12	# <cjk>
+0x919C	U+50CF	# <cjk>
+0x919D	U+5897	# <cjk>
+0x919E	U+618E	# <cjk>
+0x919F	U+81D3	# <cjk>
+0x91A0	U+8535	# <cjk>
+0x91A1	U+8D08	# <cjk>
+0x91A2	U+9020	# <cjk>
+0x91A3	U+4FC3	# <cjk>
+0x91A4	U+5074	# <cjk>
+0x91A5	U+5247	# <cjk>
+0x91A6	U+5373	# <cjk>
+0x91A7	U+606F	# <cjk>
+0x91A8	U+6349	# <cjk>
+0x91A9	U+675F	# <cjk>
+0x91AA	U+6E2C	# <cjk>
+0x91AB	U+8DB3	# <cjk>
+0x91AC	U+901F	# <cjk>
+0x91AD	U+4FD7	# <cjk>
+0x91AE	U+5C5E	# <cjk>
+0x91AF	U+8CCA	# <cjk>
+0x91B0	U+65CF	# <cjk>
+0x91B1	U+7D9A	# <cjk>
+0x91B2	U+5352	# <cjk>
+0x91B3	U+8896	# <cjk>
+0x91B4	U+5176	# <cjk>
+0x91B5	U+63C3	# <cjk>
+0x91B6	U+5B58	# <cjk>
+0x91B7	U+5B6B	# <cjk>
+0x91B8	U+5C0A	# <cjk>
+0x91B9	U+640D	# <cjk>
+0x91BA	U+6751	# <cjk>
+0x91BB	U+905C	# <cjk>
+0x91BC	U+4ED6	# <cjk>
+0x91BD	U+591A	# <cjk>
+0x91BE	U+592A	# <cjk>
+0x91BF	U+6C70	# <cjk>
+0x91C0	U+8A51	# <cjk>
+0x91C1	U+553E	# <cjk>
+0x91C2	U+5815	# <cjk>
+0x91C3	U+59A5	# <cjk>
+0x91C4	U+60F0	# <cjk>
+0x91C5	U+6253	# <cjk>
+0x91C6	U+67C1	# <cjk>
+0x91C7	U+8235	# <cjk>
+0x91C8	U+6955	# <cjk>
+0x91C9	U+9640	# <cjk>
+0x91CA	U+99C4	# <cjk>
+0x91CB	U+9A28	# <cjk>
+0x91CC	U+4F53	# <cjk>
+0x91CD	U+5806	# <cjk>
+0x91CE	U+5BFE	# <cjk>
+0x91CF	U+8010	# <cjk>
+0x91D0	U+5CB1	# <cjk>
+0x91D1	U+5E2F	# <cjk>
+0x91D2	U+5F85	# <cjk>
+0x91D3	U+6020	# <cjk>
+0x91D4	U+614B	# <cjk>
+0x91D5	U+6234	# <cjk>
+0x91D6	U+66FF	# <cjk>
+0x91D7	U+6CF0	# <cjk>
+0x91D8	U+6EDE	# <cjk>
+0x91D9	U+80CE	# <cjk>
+0x91DA	U+817F	# <cjk>
+0x91DB	U+82D4	# <cjk>
+0x91DC	U+888B	# <cjk>
+0x91DD	U+8CB8	# <cjk>
+0x91DE	U+9000	# <cjk>
+0x91DF	U+902E	# <cjk>
+0x91E0	U+968A	# <cjk>
+0x91E1	U+9EDB	# <cjk>
+0x91E2	U+9BDB	# <cjk>
+0x91E3	U+4EE3	# <cjk>
+0x91E4	U+53F0	# <cjk>
+0x91E5	U+5927	# <cjk>
+0x91E6	U+7B2C	# <cjk>
+0x91E7	U+918D	# <cjk>
+0x91E8	U+984C	# <cjk>
+0x91E9	U+9DF9	# <cjk>
+0x91EA	U+6EDD	# <cjk>
+0x91EB	U+7027	# <cjk>
+0x91EC	U+5353	# <cjk>
+0x91ED	U+5544	# <cjk>
+0x91EE	U+5B85	# <cjk>
+0x91EF	U+6258	# <cjk>
+0x91F0	U+629E	# <cjk>
+0x91F1	U+62D3	# <cjk>
+0x91F2	U+6CA2	# <cjk>
+0x91F3	U+6FEF	# <cjk>
+0x91F4	U+7422	# <cjk>
+0x91F5	U+8A17	# <cjk>
+0x91F6	U+9438	# <cjk>
+0x91F7	U+6FC1	# <cjk>
+0x91F8	U+8AFE	# <cjk>
+0x91F9	U+8338	# <cjk>
+0x91FA	U+51E7	# <cjk>
+0x91FB	U+86F8	# <cjk>
+0x91FC	U+53EA	# <cjk>
+0x9240	U+53E9	# <cjk>
+0x9241	U+4F46	# <cjk>
+0x9242	U+9054	# <cjk>
+0x9243	U+8FB0	# <cjk>
+0x9244	U+596A	# <cjk>
+0x9245	U+8131	# <cjk>
+0x9246	U+5DFD	# <cjk>
+0x9247	U+7AEA	# <cjk>
+0x9248	U+8FBF	# <cjk>
+0x9249	U+68DA	# <cjk>
+0x924A	U+8C37	# <cjk>
+0x924B	U+72F8	# <cjk>
+0x924C	U+9C48	# <cjk>
+0x924D	U+6A3D	# <cjk>
+0x924E	U+8AB0	# <cjk>
+0x924F	U+4E39	# <cjk>
+0x9250	U+5358	# <cjk>
+0x9251	U+5606	# <cjk>
+0x9252	U+5766	# <cjk>
+0x9253	U+62C5	# <cjk>
+0x9254	U+63A2	# <cjk>
+0x9255	U+65E6	# <cjk>
+0x9256	U+6B4E	# <cjk>
+0x9257	U+6DE1	# <cjk>
+0x9258	U+6E5B	# <cjk>
+0x9259	U+70AD	# <cjk>
+0x925A	U+77ED	# <cjk>
+0x925B	U+7AEF	# <cjk>
+0x925C	U+7BAA	# <cjk>
+0x925D	U+7DBB	# <cjk>
+0x925E	U+803D	# <cjk>
+0x925F	U+80C6	# <cjk>
+0x9260	U+86CB	# <cjk>
+0x9261	U+8A95	# <cjk>
+0x9262	U+935B	# <cjk>
+0x9263	U+56E3	# <cjk>
+0x9264	U+58C7	# <cjk>
+0x9265	U+5F3E	# <cjk>
+0x9266	U+65AD	# <cjk>
+0x9267	U+6696	# <cjk>
+0x9268	U+6A80	# <cjk>
+0x9269	U+6BB5	# <cjk>
+0x926A	U+7537	# <cjk>
+0x926B	U+8AC7	# <cjk>
+0x926C	U+5024	# <cjk>
+0x926D	U+77E5	# <cjk>
+0x926E	U+5730	# <cjk>
+0x926F	U+5F1B	# <cjk>
+0x9270	U+6065	# <cjk>
+0x9271	U+667A	# <cjk>
+0x9272	U+6C60	# <cjk>
+0x9273	U+75F4	# <cjk>
+0x9274	U+7A1A	# <cjk>
+0x9275	U+7F6E	# <cjk>
+0x9276	U+81F4	# <cjk>
+0x9277	U+8718	# <cjk>
+0x9278	U+9045	# <cjk>
+0x9279	U+99B3	# <cjk>
+0x927A	U+7BC9	# <cjk>
+0x927B	U+755C	# <cjk>
+0x927C	U+7AF9	# <cjk>
+0x927D	U+7B51	# <cjk>
+0x927E	U+84C4	# <cjk>
+0x9280	U+9010	# <cjk>
+0x9281	U+79E9	# <cjk>
+0x9282	U+7A92	# <cjk>
+0x9283	U+8336	# <cjk>
+0x9284	U+5AE1	# <cjk>
+0x9285	U+7740	# <cjk>
+0x9286	U+4E2D	# <cjk>
+0x9287	U+4EF2	# <cjk>
+0x9288	U+5B99	# <cjk>
+0x9289	U+5FE0	# <cjk>
+0x928A	U+62BD	# <cjk>
+0x928B	U+663C	# <cjk>
+0x928C	U+67F1	# <cjk>
+0x928D	U+6CE8	# <cjk>
+0x928E	U+866B	# <cjk>
+0x928F	U+8877	# <cjk>
+0x9290	U+8A3B	# <cjk>
+0x9291	U+914E	# <cjk>
+0x9292	U+92F3	# <cjk>
+0x9293	U+99D0	# <cjk>
+0x9294	U+6A17	# <cjk>
+0x9295	U+7026	# <cjk>
+0x9296	U+732A	# <cjk>
+0x9297	U+82E7	# <cjk>
+0x9298	U+8457	# <cjk>
+0x9299	U+8CAF	# <cjk>
+0x929A	U+4E01	# <cjk>
+0x929B	U+5146	# <cjk>
+0x929C	U+51CB	# <cjk>
+0x929D	U+558B	# <cjk>
+0x929E	U+5BF5	# <cjk>
+0x929F	U+5E16	# <cjk>
+0x92A0	U+5E33	# <cjk>
+0x92A1	U+5E81	# <cjk>
+0x92A2	U+5F14	# <cjk>
+0x92A3	U+5F35	# <cjk>
+0x92A4	U+5F6B	# <cjk>
+0x92A5	U+5FB4	# <cjk>
+0x92A6	U+61F2	# <cjk>
+0x92A7	U+6311	# <cjk>
+0x92A8	U+66A2	# <cjk>
+0x92A9	U+671D	# <cjk>
+0x92AA	U+6F6E	# <cjk>
+0x92AB	U+7252	# <cjk>
+0x92AC	U+753A	# <cjk>
+0x92AD	U+773A	# <cjk>
+0x92AE	U+8074	# <cjk>
+0x92AF	U+8139	# <cjk>
+0x92B0	U+8178	# <cjk>
+0x92B1	U+8776	# <cjk>
+0x92B2	U+8ABF	# <cjk>
+0x92B3	U+8ADC	# <cjk>
+0x92B4	U+8D85	# <cjk>
+0x92B5	U+8DF3	# <cjk>
+0x92B6	U+929A	# <cjk>
+0x92B7	U+9577	# <cjk>
+0x92B8	U+9802	# <cjk>
+0x92B9	U+9CE5	# <cjk>
+0x92BA	U+52C5	# <cjk>
+0x92BB	U+6357	# <cjk>
+0x92BC	U+76F4	# <cjk>
+0x92BD	U+6715	# <cjk>
+0x92BE	U+6C88	# <cjk>
+0x92BF	U+73CD	# <cjk>
+0x92C0	U+8CC3	# <cjk>
+0x92C1	U+93AE	# <cjk>
+0x92C2	U+9673	# <cjk>
+0x92C3	U+6D25	# <cjk>
+0x92C4	U+589C	# <cjk>
+0x92C5	U+690E	# <cjk>
+0x92C6	U+69CC	# <cjk>
+0x92C7	U+8FFD	# <cjk>
+0x92C8	U+939A	# <cjk>
+0x92C9	U+75DB	# <cjk>
+0x92CA	U+901A	# <cjk>
+0x92CB	U+585A	# <cjk>
+0x92CC	U+6802	# <cjk>
+0x92CD	U+63B4	# <cjk>
+0x92CE	U+69FB	# <cjk>
+0x92CF	U+4F43	# <cjk>
+0x92D0	U+6F2C	# <cjk>
+0x92D1	U+67D8	# <cjk>
+0x92D2	U+8FBB	# <cjk>
+0x92D3	U+8526	# <cjk>
+0x92D4	U+7DB4	# <cjk>
+0x92D5	U+9354	# <cjk>
+0x92D6	U+693F	# <cjk>
+0x92D7	U+6F70	# <cjk>
+0x92D8	U+576A	# <cjk>
+0x92D9	U+58F7	# <cjk>
+0x92DA	U+5B2C	# <cjk>
+0x92DB	U+7D2C	# <cjk>
+0x92DC	U+722A	# <cjk>
+0x92DD	U+540A	# <cjk>
+0x92DE	U+91E3	# <cjk>
+0x92DF	U+9DB4	# <cjk>
+0x92E0	U+4EAD	# <cjk>
+0x92E1	U+4F4E	# <cjk>
+0x92E2	U+505C	# <cjk>
+0x92E3	U+5075	# <cjk>
+0x92E4	U+5243	# <cjk>
+0x92E5	U+8C9E	# <cjk>
+0x92E6	U+5448	# <cjk>
+0x92E7	U+5824	# <cjk>
+0x92E8	U+5B9A	# <cjk>
+0x92E9	U+5E1D	# <cjk>
+0x92EA	U+5E95	# <cjk>
+0x92EB	U+5EAD	# <cjk>
+0x92EC	U+5EF7	# <cjk>
+0x92ED	U+5F1F	# <cjk>
+0x92EE	U+608C	# <cjk>
+0x92EF	U+62B5	# <cjk>
+0x92F0	U+633A	# <cjk>
+0x92F1	U+63D0	# <cjk>
+0x92F2	U+68AF	# <cjk>
+0x92F3	U+6C40	# <cjk>
+0x92F4	U+7887	# <cjk>
+0x92F5	U+798E	# <cjk>
+0x92F6	U+7A0B	# <cjk>
+0x92F7	U+7DE0	# <cjk>
+0x92F8	U+8247	# <cjk>
+0x92F9	U+8A02	# <cjk>
+0x92FA	U+8AE6	# <cjk>
+0x92FB	U+8E44	# <cjk>
+0x92FC	U+9013	# <cjk>
+0x9340	U+90B8	# <cjk>
+0x9341	U+912D	# <cjk>
+0x9342	U+91D8	# <cjk>
+0x9343	U+9F0E	# <cjk>
+0x9344	U+6CE5	# <cjk>
+0x9345	U+6458	# <cjk>
+0x9346	U+64E2	# <cjk>
+0x9347	U+6575	# <cjk>
+0x9348	U+6EF4	# <cjk>
+0x9349	U+7684	# <cjk>
+0x934A	U+7B1B	# <cjk>
+0x934B	U+9069	# <cjk>
+0x934C	U+93D1	# <cjk>
+0x934D	U+6EBA	# <cjk>
+0x934E	U+54F2	# <cjk>
+0x934F	U+5FB9	# <cjk>
+0x9350	U+64A4	# <cjk>
+0x9351	U+8F4D	# <cjk>
+0x9352	U+8FED	# <cjk>
+0x9353	U+9244	# <cjk>
+0x9354	U+5178	# <cjk>
+0x9355	U+586B	# <cjk>
+0x9356	U+5929	# <cjk>
+0x9357	U+5C55	# <cjk>
+0x9358	U+5E97	# <cjk>
+0x9359	U+6DFB	# <cjk>
+0x935A	U+7E8F	# <cjk>
+0x935B	U+751C	# <cjk>
+0x935C	U+8CBC	# <cjk>
+0x935D	U+8EE2	# <cjk>
+0x935E	U+985B	# <cjk>
+0x935F	U+70B9	# <cjk>
+0x9360	U+4F1D	# <cjk>
+0x9361	U+6BBF	# <cjk>
+0x9362	U+6FB1	# <cjk>
+0x9363	U+7530	# <cjk>
+0x9364	U+96FB	# <cjk>
+0x9365	U+514E	# <cjk>
+0x9366	U+5410	# <cjk>
+0x9367	U+5835	# <cjk>
+0x9368	U+5857	# <cjk>
+0x9369	U+59AC	# <cjk>
+0x936A	U+5C60	# <cjk>
+0x936B	U+5F92	# <cjk>
+0x936C	U+6597	# <cjk>
+0x936D	U+675C	# <cjk>
+0x936E	U+6E21	# <cjk>
+0x936F	U+767B	# <cjk>
+0x9370	U+83DF	# <cjk>
+0x9371	U+8CED	# <cjk>
+0x9372	U+9014	# <cjk>
+0x9373	U+90FD	# <cjk>
+0x9374	U+934D	# <cjk>
+0x9375	U+7825	# <cjk>
+0x9376	U+783A	# <cjk>
+0x9377	U+52AA	# <cjk>
+0x9378	U+5EA6	# <cjk>
+0x9379	U+571F	# <cjk>
+0x937A	U+5974	# <cjk>
+0x937B	U+6012	# <cjk>
+0x937C	U+5012	# <cjk>
+0x937D	U+515A	# <cjk>
+0x937E	U+51AC	# <cjk>
+0x9380	U+51CD	# <cjk>
+0x9381	U+5200	# <cjk>
+0x9382	U+5510	# <cjk>
+0x9383	U+5854	# <cjk>
+0x9384	U+5858	# <cjk>
+0x9385	U+5957	# <cjk>
+0x9386	U+5B95	# <cjk>
+0x9387	U+5CF6	# <cjk>
+0x9388	U+5D8B	# <cjk>
+0x9389	U+60BC	# <cjk>
+0x938A	U+6295	# <cjk>
+0x938B	U+642D	# <cjk>
+0x938C	U+6771	# <cjk>
+0x938D	U+6843	# <cjk>
+0x938E	U+68BC	# <cjk>
+0x938F	U+68DF	# <cjk>
+0x9390	U+76D7	# <cjk>
+0x9391	U+6DD8	# <cjk>
+0x9392	U+6E6F	# <cjk>
+0x9393	U+6D9B	# <cjk>
+0x9394	U+706F	# <cjk>
+0x9395	U+71C8	# <cjk>
+0x9396	U+5F53	# <cjk>
+0x9397	U+75D8	# <cjk>
+0x9398	U+7977	# <cjk>
+0x9399	U+7B49	# <cjk>
+0x939A	U+7B54	# <cjk>
+0x939B	U+7B52	# <cjk>
+0x939C	U+7CD6	# <cjk>
+0x939D	U+7D71	# <cjk>
+0x939E	U+5230	# <cjk>
+0x939F	U+8463	# <cjk>
+0x93A0	U+8569	# <cjk>
+0x93A1	U+85E4	# <cjk>
+0x93A2	U+8A0E	# <cjk>
+0x93A3	U+8B04	# <cjk>
+0x93A4	U+8C46	# <cjk>
+0x93A5	U+8E0F	# <cjk>
+0x93A6	U+9003	# <cjk>
+0x93A7	U+900F	# <cjk>
+0x93A8	U+9419	# <cjk>
+0x93A9	U+9676	# <cjk>
+0x93AA	U+982D	# <cjk>
+0x93AB	U+9A30	# <cjk>
+0x93AC	U+95D8	# <cjk>
+0x93AD	U+50CD	# <cjk>
+0x93AE	U+52D5	# <cjk>
+0x93AF	U+540C	# <cjk>
+0x93B0	U+5802	# <cjk>
+0x93B1	U+5C0E	# <cjk>
+0x93B2	U+61A7	# <cjk>
+0x93B3	U+649E	# <cjk>
+0x93B4	U+6D1E	# <cjk>
+0x93B5	U+77B3	# <cjk>
+0x93B6	U+7AE5	# <cjk>
+0x93B7	U+80F4	# <cjk>
+0x93B8	U+8404	# <cjk>
+0x93B9	U+9053	# <cjk>
+0x93BA	U+9285	# <cjk>
+0x93BB	U+5CE0	# <cjk>
+0x93BC	U+9D07	# <cjk>
+0x93BD	U+533F	# <cjk>
+0x93BE	U+5F97	# <cjk>
+0x93BF	U+5FB3	# <cjk>
+0x93C0	U+6D9C	# <cjk>
+0x93C1	U+7279	# <cjk>
+0x93C2	U+7763	# <cjk>
+0x93C3	U+79BF	# <cjk>
+0x93C4	U+7BE4	# <cjk>
+0x93C5	U+6BD2	# <cjk>
+0x93C6	U+72EC	# <cjk>
+0x93C7	U+8AAD	# <cjk>
+0x93C8	U+6803	# <cjk>
+0x93C9	U+6A61	# <cjk>
+0x93CA	U+51F8	# <cjk>
+0x93CB	U+7A81	# <cjk>
+0x93CC	U+6934	# <cjk>
+0x93CD	U+5C4A	# <cjk>
+0x93CE	U+9CF6	# <cjk>
+0x93CF	U+82EB	# <cjk>
+0x93D0	U+5BC5	# <cjk>
+0x93D1	U+9149	# <cjk>
+0x93D2	U+701E	# <cjk>
+0x93D3	U+5678	# <cjk>
+0x93D4	U+5C6F	# <cjk>
+0x93D5	U+60C7	# <cjk>
+0x93D6	U+6566	# <cjk>
+0x93D7	U+6C8C	# <cjk>
+0x93D8	U+8C5A	# <cjk>
+0x93D9	U+9041	# <cjk>
+0x93DA	U+9813	# <cjk>
+0x93DB	U+5451	# <cjk>
+0x93DC	U+66C7	# <cjk>
+0x93DD	U+920D	# <cjk>
+0x93DE	U+5948	# <cjk>
+0x93DF	U+90A3	# <cjk>
+0x93E0	U+5185	# <cjk>
+0x93E1	U+4E4D	# <cjk>
+0x93E2	U+51EA	# <cjk>
+0x93E3	U+8599	# <cjk>
+0x93E4	U+8B0E	# <cjk>
+0x93E5	U+7058	# <cjk>
+0x93E6	U+637A	# <cjk>
+0x93E7	U+934B	# <cjk>
+0x93E8	U+6962	# <cjk>
+0x93E9	U+99B4	# <cjk>
+0x93EA	U+7E04	# <cjk>
+0x93EB	U+7577	# <cjk>
+0x93EC	U+5357	# <cjk>
+0x93ED	U+6960	# <cjk>
+0x93EE	U+8EDF	# <cjk>
+0x93EF	U+96E3	# <cjk>
+0x93F0	U+6C5D	# <cjk>
+0x93F1	U+4E8C	# <cjk>
+0x93F2	U+5C3C	# <cjk>
+0x93F3	U+5F10	# <cjk>
+0x93F4	U+8FE9	# <cjk>
+0x93F5	U+5302	# <cjk>
+0x93F6	U+8CD1	# <cjk>
+0x93F7	U+8089	# <cjk>
+0x93F8	U+8679	# <cjk>
+0x93F9	U+5EFF	# <cjk>
+0x93FA	U+65E5	# <cjk>
+0x93FB	U+4E73	# <cjk>
+0x93FC	U+5165	# <cjk>
+0x9440	U+5982	# <cjk>
+0x9441	U+5C3F	# <cjk>
+0x9442	U+97EE	# <cjk>
+0x9443	U+4EFB	# <cjk>
+0x9444	U+598A	# <cjk>
+0x9445	U+5FCD	# <cjk>
+0x9446	U+8A8D	# <cjk>
+0x9447	U+6FE1	# <cjk>
+0x9448	U+79B0	# <cjk>
+0x9449	U+7962	# <cjk>
+0x944A	U+5BE7	# <cjk>
+0x944B	U+8471	# <cjk>
+0x944C	U+732B	# <cjk>
+0x944D	U+71B1	# <cjk>
+0x944E	U+5E74	# <cjk>
+0x944F	U+5FF5	# <cjk>
+0x9450	U+637B	# <cjk>
+0x9451	U+649A	# <cjk>
+0x9452	U+71C3	# <cjk>
+0x9453	U+7C98	# <cjk>
+0x9454	U+4E43	# <cjk>
+0x9455	U+5EFC	# <cjk>
+0x9456	U+4E4B	# <cjk>
+0x9457	U+57DC	# <cjk>
+0x9458	U+56A2	# <cjk>
+0x9459	U+60A9	# <cjk>
+0x945A	U+6FC3	# <cjk>
+0x945B	U+7D0D	# <cjk>
+0x945C	U+80FD	# <cjk>
+0x945D	U+8133	# <cjk>
+0x945E	U+81BF	# <cjk>
+0x945F	U+8FB2	# <cjk>
+0x9460	U+8997	# <cjk>
+0x9461	U+86A4	# <cjk>
+0x9462	U+5DF4	# <cjk>
+0x9463	U+628A	# <cjk>
+0x9464	U+64AD	# <cjk>
+0x9465	U+8987	# <cjk>
+0x9466	U+6777	# <cjk>
+0x9467	U+6CE2	# <cjk>
+0x9468	U+6D3E	# <cjk>
+0x9469	U+7436	# <cjk>
+0x946A	U+7834	# <cjk>
+0x946B	U+5A46	# <cjk>
+0x946C	U+7F75	# <cjk>
+0x946D	U+82AD	# <cjk>
+0x946E	U+99AC	# <cjk>
+0x946F	U+4FF3	# <cjk>
+0x9470	U+5EC3	# <cjk>
+0x9471	U+62DD	# <cjk>
+0x9472	U+6392	# <cjk>
+0x9473	U+6557	# <cjk>
+0x9474	U+676F	# <cjk>
+0x9475	U+76C3	# <cjk>
+0x9476	U+724C	# <cjk>
+0x9477	U+80CC	# <cjk>
+0x9478	U+80BA	# <cjk>
+0x9479	U+8F29	# <cjk>
+0x947A	U+914D	# <cjk>
+0x947B	U+500D	# <cjk>
+0x947C	U+57F9	# <cjk>
+0x947D	U+5A92	# <cjk>
+0x947E	U+6885	# <cjk>
+0x9480	U+6973	# <cjk>
+0x9481	U+7164	# <cjk>
+0x9482	U+72FD	# <cjk>
+0x9483	U+8CB7	# <cjk>
+0x9484	U+58F2	# <cjk>
+0x9485	U+8CE0	# <cjk>
+0x9486	U+966A	# <cjk>
+0x9487	U+9019	# <cjk>
+0x9488	U+877F	# <cjk>
+0x9489	U+79E4	# <cjk>
+0x948A	U+77E7	# <cjk>
+0x948B	U+8429	# <cjk>
+0x948C	U+4F2F	# <cjk>
+0x948D	U+5265	# <cjk>
+0x948E	U+535A	# <cjk>
+0x948F	U+62CD	# <cjk>
+0x9490	U+67CF	# <cjk>
+0x9491	U+6CCA	# <cjk>
+0x9492	U+767D	# <cjk>
+0x9493	U+7B94	# <cjk>
+0x9494	U+7C95	# <cjk>
+0x9495	U+8236	# <cjk>
+0x9496	U+8584	# <cjk>
+0x9497	U+8FEB	# <cjk>
+0x9498	U+66DD	# <cjk>
+0x9499	U+6F20	# <cjk>
+0x949A	U+7206	# <cjk>
+0x949B	U+7E1B	# <cjk>
+0x949C	U+83AB	# <cjk>
+0x949D	U+99C1	# <cjk>
+0x949E	U+9EA6	# <cjk>
+0x949F	U+51FD	# <cjk>
+0x94A0	U+7BB1	# <cjk>
+0x94A1	U+7872	# <cjk>
+0x94A2	U+7BB8	# <cjk>
+0x94A3	U+8087	# <cjk>
+0x94A4	U+7B48	# <cjk>
+0x94A5	U+6AE8	# <cjk>
+0x94A6	U+5E61	# <cjk>
+0x94A7	U+808C	# <cjk>
+0x94A8	U+7551	# <cjk>
+0x94A9	U+7560	# <cjk>
+0x94AA	U+516B	# <cjk>
+0x94AB	U+9262	# <cjk>
+0x94AC	U+6E8C	# <cjk>
+0x94AD	U+767A	# <cjk>
+0x94AE	U+9197	# <cjk>
+0x94AF	U+9AEA	# <cjk>
+0x94B0	U+4F10	# <cjk>
+0x94B1	U+7F70	# <cjk>
+0x94B2	U+629C	# <cjk>
+0x94B3	U+7B4F	# <cjk>
+0x94B4	U+95A5	# <cjk>
+0x94B5	U+9CE9	# <cjk>
+0x94B6	U+567A	# <cjk>
+0x94B7	U+5859	# <cjk>
+0x94B8	U+86E4	# <cjk>
+0x94B9	U+96BC	# <cjk>
+0x94BA	U+4F34	# <cjk>
+0x94BB	U+5224	# <cjk>
+0x94BC	U+534A	# <cjk>
+0x94BD	U+53CD	# <cjk>
+0x94BE	U+53DB	# <cjk>
+0x94BF	U+5E06	# <cjk>
+0x94C0	U+642C	# <cjk>
+0x94C1	U+6591	# <cjk>
+0x94C2	U+677F	# <cjk>
+0x94C3	U+6C3E	# <cjk>
+0x94C4	U+6C4E	# <cjk>
+0x94C5	U+7248	# <cjk>
+0x94C6	U+72AF	# <cjk>
+0x94C7	U+73ED	# <cjk>
+0x94C8	U+7554	# <cjk>
+0x94C9	U+7E41	# <cjk>
+0x94CA	U+822C	# <cjk>
+0x94CB	U+85E9	# <cjk>
+0x94CC	U+8CA9	# <cjk>
+0x94CD	U+7BC4	# <cjk>
+0x94CE	U+91C6	# <cjk>
+0x94CF	U+7169	# <cjk>
+0x94D0	U+9812	# <cjk>
+0x94D1	U+98EF	# <cjk>
+0x94D2	U+633D	# <cjk>
+0x94D3	U+6669	# <cjk>
+0x94D4	U+756A	# <cjk>
+0x94D5	U+76E4	# <cjk>
+0x94D6	U+78D0	# <cjk>
+0x94D7	U+8543	# <cjk>
+0x94D8	U+86EE	# <cjk>
+0x94D9	U+532A	# <cjk>
+0x94DA	U+5351	# <cjk>
+0x94DB	U+5426	# <cjk>
+0x94DC	U+5983	# <cjk>
+0x94DD	U+5E87	# <cjk>
+0x94DE	U+5F7C	# <cjk>
+0x94DF	U+60B2	# <cjk>
+0x94E0	U+6249	# <cjk>
+0x94E1	U+6279	# <cjk>
+0x94E2	U+62AB	# <cjk>
+0x94E3	U+6590	# <cjk>
+0x94E4	U+6BD4	# <cjk>
+0x94E5	U+6CCC	# <cjk>
+0x94E6	U+75B2	# <cjk>
+0x94E7	U+76AE	# <cjk>
+0x94E8	U+7891	# <cjk>
+0x94E9	U+79D8	# <cjk>
+0x94EA	U+7DCB	# <cjk>
+0x94EB	U+7F77	# <cjk>
+0x94EC	U+80A5	# <cjk>
+0x94ED	U+88AB	# <cjk>
+0x94EE	U+8AB9	# <cjk>
+0x94EF	U+8CBB	# <cjk>
+0x94F0	U+907F	# <cjk>
+0x94F1	U+975E	# <cjk>
+0x94F2	U+98DB	# <cjk>
+0x94F3	U+6A0B	# <cjk>
+0x94F4	U+7C38	# <cjk>
+0x94F5	U+5099	# <cjk>
+0x94F6	U+5C3E	# <cjk>
+0x94F7	U+5FAE	# <cjk>
+0x94F8	U+6787	# <cjk>
+0x94F9	U+6BD8	# <cjk>
+0x94FA	U+7435	# <cjk>
+0x94FB	U+7709	# <cjk>
+0x94FC	U+7F8E	# <cjk>
+0x9540	U+9F3B	# <cjk>
+0x9541	U+67CA	# <cjk>
+0x9542	U+7A17	# <cjk>
+0x9543	U+5339	# <cjk>
+0x9544	U+758B	# <cjk>
+0x9545	U+9AED	# <cjk>
+0x9546	U+5F66	# <cjk>
+0x9547	U+819D	# <cjk>
+0x9548	U+83F1	# <cjk>
+0x9549	U+8098	# <cjk>
+0x954A	U+5F3C	# <cjk>
+0x954B	U+5FC5	# <cjk>
+0x954C	U+7562	# <cjk>
+0x954D	U+7B46	# <cjk>
+0x954E	U+903C	# <cjk>
+0x954F	U+6867	# <cjk>
+0x9550	U+59EB	# <cjk>
+0x9551	U+5A9B	# <cjk>
+0x9552	U+7D10	# <cjk>
+0x9553	U+767E	# <cjk>
+0x9554	U+8B2C	# <cjk>
+0x9555	U+4FF5	# <cjk>
+0x9556	U+5F6A	# <cjk>
+0x9557	U+6A19	# <cjk>
+0x9558	U+6C37	# <cjk>
+0x9559	U+6F02	# <cjk>
+0x955A	U+74E2	# <cjk>
+0x955B	U+7968	# <cjk>
+0x955C	U+8868	# <cjk>
+0x955D	U+8A55	# <cjk>
+0x955E	U+8C79	# <cjk>
+0x955F	U+5EDF	# <cjk>
+0x9560	U+63CF	# <cjk>
+0x9561	U+75C5	# <cjk>
+0x9562	U+79D2	# <cjk>
+0x9563	U+82D7	# <cjk>
+0x9564	U+9328	# <cjk>
+0x9565	U+92F2	# <cjk>
+0x9566	U+849C	# <cjk>
+0x9567	U+86ED	# <cjk>
+0x9568	U+9C2D	# <cjk>
+0x9569	U+54C1	# <cjk>
+0x956A	U+5F6C	# <cjk>
+0x956B	U+658C	# <cjk>
+0x956C	U+6D5C	# <cjk>
+0x956D	U+7015	# <cjk>
+0x956E	U+8CA7	# <cjk>
+0x956F	U+8CD3	# <cjk>
+0x9570	U+983B	# <cjk>
+0x9571	U+654F	# <cjk>
+0x9572	U+74F6	# <cjk>
+0x9573	U+4E0D	# <cjk>
+0x9574	U+4ED8	# <cjk>
+0x9575	U+57E0	# <cjk>
+0x9576	U+592B	# <cjk>
+0x9577	U+5A66	# <cjk>
+0x9578	U+5BCC	# <cjk>
+0x9579	U+51A8	# <cjk>
+0x957A	U+5E03	# <cjk>
+0x957B	U+5E9C	# <cjk>
+0x957C	U+6016	# <cjk>
+0x957D	U+6276	# <cjk>
+0x957E	U+6577	# <cjk>
+0x9580	U+65A7	# <cjk>
+0x9581	U+666E	# <cjk>
+0x9582	U+6D6E	# <cjk>
+0x9583	U+7236	# <cjk>
+0x9584	U+7B26	# <cjk>
+0x9585	U+8150	# <cjk>
+0x9586	U+819A	# <cjk>
+0x9587	U+8299	# <cjk>
+0x9588	U+8B5C	# <cjk>
+0x9589	U+8CA0	# <cjk>
+0x958A	U+8CE6	# <cjk>
+0x958B	U+8D74	# <cjk>
+0x958C	U+961C	# <cjk>
+0x958D	U+9644	# <cjk>
+0x958E	U+4FAE	# <cjk>
+0x958F	U+64AB	# <cjk>
+0x9590	U+6B66	# <cjk>
+0x9591	U+821E	# <cjk>
+0x9592	U+8461	# <cjk>
+0x9593	U+856A	# <cjk>
+0x9594	U+90E8	# <cjk>
+0x9595	U+5C01	# <cjk>
+0x9596	U+6953	# <cjk>
+0x9597	U+98A8	# <cjk>
+0x9598	U+847A	# <cjk>
+0x9599	U+8557	# <cjk>
+0x959A	U+4F0F	# <cjk>
+0x959B	U+526F	# <cjk>
+0x959C	U+5FA9	# <cjk>
+0x959D	U+5E45	# <cjk>
+0x959E	U+670D	# <cjk>
+0x959F	U+798F	# <cjk>
+0x95A0	U+8179	# <cjk>
+0x95A1	U+8907	# <cjk>
+0x95A2	U+8986	# <cjk>
+0x95A3	U+6DF5	# <cjk>
+0x95A4	U+5F17	# <cjk>
+0x95A5	U+6255	# <cjk>
+0x95A6	U+6CB8	# <cjk>
+0x95A7	U+4ECF	# <cjk>
+0x95A8	U+7269	# <cjk>
+0x95A9	U+9B92	# <cjk>
+0x95AA	U+5206	# <cjk>
+0x95AB	U+543B	# <cjk>
+0x95AC	U+5674	# <cjk>
+0x95AD	U+58B3	# <cjk>
+0x95AE	U+61A4	# <cjk>
+0x95AF	U+626E	# <cjk>
+0x95B0	U+711A	# <cjk>
+0x95B1	U+596E	# <cjk>
+0x95B2	U+7C89	# <cjk>
+0x95B3	U+7CDE	# <cjk>
+0x95B4	U+7D1B	# <cjk>
+0x95B5	U+96F0	# <cjk>
+0x95B6	U+6587	# <cjk>
+0x95B7	U+805E	# <cjk>
+0x95B8	U+4E19	# <cjk>
+0x95B9	U+4F75	# <cjk>
+0x95BA	U+5175	# <cjk>
+0x95BB	U+5840	# <cjk>
+0x95BC	U+5E63	# <cjk>
+0x95BD	U+5E73	# <cjk>
+0x95BE	U+5F0A	# <cjk>
+0x95BF	U+67C4	# <cjk>
+0x95C0	U+4E26	# <cjk>
+0x95C1	U+853D	# <cjk>
+0x95C2	U+9589	# <cjk>
+0x95C3	U+965B	# <cjk>
+0x95C4	U+7C73	# <cjk>
+0x95C5	U+9801	# <cjk>
+0x95C6	U+50FB	# <cjk>
+0x95C7	U+58C1	# <cjk>
+0x95C8	U+7656	# <cjk>
+0x95C9	U+78A7	# <cjk>
+0x95CA	U+5225	# <cjk>
+0x95CB	U+77A5	# <cjk>
+0x95CC	U+8511	# <cjk>
+0x95CD	U+7B86	# <cjk>
+0x95CE	U+504F	# <cjk>
+0x95CF	U+5909	# <cjk>
+0x95D0	U+7247	# <cjk>
+0x95D1	U+7BC7	# <cjk>
+0x95D2	U+7DE8	# <cjk>
+0x95D3	U+8FBA	# <cjk>
+0x95D4	U+8FD4	# <cjk>
+0x95D5	U+904D	# <cjk>
+0x95D6	U+4FBF	# <cjk>
+0x95D7	U+52C9	# <cjk>
+0x95D8	U+5A29	# <cjk>
+0x95D9	U+5F01	# <cjk>
+0x95DA	U+97AD	# <cjk>
+0x95DB	U+4FDD	# <cjk>
+0x95DC	U+8217	# <cjk>
+0x95DD	U+92EA	# <cjk>
+0x95DE	U+5703	# <cjk>
+0x95DF	U+6355	# <cjk>
+0x95E0	U+6B69	# <cjk>
+0x95E1	U+752B	# <cjk>
+0x95E2	U+88DC	# <cjk>
+0x95E3	U+8F14	# <cjk>
+0x95E4	U+7A42	# <cjk>
+0x95E5	U+52DF	# <cjk>
+0x95E6	U+5893	# <cjk>
+0x95E7	U+6155	# <cjk>
+0x95E8	U+620A	# <cjk>
+0x95E9	U+66AE	# <cjk>
+0x95EA	U+6BCD	# <cjk>
+0x95EB	U+7C3F	# <cjk>
+0x95EC	U+83E9	# <cjk>
+0x95ED	U+5023	# <cjk>
+0x95EE	U+4FF8	# <cjk>
+0x95EF	U+5305	# <cjk>
+0x95F0	U+5446	# <cjk>
+0x95F1	U+5831	# <cjk>
+0x95F2	U+5949	# <cjk>
+0x95F3	U+5B9D	# <cjk>
+0x95F4	U+5CF0	# <cjk>
+0x95F5	U+5CEF	# <cjk>
+0x95F6	U+5D29	# <cjk>
+0x95F7	U+5E96	# <cjk>
+0x95F8	U+62B1	# <cjk>
+0x95F9	U+6367	# <cjk>
+0x95FA	U+653E	# <cjk>
+0x95FB	U+65B9	# <cjk>
+0x95FC	U+670B	# <cjk>
+0x9640	U+6CD5	# <cjk>
+0x9641	U+6CE1	# <cjk>
+0x9642	U+70F9	# <cjk>
+0x9643	U+7832	# <cjk>
+0x9644	U+7E2B	# <cjk>
+0x9645	U+80DE	# <cjk>
+0x9646	U+82B3	# <cjk>
+0x9647	U+840C	# <cjk>
+0x9648	U+84EC	# <cjk>
+0x9649	U+8702	# <cjk>
+0x964A	U+8912	# <cjk>
+0x964B	U+8A2A	# <cjk>
+0x964C	U+8C4A	# <cjk>
+0x964D	U+90A6	# <cjk>
+0x964E	U+92D2	# <cjk>
+0x964F	U+98FD	# <cjk>
+0x9650	U+9CF3	# <cjk>
+0x9651	U+9D6C	# <cjk>
+0x9652	U+4E4F	# <cjk>
+0x9653	U+4EA1	# <cjk>
+0x9654	U+508D	# <cjk>
+0x9655	U+5256	# <cjk>
+0x9656	U+574A	# <cjk>
+0x9657	U+59A8	# <cjk>
+0x9658	U+5E3D	# <cjk>
+0x9659	U+5FD8	# <cjk>
+0x965A	U+5FD9	# <cjk>
+0x965B	U+623F	# <cjk>
+0x965C	U+66B4	# <cjk>
+0x965D	U+671B	# <cjk>
+0x965E	U+67D0	# <cjk>
+0x965F	U+68D2	# <cjk>
+0x9660	U+5192	# <cjk>
+0x9661	U+7D21	# <cjk>
+0x9662	U+80AA	# <cjk>
+0x9663	U+81A8	# <cjk>
+0x9664	U+8B00	# <cjk>
+0x9665	U+8C8C	# <cjk>
+0x9666	U+8CBF	# <cjk>
+0x9667	U+927E	# <cjk>
+0x9668	U+9632	# <cjk>
+0x9669	U+5420	# <cjk>
+0x966A	U+982C	# <cjk>
+0x966B	U+5317	# <cjk>
+0x966C	U+50D5	# <cjk>
+0x966D	U+535C	# <cjk>
+0x966E	U+58A8	# <cjk>
+0x966F	U+64B2	# <cjk>
+0x9670	U+6734	# <cjk>
+0x9671	U+7267	# <cjk>
+0x9672	U+7766	# <cjk>
+0x9673	U+7A46	# <cjk>
+0x9674	U+91E6	# <cjk>
+0x9675	U+52C3	# <cjk>
+0x9676	U+6CA1	# <cjk>
+0x9677	U+6B86	# <cjk>
+0x9678	U+5800	# <cjk>
+0x9679	U+5E4C	# <cjk>
+0x967A	U+5954	# <cjk>
+0x967B	U+672C	# <cjk>
+0x967C	U+7FFB	# <cjk>
+0x967D	U+51E1	# <cjk>
+0x967E	U+76C6	# <cjk>
+0x9680	U+6469	# <cjk>
+0x9681	U+78E8	# <cjk>
+0x9682	U+9B54	# <cjk>
+0x9683	U+9EBB	# <cjk>
+0x9684	U+57CB	# <cjk>
+0x9685	U+59B9	# <cjk>
+0x9686	U+6627	# <cjk>
+0x9687	U+679A	# <cjk>
+0x9688	U+6BCE	# <cjk>
+0x9689	U+54E9	# <cjk>
+0x968A	U+69D9	# <cjk>
+0x968B	U+5E55	# <cjk>
+0x968C	U+819C	# <cjk>
+0x968D	U+6795	# <cjk>
+0x968E	U+9BAA	# <cjk>
+0x968F	U+67FE	# <cjk>
+0x9690	U+9C52	# <cjk>
+0x9691	U+685D	# <cjk>
+0x9692	U+4EA6	# <cjk>
+0x9693	U+4FE3	# <cjk>
+0x9694	U+53C8	# <cjk>
+0x9695	U+62B9	# <cjk>
+0x9696	U+672B	# <cjk>
+0x9697	U+6CAB	# <cjk>
+0x9698	U+8FC4	# <cjk>
+0x9699	U+4FAD	# <cjk>
+0x969A	U+7E6D	# <cjk>
+0x969B	U+9EBF	# <cjk>
+0x969C	U+4E07	# <cjk>
+0x969D	U+6162	# <cjk>
+0x969E	U+6E80	# <cjk>
+0x969F	U+6F2B	# <cjk>
+0x96A0	U+8513	# <cjk>
+0x96A1	U+5473	# <cjk>
+0x96A2	U+672A	# <cjk>
+0x96A3	U+9B45	# <cjk>
+0x96A4	U+5DF3	# <cjk>
+0x96A5	U+7B95	# <cjk>
+0x96A6	U+5CAC	# <cjk>
+0x96A7	U+5BC6	# <cjk>
+0x96A8	U+871C	# <cjk>
+0x96A9	U+6E4A	# <cjk>
+0x96AA	U+84D1	# <cjk>
+0x96AB	U+7A14	# <cjk>
+0x96AC	U+8108	# <cjk>
+0x96AD	U+5999	# <cjk>
+0x96AE	U+7C8D	# <cjk>
+0x96AF	U+6C11	# <cjk>
+0x96B0	U+7720	# <cjk>
+0x96B1	U+52D9	# <cjk>
+0x96B2	U+5922	# <cjk>
+0x96B3	U+7121	# <cjk>
+0x96B4	U+725F	# <cjk>
+0x96B5	U+77DB	# <cjk>
+0x96B6	U+9727	# <cjk>
+0x96B7	U+9D61	# <cjk>
+0x96B8	U+690B	# <cjk>
+0x96B9	U+5A7F	# <cjk>
+0x96BA	U+5A18	# <cjk>
+0x96BB	U+51A5	# <cjk>
+0x96BC	U+540D	# <cjk>
+0x96BD	U+547D	# <cjk>
+0x96BE	U+660E	# <cjk>
+0x96BF	U+76DF	# <cjk>
+0x96C0	U+8FF7	# <cjk>
+0x96C1	U+9298	# <cjk>
+0x96C2	U+9CF4	# <cjk>
+0x96C3	U+59EA	# <cjk>
+0x96C4	U+725D	# <cjk>
+0x96C5	U+6EC5	# <cjk>
+0x96C6	U+514D	# <cjk>
+0x96C7	U+68C9	# <cjk>
+0x96C8	U+7DBF	# <cjk>
+0x96C9	U+7DEC	# <cjk>
+0x96CA	U+9762	# <cjk>
+0x96CB	U+9EBA	# <cjk>
+0x96CC	U+6478	# <cjk>
+0x96CD	U+6A21	# <cjk>
+0x96CE	U+8302	# <cjk>
+0x96CF	U+5984	# <cjk>
+0x96D0	U+5B5F	# <cjk>
+0x96D1	U+6BDB	# <cjk>
+0x96D2	U+731B	# <cjk>
+0x96D3	U+76F2	# <cjk>
+0x96D4	U+7DB2	# <cjk>
+0x96D5	U+8017	# <cjk>
+0x96D6	U+8499	# <cjk>
+0x96D7	U+5132	# <cjk>
+0x96D8	U+6728	# <cjk>
+0x96D9	U+9ED9	# <cjk>
+0x96DA	U+76EE	# <cjk>
+0x96DB	U+6762	# <cjk>
+0x96DC	U+52FF	# <cjk>
+0x96DD	U+9905	# <cjk>
+0x96DE	U+5C24	# <cjk>
+0x96DF	U+623B	# <cjk>
+0x96E0	U+7C7E	# <cjk>
+0x96E1	U+8CB0	# <cjk>
+0x96E2	U+554F	# <cjk>
+0x96E3	U+60B6	# <cjk>
+0x96E4	U+7D0B	# <cjk>
+0x96E5	U+9580	# <cjk>
+0x96E6	U+5301	# <cjk>
+0x96E7	U+4E5F	# <cjk>
+0x96E8	U+51B6	# <cjk>
+0x96E9	U+591C	# <cjk>
+0x96EA	U+723A	# <cjk>
+0x96EB	U+8036	# <cjk>
+0x96EC	U+91CE	# <cjk>
+0x96ED	U+5F25	# <cjk>
+0x96EE	U+77E2	# <cjk>
+0x96EF	U+5384	# <cjk>
+0x96F0	U+5F79	# <cjk>
+0x96F1	U+7D04	# <cjk>
+0x96F2	U+85AC	# <cjk>
+0x96F3	U+8A33	# <cjk>
+0x96F4	U+8E8D	# <cjk>
+0x96F5	U+9756	# <cjk>
+0x96F6	U+67F3	# <cjk>
+0x96F7	U+85AE	# <cjk>
+0x96F8	U+9453	# <cjk>
+0x96F9	U+6109	# <cjk>
+0x96FA	U+6108	# <cjk>
+0x96FB	U+6CB9	# <cjk>
+0x96FC	U+7652	# <cjk>
+0x9740	U+8AED	# <cjk>
+0x9741	U+8F38	# <cjk>
+0x9742	U+552F	# <cjk>
+0x9743	U+4F51	# <cjk>
+0x9744	U+512A	# <cjk>
+0x9745	U+52C7	# <cjk>
+0x9746	U+53CB	# <cjk>
+0x9747	U+5BA5	# <cjk>
+0x9748	U+5E7D	# <cjk>
+0x9749	U+60A0	# <cjk>
+0x974A	U+6182	# <cjk>
+0x974B	U+63D6	# <cjk>
+0x974C	U+6709	# <cjk>
+0x974D	U+67DA	# <cjk>
+0x974E	U+6E67	# <cjk>
+0x974F	U+6D8C	# <cjk>
+0x9750	U+7336	# <cjk>
+0x9751	U+7337	# <cjk>
+0x9752	U+7531	# <cjk>
+0x9753	U+7950	# <cjk>
+0x9754	U+88D5	# <cjk>
+0x9755	U+8A98	# <cjk>
+0x9756	U+904A	# <cjk>
+0x9757	U+9091	# <cjk>
+0x9758	U+90F5	# <cjk>
+0x9759	U+96C4	# <cjk>
+0x975A	U+878D	# <cjk>
+0x975B	U+5915	# <cjk>
+0x975C	U+4E88	# <cjk>
+0x975D	U+4F59	# <cjk>
+0x975E	U+4E0E	# <cjk>
+0x975F	U+8A89	# <cjk>
+0x9760	U+8F3F	# <cjk>
+0x9761	U+9810	# <cjk>
+0x9762	U+50AD	# <cjk>
+0x9763	U+5E7C	# <cjk>
+0x9764	U+5996	# <cjk>
+0x9765	U+5BB9	# <cjk>
+0x9766	U+5EB8	# <cjk>
+0x9767	U+63DA	# <cjk>
+0x9768	U+63FA	# <cjk>
+0x9769	U+64C1	# <cjk>
+0x976A	U+66DC	# <cjk>
+0x976B	U+694A	# <cjk>
+0x976C	U+69D8	# <cjk>
+0x976D	U+6D0B	# <cjk>
+0x976E	U+6EB6	# <cjk>
+0x976F	U+7194	# <cjk>
+0x9770	U+7528	# <cjk>
+0x9771	U+7AAF	# <cjk>
+0x9772	U+7F8A	# <cjk>
+0x9773	U+8000	# <cjk>
+0x9774	U+8449	# <cjk>
+0x9775	U+84C9	# <cjk>
+0x9776	U+8981	# <cjk>
+0x9777	U+8B21	# <cjk>
+0x9778	U+8E0A	# <cjk>
+0x9779	U+9065	# <cjk>
+0x977A	U+967D	# <cjk>
+0x977B	U+990A	# <cjk>
+0x977C	U+617E	# <cjk>
+0x977D	U+6291	# <cjk>
+0x977E	U+6B32	# <cjk>
+0x9780	U+6C83	# <cjk>
+0x9781	U+6D74	# <cjk>
+0x9782	U+7FCC	# <cjk>
+0x9783	U+7FFC	# <cjk>
+0x9784	U+6DC0	# <cjk>
+0x9785	U+7F85	# <cjk>
+0x9786	U+87BA	# <cjk>
+0x9787	U+88F8	# <cjk>
+0x9788	U+6765	# <cjk>
+0x9789	U+83B1	# <cjk>
+0x978A	U+983C	# <cjk>
+0x978B	U+96F7	# <cjk>
+0x978C	U+6D1B	# <cjk>
+0x978D	U+7D61	# <cjk>
+0x978E	U+843D	# <cjk>
+0x978F	U+916A	# <cjk>
+0x9790	U+4E71	# <cjk>
+0x9791	U+5375	# <cjk>
+0x9792	U+5D50	# <cjk>
+0x9793	U+6B04	# <cjk>
+0x9794	U+6FEB	# <cjk>
+0x9795	U+85CD	# <cjk>
+0x9796	U+862D	# <cjk>
+0x9797	U+89A7	# <cjk>
+0x9798	U+5229	# <cjk>
+0x9799	U+540F	# <cjk>
+0x979A	U+5C65	# <cjk>
+0x979B	U+674E	# <cjk>
+0x979C	U+68A8	# <cjk>
+0x979D	U+7406	# <cjk>
+0x979E	U+7483	# <cjk>
+0x979F	U+75E2	# <cjk>
+0x97A0	U+88CF	# <cjk>
+0x97A1	U+88E1	# <cjk>
+0x97A2	U+91CC	# <cjk>
+0x97A3	U+96E2	# <cjk>
+0x97A4	U+9678	# <cjk>
+0x97A5	U+5F8B	# <cjk>
+0x97A6	U+7387	# <cjk>
+0x97A7	U+7ACB	# <cjk>
+0x97A8	U+844E	# <cjk>
+0x97A9	U+63A0	# <cjk>
+0x97AA	U+7565	# <cjk>
+0x97AB	U+5289	# <cjk>
+0x97AC	U+6D41	# <cjk>
+0x97AD	U+6E9C	# <cjk>
+0x97AE	U+7409	# <cjk>
+0x97AF	U+7559	# <cjk>
+0x97B0	U+786B	# <cjk>
+0x97B1	U+7C92	# <cjk>
+0x97B2	U+9686	# <cjk>
+0x97B3	U+7ADC	# <cjk>
+0x97B4	U+9F8D	# <cjk>
+0x97B5	U+4FB6	# <cjk>
+0x97B6	U+616E	# <cjk>
+0x97B7	U+65C5	# <cjk>
+0x97B8	U+865C	# <cjk>
+0x97B9	U+4E86	# <cjk>
+0x97BA	U+4EAE	# <cjk>
+0x97BB	U+50DA	# <cjk>
+0x97BC	U+4E21	# <cjk>
+0x97BD	U+51CC	# <cjk>
+0x97BE	U+5BEE	# <cjk>
+0x97BF	U+6599	# <cjk>
+0x97C0	U+6881	# <cjk>
+0x97C1	U+6DBC	# <cjk>
+0x97C2	U+731F	# <cjk>
+0x97C3	U+7642	# <cjk>
+0x97C4	U+77AD	# <cjk>
+0x97C5	U+7A1C	# <cjk>
+0x97C6	U+7CE7	# <cjk>
+0x97C7	U+826F	# <cjk>
+0x97C8	U+8AD2	# <cjk>
+0x97C9	U+907C	# <cjk>
+0x97CA	U+91CF	# <cjk>
+0x97CB	U+9675	# <cjk>
+0x97CC	U+9818	# <cjk>
+0x97CD	U+529B	# <cjk>
+0x97CE	U+7DD1	# <cjk>
+0x97CF	U+502B	# <cjk>
+0x97D0	U+5398	# <cjk>
+0x97D1	U+6797	# <cjk>
+0x97D2	U+6DCB	# <cjk>
+0x97D3	U+71D0	# <cjk>
+0x97D4	U+7433	# <cjk>
+0x97D5	U+81E8	# <cjk>
+0x97D6	U+8F2A	# <cjk>
+0x97D7	U+96A3	# <cjk>
+0x97D8	U+9C57	# <cjk>
+0x97D9	U+9E9F	# <cjk>
+0x97DA	U+7460	# <cjk>
+0x97DB	U+5841	# <cjk>
+0x97DC	U+6D99	# <cjk>
+0x97DD	U+7D2F	# <cjk>
+0x97DE	U+985E	# <cjk>
+0x97DF	U+4EE4	# <cjk>
+0x97E0	U+4F36	# <cjk>
+0x97E1	U+4F8B	# <cjk>
+0x97E2	U+51B7	# <cjk>
+0x97E3	U+52B1	# <cjk>
+0x97E4	U+5DBA	# <cjk>
+0x97E5	U+601C	# <cjk>
+0x97E6	U+73B2	# <cjk>
+0x97E7	U+793C	# <cjk>
+0x97E8	U+82D3	# <cjk>
+0x97E9	U+9234	# <cjk>
+0x97EA	U+96B7	# <cjk>
+0x97EB	U+96F6	# <cjk>
+0x97EC	U+970A	# <cjk>
+0x97ED	U+9E97	# <cjk>
+0x97EE	U+9F62	# <cjk>
+0x97EF	U+66A6	# <cjk>
+0x97F0	U+6B74	# <cjk>
+0x97F1	U+5217	# <cjk>
+0x97F2	U+52A3	# <cjk>
+0x97F3	U+70C8	# <cjk>
+0x97F4	U+88C2	# <cjk>
+0x97F5	U+5EC9	# <cjk>
+0x97F6	U+604B	# <cjk>
+0x97F7	U+6190	# <cjk>
+0x97F8	U+6F23	# <cjk>
+0x97F9	U+7149	# <cjk>
+0x97FA	U+7C3E	# <cjk>
+0x97FB	U+7DF4	# <cjk>
+0x97FC	U+806F	# <cjk>
+0x9840	U+84EE	# <cjk>
+0x9841	U+9023	# <cjk>
+0x9842	U+932C	# <cjk>
+0x9843	U+5442	# <cjk>
+0x9844	U+9B6F	# <cjk>
+0x9845	U+6AD3	# <cjk>
+0x9846	U+7089	# <cjk>
+0x9847	U+8CC2	# <cjk>
+0x9848	U+8DEF	# <cjk>
+0x9849	U+9732	# <cjk>
+0x984A	U+52B4	# <cjk>
+0x984B	U+5A41	# <cjk>
+0x984C	U+5ECA	# <cjk>
+0x984D	U+5F04	# <cjk>
+0x984E	U+6717	# <cjk>
+0x984F	U+697C	# <cjk>
+0x9850	U+6994	# <cjk>
+0x9851	U+6D6A	# <cjk>
+0x9852	U+6F0F	# <cjk>
+0x9853	U+7262	# <cjk>
+0x9854	U+72FC	# <cjk>
+0x9855	U+7BED	# <cjk>
+0x9856	U+8001	# <cjk>
+0x9857	U+807E	# <cjk>
+0x9858	U+874B	# <cjk>
+0x9859	U+90CE	# <cjk>
+0x985A	U+516D	# <cjk>
+0x985B	U+9E93	# <cjk>
+0x985C	U+7984	# <cjk>
+0x985D	U+808B	# <cjk>
+0x985E	U+9332	# <cjk>
+0x985F	U+8AD6	# <cjk>
+0x9860	U+502D	# <cjk>
+0x9861	U+548C	# <cjk>
+0x9862	U+8A71	# <cjk>
+0x9863	U+6B6A	# <cjk>
+0x9864	U+8CC4	# <cjk>
+0x9865	U+8107	# <cjk>
+0x9866	U+60D1	# <cjk>
+0x9867	U+67A0	# <cjk>
+0x9868	U+9DF2	# <cjk>
+0x9869	U+4E99	# <cjk>
+0x986A	U+4E98	# <cjk>
+0x986B	U+9C10	# <cjk>
+0x986C	U+8A6B	# <cjk>
+0x986D	U+85C1	# <cjk>
+0x986E	U+8568	# <cjk>
+0x986F	U+6900	# <cjk>
+0x9870	U+6E7E	# <cjk>
+0x9871	U+7897	# <cjk>
+0x9872	U+8155	# <cjk>
+0x9873	U+20B9F	# <cjk>	[2004]	[Unicode3.1]
+0x9874	U+5B41	# <cjk>	[2000]
+0x9875	U+5B56	# <cjk>	[2000]
+0x9876	U+5B7D	# <cjk>	[2000]
+0x9877	U+5B93	# <cjk>	[2000]
+0x9878	U+5BD8	# <cjk>	[2000]
+0x9879	U+5BEC	# <cjk>	[2000]
+0x987A	U+5C12	# <cjk>	[2000]
+0x987B	U+5C1E	# <cjk>	[2000]
+0x987C	U+5C23	# <cjk>	[2000]
+0x987D	U+5C2B	# <cjk>	[2000]
+0x987E	U+378D	# <cjk>	[2000]
+0x9880	U+5C62	# <cjk>	[2000]
+0x9881	U+FA3B	# CJK COMPATIBILITY IDEOGRAPH-FA3B	[2000]	[Unicode3.2]
+0x9882	U+FA3C	# CJK COMPATIBILITY IDEOGRAPH-FA3C	[2000]	[Unicode3.2]
+0x9883	U+216B4	# <cjk>	[2000]	[Unicode3.1]
+0x9884	U+5C7A	# <cjk>	[2000]
+0x9885	U+5C8F	# <cjk>	[2000]
+0x9886	U+5C9F	# <cjk>	[2000]
+0x9887	U+5CA3	# <cjk>	[2000]
+0x9888	U+5CAA	# <cjk>	[2000]
+0x9889	U+5CBA	# <cjk>	[2000]
+0x988A	U+5CCB	# <cjk>	[2000]
+0x988B	U+5CD0	# <cjk>	[2000]
+0x988C	U+5CD2	# <cjk>	[2000]
+0x988D	U+5CF4	# <cjk>	[2000]
+0x988E	U+21E34	# <cjk>	[2000]	[Unicode3.1]
+0x988F	U+37E2	# <cjk>	[2000]
+0x9890	U+5D0D	# <cjk>	[2000]
+0x9891	U+5D27	# <cjk>	[2000]
+0x9892	U+FA11	# CJK COMPATIBILITY IDEOGRAPH-FA11	[2000]
+0x9893	U+5D46	# <cjk>	[2000]
+0x9894	U+5D47	# <cjk>	[2000]
+0x9895	U+5D53	# <cjk>	[2000]
+0x9896	U+5D4A	# <cjk>	[2000]
+0x9897	U+5D6D	# <cjk>	[2000]
+0x9898	U+5D81	# <cjk>	[2000]
+0x9899	U+5DA0	# <cjk>	[2000]
+0x989A	U+5DA4	# <cjk>	[2000]
+0x989B	U+5DA7	# <cjk>	[2000]
+0x989C	U+5DB8	# <cjk>	[2000]
+0x989D	U+5DCB	# <cjk>	[2000]
+0x989E	U+541E	# <cjk>	[2004]
+0x989F	U+5F0C	# <cjk>
+0x98A0	U+4E10	# <cjk>
+0x98A1	U+4E15	# <cjk>
+0x98A2	U+4E2A	# <cjk>
+0x98A3	U+4E31	# <cjk>
+0x98A4	U+4E36	# <cjk>
+0x98A5	U+4E3C	# <cjk>
+0x98A6	U+4E3F	# <cjk>
+0x98A7	U+4E42	# <cjk>
+0x98A8	U+4E56	# <cjk>
+0x98A9	U+4E58	# <cjk>
+0x98AA	U+4E82	# <cjk>
+0x98AB	U+4E85	# <cjk>
+0x98AC	U+8C6B	# <cjk>
+0x98AD	U+4E8A	# <cjk>
+0x98AE	U+8212	# <cjk>
+0x98AF	U+5F0D	# <cjk>
+0x98B0	U+4E8E	# <cjk>
+0x98B1	U+4E9E	# <cjk>
+0x98B2	U+4E9F	# <cjk>
+0x98B3	U+4EA0	# <cjk>
+0x98B4	U+4EA2	# <cjk>
+0x98B5	U+4EB0	# <cjk>
+0x98B6	U+4EB3	# <cjk>
+0x98B7	U+4EB6	# <cjk>
+0x98B8	U+4ECE	# <cjk>
+0x98B9	U+4ECD	# <cjk>
+0x98BA	U+4EC4	# <cjk>
+0x98BB	U+4EC6	# <cjk>
+0x98BC	U+4EC2	# <cjk>
+0x98BD	U+4ED7	# <cjk>
+0x98BE	U+4EDE	# <cjk>
+0x98BF	U+4EED	# <cjk>
+0x98C0	U+4EDF	# <cjk>
+0x98C1	U+4EF7	# <cjk>
+0x98C2	U+4F09	# <cjk>
+0x98C3	U+4F5A	# <cjk>
+0x98C4	U+4F30	# <cjk>
+0x98C5	U+4F5B	# <cjk>
+0x98C6	U+4F5D	# <cjk>
+0x98C7	U+4F57	# <cjk>
+0x98C8	U+4F47	# <cjk>
+0x98C9	U+4F76	# <cjk>
+0x98CA	U+4F88	# <cjk>
+0x98CB	U+4F8F	# <cjk>
+0x98CC	U+4F98	# <cjk>
+0x98CD	U+4F7B	# <cjk>
+0x98CE	U+4F69	# <cjk>
+0x98CF	U+4F70	# <cjk>
+0x98D0	U+4F91	# <cjk>
+0x98D1	U+4F6F	# <cjk>
+0x98D2	U+4F86	# <cjk>
+0x98D3	U+4F96	# <cjk>
+0x98D4	U+5118	# <cjk>
+0x98D5	U+4FD4	# <cjk>
+0x98D6	U+4FDF	# <cjk>
+0x98D7	U+4FCE	# <cjk>
+0x98D8	U+4FD8	# <cjk>
+0x98D9	U+4FDB	# <cjk>
+0x98DA	U+4FD1	# <cjk>
+0x98DB	U+4FDA	# <cjk>
+0x98DC	U+4FD0	# <cjk>
+0x98DD	U+4FE4	# <cjk>
+0x98DE	U+4FE5	# <cjk>
+0x98DF	U+501A	# <cjk>
+0x98E0	U+5028	# <cjk>
+0x98E1	U+5014	# <cjk>
+0x98E2	U+502A	# <cjk>
+0x98E3	U+5025	# <cjk>
+0x98E4	U+5005	# <cjk>
+0x98E5	U+4F1C	# <cjk>
+0x98E6	U+4FF6	# <cjk>
+0x98E7	U+5021	# <cjk>
+0x98E8	U+5029	# <cjk>
+0x98E9	U+502C	# <cjk>
+0x98EA	U+4FFE	# <cjk>
+0x98EB	U+4FEF	# <cjk>
+0x98EC	U+5011	# <cjk>
+0x98ED	U+5006	# <cjk>
+0x98EE	U+5043	# <cjk>
+0x98EF	U+5047	# <cjk>
+0x98F0	U+6703	# <cjk>
+0x98F1	U+5055	# <cjk>
+0x98F2	U+5050	# <cjk>
+0x98F3	U+5048	# <cjk>
+0x98F4	U+505A	# <cjk>
+0x98F5	U+5056	# <cjk>
+0x98F6	U+506C	# <cjk>
+0x98F7	U+5078	# <cjk>
+0x98F8	U+5080	# <cjk>
+0x98F9	U+509A	# <cjk>
+0x98FA	U+5085	# <cjk>
+0x98FB	U+50B4	# <cjk>
+0x98FC	U+50B2	# <cjk>
+0x9940	U+50C9	# <cjk>
+0x9941	U+50CA	# <cjk>
+0x9942	U+50B3	# <cjk>
+0x9943	U+50C2	# <cjk>
+0x9944	U+50D6	# <cjk>
+0x9945	U+50DE	# <cjk>
+0x9946	U+50E5	# <cjk>
+0x9947	U+50ED	# <cjk>
+0x9948	U+50E3	# <cjk>
+0x9949	U+50EE	# <cjk>
+0x994A	U+50F9	# <cjk>
+0x994B	U+50F5	# <cjk>
+0x994C	U+5109	# <cjk>
+0x994D	U+5101	# <cjk>
+0x994E	U+5102	# <cjk>
+0x994F	U+5116	# <cjk>
+0x9950	U+5115	# <cjk>
+0x9951	U+5114	# <cjk>
+0x9952	U+511A	# <cjk>
+0x9953	U+5121	# <cjk>
+0x9954	U+513A	# <cjk>
+0x9955	U+5137	# <cjk>
+0x9956	U+513C	# <cjk>
+0x9957	U+513B	# <cjk>
+0x9958	U+513F	# <cjk>
+0x9959	U+5140	# <cjk>
+0x995A	U+5152	# <cjk>
+0x995B	U+514C	# <cjk>
+0x995C	U+5154	# <cjk>
+0x995D	U+5162	# <cjk>
+0x995E	U+7AF8	# <cjk>
+0x995F	U+5169	# <cjk>
+0x9960	U+516A	# <cjk>
+0x9961	U+516E	# <cjk>
+0x9962	U+5180	# <cjk>
+0x9963	U+5182	# <cjk>
+0x9964	U+56D8	# <cjk>
+0x9965	U+518C	# <cjk>
+0x9966	U+5189	# <cjk>
+0x9967	U+518F	# <cjk>
+0x9968	U+5191	# <cjk>
+0x9969	U+5193	# <cjk>
+0x996A	U+5195	# <cjk>
+0x996B	U+5196	# <cjk>
+0x996C	U+51A4	# <cjk>
+0x996D	U+51A6	# <cjk>
+0x996E	U+51A2	# <cjk>
+0x996F	U+51A9	# <cjk>
+0x9970	U+51AA	# <cjk>
+0x9971	U+51AB	# <cjk>
+0x9972	U+51B3	# <cjk>
+0x9973	U+51B1	# <cjk>
+0x9974	U+51B2	# <cjk>
+0x9975	U+51B0	# <cjk>
+0x9976	U+51B5	# <cjk>
+0x9977	U+51BD	# <cjk>
+0x9978	U+51C5	# <cjk>
+0x9979	U+51C9	# <cjk>
+0x997A	U+51DB	# <cjk>
+0x997B	U+51E0	# <cjk>
+0x997C	U+8655	# <cjk>
+0x997D	U+51E9	# <cjk>
+0x997E	U+51ED	# <cjk>
+0x9980	U+51F0	# <cjk>
+0x9981	U+51F5	# <cjk>
+0x9982	U+51FE	# <cjk>
+0x9983	U+5204	# <cjk>
+0x9984	U+520B	# <cjk>
+0x9985	U+5214	# <cjk>
+0x9986	U+520E	# <cjk>
+0x9987	U+5227	# <cjk>
+0x9988	U+522A	# <cjk>
+0x9989	U+522E	# <cjk>
+0x998A	U+5233	# <cjk>
+0x998B	U+5239	# <cjk>
+0x998C	U+524F	# <cjk>
+0x998D	U+5244	# <cjk>
+0x998E	U+524B	# <cjk>
+0x998F	U+524C	# <cjk>
+0x9990	U+525E	# <cjk>
+0x9991	U+5254	# <cjk>
+0x9992	U+526A	# <cjk>
+0x9993	U+5274	# <cjk>
+0x9994	U+5269	# <cjk>
+0x9995	U+5273	# <cjk>
+0x9996	U+527F	# <cjk>
+0x9997	U+527D	# <cjk>
+0x9998	U+528D	# <cjk>
+0x9999	U+5294	# <cjk>
+0x999A	U+5292	# <cjk>
+0x999B	U+5271	# <cjk>
+0x999C	U+5288	# <cjk>
+0x999D	U+5291	# <cjk>
+0x999E	U+8FA8	# <cjk>
+0x999F	U+8FA7	# <cjk>
+0x99A0	U+52AC	# <cjk>
+0x99A1	U+52AD	# <cjk>
+0x99A2	U+52BC	# <cjk>
+0x99A3	U+52B5	# <cjk>
+0x99A4	U+52C1	# <cjk>
+0x99A5	U+52CD	# <cjk>
+0x99A6	U+52D7	# <cjk>
+0x99A7	U+52DE	# <cjk>
+0x99A8	U+52E3	# <cjk>
+0x99A9	U+52E6	# <cjk>
+0x99AA	U+98ED	# <cjk>
+0x99AB	U+52E0	# <cjk>
+0x99AC	U+52F3	# <cjk>
+0x99AD	U+52F5	# <cjk>
+0x99AE	U+52F8	# <cjk>
+0x99AF	U+52F9	# <cjk>
+0x99B0	U+5306	# <cjk>
+0x99B1	U+5308	# <cjk>
+0x99B2	U+7538	# <cjk>
+0x99B3	U+530D	# <cjk>
+0x99B4	U+5310	# <cjk>
+0x99B5	U+530F	# <cjk>
+0x99B6	U+5315	# <cjk>
+0x99B7	U+531A	# <cjk>
+0x99B8	U+5323	# <cjk>
+0x99B9	U+532F	# <cjk>
+0x99BA	U+5331	# <cjk>
+0x99BB	U+5333	# <cjk>
+0x99BC	U+5338	# <cjk>
+0x99BD	U+5340	# <cjk>
+0x99BE	U+5346	# <cjk>
+0x99BF	U+5345	# <cjk>
+0x99C0	U+4E17	# <cjk>
+0x99C1	U+5349	# <cjk>
+0x99C2	U+534D	# <cjk>
+0x99C3	U+51D6	# <cjk>
+0x99C4	U+535E	# <cjk>
+0x99C5	U+5369	# <cjk>
+0x99C6	U+536E	# <cjk>
+0x99C7	U+5918	# <cjk>
+0x99C8	U+537B	# <cjk>
+0x99C9	U+5377	# <cjk>
+0x99CA	U+5382	# <cjk>
+0x99CB	U+5396	# <cjk>
+0x99CC	U+53A0	# <cjk>
+0x99CD	U+53A6	# <cjk>
+0x99CE	U+53A5	# <cjk>
+0x99CF	U+53AE	# <cjk>
+0x99D0	U+53B0	# <cjk>
+0x99D1	U+53B6	# <cjk>
+0x99D2	U+53C3	# <cjk>
+0x99D3	U+7C12	# <cjk>
+0x99D4	U+96D9	# <cjk>
+0x99D5	U+53DF	# <cjk>
+0x99D6	U+66FC	# <cjk>
+0x99D7	U+71EE	# <cjk>
+0x99D8	U+53EE	# <cjk>
+0x99D9	U+53E8	# <cjk>
+0x99DA	U+53ED	# <cjk>
+0x99DB	U+53FA	# <cjk>
+0x99DC	U+5401	# <cjk>
+0x99DD	U+543D	# <cjk>
+0x99DE	U+5440	# <cjk>
+0x99DF	U+542C	# <cjk>
+0x99E0	U+542D	# <cjk>
+0x99E1	U+543C	# <cjk>
+0x99E2	U+542E	# <cjk>
+0x99E3	U+5436	# <cjk>
+0x99E4	U+5429	# <cjk>
+0x99E5	U+541D	# <cjk>
+0x99E6	U+544E	# <cjk>
+0x99E7	U+548F	# <cjk>
+0x99E8	U+5475	# <cjk>
+0x99E9	U+548E	# <cjk>
+0x99EA	U+545F	# <cjk>
+0x99EB	U+5471	# <cjk>
+0x99EC	U+5477	# <cjk>
+0x99ED	U+5470	# <cjk>
+0x99EE	U+5492	# <cjk>
+0x99EF	U+547B	# <cjk>
+0x99F0	U+5480	# <cjk>
+0x99F1	U+5476	# <cjk>
+0x99F2	U+5484	# <cjk>
+0x99F3	U+5490	# <cjk>
+0x99F4	U+5486	# <cjk>
+0x99F5	U+54C7	# <cjk>
+0x99F6	U+54A2	# <cjk>
+0x99F7	U+54B8	# <cjk>
+0x99F8	U+54A5	# <cjk>
+0x99F9	U+54AC	# <cjk>
+0x99FA	U+54C4	# <cjk>
+0x99FB	U+54C8	# <cjk>
+0x99FC	U+54A8	# <cjk>
+0x9A40	U+54AB	# <cjk>
+0x9A41	U+54C2	# <cjk>
+0x9A42	U+54A4	# <cjk>
+0x9A43	U+54BE	# <cjk>
+0x9A44	U+54BC	# <cjk>
+0x9A45	U+54D8	# <cjk>
+0x9A46	U+54E5	# <cjk>
+0x9A47	U+54E6	# <cjk>
+0x9A48	U+550F	# <cjk>
+0x9A49	U+5514	# <cjk>
+0x9A4A	U+54FD	# <cjk>
+0x9A4B	U+54EE	# <cjk>
+0x9A4C	U+54ED	# <cjk>
+0x9A4D	U+54FA	# <cjk>
+0x9A4E	U+54E2	# <cjk>
+0x9A4F	U+5539	# <cjk>
+0x9A50	U+5540	# <cjk>
+0x9A51	U+5563	# <cjk>
+0x9A52	U+554C	# <cjk>
+0x9A53	U+552E	# <cjk>
+0x9A54	U+555C	# <cjk>
+0x9A55	U+5545	# <cjk>
+0x9A56	U+5556	# <cjk>
+0x9A57	U+5557	# <cjk>
+0x9A58	U+5538	# <cjk>
+0x9A59	U+5533	# <cjk>
+0x9A5A	U+555D	# <cjk>
+0x9A5B	U+5599	# <cjk>
+0x9A5C	U+5580	# <cjk>
+0x9A5D	U+54AF	# <cjk>
+0x9A5E	U+558A	# <cjk>
+0x9A5F	U+559F	# <cjk>
+0x9A60	U+557B	# <cjk>
+0x9A61	U+557E	# <cjk>
+0x9A62	U+5598	# <cjk>
+0x9A63	U+559E	# <cjk>
+0x9A64	U+55AE	# <cjk>
+0x9A65	U+557C	# <cjk>
+0x9A66	U+5583	# <cjk>
+0x9A67	U+55A9	# <cjk>
+0x9A68	U+5587	# <cjk>
+0x9A69	U+55A8	# <cjk>
+0x9A6A	U+55DA	# <cjk>
+0x9A6B	U+55C5	# <cjk>
+0x9A6C	U+55DF	# <cjk>
+0x9A6D	U+55C4	# <cjk>
+0x9A6E	U+55DC	# <cjk>
+0x9A6F	U+55E4	# <cjk>
+0x9A70	U+55D4	# <cjk>
+0x9A71	U+5614	# <cjk>
+0x9A72	U+55F7	# <cjk>
+0x9A73	U+5616	# <cjk>
+0x9A74	U+55FE	# <cjk>
+0x9A75	U+55FD	# <cjk>
+0x9A76	U+561B	# <cjk>
+0x9A77	U+55F9	# <cjk>
+0x9A78	U+564E	# <cjk>
+0x9A79	U+5650	# <cjk>
+0x9A7A	U+71DF	# <cjk>
+0x9A7B	U+5634	# <cjk>
+0x9A7C	U+5636	# <cjk>
+0x9A7D	U+5632	# <cjk>
+0x9A7E	U+5638	# <cjk>
+0x9A80	U+566B	# <cjk>
+0x9A81	U+5664	# <cjk>
+0x9A82	U+562F	# <cjk>
+0x9A83	U+566C	# <cjk>
+0x9A84	U+566A	# <cjk>
+0x9A85	U+5686	# <cjk>
+0x9A86	U+5680	# <cjk>
+0x9A87	U+568A	# <cjk>
+0x9A88	U+56A0	# <cjk>
+0x9A89	U+5694	# <cjk>
+0x9A8A	U+568F	# <cjk>
+0x9A8B	U+56A5	# <cjk>
+0x9A8C	U+56AE	# <cjk>
+0x9A8D	U+56B6	# <cjk>
+0x9A8E	U+56B4	# <cjk>
+0x9A8F	U+56C2	# <cjk>
+0x9A90	U+56BC	# <cjk>
+0x9A91	U+56C1	# <cjk>
+0x9A92	U+56C3	# <cjk>
+0x9A93	U+56C0	# <cjk>
+0x9A94	U+56C8	# <cjk>
+0x9A95	U+56CE	# <cjk>
+0x9A96	U+56D1	# <cjk>
+0x9A97	U+56D3	# <cjk>
+0x9A98	U+56D7	# <cjk>
+0x9A99	U+56EE	# <cjk>
+0x9A9A	U+56F9	# <cjk>
+0x9A9B	U+5700	# <cjk>
+0x9A9C	U+56FF	# <cjk>
+0x9A9D	U+5704	# <cjk>
+0x9A9E	U+5709	# <cjk>
+0x9A9F	U+5708	# <cjk>
+0x9AA0	U+570B	# <cjk>
+0x9AA1	U+570D	# <cjk>
+0x9AA2	U+5713	# <cjk>
+0x9AA3	U+5718	# <cjk>
+0x9AA4	U+5716	# <cjk>
+0x9AA5	U+55C7	# <cjk>
+0x9AA6	U+571C	# <cjk>
+0x9AA7	U+5726	# <cjk>
+0x9AA8	U+5737	# <cjk>
+0x9AA9	U+5738	# <cjk>
+0x9AAA	U+574E	# <cjk>
+0x9AAB	U+573B	# <cjk>
+0x9AAC	U+5740	# <cjk>
+0x9AAD	U+574F	# <cjk>
+0x9AAE	U+5769	# <cjk>
+0x9AAF	U+57C0	# <cjk>
+0x9AB0	U+5788	# <cjk>
+0x9AB1	U+5761	# <cjk>
+0x9AB2	U+577F	# <cjk>
+0x9AB3	U+5789	# <cjk>
+0x9AB4	U+5793	# <cjk>
+0x9AB5	U+57A0	# <cjk>
+0x9AB6	U+57B3	# <cjk>
+0x9AB7	U+57A4	# <cjk>
+0x9AB8	U+57AA	# <cjk>
+0x9AB9	U+57B0	# <cjk>
+0x9ABA	U+57C3	# <cjk>
+0x9ABB	U+57C6	# <cjk>
+0x9ABC	U+57D4	# <cjk>
+0x9ABD	U+57D2	# <cjk>
+0x9ABE	U+57D3	# <cjk>
+0x9ABF	U+580A	# <cjk>
+0x9AC0	U+57D6	# <cjk>
+0x9AC1	U+57E3	# <cjk>
+0x9AC2	U+580B	# <cjk>
+0x9AC3	U+5819	# <cjk>
+0x9AC4	U+581D	# <cjk>
+0x9AC5	U+5872	# <cjk>
+0x9AC6	U+5821	# <cjk>
+0x9AC7	U+5862	# <cjk>
+0x9AC8	U+584B	# <cjk>
+0x9AC9	U+5870	# <cjk>
+0x9ACA	U+6BC0	# <cjk>
+0x9ACB	U+5852	# <cjk>
+0x9ACC	U+583D	# <cjk>
+0x9ACD	U+5879	# <cjk>
+0x9ACE	U+5885	# <cjk>
+0x9ACF	U+58B9	# <cjk>
+0x9AD0	U+589F	# <cjk>
+0x9AD1	U+58AB	# <cjk>
+0x9AD2	U+58BA	# <cjk>
+0x9AD3	U+58DE	# <cjk>
+0x9AD4	U+58BB	# <cjk>
+0x9AD5	U+58B8	# <cjk>
+0x9AD6	U+58AE	# <cjk>
+0x9AD7	U+58C5	# <cjk>
+0x9AD8	U+58D3	# <cjk>
+0x9AD9	U+58D1	# <cjk>
+0x9ADA	U+58D7	# <cjk>
+0x9ADB	U+58D9	# <cjk>
+0x9ADC	U+58D8	# <cjk>
+0x9ADD	U+58E5	# <cjk>
+0x9ADE	U+58DC	# <cjk>
+0x9ADF	U+58E4	# <cjk>
+0x9AE0	U+58DF	# <cjk>
+0x9AE1	U+58EF	# <cjk>
+0x9AE2	U+58FA	# <cjk>
+0x9AE3	U+58F9	# <cjk>
+0x9AE4	U+58FB	# <cjk>
+0x9AE5	U+58FC	# <cjk>
+0x9AE6	U+58FD	# <cjk>
+0x9AE7	U+5902	# <cjk>
+0x9AE8	U+590A	# <cjk>
+0x9AE9	U+5910	# <cjk>
+0x9AEA	U+591B	# <cjk>
+0x9AEB	U+68A6	# <cjk>
+0x9AEC	U+5925	# <cjk>
+0x9AED	U+592C	# <cjk>
+0x9AEE	U+592D	# <cjk>
+0x9AEF	U+5932	# <cjk>
+0x9AF0	U+5938	# <cjk>
+0x9AF1	U+593E	# <cjk>
+0x9AF2	U+7AD2	# <cjk>
+0x9AF3	U+5955	# <cjk>
+0x9AF4	U+5950	# <cjk>
+0x9AF5	U+594E	# <cjk>
+0x9AF6	U+595A	# <cjk>
+0x9AF7	U+5958	# <cjk>
+0x9AF8	U+5962	# <cjk>
+0x9AF9	U+5960	# <cjk>
+0x9AFA	U+5967	# <cjk>
+0x9AFB	U+596C	# <cjk>
+0x9AFC	U+5969	# <cjk>
+0x9B40	U+5978	# <cjk>
+0x9B41	U+5981	# <cjk>
+0x9B42	U+599D	# <cjk>
+0x9B43	U+4F5E	# <cjk>
+0x9B44	U+4FAB	# <cjk>
+0x9B45	U+59A3	# <cjk>
+0x9B46	U+59B2	# <cjk>
+0x9B47	U+59C6	# <cjk>
+0x9B48	U+59E8	# <cjk>
+0x9B49	U+59DC	# <cjk>
+0x9B4A	U+598D	# <cjk>
+0x9B4B	U+59D9	# <cjk>
+0x9B4C	U+59DA	# <cjk>
+0x9B4D	U+5A25	# <cjk>
+0x9B4E	U+5A1F	# <cjk>
+0x9B4F	U+5A11	# <cjk>
+0x9B50	U+5A1C	# <cjk>
+0x9B51	U+5A09	# <cjk>
+0x9B52	U+5A1A	# <cjk>
+0x9B53	U+5A40	# <cjk>
+0x9B54	U+5A6C	# <cjk>
+0x9B55	U+5A49	# <cjk>
+0x9B56	U+5A35	# <cjk>
+0x9B57	U+5A36	# <cjk>
+0x9B58	U+5A62	# <cjk>
+0x9B59	U+5A6A	# <cjk>
+0x9B5A	U+5A9A	# <cjk>
+0x9B5B	U+5ABC	# <cjk>
+0x9B5C	U+5ABE	# <cjk>
+0x9B5D	U+5ACB	# <cjk>
+0x9B5E	U+5AC2	# <cjk>
+0x9B5F	U+5ABD	# <cjk>
+0x9B60	U+5AE3	# <cjk>
+0x9B61	U+5AD7	# <cjk>
+0x9B62	U+5AE6	# <cjk>
+0x9B63	U+5AE9	# <cjk>
+0x9B64	U+5AD6	# <cjk>
+0x9B65	U+5AFA	# <cjk>
+0x9B66	U+5AFB	# <cjk>
+0x9B67	U+5B0C	# <cjk>
+0x9B68	U+5B0B	# <cjk>
+0x9B69	U+5B16	# <cjk>
+0x9B6A	U+5B32	# <cjk>
+0x9B6B	U+5AD0	# <cjk>
+0x9B6C	U+5B2A	# <cjk>
+0x9B6D	U+5B36	# <cjk>
+0x9B6E	U+5B3E	# <cjk>
+0x9B6F	U+5B43	# <cjk>
+0x9B70	U+5B45	# <cjk>
+0x9B71	U+5B40	# <cjk>
+0x9B72	U+5B51	# <cjk>
+0x9B73	U+5B55	# <cjk>
+0x9B74	U+5B5A	# <cjk>
+0x9B75	U+5B5B	# <cjk>
+0x9B76	U+5B65	# <cjk>
+0x9B77	U+5B69	# <cjk>
+0x9B78	U+5B70	# <cjk>
+0x9B79	U+5B73	# <cjk>
+0x9B7A	U+5B75	# <cjk>
+0x9B7B	U+5B78	# <cjk>
+0x9B7C	U+6588	# <cjk>
+0x9B7D	U+5B7A	# <cjk>
+0x9B7E	U+5B80	# <cjk>
+0x9B80	U+5B83	# <cjk>
+0x9B81	U+5BA6	# <cjk>
+0x9B82	U+5BB8	# <cjk>
+0x9B83	U+5BC3	# <cjk>
+0x9B84	U+5BC7	# <cjk>
+0x9B85	U+5BC9	# <cjk>
+0x9B86	U+5BD4	# <cjk>
+0x9B87	U+5BD0	# <cjk>
+0x9B88	U+5BE4	# <cjk>
+0x9B89	U+5BE6	# <cjk>
+0x9B8A	U+5BE2	# <cjk>
+0x9B8B	U+5BDE	# <cjk>
+0x9B8C	U+5BE5	# <cjk>
+0x9B8D	U+5BEB	# <cjk>
+0x9B8E	U+5BF0	# <cjk>
+0x9B8F	U+5BF6	# <cjk>
+0x9B90	U+5BF3	# <cjk>
+0x9B91	U+5C05	# <cjk>
+0x9B92	U+5C07	# <cjk>
+0x9B93	U+5C08	# <cjk>
+0x9B94	U+5C0D	# <cjk>
+0x9B95	U+5C13	# <cjk>
+0x9B96	U+5C20	# <cjk>
+0x9B97	U+5C22	# <cjk>
+0x9B98	U+5C28	# <cjk>
+0x9B99	U+5C38	# <cjk>
+0x9B9A	U+5C39	# <cjk>
+0x9B9B	U+5C41	# <cjk>
+0x9B9C	U+5C46	# <cjk>
+0x9B9D	U+5C4E	# <cjk>
+0x9B9E	U+5C53	# <cjk>
+0x9B9F	U+5C50	# <cjk>
+0x9BA0	U+5C4F	# <cjk>
+0x9BA1	U+5B71	# <cjk>
+0x9BA2	U+5C6C	# <cjk>
+0x9BA3	U+5C6E	# <cjk>
+0x9BA4	U+4E62	# <cjk>
+0x9BA5	U+5C76	# <cjk>
+0x9BA6	U+5C79	# <cjk>
+0x9BA7	U+5C8C	# <cjk>
+0x9BA8	U+5C91	# <cjk>
+0x9BA9	U+5C94	# <cjk>
+0x9BAA	U+599B	# <cjk>
+0x9BAB	U+5CAB	# <cjk>
+0x9BAC	U+5CBB	# <cjk>
+0x9BAD	U+5CB6	# <cjk>
+0x9BAE	U+5CBC	# <cjk>
+0x9BAF	U+5CB7	# <cjk>
+0x9BB0	U+5CC5	# <cjk>
+0x9BB1	U+5CBE	# <cjk>
+0x9BB2	U+5CC7	# <cjk>
+0x9BB3	U+5CD9	# <cjk>
+0x9BB4	U+5CE9	# <cjk>
+0x9BB5	U+5CFD	# <cjk>
+0x9BB6	U+5CFA	# <cjk>
+0x9BB7	U+5CED	# <cjk>
+0x9BB8	U+5D8C	# <cjk>
+0x9BB9	U+5CEA	# <cjk>
+0x9BBA	U+5D0B	# <cjk>
+0x9BBB	U+5D15	# <cjk>
+0x9BBC	U+5D17	# <cjk>
+0x9BBD	U+5D5C	# <cjk>
+0x9BBE	U+5D1F	# <cjk>
+0x9BBF	U+5D1B	# <cjk>
+0x9BC0	U+5D11	# <cjk>
+0x9BC1	U+5D14	# <cjk>
+0x9BC2	U+5D22	# <cjk>
+0x9BC3	U+5D1A	# <cjk>
+0x9BC4	U+5D19	# <cjk>
+0x9BC5	U+5D18	# <cjk>
+0x9BC6	U+5D4C	# <cjk>
+0x9BC7	U+5D52	# <cjk>
+0x9BC8	U+5D4E	# <cjk>
+0x9BC9	U+5D4B	# <cjk>
+0x9BCA	U+5D6C	# <cjk>
+0x9BCB	U+5D73	# <cjk>
+0x9BCC	U+5D76	# <cjk>
+0x9BCD	U+5D87	# <cjk>
+0x9BCE	U+5D84	# <cjk>
+0x9BCF	U+5D82	# <cjk>
+0x9BD0	U+5DA2	# <cjk>
+0x9BD1	U+5D9D	# <cjk>
+0x9BD2	U+5DAC	# <cjk>
+0x9BD3	U+5DAE	# <cjk>
+0x9BD4	U+5DBD	# <cjk>
+0x9BD5	U+5D90	# <cjk>
+0x9BD6	U+5DB7	# <cjk>
+0x9BD7	U+5DBC	# <cjk>
+0x9BD8	U+5DC9	# <cjk>
+0x9BD9	U+5DCD	# <cjk>
+0x9BDA	U+5DD3	# <cjk>
+0x9BDB	U+5DD2	# <cjk>
+0x9BDC	U+5DD6	# <cjk>
+0x9BDD	U+5DDB	# <cjk>
+0x9BDE	U+5DEB	# <cjk>
+0x9BDF	U+5DF2	# <cjk>
+0x9BE0	U+5DF5	# <cjk>
+0x9BE1	U+5E0B	# <cjk>
+0x9BE2	U+5E1A	# <cjk>
+0x9BE3	U+5E19	# <cjk>
+0x9BE4	U+5E11	# <cjk>
+0x9BE5	U+5E1B	# <cjk>
+0x9BE6	U+5E36	# <cjk>
+0x9BE7	U+5E37	# <cjk>
+0x9BE8	U+5E44	# <cjk>
+0x9BE9	U+5E43	# <cjk>
+0x9BEA	U+5E40	# <cjk>
+0x9BEB	U+5E4E	# <cjk>
+0x9BEC	U+5E57	# <cjk>
+0x9BED	U+5E54	# <cjk>
+0x9BEE	U+5E5F	# <cjk>
+0x9BEF	U+5E62	# <cjk>
+0x9BF0	U+5E64	# <cjk>
+0x9BF1	U+5E47	# <cjk>
+0x9BF2	U+5E75	# <cjk>
+0x9BF3	U+5E76	# <cjk>
+0x9BF4	U+5E7A	# <cjk>
+0x9BF5	U+9EBC	# <cjk>
+0x9BF6	U+5E7F	# <cjk>
+0x9BF7	U+5EA0	# <cjk>
+0x9BF8	U+5EC1	# <cjk>
+0x9BF9	U+5EC2	# <cjk>
+0x9BFA	U+5EC8	# <cjk>
+0x9BFB	U+5ED0	# <cjk>
+0x9BFC	U+5ECF	# <cjk>
+0x9C40	U+5ED6	# <cjk>
+0x9C41	U+5EE3	# <cjk>
+0x9C42	U+5EDD	# <cjk>
+0x9C43	U+5EDA	# <cjk>
+0x9C44	U+5EDB	# <cjk>
+0x9C45	U+5EE2	# <cjk>
+0x9C46	U+5EE1	# <cjk>
+0x9C47	U+5EE8	# <cjk>
+0x9C48	U+5EE9	# <cjk>
+0x9C49	U+5EEC	# <cjk>
+0x9C4A	U+5EF1	# <cjk>
+0x9C4B	U+5EF3	# <cjk>
+0x9C4C	U+5EF0	# <cjk>
+0x9C4D	U+5EF4	# <cjk>
+0x9C4E	U+5EF8	# <cjk>
+0x9C4F	U+5EFE	# <cjk>
+0x9C50	U+5F03	# <cjk>
+0x9C51	U+5F09	# <cjk>
+0x9C52	U+5F5D	# <cjk>
+0x9C53	U+5F5C	# <cjk>
+0x9C54	U+5F0B	# <cjk>
+0x9C55	U+5F11	# <cjk>
+0x9C56	U+5F16	# <cjk>
+0x9C57	U+5F29	# <cjk>
+0x9C58	U+5F2D	# <cjk>
+0x9C59	U+5F38	# <cjk>
+0x9C5A	U+5F41	# <cjk>
+0x9C5B	U+5F48	# <cjk>
+0x9C5C	U+5F4C	# <cjk>
+0x9C5D	U+5F4E	# <cjk>
+0x9C5E	U+5F2F	# <cjk>
+0x9C5F	U+5F51	# <cjk>
+0x9C60	U+5F56	# <cjk>
+0x9C61	U+5F57	# <cjk>
+0x9C62	U+5F59	# <cjk>
+0x9C63	U+5F61	# <cjk>
+0x9C64	U+5F6D	# <cjk>
+0x9C65	U+5F73	# <cjk>
+0x9C66	U+5F77	# <cjk>
+0x9C67	U+5F83	# <cjk>
+0x9C68	U+5F82	# <cjk>
+0x9C69	U+5F7F	# <cjk>
+0x9C6A	U+5F8A	# <cjk>
+0x9C6B	U+5F88	# <cjk>
+0x9C6C	U+5F91	# <cjk>
+0x9C6D	U+5F87	# <cjk>
+0x9C6E	U+5F9E	# <cjk>
+0x9C6F	U+5F99	# <cjk>
+0x9C70	U+5F98	# <cjk>
+0x9C71	U+5FA0	# <cjk>
+0x9C72	U+5FA8	# <cjk>
+0x9C73	U+5FAD	# <cjk>
+0x9C74	U+5FBC	# <cjk>
+0x9C75	U+5FD6	# <cjk>
+0x9C76	U+5FFB	# <cjk>
+0x9C77	U+5FE4	# <cjk>
+0x9C78	U+5FF8	# <cjk>
+0x9C79	U+5FF1	# <cjk>
+0x9C7A	U+5FDD	# <cjk>
+0x9C7B	U+60B3	# <cjk>
+0x9C7C	U+5FFF	# <cjk>
+0x9C7D	U+6021	# <cjk>
+0x9C7E	U+6060	# <cjk>
+0x9C80	U+6019	# <cjk>
+0x9C81	U+6010	# <cjk>
+0x9C82	U+6029	# <cjk>
+0x9C83	U+600E	# <cjk>
+0x9C84	U+6031	# <cjk>
+0x9C85	U+601B	# <cjk>
+0x9C86	U+6015	# <cjk>
+0x9C87	U+602B	# <cjk>
+0x9C88	U+6026	# <cjk>
+0x9C89	U+600F	# <cjk>
+0x9C8A	U+603A	# <cjk>
+0x9C8B	U+605A	# <cjk>
+0x9C8C	U+6041	# <cjk>
+0x9C8D	U+606A	# <cjk>
+0x9C8E	U+6077	# <cjk>
+0x9C8F	U+605F	# <cjk>
+0x9C90	U+604A	# <cjk>
+0x9C91	U+6046	# <cjk>
+0x9C92	U+604D	# <cjk>
+0x9C93	U+6063	# <cjk>
+0x9C94	U+6043	# <cjk>
+0x9C95	U+6064	# <cjk>
+0x9C96	U+6042	# <cjk>
+0x9C97	U+606C	# <cjk>
+0x9C98	U+606B	# <cjk>
+0x9C99	U+6059	# <cjk>
+0x9C9A	U+6081	# <cjk>
+0x9C9B	U+608D	# <cjk>
+0x9C9C	U+60E7	# <cjk>
+0x9C9D	U+6083	# <cjk>
+0x9C9E	U+609A	# <cjk>
+0x9C9F	U+6084	# <cjk>
+0x9CA0	U+609B	# <cjk>
+0x9CA1	U+6096	# <cjk>
+0x9CA2	U+6097	# <cjk>
+0x9CA3	U+6092	# <cjk>
+0x9CA4	U+60A7	# <cjk>
+0x9CA5	U+608B	# <cjk>
+0x9CA6	U+60E1	# <cjk>
+0x9CA7	U+60B8	# <cjk>
+0x9CA8	U+60E0	# <cjk>
+0x9CA9	U+60D3	# <cjk>
+0x9CAA	U+60B4	# <cjk>
+0x9CAB	U+5FF0	# <cjk>
+0x9CAC	U+60BD	# <cjk>
+0x9CAD	U+60C6	# <cjk>
+0x9CAE	U+60B5	# <cjk>
+0x9CAF	U+60D8	# <cjk>
+0x9CB0	U+614D	# <cjk>
+0x9CB1	U+6115	# <cjk>
+0x9CB2	U+6106	# <cjk>
+0x9CB3	U+60F6	# <cjk>
+0x9CB4	U+60F7	# <cjk>
+0x9CB5	U+6100	# <cjk>
+0x9CB6	U+60F4	# <cjk>
+0x9CB7	U+60FA	# <cjk>
+0x9CB8	U+6103	# <cjk>
+0x9CB9	U+6121	# <cjk>
+0x9CBA	U+60FB	# <cjk>
+0x9CBB	U+60F1	# <cjk>
+0x9CBC	U+610D	# <cjk>
+0x9CBD	U+610E	# <cjk>
+0x9CBE	U+6147	# <cjk>
+0x9CBF	U+613E	# <cjk>
+0x9CC0	U+6128	# <cjk>
+0x9CC1	U+6127	# <cjk>
+0x9CC2	U+614A	# <cjk>
+0x9CC3	U+613F	# <cjk>
+0x9CC4	U+613C	# <cjk>
+0x9CC5	U+612C	# <cjk>
+0x9CC6	U+6134	# <cjk>
+0x9CC7	U+613D	# <cjk>
+0x9CC8	U+6142	# <cjk>
+0x9CC9	U+6144	# <cjk>
+0x9CCA	U+6173	# <cjk>
+0x9CCB	U+6177	# <cjk>
+0x9CCC	U+6158	# <cjk>
+0x9CCD	U+6159	# <cjk>
+0x9CCE	U+615A	# <cjk>
+0x9CCF	U+616B	# <cjk>
+0x9CD0	U+6174	# <cjk>
+0x9CD1	U+616F	# <cjk>
+0x9CD2	U+6165	# <cjk>
+0x9CD3	U+6171	# <cjk>
+0x9CD4	U+615F	# <cjk>
+0x9CD5	U+615D	# <cjk>
+0x9CD6	U+6153	# <cjk>
+0x9CD7	U+6175	# <cjk>
+0x9CD8	U+6199	# <cjk>
+0x9CD9	U+6196	# <cjk>
+0x9CDA	U+6187	# <cjk>
+0x9CDB	U+61AC	# <cjk>
+0x9CDC	U+6194	# <cjk>
+0x9CDD	U+619A	# <cjk>
+0x9CDE	U+618A	# <cjk>
+0x9CDF	U+6191	# <cjk>
+0x9CE0	U+61AB	# <cjk>
+0x9CE1	U+61AE	# <cjk>
+0x9CE2	U+61CC	# <cjk>
+0x9CE3	U+61CA	# <cjk>
+0x9CE4	U+61C9	# <cjk>
+0x9CE5	U+61F7	# <cjk>
+0x9CE6	U+61C8	# <cjk>
+0x9CE7	U+61C3	# <cjk>
+0x9CE8	U+61C6	# <cjk>
+0x9CE9	U+61BA	# <cjk>
+0x9CEA	U+61CB	# <cjk>
+0x9CEB	U+7F79	# <cjk>
+0x9CEC	U+61CD	# <cjk>
+0x9CED	U+61E6	# <cjk>
+0x9CEE	U+61E3	# <cjk>
+0x9CEF	U+61F6	# <cjk>
+0x9CF0	U+61FA	# <cjk>
+0x9CF1	U+61F4	# <cjk>
+0x9CF2	U+61FF	# <cjk>
+0x9CF3	U+61FD	# <cjk>
+0x9CF4	U+61FC	# <cjk>
+0x9CF5	U+61FE	# <cjk>
+0x9CF6	U+6200	# <cjk>
+0x9CF7	U+6208	# <cjk>
+0x9CF8	U+6209	# <cjk>
+0x9CF9	U+620D	# <cjk>
+0x9CFA	U+620C	# <cjk>
+0x9CFB	U+6214	# <cjk>
+0x9CFC	U+621B	# <cjk>
+0x9D40	U+621E	# <cjk>
+0x9D41	U+6221	# <cjk>
+0x9D42	U+622A	# <cjk>
+0x9D43	U+622E	# <cjk>
+0x9D44	U+6230	# <cjk>
+0x9D45	U+6232	# <cjk>
+0x9D46	U+6233	# <cjk>
+0x9D47	U+6241	# <cjk>
+0x9D48	U+624E	# <cjk>
+0x9D49	U+625E	# <cjk>
+0x9D4A	U+6263	# <cjk>
+0x9D4B	U+625B	# <cjk>
+0x9D4C	U+6260	# <cjk>
+0x9D4D	U+6268	# <cjk>
+0x9D4E	U+627C	# <cjk>
+0x9D4F	U+6282	# <cjk>
+0x9D50	U+6289	# <cjk>
+0x9D51	U+627E	# <cjk>
+0x9D52	U+6292	# <cjk>
+0x9D53	U+6293	# <cjk>
+0x9D54	U+6296	# <cjk>
+0x9D55	U+62D4	# <cjk>
+0x9D56	U+6283	# <cjk>
+0x9D57	U+6294	# <cjk>
+0x9D58	U+62D7	# <cjk>
+0x9D59	U+62D1	# <cjk>
+0x9D5A	U+62BB	# <cjk>
+0x9D5B	U+62CF	# <cjk>
+0x9D5C	U+62FF	# <cjk>
+0x9D5D	U+62C6	# <cjk>
+0x9D5E	U+64D4	# <cjk>
+0x9D5F	U+62C8	# <cjk>
+0x9D60	U+62DC	# <cjk>
+0x9D61	U+62CC	# <cjk>
+0x9D62	U+62CA	# <cjk>
+0x9D63	U+62C2	# <cjk>
+0x9D64	U+62C7	# <cjk>
+0x9D65	U+629B	# <cjk>
+0x9D66	U+62C9	# <cjk>
+0x9D67	U+630C	# <cjk>
+0x9D68	U+62EE	# <cjk>
+0x9D69	U+62F1	# <cjk>
+0x9D6A	U+6327	# <cjk>
+0x9D6B	U+6302	# <cjk>
+0x9D6C	U+6308	# <cjk>
+0x9D6D	U+62EF	# <cjk>
+0x9D6E	U+62F5	# <cjk>
+0x9D6F	U+6350	# <cjk>
+0x9D70	U+633E	# <cjk>
+0x9D71	U+634D	# <cjk>
+0x9D72	U+641C	# <cjk>
+0x9D73	U+634F	# <cjk>
+0x9D74	U+6396	# <cjk>
+0x9D75	U+638E	# <cjk>
+0x9D76	U+6380	# <cjk>
+0x9D77	U+63AB	# <cjk>
+0x9D78	U+6376	# <cjk>
+0x9D79	U+63A3	# <cjk>
+0x9D7A	U+638F	# <cjk>
+0x9D7B	U+6389	# <cjk>
+0x9D7C	U+639F	# <cjk>
+0x9D7D	U+63B5	# <cjk>
+0x9D7E	U+636B	# <cjk>
+0x9D80	U+6369	# <cjk>
+0x9D81	U+63BE	# <cjk>
+0x9D82	U+63E9	# <cjk>
+0x9D83	U+63C0	# <cjk>
+0x9D84	U+63C6	# <cjk>
+0x9D85	U+63E3	# <cjk>
+0x9D86	U+63C9	# <cjk>
+0x9D87	U+63D2	# <cjk>
+0x9D88	U+63F6	# <cjk>
+0x9D89	U+63C4	# <cjk>
+0x9D8A	U+6416	# <cjk>
+0x9D8B	U+6434	# <cjk>
+0x9D8C	U+6406	# <cjk>
+0x9D8D	U+6413	# <cjk>
+0x9D8E	U+6426	# <cjk>
+0x9D8F	U+6436	# <cjk>
+0x9D90	U+651D	# <cjk>
+0x9D91	U+6417	# <cjk>
+0x9D92	U+6428	# <cjk>
+0x9D93	U+640F	# <cjk>
+0x9D94	U+6467	# <cjk>
+0x9D95	U+646F	# <cjk>
+0x9D96	U+6476	# <cjk>
+0x9D97	U+644E	# <cjk>
+0x9D98	U+652A	# <cjk>
+0x9D99	U+6495	# <cjk>
+0x9D9A	U+6493	# <cjk>
+0x9D9B	U+64A5	# <cjk>
+0x9D9C	U+64A9	# <cjk>
+0x9D9D	U+6488	# <cjk>
+0x9D9E	U+64BC	# <cjk>
+0x9D9F	U+64DA	# <cjk>
+0x9DA0	U+64D2	# <cjk>
+0x9DA1	U+64C5	# <cjk>
+0x9DA2	U+64C7	# <cjk>
+0x9DA3	U+64BB	# <cjk>
+0x9DA4	U+64D8	# <cjk>
+0x9DA5	U+64C2	# <cjk>
+0x9DA6	U+64F1	# <cjk>
+0x9DA7	U+64E7	# <cjk>
+0x9DA8	U+8209	# <cjk>
+0x9DA9	U+64E0	# <cjk>
+0x9DAA	U+64E1	# <cjk>
+0x9DAB	U+62AC	# <cjk>
+0x9DAC	U+64E3	# <cjk>
+0x9DAD	U+64EF	# <cjk>
+0x9DAE	U+652C	# <cjk>
+0x9DAF	U+64F6	# <cjk>
+0x9DB0	U+64F4	# <cjk>
+0x9DB1	U+64F2	# <cjk>
+0x9DB2	U+64FA	# <cjk>
+0x9DB3	U+6500	# <cjk>
+0x9DB4	U+64FD	# <cjk>
+0x9DB5	U+6518	# <cjk>
+0x9DB6	U+651C	# <cjk>
+0x9DB7	U+6505	# <cjk>
+0x9DB8	U+6524	# <cjk>
+0x9DB9	U+6523	# <cjk>
+0x9DBA	U+652B	# <cjk>
+0x9DBB	U+6534	# <cjk>
+0x9DBC	U+6535	# <cjk>
+0x9DBD	U+6537	# <cjk>
+0x9DBE	U+6536	# <cjk>
+0x9DBF	U+6538	# <cjk>
+0x9DC0	U+754B	# <cjk>
+0x9DC1	U+6548	# <cjk>
+0x9DC2	U+6556	# <cjk>
+0x9DC3	U+6555	# <cjk>
+0x9DC4	U+654D	# <cjk>
+0x9DC5	U+6558	# <cjk>
+0x9DC6	U+655E	# <cjk>
+0x9DC7	U+655D	# <cjk>
+0x9DC8	U+6572	# <cjk>
+0x9DC9	U+6578	# <cjk>
+0x9DCA	U+6582	# <cjk>
+0x9DCB	U+6583	# <cjk>
+0x9DCC	U+8B8A	# <cjk>
+0x9DCD	U+659B	# <cjk>
+0x9DCE	U+659F	# <cjk>
+0x9DCF	U+65AB	# <cjk>
+0x9DD0	U+65B7	# <cjk>
+0x9DD1	U+65C3	# <cjk>
+0x9DD2	U+65C6	# <cjk>
+0x9DD3	U+65C1	# <cjk>
+0x9DD4	U+65C4	# <cjk>
+0x9DD5	U+65CC	# <cjk>
+0x9DD6	U+65D2	# <cjk>
+0x9DD7	U+65DB	# <cjk>
+0x9DD8	U+65D9	# <cjk>
+0x9DD9	U+65E0	# <cjk>
+0x9DDA	U+65E1	# <cjk>
+0x9DDB	U+65F1	# <cjk>
+0x9DDC	U+6772	# <cjk>
+0x9DDD	U+660A	# <cjk>
+0x9DDE	U+6603	# <cjk>
+0x9DDF	U+65FB	# <cjk>
+0x9DE0	U+6773	# <cjk>
+0x9DE1	U+6635	# <cjk>
+0x9DE2	U+6636	# <cjk>
+0x9DE3	U+6634	# <cjk>
+0x9DE4	U+661C	# <cjk>
+0x9DE5	U+664F	# <cjk>
+0x9DE6	U+6644	# <cjk>
+0x9DE7	U+6649	# <cjk>
+0x9DE8	U+6641	# <cjk>
+0x9DE9	U+665E	# <cjk>
+0x9DEA	U+665D	# <cjk>
+0x9DEB	U+6664	# <cjk>
+0x9DEC	U+6667	# <cjk>
+0x9DED	U+6668	# <cjk>
+0x9DEE	U+665F	# <cjk>
+0x9DEF	U+6662	# <cjk>
+0x9DF0	U+6670	# <cjk>
+0x9DF1	U+6683	# <cjk>
+0x9DF2	U+6688	# <cjk>
+0x9DF3	U+668E	# <cjk>
+0x9DF4	U+6689	# <cjk>
+0x9DF5	U+6684	# <cjk>
+0x9DF6	U+6698	# <cjk>
+0x9DF7	U+669D	# <cjk>
+0x9DF8	U+66C1	# <cjk>
+0x9DF9	U+66B9	# <cjk>
+0x9DFA	U+66C9	# <cjk>
+0x9DFB	U+66BE	# <cjk>
+0x9DFC	U+66BC	# <cjk>
+0x9E40	U+66C4	# <cjk>
+0x9E41	U+66B8	# <cjk>
+0x9E42	U+66D6	# <cjk>
+0x9E43	U+66DA	# <cjk>
+0x9E44	U+66E0	# <cjk>
+0x9E45	U+663F	# <cjk>
+0x9E46	U+66E6	# <cjk>
+0x9E47	U+66E9	# <cjk>
+0x9E48	U+66F0	# <cjk>
+0x9E49	U+66F5	# <cjk>
+0x9E4A	U+66F7	# <cjk>
+0x9E4B	U+670F	# <cjk>
+0x9E4C	U+6716	# <cjk>
+0x9E4D	U+671E	# <cjk>
+0x9E4E	U+6726	# <cjk>
+0x9E4F	U+6727	# <cjk>
+0x9E50	U+9738	# <cjk>
+0x9E51	U+672E	# <cjk>
+0x9E52	U+673F	# <cjk>
+0x9E53	U+6736	# <cjk>
+0x9E54	U+6741	# <cjk>
+0x9E55	U+6738	# <cjk>
+0x9E56	U+6737	# <cjk>
+0x9E57	U+6746	# <cjk>
+0x9E58	U+675E	# <cjk>
+0x9E59	U+6760	# <cjk>
+0x9E5A	U+6759	# <cjk>
+0x9E5B	U+6763	# <cjk>
+0x9E5C	U+6764	# <cjk>
+0x9E5D	U+6789	# <cjk>
+0x9E5E	U+6770	# <cjk>
+0x9E5F	U+67A9	# <cjk>
+0x9E60	U+677C	# <cjk>
+0x9E61	U+676A	# <cjk>
+0x9E62	U+678C	# <cjk>
+0x9E63	U+678B	# <cjk>
+0x9E64	U+67A6	# <cjk>
+0x9E65	U+67A1	# <cjk>
+0x9E66	U+6785	# <cjk>
+0x9E67	U+67B7	# <cjk>
+0x9E68	U+67EF	# <cjk>
+0x9E69	U+67B4	# <cjk>
+0x9E6A	U+67EC	# <cjk>
+0x9E6B	U+67B3	# <cjk>
+0x9E6C	U+67E9	# <cjk>
+0x9E6D	U+67B8	# <cjk>
+0x9E6E	U+67E4	# <cjk>
+0x9E6F	U+67DE	# <cjk>
+0x9E70	U+67DD	# <cjk>
+0x9E71	U+67E2	# <cjk>
+0x9E72	U+67EE	# <cjk>
+0x9E73	U+67B9	# <cjk>
+0x9E74	U+67CE	# <cjk>
+0x9E75	U+67C6	# <cjk>
+0x9E76	U+67E7	# <cjk>
+0x9E77	U+6A9C	# <cjk>
+0x9E78	U+681E	# <cjk>
+0x9E79	U+6846	# <cjk>
+0x9E7A	U+6829	# <cjk>
+0x9E7B	U+6840	# <cjk>
+0x9E7C	U+684D	# <cjk>
+0x9E7D	U+6832	# <cjk>
+0x9E7E	U+684E	# <cjk>
+0x9E80	U+68B3	# <cjk>
+0x9E81	U+682B	# <cjk>
+0x9E82	U+6859	# <cjk>
+0x9E83	U+6863	# <cjk>
+0x9E84	U+6877	# <cjk>
+0x9E85	U+687F	# <cjk>
+0x9E86	U+689F	# <cjk>
+0x9E87	U+688F	# <cjk>
+0x9E88	U+68AD	# <cjk>
+0x9E89	U+6894	# <cjk>
+0x9E8A	U+689D	# <cjk>
+0x9E8B	U+689B	# <cjk>
+0x9E8C	U+6883	# <cjk>
+0x9E8D	U+6AAE	# <cjk>
+0x9E8E	U+68B9	# <cjk>
+0x9E8F	U+6874	# <cjk>
+0x9E90	U+68B5	# <cjk>
+0x9E91	U+68A0	# <cjk>
+0x9E92	U+68BA	# <cjk>
+0x9E93	U+690F	# <cjk>
+0x9E94	U+688D	# <cjk>
+0x9E95	U+687E	# <cjk>
+0x9E96	U+6901	# <cjk>
+0x9E97	U+68CA	# <cjk>
+0x9E98	U+6908	# <cjk>
+0x9E99	U+68D8	# <cjk>
+0x9E9A	U+6922	# <cjk>
+0x9E9B	U+6926	# <cjk>
+0x9E9C	U+68E1	# <cjk>
+0x9E9D	U+690C	# <cjk>
+0x9E9E	U+68CD	# <cjk>
+0x9E9F	U+68D4	# <cjk>
+0x9EA0	U+68E7	# <cjk>
+0x9EA1	U+68D5	# <cjk>
+0x9EA2	U+6936	# <cjk>
+0x9EA3	U+6912	# <cjk>
+0x9EA4	U+6904	# <cjk>
+0x9EA5	U+68D7	# <cjk>
+0x9EA6	U+68E3	# <cjk>
+0x9EA7	U+6925	# <cjk>
+0x9EA8	U+68F9	# <cjk>
+0x9EA9	U+68E0	# <cjk>
+0x9EAA	U+68EF	# <cjk>
+0x9EAB	U+6928	# <cjk>
+0x9EAC	U+692A	# <cjk>
+0x9EAD	U+691A	# <cjk>
+0x9EAE	U+6923	# <cjk>
+0x9EAF	U+6921	# <cjk>
+0x9EB0	U+68C6	# <cjk>
+0x9EB1	U+6979	# <cjk>
+0x9EB2	U+6977	# <cjk>
+0x9EB3	U+695C	# <cjk>
+0x9EB4	U+6978	# <cjk>
+0x9EB5	U+696B	# <cjk>
+0x9EB6	U+6954	# <cjk>
+0x9EB7	U+697E	# <cjk>
+0x9EB8	U+696E	# <cjk>
+0x9EB9	U+6939	# <cjk>
+0x9EBA	U+6974	# <cjk>
+0x9EBB	U+693D	# <cjk>
+0x9EBC	U+6959	# <cjk>
+0x9EBD	U+6930	# <cjk>
+0x9EBE	U+6961	# <cjk>
+0x9EBF	U+695E	# <cjk>
+0x9EC0	U+695D	# <cjk>
+0x9EC1	U+6981	# <cjk>
+0x9EC2	U+696A	# <cjk>
+0x9EC3	U+69B2	# <cjk>
+0x9EC4	U+69AE	# <cjk>
+0x9EC5	U+69D0	# <cjk>
+0x9EC6	U+69BF	# <cjk>
+0x9EC7	U+69C1	# <cjk>
+0x9EC8	U+69D3	# <cjk>
+0x9EC9	U+69BE	# <cjk>
+0x9ECA	U+69CE	# <cjk>
+0x9ECB	U+5BE8	# <cjk>
+0x9ECC	U+69CA	# <cjk>
+0x9ECD	U+69DD	# <cjk>
+0x9ECE	U+69BB	# <cjk>
+0x9ECF	U+69C3	# <cjk>
+0x9ED0	U+69A7	# <cjk>
+0x9ED1	U+6A2E	# <cjk>
+0x9ED2	U+6991	# <cjk>
+0x9ED3	U+69A0	# <cjk>
+0x9ED4	U+699C	# <cjk>
+0x9ED5	U+6995	# <cjk>
+0x9ED6	U+69B4	# <cjk>
+0x9ED7	U+69DE	# <cjk>
+0x9ED8	U+69E8	# <cjk>
+0x9ED9	U+6A02	# <cjk>
+0x9EDA	U+6A1B	# <cjk>
+0x9EDB	U+69FF	# <cjk>
+0x9EDC	U+6B0A	# <cjk>
+0x9EDD	U+69F9	# <cjk>
+0x9EDE	U+69F2	# <cjk>
+0x9EDF	U+69E7	# <cjk>
+0x9EE0	U+6A05	# <cjk>
+0x9EE1	U+69B1	# <cjk>
+0x9EE2	U+6A1E	# <cjk>
+0x9EE3	U+69ED	# <cjk>
+0x9EE4	U+6A14	# <cjk>
+0x9EE5	U+69EB	# <cjk>
+0x9EE6	U+6A0A	# <cjk>
+0x9EE7	U+6A12	# <cjk>
+0x9EE8	U+6AC1	# <cjk>
+0x9EE9	U+6A23	# <cjk>
+0x9EEA	U+6A13	# <cjk>
+0x9EEB	U+6A44	# <cjk>
+0x9EEC	U+6A0C	# <cjk>
+0x9EED	U+6A72	# <cjk>
+0x9EEE	U+6A36	# <cjk>
+0x9EEF	U+6A78	# <cjk>
+0x9EF0	U+6A47	# <cjk>
+0x9EF1	U+6A62	# <cjk>
+0x9EF2	U+6A59	# <cjk>
+0x9EF3	U+6A66	# <cjk>
+0x9EF4	U+6A48	# <cjk>
+0x9EF5	U+6A38	# <cjk>
+0x9EF6	U+6A22	# <cjk>
+0x9EF7	U+6A90	# <cjk>
+0x9EF8	U+6A8D	# <cjk>
+0x9EF9	U+6AA0	# <cjk>
+0x9EFA	U+6A84	# <cjk>
+0x9EFB	U+6AA2	# <cjk>
+0x9EFC	U+6AA3	# <cjk>
+0x9F40	U+6A97	# <cjk>
+0x9F41	U+8617	# <cjk>
+0x9F42	U+6ABB	# <cjk>
+0x9F43	U+6AC3	# <cjk>
+0x9F44	U+6AC2	# <cjk>
+0x9F45	U+6AB8	# <cjk>
+0x9F46	U+6AB3	# <cjk>
+0x9F47	U+6AAC	# <cjk>
+0x9F48	U+6ADE	# <cjk>
+0x9F49	U+6AD1	# <cjk>
+0x9F4A	U+6ADF	# <cjk>
+0x9F4B	U+6AAA	# <cjk>
+0x9F4C	U+6ADA	# <cjk>
+0x9F4D	U+6AEA	# <cjk>
+0x9F4E	U+6AFB	# <cjk>
+0x9F4F	U+6B05	# <cjk>
+0x9F50	U+8616	# <cjk>
+0x9F51	U+6AFA	# <cjk>
+0x9F52	U+6B12	# <cjk>
+0x9F53	U+6B16	# <cjk>
+0x9F54	U+9B31	# <cjk>
+0x9F55	U+6B1F	# <cjk>
+0x9F56	U+6B38	# <cjk>
+0x9F57	U+6B37	# <cjk>
+0x9F58	U+76DC	# <cjk>
+0x9F59	U+6B39	# <cjk>
+0x9F5A	U+98EE	# <cjk>
+0x9F5B	U+6B47	# <cjk>
+0x9F5C	U+6B43	# <cjk>
+0x9F5D	U+6B49	# <cjk>
+0x9F5E	U+6B50	# <cjk>
+0x9F5F	U+6B59	# <cjk>
+0x9F60	U+6B54	# <cjk>
+0x9F61	U+6B5B	# <cjk>
+0x9F62	U+6B5F	# <cjk>
+0x9F63	U+6B61	# <cjk>
+0x9F64	U+6B78	# <cjk>
+0x9F65	U+6B79	# <cjk>
+0x9F66	U+6B7F	# <cjk>
+0x9F67	U+6B80	# <cjk>
+0x9F68	U+6B84	# <cjk>
+0x9F69	U+6B83	# <cjk>
+0x9F6A	U+6B8D	# <cjk>
+0x9F6B	U+6B98	# <cjk>
+0x9F6C	U+6B95	# <cjk>
+0x9F6D	U+6B9E	# <cjk>
+0x9F6E	U+6BA4	# <cjk>
+0x9F6F	U+6BAA	# <cjk>
+0x9F70	U+6BAB	# <cjk>
+0x9F71	U+6BAF	# <cjk>
+0x9F72	U+6BB2	# <cjk>
+0x9F73	U+6BB1	# <cjk>
+0x9F74	U+6BB3	# <cjk>
+0x9F75	U+6BB7	# <cjk>
+0x9F76	U+6BBC	# <cjk>
+0x9F77	U+6BC6	# <cjk>
+0x9F78	U+6BCB	# <cjk>
+0x9F79	U+6BD3	# <cjk>
+0x9F7A	U+6BDF	# <cjk>
+0x9F7B	U+6BEC	# <cjk>
+0x9F7C	U+6BEB	# <cjk>
+0x9F7D	U+6BF3	# <cjk>
+0x9F7E	U+6BEF	# <cjk>
+0x9F80	U+9EBE	# <cjk>
+0x9F81	U+6C08	# <cjk>
+0x9F82	U+6C13	# <cjk>
+0x9F83	U+6C14	# <cjk>
+0x9F84	U+6C1B	# <cjk>
+0x9F85	U+6C24	# <cjk>
+0x9F86	U+6C23	# <cjk>
+0x9F87	U+6C5E	# <cjk>
+0x9F88	U+6C55	# <cjk>
+0x9F89	U+6C62	# <cjk>
+0x9F8A	U+6C6A	# <cjk>
+0x9F8B	U+6C82	# <cjk>
+0x9F8C	U+6C8D	# <cjk>
+0x9F8D	U+6C9A	# <cjk>
+0x9F8E	U+6C81	# <cjk>
+0x9F8F	U+6C9B	# <cjk>
+0x9F90	U+6C7E	# <cjk>
+0x9F91	U+6C68	# <cjk>
+0x9F92	U+6C73	# <cjk>
+0x9F93	U+6C92	# <cjk>
+0x9F94	U+6C90	# <cjk>
+0x9F95	U+6CC4	# <cjk>
+0x9F96	U+6CF1	# <cjk>
+0x9F97	U+6CD3	# <cjk>
+0x9F98	U+6CBD	# <cjk>
+0x9F99	U+6CD7	# <cjk>
+0x9F9A	U+6CC5	# <cjk>
+0x9F9B	U+6CDD	# <cjk>
+0x9F9C	U+6CAE	# <cjk>
+0x9F9D	U+6CB1	# <cjk>
+0x9F9E	U+6CBE	# <cjk>
+0x9F9F	U+6CBA	# <cjk>
+0x9FA0	U+6CDB	# <cjk>
+0x9FA1	U+6CEF	# <cjk>
+0x9FA2	U+6CD9	# <cjk>
+0x9FA3	U+6CEA	# <cjk>
+0x9FA4	U+6D1F	# <cjk>
+0x9FA5	U+884D	# <cjk>
+0x9FA6	U+6D36	# <cjk>
+0x9FA7	U+6D2B	# <cjk>
+0x9FA8	U+6D3D	# <cjk>
+0x9FA9	U+6D38	# <cjk>
+0x9FAA	U+6D19	# <cjk>
+0x9FAB	U+6D35	# <cjk>
+0x9FAC	U+6D33	# <cjk>
+0x9FAD	U+6D12	# <cjk>
+0x9FAE	U+6D0C	# <cjk>
+0x9FAF	U+6D63	# <cjk>
+0x9FB0	U+6D93	# <cjk>
+0x9FB1	U+6D64	# <cjk>
+0x9FB2	U+6D5A	# <cjk>
+0x9FB3	U+6D79	# <cjk>
+0x9FB4	U+6D59	# <cjk>
+0x9FB5	U+6D8E	# <cjk>
+0x9FB6	U+6D95	# <cjk>
+0x9FB7	U+6FE4	# <cjk>
+0x9FB8	U+6D85	# <cjk>
+0x9FB9	U+6DF9	# <cjk>
+0x9FBA	U+6E15	# <cjk>
+0x9FBB	U+6E0A	# <cjk>
+0x9FBC	U+6DB5	# <cjk>
+0x9FBD	U+6DC7	# <cjk>
+0x9FBE	U+6DE6	# <cjk>
+0x9FBF	U+6DB8	# <cjk>
+0x9FC0	U+6DC6	# <cjk>
+0x9FC1	U+6DEC	# <cjk>
+0x9FC2	U+6DDE	# <cjk>
+0x9FC3	U+6DCC	# <cjk>
+0x9FC4	U+6DE8	# <cjk>
+0x9FC5	U+6DD2	# <cjk>
+0x9FC6	U+6DC5	# <cjk>
+0x9FC7	U+6DFA	# <cjk>
+0x9FC8	U+6DD9	# <cjk>
+0x9FC9	U+6DE4	# <cjk>
+0x9FCA	U+6DD5	# <cjk>
+0x9FCB	U+6DEA	# <cjk>
+0x9FCC	U+6DEE	# <cjk>
+0x9FCD	U+6E2D	# <cjk>
+0x9FCE	U+6E6E	# <cjk>
+0x9FCF	U+6E2E	# <cjk>
+0x9FD0	U+6E19	# <cjk>
+0x9FD1	U+6E72	# <cjk>
+0x9FD2	U+6E5F	# <cjk>
+0x9FD3	U+6E3E	# <cjk>
+0x9FD4	U+6E23	# <cjk>
+0x9FD5	U+6E6B	# <cjk>
+0x9FD6	U+6E2B	# <cjk>
+0x9FD7	U+6E76	# <cjk>
+0x9FD8	U+6E4D	# <cjk>
+0x9FD9	U+6E1F	# <cjk>
+0x9FDA	U+6E43	# <cjk>
+0x9FDB	U+6E3A	# <cjk>
+0x9FDC	U+6E4E	# <cjk>
+0x9FDD	U+6E24	# <cjk>
+0x9FDE	U+6EFF	# <cjk>
+0x9FDF	U+6E1D	# <cjk>
+0x9FE0	U+6E38	# <cjk>
+0x9FE1	U+6E82	# <cjk>
+0x9FE2	U+6EAA	# <cjk>
+0x9FE3	U+6E98	# <cjk>
+0x9FE4	U+6EC9	# <cjk>
+0x9FE5	U+6EB7	# <cjk>
+0x9FE6	U+6ED3	# <cjk>
+0x9FE7	U+6EBD	# <cjk>
+0x9FE8	U+6EAF	# <cjk>
+0x9FE9	U+6EC4	# <cjk>
+0x9FEA	U+6EB2	# <cjk>
+0x9FEB	U+6ED4	# <cjk>
+0x9FEC	U+6ED5	# <cjk>
+0x9FED	U+6E8F	# <cjk>
+0x9FEE	U+6EA5	# <cjk>
+0x9FEF	U+6EC2	# <cjk>
+0x9FF0	U+6E9F	# <cjk>
+0x9FF1	U+6F41	# <cjk>
+0x9FF2	U+6F11	# <cjk>
+0x9FF3	U+704C	# <cjk>
+0x9FF4	U+6EEC	# <cjk>
+0x9FF5	U+6EF8	# <cjk>
+0x9FF6	U+6EFE	# <cjk>
+0x9FF7	U+6F3F	# <cjk>
+0x9FF8	U+6EF2	# <cjk>
+0x9FF9	U+6F31	# <cjk>
+0x9FFA	U+6EEF	# <cjk>
+0x9FFB	U+6F32	# <cjk>
+0x9FFC	U+6ECC	# <cjk>
+0xE040	U+6F3E	# <cjk>
+0xE041	U+6F13	# <cjk>
+0xE042	U+6EF7	# <cjk>
+0xE043	U+6F86	# <cjk>
+0xE044	U+6F7A	# <cjk>
+0xE045	U+6F78	# <cjk>
+0xE046	U+6F81	# <cjk>
+0xE047	U+6F80	# <cjk>
+0xE048	U+6F6F	# <cjk>
+0xE049	U+6F5B	# <cjk>
+0xE04A	U+6FF3	# <cjk>
+0xE04B	U+6F6D	# <cjk>
+0xE04C	U+6F82	# <cjk>
+0xE04D	U+6F7C	# <cjk>
+0xE04E	U+6F58	# <cjk>
+0xE04F	U+6F8E	# <cjk>
+0xE050	U+6F91	# <cjk>
+0xE051	U+6FC2	# <cjk>
+0xE052	U+6F66	# <cjk>
+0xE053	U+6FB3	# <cjk>
+0xE054	U+6FA3	# <cjk>
+0xE055	U+6FA1	# <cjk>
+0xE056	U+6FA4	# <cjk>
+0xE057	U+6FB9	# <cjk>
+0xE058	U+6FC6	# <cjk>
+0xE059	U+6FAA	# <cjk>
+0xE05A	U+6FDF	# <cjk>
+0xE05B	U+6FD5	# <cjk>
+0xE05C	U+6FEC	# <cjk>
+0xE05D	U+6FD4	# <cjk>
+0xE05E	U+6FD8	# <cjk>
+0xE05F	U+6FF1	# <cjk>
+0xE060	U+6FEE	# <cjk>
+0xE061	U+6FDB	# <cjk>
+0xE062	U+7009	# <cjk>
+0xE063	U+700B	# <cjk>
+0xE064	U+6FFA	# <cjk>
+0xE065	U+7011	# <cjk>
+0xE066	U+7001	# <cjk>
+0xE067	U+700F	# <cjk>
+0xE068	U+6FFE	# <cjk>
+0xE069	U+701B	# <cjk>
+0xE06A	U+701A	# <cjk>
+0xE06B	U+6F74	# <cjk>
+0xE06C	U+701D	# <cjk>
+0xE06D	U+7018	# <cjk>
+0xE06E	U+701F	# <cjk>
+0xE06F	U+7030	# <cjk>
+0xE070	U+703E	# <cjk>
+0xE071	U+7032	# <cjk>
+0xE072	U+7051	# <cjk>
+0xE073	U+7063	# <cjk>
+0xE074	U+7099	# <cjk>
+0xE075	U+7092	# <cjk>
+0xE076	U+70AF	# <cjk>
+0xE077	U+70F1	# <cjk>
+0xE078	U+70AC	# <cjk>
+0xE079	U+70B8	# <cjk>
+0xE07A	U+70B3	# <cjk>
+0xE07B	U+70AE	# <cjk>
+0xE07C	U+70DF	# <cjk>
+0xE07D	U+70CB	# <cjk>
+0xE07E	U+70DD	# <cjk>
+0xE080	U+70D9	# <cjk>
+0xE081	U+7109	# <cjk>
+0xE082	U+70FD	# <cjk>
+0xE083	U+711C	# <cjk>
+0xE084	U+7119	# <cjk>
+0xE085	U+7165	# <cjk>
+0xE086	U+7155	# <cjk>
+0xE087	U+7188	# <cjk>
+0xE088	U+7166	# <cjk>
+0xE089	U+7162	# <cjk>
+0xE08A	U+714C	# <cjk>
+0xE08B	U+7156	# <cjk>
+0xE08C	U+716C	# <cjk>
+0xE08D	U+718F	# <cjk>
+0xE08E	U+71FB	# <cjk>
+0xE08F	U+7184	# <cjk>
+0xE090	U+7195	# <cjk>
+0xE091	U+71A8	# <cjk>
+0xE092	U+71AC	# <cjk>
+0xE093	U+71D7	# <cjk>
+0xE094	U+71B9	# <cjk>
+0xE095	U+71BE	# <cjk>
+0xE096	U+71D2	# <cjk>
+0xE097	U+71C9	# <cjk>
+0xE098	U+71D4	# <cjk>
+0xE099	U+71CE	# <cjk>
+0xE09A	U+71E0	# <cjk>
+0xE09B	U+71EC	# <cjk>
+0xE09C	U+71E7	# <cjk>
+0xE09D	U+71F5	# <cjk>
+0xE09E	U+71FC	# <cjk>
+0xE09F	U+71F9	# <cjk>
+0xE0A0	U+71FF	# <cjk>
+0xE0A1	U+720D	# <cjk>
+0xE0A2	U+7210	# <cjk>
+0xE0A3	U+721B	# <cjk>
+0xE0A4	U+7228	# <cjk>
+0xE0A5	U+722D	# <cjk>
+0xE0A6	U+722C	# <cjk>
+0xE0A7	U+7230	# <cjk>
+0xE0A8	U+7232	# <cjk>
+0xE0A9	U+723B	# <cjk>
+0xE0AA	U+723C	# <cjk>
+0xE0AB	U+723F	# <cjk>
+0xE0AC	U+7240	# <cjk>
+0xE0AD	U+7246	# <cjk>
+0xE0AE	U+724B	# <cjk>
+0xE0AF	U+7258	# <cjk>
+0xE0B0	U+7274	# <cjk>
+0xE0B1	U+727E	# <cjk>
+0xE0B2	U+7282	# <cjk>
+0xE0B3	U+7281	# <cjk>
+0xE0B4	U+7287	# <cjk>
+0xE0B5	U+7292	# <cjk>
+0xE0B6	U+7296	# <cjk>
+0xE0B7	U+72A2	# <cjk>
+0xE0B8	U+72A7	# <cjk>
+0xE0B9	U+72B9	# <cjk>
+0xE0BA	U+72B2	# <cjk>
+0xE0BB	U+72C3	# <cjk>
+0xE0BC	U+72C6	# <cjk>
+0xE0BD	U+72C4	# <cjk>
+0xE0BE	U+72CE	# <cjk>
+0xE0BF	U+72D2	# <cjk>
+0xE0C0	U+72E2	# <cjk>
+0xE0C1	U+72E0	# <cjk>
+0xE0C2	U+72E1	# <cjk>
+0xE0C3	U+72F9	# <cjk>
+0xE0C4	U+72F7	# <cjk>
+0xE0C5	U+500F	# <cjk>
+0xE0C6	U+7317	# <cjk>
+0xE0C7	U+730A	# <cjk>
+0xE0C8	U+731C	# <cjk>
+0xE0C9	U+7316	# <cjk>
+0xE0CA	U+731D	# <cjk>
+0xE0CB	U+7334	# <cjk>
+0xE0CC	U+732F	# <cjk>
+0xE0CD	U+7329	# <cjk>
+0xE0CE	U+7325	# <cjk>
+0xE0CF	U+733E	# <cjk>
+0xE0D0	U+734E	# <cjk>
+0xE0D1	U+734F	# <cjk>
+0xE0D2	U+9ED8	# <cjk>
+0xE0D3	U+7357	# <cjk>
+0xE0D4	U+736A	# <cjk>
+0xE0D5	U+7368	# <cjk>
+0xE0D6	U+7370	# <cjk>
+0xE0D7	U+7378	# <cjk>
+0xE0D8	U+7375	# <cjk>
+0xE0D9	U+737B	# <cjk>
+0xE0DA	U+737A	# <cjk>
+0xE0DB	U+73C8	# <cjk>
+0xE0DC	U+73B3	# <cjk>
+0xE0DD	U+73CE	# <cjk>
+0xE0DE	U+73BB	# <cjk>
+0xE0DF	U+73C0	# <cjk>
+0xE0E0	U+73E5	# <cjk>
+0xE0E1	U+73EE	# <cjk>
+0xE0E2	U+73DE	# <cjk>
+0xE0E3	U+74A2	# <cjk>
+0xE0E4	U+7405	# <cjk>
+0xE0E5	U+746F	# <cjk>
+0xE0E6	U+7425	# <cjk>
+0xE0E7	U+73F8	# <cjk>
+0xE0E8	U+7432	# <cjk>
+0xE0E9	U+743A	# <cjk>
+0xE0EA	U+7455	# <cjk>
+0xE0EB	U+743F	# <cjk>
+0xE0EC	U+745F	# <cjk>
+0xE0ED	U+7459	# <cjk>
+0xE0EE	U+7441	# <cjk>
+0xE0EF	U+745C	# <cjk>
+0xE0F0	U+7469	# <cjk>
+0xE0F1	U+7470	# <cjk>
+0xE0F2	U+7463	# <cjk>
+0xE0F3	U+746A	# <cjk>
+0xE0F4	U+7476	# <cjk>
+0xE0F5	U+747E	# <cjk>
+0xE0F6	U+748B	# <cjk>
+0xE0F7	U+749E	# <cjk>
+0xE0F8	U+74A7	# <cjk>
+0xE0F9	U+74CA	# <cjk>
+0xE0FA	U+74CF	# <cjk>
+0xE0FB	U+74D4	# <cjk>
+0xE0FC	U+73F1	# <cjk>
+0xE140	U+74E0	# <cjk>
+0xE141	U+74E3	# <cjk>
+0xE142	U+74E7	# <cjk>
+0xE143	U+74E9	# <cjk>
+0xE144	U+74EE	# <cjk>
+0xE145	U+74F2	# <cjk>
+0xE146	U+74F0	# <cjk>
+0xE147	U+74F1	# <cjk>
+0xE148	U+74F8	# <cjk>
+0xE149	U+74F7	# <cjk>
+0xE14A	U+7504	# <cjk>
+0xE14B	U+7503	# <cjk>
+0xE14C	U+7505	# <cjk>
+0xE14D	U+750C	# <cjk>
+0xE14E	U+750E	# <cjk>
+0xE14F	U+750D	# <cjk>
+0xE150	U+7515	# <cjk>
+0xE151	U+7513	# <cjk>
+0xE152	U+751E	# <cjk>
+0xE153	U+7526	# <cjk>
+0xE154	U+752C	# <cjk>
+0xE155	U+753C	# <cjk>
+0xE156	U+7544	# <cjk>
+0xE157	U+754D	# <cjk>
+0xE158	U+754A	# <cjk>
+0xE159	U+7549	# <cjk>
+0xE15A	U+755B	# <cjk>
+0xE15B	U+7546	# <cjk>
+0xE15C	U+755A	# <cjk>
+0xE15D	U+7569	# <cjk>
+0xE15E	U+7564	# <cjk>
+0xE15F	U+7567	# <cjk>
+0xE160	U+756B	# <cjk>
+0xE161	U+756D	# <cjk>
+0xE162	U+7578	# <cjk>
+0xE163	U+7576	# <cjk>
+0xE164	U+7586	# <cjk>
+0xE165	U+7587	# <cjk>
+0xE166	U+7574	# <cjk>
+0xE167	U+758A	# <cjk>
+0xE168	U+7589	# <cjk>
+0xE169	U+7582	# <cjk>
+0xE16A	U+7594	# <cjk>
+0xE16B	U+759A	# <cjk>
+0xE16C	U+759D	# <cjk>
+0xE16D	U+75A5	# <cjk>
+0xE16E	U+75A3	# <cjk>
+0xE16F	U+75C2	# <cjk>
+0xE170	U+75B3	# <cjk>
+0xE171	U+75C3	# <cjk>
+0xE172	U+75B5	# <cjk>
+0xE173	U+75BD	# <cjk>
+0xE174	U+75B8	# <cjk>
+0xE175	U+75BC	# <cjk>
+0xE176	U+75B1	# <cjk>
+0xE177	U+75CD	# <cjk>
+0xE178	U+75CA	# <cjk>
+0xE179	U+75D2	# <cjk>
+0xE17A	U+75D9	# <cjk>
+0xE17B	U+75E3	# <cjk>
+0xE17C	U+75DE	# <cjk>
+0xE17D	U+75FE	# <cjk>
+0xE17E	U+75FF	# <cjk>
+0xE180	U+75FC	# <cjk>
+0xE181	U+7601	# <cjk>
+0xE182	U+75F0	# <cjk>
+0xE183	U+75FA	# <cjk>
+0xE184	U+75F2	# <cjk>
+0xE185	U+75F3	# <cjk>
+0xE186	U+760B	# <cjk>
+0xE187	U+760D	# <cjk>
+0xE188	U+7609	# <cjk>
+0xE189	U+761F	# <cjk>
+0xE18A	U+7627	# <cjk>
+0xE18B	U+7620	# <cjk>
+0xE18C	U+7621	# <cjk>
+0xE18D	U+7622	# <cjk>
+0xE18E	U+7624	# <cjk>
+0xE18F	U+7634	# <cjk>
+0xE190	U+7630	# <cjk>
+0xE191	U+763B	# <cjk>
+0xE192	U+7647	# <cjk>
+0xE193	U+7648	# <cjk>
+0xE194	U+7646	# <cjk>
+0xE195	U+765C	# <cjk>
+0xE196	U+7658	# <cjk>
+0xE197	U+7661	# <cjk>
+0xE198	U+7662	# <cjk>
+0xE199	U+7668	# <cjk>
+0xE19A	U+7669	# <cjk>
+0xE19B	U+766A	# <cjk>
+0xE19C	U+7667	# <cjk>
+0xE19D	U+766C	# <cjk>
+0xE19E	U+7670	# <cjk>
+0xE19F	U+7672	# <cjk>
+0xE1A0	U+7676	# <cjk>
+0xE1A1	U+7678	# <cjk>
+0xE1A2	U+767C	# <cjk>
+0xE1A3	U+7680	# <cjk>
+0xE1A4	U+7683	# <cjk>
+0xE1A5	U+7688	# <cjk>
+0xE1A6	U+768B	# <cjk>
+0xE1A7	U+768E	# <cjk>
+0xE1A8	U+7696	# <cjk>
+0xE1A9	U+7693	# <cjk>
+0xE1AA	U+7699	# <cjk>
+0xE1AB	U+769A	# <cjk>
+0xE1AC	U+76B0	# <cjk>
+0xE1AD	U+76B4	# <cjk>
+0xE1AE	U+76B8	# <cjk>
+0xE1AF	U+76B9	# <cjk>
+0xE1B0	U+76BA	# <cjk>
+0xE1B1	U+76C2	# <cjk>
+0xE1B2	U+76CD	# <cjk>
+0xE1B3	U+76D6	# <cjk>
+0xE1B4	U+76D2	# <cjk>
+0xE1B5	U+76DE	# <cjk>
+0xE1B6	U+76E1	# <cjk>
+0xE1B7	U+76E5	# <cjk>
+0xE1B8	U+76E7	# <cjk>
+0xE1B9	U+76EA	# <cjk>
+0xE1BA	U+862F	# <cjk>
+0xE1BB	U+76FB	# <cjk>
+0xE1BC	U+7708	# <cjk>
+0xE1BD	U+7707	# <cjk>
+0xE1BE	U+7704	# <cjk>
+0xE1BF	U+7729	# <cjk>
+0xE1C0	U+7724	# <cjk>
+0xE1C1	U+771E	# <cjk>
+0xE1C2	U+7725	# <cjk>
+0xE1C3	U+7726	# <cjk>
+0xE1C4	U+771B	# <cjk>
+0xE1C5	U+7737	# <cjk>
+0xE1C6	U+7738	# <cjk>
+0xE1C7	U+7747	# <cjk>
+0xE1C8	U+775A	# <cjk>
+0xE1C9	U+7768	# <cjk>
+0xE1CA	U+776B	# <cjk>
+0xE1CB	U+775B	# <cjk>
+0xE1CC	U+7765	# <cjk>
+0xE1CD	U+777F	# <cjk>
+0xE1CE	U+777E	# <cjk>
+0xE1CF	U+7779	# <cjk>
+0xE1D0	U+778E	# <cjk>
+0xE1D1	U+778B	# <cjk>
+0xE1D2	U+7791	# <cjk>
+0xE1D3	U+77A0	# <cjk>
+0xE1D4	U+779E	# <cjk>
+0xE1D5	U+77B0	# <cjk>
+0xE1D6	U+77B6	# <cjk>
+0xE1D7	U+77B9	# <cjk>
+0xE1D8	U+77BF	# <cjk>
+0xE1D9	U+77BC	# <cjk>
+0xE1DA	U+77BD	# <cjk>
+0xE1DB	U+77BB	# <cjk>
+0xE1DC	U+77C7	# <cjk>
+0xE1DD	U+77CD	# <cjk>
+0xE1DE	U+77D7	# <cjk>
+0xE1DF	U+77DA	# <cjk>
+0xE1E0	U+77DC	# <cjk>
+0xE1E1	U+77E3	# <cjk>
+0xE1E2	U+77EE	# <cjk>
+0xE1E3	U+77FC	# <cjk>
+0xE1E4	U+780C	# <cjk>
+0xE1E5	U+7812	# <cjk>
+0xE1E6	U+7926	# <cjk>
+0xE1E7	U+7820	# <cjk>
+0xE1E8	U+792A	# <cjk>
+0xE1E9	U+7845	# <cjk>
+0xE1EA	U+788E	# <cjk>
+0xE1EB	U+7874	# <cjk>
+0xE1EC	U+7886	# <cjk>
+0xE1ED	U+787C	# <cjk>
+0xE1EE	U+789A	# <cjk>
+0xE1EF	U+788C	# <cjk>
+0xE1F0	U+78A3	# <cjk>
+0xE1F1	U+78B5	# <cjk>
+0xE1F2	U+78AA	# <cjk>
+0xE1F3	U+78AF	# <cjk>
+0xE1F4	U+78D1	# <cjk>
+0xE1F5	U+78C6	# <cjk>
+0xE1F6	U+78CB	# <cjk>
+0xE1F7	U+78D4	# <cjk>
+0xE1F8	U+78BE	# <cjk>
+0xE1F9	U+78BC	# <cjk>
+0xE1FA	U+78C5	# <cjk>
+0xE1FB	U+78CA	# <cjk>
+0xE1FC	U+78EC	# <cjk>
+0xE240	U+78E7	# <cjk>
+0xE241	U+78DA	# <cjk>
+0xE242	U+78FD	# <cjk>
+0xE243	U+78F4	# <cjk>
+0xE244	U+7907	# <cjk>
+0xE245	U+7912	# <cjk>
+0xE246	U+7911	# <cjk>
+0xE247	U+7919	# <cjk>
+0xE248	U+792C	# <cjk>
+0xE249	U+792B	# <cjk>
+0xE24A	U+7940	# <cjk>
+0xE24B	U+7960	# <cjk>
+0xE24C	U+7957	# <cjk>
+0xE24D	U+795F	# <cjk>
+0xE24E	U+795A	# <cjk>
+0xE24F	U+7955	# <cjk>
+0xE250	U+7953	# <cjk>
+0xE251	U+797A	# <cjk>
+0xE252	U+797F	# <cjk>
+0xE253	U+798A	# <cjk>
+0xE254	U+799D	# <cjk>
+0xE255	U+79A7	# <cjk>
+0xE256	U+9F4B	# <cjk>
+0xE257	U+79AA	# <cjk>
+0xE258	U+79AE	# <cjk>
+0xE259	U+79B3	# <cjk>
+0xE25A	U+79B9	# <cjk>
+0xE25B	U+79BA	# <cjk>
+0xE25C	U+79C9	# <cjk>
+0xE25D	U+79D5	# <cjk>
+0xE25E	U+79E7	# <cjk>
+0xE25F	U+79EC	# <cjk>
+0xE260	U+79E1	# <cjk>
+0xE261	U+79E3	# <cjk>
+0xE262	U+7A08	# <cjk>
+0xE263	U+7A0D	# <cjk>
+0xE264	U+7A18	# <cjk>
+0xE265	U+7A19	# <cjk>
+0xE266	U+7A20	# <cjk>
+0xE267	U+7A1F	# <cjk>
+0xE268	U+7980	# <cjk>
+0xE269	U+7A31	# <cjk>
+0xE26A	U+7A3B	# <cjk>
+0xE26B	U+7A3E	# <cjk>
+0xE26C	U+7A37	# <cjk>
+0xE26D	U+7A43	# <cjk>
+0xE26E	U+7A57	# <cjk>
+0xE26F	U+7A49	# <cjk>
+0xE270	U+7A61	# <cjk>
+0xE271	U+7A62	# <cjk>
+0xE272	U+7A69	# <cjk>
+0xE273	U+9F9D	# <cjk>
+0xE274	U+7A70	# <cjk>
+0xE275	U+7A79	# <cjk>
+0xE276	U+7A7D	# <cjk>
+0xE277	U+7A88	# <cjk>
+0xE278	U+7A97	# <cjk>
+0xE279	U+7A95	# <cjk>
+0xE27A	U+7A98	# <cjk>
+0xE27B	U+7A96	# <cjk>
+0xE27C	U+7AA9	# <cjk>
+0xE27D	U+7AC8	# <cjk>
+0xE27E	U+7AB0	# <cjk>
+0xE280	U+7AB6	# <cjk>
+0xE281	U+7AC5	# <cjk>
+0xE282	U+7AC4	# <cjk>
+0xE283	U+7ABF	# <cjk>
+0xE284	U+9083	# <cjk>
+0xE285	U+7AC7	# <cjk>
+0xE286	U+7ACA	# <cjk>
+0xE287	U+7ACD	# <cjk>
+0xE288	U+7ACF	# <cjk>
+0xE289	U+7AD5	# <cjk>
+0xE28A	U+7AD3	# <cjk>
+0xE28B	U+7AD9	# <cjk>
+0xE28C	U+7ADA	# <cjk>
+0xE28D	U+7ADD	# <cjk>
+0xE28E	U+7AE1	# <cjk>
+0xE28F	U+7AE2	# <cjk>
+0xE290	U+7AE6	# <cjk>
+0xE291	U+7AED	# <cjk>
+0xE292	U+7AF0	# <cjk>
+0xE293	U+7B02	# <cjk>
+0xE294	U+7B0F	# <cjk>
+0xE295	U+7B0A	# <cjk>
+0xE296	U+7B06	# <cjk>
+0xE297	U+7B33	# <cjk>
+0xE298	U+7B18	# <cjk>
+0xE299	U+7B19	# <cjk>
+0xE29A	U+7B1E	# <cjk>
+0xE29B	U+7B35	# <cjk>
+0xE29C	U+7B28	# <cjk>
+0xE29D	U+7B36	# <cjk>
+0xE29E	U+7B50	# <cjk>
+0xE29F	U+7B7A	# <cjk>
+0xE2A0	U+7B04	# <cjk>
+0xE2A1	U+7B4D	# <cjk>
+0xE2A2	U+7B0B	# <cjk>
+0xE2A3	U+7B4C	# <cjk>
+0xE2A4	U+7B45	# <cjk>
+0xE2A5	U+7B75	# <cjk>
+0xE2A6	U+7B65	# <cjk>
+0xE2A7	U+7B74	# <cjk>
+0xE2A8	U+7B67	# <cjk>
+0xE2A9	U+7B70	# <cjk>
+0xE2AA	U+7B71	# <cjk>
+0xE2AB	U+7B6C	# <cjk>
+0xE2AC	U+7B6E	# <cjk>
+0xE2AD	U+7B9D	# <cjk>
+0xE2AE	U+7B98	# <cjk>
+0xE2AF	U+7B9F	# <cjk>
+0xE2B0	U+7B8D	# <cjk>
+0xE2B1	U+7B9C	# <cjk>
+0xE2B2	U+7B9A	# <cjk>
+0xE2B3	U+7B8B	# <cjk>
+0xE2B4	U+7B92	# <cjk>
+0xE2B5	U+7B8F	# <cjk>
+0xE2B6	U+7B5D	# <cjk>
+0xE2B7	U+7B99	# <cjk>
+0xE2B8	U+7BCB	# <cjk>
+0xE2B9	U+7BC1	# <cjk>
+0xE2BA	U+7BCC	# <cjk>
+0xE2BB	U+7BCF	# <cjk>
+0xE2BC	U+7BB4	# <cjk>
+0xE2BD	U+7BC6	# <cjk>
+0xE2BE	U+7BDD	# <cjk>
+0xE2BF	U+7BE9	# <cjk>
+0xE2C0	U+7C11	# <cjk>
+0xE2C1	U+7C14	# <cjk>
+0xE2C2	U+7BE6	# <cjk>
+0xE2C3	U+7BE5	# <cjk>
+0xE2C4	U+7C60	# <cjk>
+0xE2C5	U+7C00	# <cjk>
+0xE2C6	U+7C07	# <cjk>
+0xE2C7	U+7C13	# <cjk>
+0xE2C8	U+7BF3	# <cjk>
+0xE2C9	U+7BF7	# <cjk>
+0xE2CA	U+7C17	# <cjk>
+0xE2CB	U+7C0D	# <cjk>
+0xE2CC	U+7BF6	# <cjk>
+0xE2CD	U+7C23	# <cjk>
+0xE2CE	U+7C27	# <cjk>
+0xE2CF	U+7C2A	# <cjk>
+0xE2D0	U+7C1F	# <cjk>
+0xE2D1	U+7C37	# <cjk>
+0xE2D2	U+7C2B	# <cjk>
+0xE2D3	U+7C3D	# <cjk>
+0xE2D4	U+7C4C	# <cjk>
+0xE2D5	U+7C43	# <cjk>
+0xE2D6	U+7C54	# <cjk>
+0xE2D7	U+7C4F	# <cjk>
+0xE2D8	U+7C40	# <cjk>
+0xE2D9	U+7C50	# <cjk>
+0xE2DA	U+7C58	# <cjk>
+0xE2DB	U+7C5F	# <cjk>
+0xE2DC	U+7C64	# <cjk>
+0xE2DD	U+7C56	# <cjk>
+0xE2DE	U+7C65	# <cjk>
+0xE2DF	U+7C6C	# <cjk>
+0xE2E0	U+7C75	# <cjk>
+0xE2E1	U+7C83	# <cjk>
+0xE2E2	U+7C90	# <cjk>
+0xE2E3	U+7CA4	# <cjk>
+0xE2E4	U+7CAD	# <cjk>
+0xE2E5	U+7CA2	# <cjk>
+0xE2E6	U+7CAB	# <cjk>
+0xE2E7	U+7CA1	# <cjk>
+0xE2E8	U+7CA8	# <cjk>
+0xE2E9	U+7CB3	# <cjk>
+0xE2EA	U+7CB2	# <cjk>
+0xE2EB	U+7CB1	# <cjk>
+0xE2EC	U+7CAE	# <cjk>
+0xE2ED	U+7CB9	# <cjk>
+0xE2EE	U+7CBD	# <cjk>
+0xE2EF	U+7CC0	# <cjk>
+0xE2F0	U+7CC5	# <cjk>
+0xE2F1	U+7CC2	# <cjk>
+0xE2F2	U+7CD8	# <cjk>
+0xE2F3	U+7CD2	# <cjk>
+0xE2F4	U+7CDC	# <cjk>
+0xE2F5	U+7CE2	# <cjk>
+0xE2F6	U+9B3B	# <cjk>
+0xE2F7	U+7CEF	# <cjk>
+0xE2F8	U+7CF2	# <cjk>
+0xE2F9	U+7CF4	# <cjk>
+0xE2FA	U+7CF6	# <cjk>
+0xE2FB	U+7CFA	# <cjk>
+0xE2FC	U+7D06	# <cjk>
+0xE340	U+7D02	# <cjk>
+0xE341	U+7D1C	# <cjk>
+0xE342	U+7D15	# <cjk>
+0xE343	U+7D0A	# <cjk>
+0xE344	U+7D45	# <cjk>
+0xE345	U+7D4B	# <cjk>
+0xE346	U+7D2E	# <cjk>
+0xE347	U+7D32	# <cjk>
+0xE348	U+7D3F	# <cjk>
+0xE349	U+7D35	# <cjk>
+0xE34A	U+7D46	# <cjk>
+0xE34B	U+7D73	# <cjk>
+0xE34C	U+7D56	# <cjk>
+0xE34D	U+7D4E	# <cjk>
+0xE34E	U+7D72	# <cjk>
+0xE34F	U+7D68	# <cjk>
+0xE350	U+7D6E	# <cjk>
+0xE351	U+7D4F	# <cjk>
+0xE352	U+7D63	# <cjk>
+0xE353	U+7D93	# <cjk>
+0xE354	U+7D89	# <cjk>
+0xE355	U+7D5B	# <cjk>
+0xE356	U+7D8F	# <cjk>
+0xE357	U+7D7D	# <cjk>
+0xE358	U+7D9B	# <cjk>
+0xE359	U+7DBA	# <cjk>
+0xE35A	U+7DAE	# <cjk>
+0xE35B	U+7DA3	# <cjk>
+0xE35C	U+7DB5	# <cjk>
+0xE35D	U+7DC7	# <cjk>
+0xE35E	U+7DBD	# <cjk>
+0xE35F	U+7DAB	# <cjk>
+0xE360	U+7E3D	# <cjk>
+0xE361	U+7DA2	# <cjk>
+0xE362	U+7DAF	# <cjk>
+0xE363	U+7DDC	# <cjk>
+0xE364	U+7DB8	# <cjk>
+0xE365	U+7D9F	# <cjk>
+0xE366	U+7DB0	# <cjk>
+0xE367	U+7DD8	# <cjk>
+0xE368	U+7DDD	# <cjk>
+0xE369	U+7DE4	# <cjk>
+0xE36A	U+7DDE	# <cjk>
+0xE36B	U+7DFB	# <cjk>
+0xE36C	U+7DF2	# <cjk>
+0xE36D	U+7DE1	# <cjk>
+0xE36E	U+7E05	# <cjk>
+0xE36F	U+7E0A	# <cjk>
+0xE370	U+7E23	# <cjk>
+0xE371	U+7E21	# <cjk>
+0xE372	U+7E12	# <cjk>
+0xE373	U+7E31	# <cjk>
+0xE374	U+7E1F	# <cjk>
+0xE375	U+7E09	# <cjk>
+0xE376	U+7E0B	# <cjk>
+0xE377	U+7E22	# <cjk>
+0xE378	U+7E46	# <cjk>
+0xE379	U+7E66	# <cjk>
+0xE37A	U+7E3B	# <cjk>
+0xE37B	U+7E35	# <cjk>
+0xE37C	U+7E39	# <cjk>
+0xE37D	U+7E43	# <cjk>
+0xE37E	U+7E37	# <cjk>
+0xE380	U+7E32	# <cjk>
+0xE381	U+7E3A	# <cjk>
+0xE382	U+7E67	# <cjk>
+0xE383	U+7E5D	# <cjk>
+0xE384	U+7E56	# <cjk>
+0xE385	U+7E5E	# <cjk>
+0xE386	U+7E59	# <cjk>
+0xE387	U+7E5A	# <cjk>
+0xE388	U+7E79	# <cjk>
+0xE389	U+7E6A	# <cjk>
+0xE38A	U+7E69	# <cjk>
+0xE38B	U+7E7C	# <cjk>
+0xE38C	U+7E7B	# <cjk>
+0xE38D	U+7E83	# <cjk>
+0xE38E	U+7DD5	# <cjk>
+0xE38F	U+7E7D	# <cjk>
+0xE390	U+8FAE	# <cjk>
+0xE391	U+7E7F	# <cjk>
+0xE392	U+7E88	# <cjk>
+0xE393	U+7E89	# <cjk>
+0xE394	U+7E8C	# <cjk>
+0xE395	U+7E92	# <cjk>
+0xE396	U+7E90	# <cjk>
+0xE397	U+7E93	# <cjk>
+0xE398	U+7E94	# <cjk>
+0xE399	U+7E96	# <cjk>
+0xE39A	U+7E8E	# <cjk>
+0xE39B	U+7E9B	# <cjk>
+0xE39C	U+7E9C	# <cjk>
+0xE39D	U+7F38	# <cjk>
+0xE39E	U+7F3A	# <cjk>
+0xE39F	U+7F45	# <cjk>
+0xE3A0	U+7F4C	# <cjk>
+0xE3A1	U+7F4D	# <cjk>
+0xE3A2	U+7F4E	# <cjk>
+0xE3A3	U+7F50	# <cjk>
+0xE3A4	U+7F51	# <cjk>
+0xE3A5	U+7F55	# <cjk>
+0xE3A6	U+7F54	# <cjk>
+0xE3A7	U+7F58	# <cjk>
+0xE3A8	U+7F5F	# <cjk>
+0xE3A9	U+7F60	# <cjk>
+0xE3AA	U+7F68	# <cjk>
+0xE3AB	U+7F69	# <cjk>
+0xE3AC	U+7F67	# <cjk>
+0xE3AD	U+7F78	# <cjk>
+0xE3AE	U+7F82	# <cjk>
+0xE3AF	U+7F86	# <cjk>
+0xE3B0	U+7F83	# <cjk>
+0xE3B1	U+7F88	# <cjk>
+0xE3B2	U+7F87	# <cjk>
+0xE3B3	U+7F8C	# <cjk>
+0xE3B4	U+7F94	# <cjk>
+0xE3B5	U+7F9E	# <cjk>
+0xE3B6	U+7F9D	# <cjk>
+0xE3B7	U+7F9A	# <cjk>
+0xE3B8	U+7FA3	# <cjk>
+0xE3B9	U+7FAF	# <cjk>
+0xE3BA	U+7FB2	# <cjk>
+0xE3BB	U+7FB9	# <cjk>
+0xE3BC	U+7FAE	# <cjk>
+0xE3BD	U+7FB6	# <cjk>
+0xE3BE	U+7FB8	# <cjk>
+0xE3BF	U+8B71	# <cjk>
+0xE3C0	U+7FC5	# <cjk>
+0xE3C1	U+7FC6	# <cjk>
+0xE3C2	U+7FCA	# <cjk>
+0xE3C3	U+7FD5	# <cjk>
+0xE3C4	U+7FD4	# <cjk>
+0xE3C5	U+7FE1	# <cjk>
+0xE3C6	U+7FE6	# <cjk>
+0xE3C7	U+7FE9	# <cjk>
+0xE3C8	U+7FF3	# <cjk>
+0xE3C9	U+7FF9	# <cjk>
+0xE3CA	U+98DC	# <cjk>
+0xE3CB	U+8006	# <cjk>
+0xE3CC	U+8004	# <cjk>
+0xE3CD	U+800B	# <cjk>
+0xE3CE	U+8012	# <cjk>
+0xE3CF	U+8018	# <cjk>
+0xE3D0	U+8019	# <cjk>
+0xE3D1	U+801C	# <cjk>
+0xE3D2	U+8021	# <cjk>
+0xE3D3	U+8028	# <cjk>
+0xE3D4	U+803F	# <cjk>
+0xE3D5	U+803B	# <cjk>
+0xE3D6	U+804A	# <cjk>
+0xE3D7	U+8046	# <cjk>
+0xE3D8	U+8052	# <cjk>
+0xE3D9	U+8058	# <cjk>
+0xE3DA	U+805A	# <cjk>
+0xE3DB	U+805F	# <cjk>
+0xE3DC	U+8062	# <cjk>
+0xE3DD	U+8068	# <cjk>
+0xE3DE	U+8073	# <cjk>
+0xE3DF	U+8072	# <cjk>
+0xE3E0	U+8070	# <cjk>
+0xE3E1	U+8076	# <cjk>
+0xE3E2	U+8079	# <cjk>
+0xE3E3	U+807D	# <cjk>
+0xE3E4	U+807F	# <cjk>
+0xE3E5	U+8084	# <cjk>
+0xE3E6	U+8086	# <cjk>
+0xE3E7	U+8085	# <cjk>
+0xE3E8	U+809B	# <cjk>
+0xE3E9	U+8093	# <cjk>
+0xE3EA	U+809A	# <cjk>
+0xE3EB	U+80AD	# <cjk>
+0xE3EC	U+5190	# <cjk>
+0xE3ED	U+80AC	# <cjk>
+0xE3EE	U+80DB	# <cjk>
+0xE3EF	U+80E5	# <cjk>
+0xE3F0	U+80D9	# <cjk>
+0xE3F1	U+80DD	# <cjk>
+0xE3F2	U+80C4	# <cjk>
+0xE3F3	U+80DA	# <cjk>
+0xE3F4	U+80D6	# <cjk>
+0xE3F5	U+8109	# <cjk>
+0xE3F6	U+80EF	# <cjk>
+0xE3F7	U+80F1	# <cjk>
+0xE3F8	U+811B	# <cjk>
+0xE3F9	U+8129	# <cjk>
+0xE3FA	U+8123	# <cjk>
+0xE3FB	U+812F	# <cjk>
+0xE3FC	U+814B	# <cjk>
+0xE440	U+968B	# <cjk>
+0xE441	U+8146	# <cjk>
+0xE442	U+813E	# <cjk>
+0xE443	U+8153	# <cjk>
+0xE444	U+8151	# <cjk>
+0xE445	U+80FC	# <cjk>
+0xE446	U+8171	# <cjk>
+0xE447	U+816E	# <cjk>
+0xE448	U+8165	# <cjk>
+0xE449	U+8166	# <cjk>
+0xE44A	U+8174	# <cjk>
+0xE44B	U+8183	# <cjk>
+0xE44C	U+8188	# <cjk>
+0xE44D	U+818A	# <cjk>
+0xE44E	U+8180	# <cjk>
+0xE44F	U+8182	# <cjk>
+0xE450	U+81A0	# <cjk>
+0xE451	U+8195	# <cjk>
+0xE452	U+81A4	# <cjk>
+0xE453	U+81A3	# <cjk>
+0xE454	U+815F	# <cjk>
+0xE455	U+8193	# <cjk>
+0xE456	U+81A9	# <cjk>
+0xE457	U+81B0	# <cjk>
+0xE458	U+81B5	# <cjk>
+0xE459	U+81BE	# <cjk>
+0xE45A	U+81B8	# <cjk>
+0xE45B	U+81BD	# <cjk>
+0xE45C	U+81C0	# <cjk>
+0xE45D	U+81C2	# <cjk>
+0xE45E	U+81BA	# <cjk>
+0xE45F	U+81C9	# <cjk>
+0xE460	U+81CD	# <cjk>
+0xE461	U+81D1	# <cjk>
+0xE462	U+81D9	# <cjk>
+0xE463	U+81D8	# <cjk>
+0xE464	U+81C8	# <cjk>
+0xE465	U+81DA	# <cjk>
+0xE466	U+81DF	# <cjk>
+0xE467	U+81E0	# <cjk>
+0xE468	U+81E7	# <cjk>
+0xE469	U+81FA	# <cjk>
+0xE46A	U+81FB	# <cjk>
+0xE46B	U+81FE	# <cjk>
+0xE46C	U+8201	# <cjk>
+0xE46D	U+8202	# <cjk>
+0xE46E	U+8205	# <cjk>
+0xE46F	U+8207	# <cjk>
+0xE470	U+820A	# <cjk>
+0xE471	U+820D	# <cjk>
+0xE472	U+8210	# <cjk>
+0xE473	U+8216	# <cjk>
+0xE474	U+8229	# <cjk>
+0xE475	U+822B	# <cjk>
+0xE476	U+8238	# <cjk>
+0xE477	U+8233	# <cjk>
+0xE478	U+8240	# <cjk>
+0xE479	U+8259	# <cjk>
+0xE47A	U+8258	# <cjk>
+0xE47B	U+825D	# <cjk>
+0xE47C	U+825A	# <cjk>
+0xE47D	U+825F	# <cjk>
+0xE47E	U+8264	# <cjk>
+0xE480	U+8262	# <cjk>
+0xE481	U+8268	# <cjk>
+0xE482	U+826A	# <cjk>
+0xE483	U+826B	# <cjk>
+0xE484	U+822E	# <cjk>
+0xE485	U+8271	# <cjk>
+0xE486	U+8277	# <cjk>
+0xE487	U+8278	# <cjk>
+0xE488	U+827E	# <cjk>
+0xE489	U+828D	# <cjk>
+0xE48A	U+8292	# <cjk>
+0xE48B	U+82AB	# <cjk>
+0xE48C	U+829F	# <cjk>
+0xE48D	U+82BB	# <cjk>
+0xE48E	U+82AC	# <cjk>
+0xE48F	U+82E1	# <cjk>
+0xE490	U+82E3	# <cjk>
+0xE491	U+82DF	# <cjk>
+0xE492	U+82D2	# <cjk>
+0xE493	U+82F4	# <cjk>
+0xE494	U+82F3	# <cjk>
+0xE495	U+82FA	# <cjk>
+0xE496	U+8393	# <cjk>
+0xE497	U+8303	# <cjk>
+0xE498	U+82FB	# <cjk>
+0xE499	U+82F9	# <cjk>
+0xE49A	U+82DE	# <cjk>
+0xE49B	U+8306	# <cjk>
+0xE49C	U+82DC	# <cjk>
+0xE49D	U+8309	# <cjk>
+0xE49E	U+82D9	# <cjk>
+0xE49F	U+8335	# <cjk>
+0xE4A0	U+8334	# <cjk>
+0xE4A1	U+8316	# <cjk>
+0xE4A2	U+8332	# <cjk>
+0xE4A3	U+8331	# <cjk>
+0xE4A4	U+8340	# <cjk>
+0xE4A5	U+8339	# <cjk>
+0xE4A6	U+8350	# <cjk>
+0xE4A7	U+8345	# <cjk>
+0xE4A8	U+832F	# <cjk>
+0xE4A9	U+832B	# <cjk>
+0xE4AA	U+8317	# <cjk>
+0xE4AB	U+8318	# <cjk>
+0xE4AC	U+8385	# <cjk>
+0xE4AD	U+839A	# <cjk>
+0xE4AE	U+83AA	# <cjk>
+0xE4AF	U+839F	# <cjk>
+0xE4B0	U+83A2	# <cjk>
+0xE4B1	U+8396	# <cjk>
+0xE4B2	U+8323	# <cjk>
+0xE4B3	U+838E	# <cjk>
+0xE4B4	U+8387	# <cjk>
+0xE4B5	U+838A	# <cjk>
+0xE4B6	U+837C	# <cjk>
+0xE4B7	U+83B5	# <cjk>
+0xE4B8	U+8373	# <cjk>
+0xE4B9	U+8375	# <cjk>
+0xE4BA	U+83A0	# <cjk>
+0xE4BB	U+8389	# <cjk>
+0xE4BC	U+83A8	# <cjk>
+0xE4BD	U+83F4	# <cjk>
+0xE4BE	U+8413	# <cjk>
+0xE4BF	U+83EB	# <cjk>
+0xE4C0	U+83CE	# <cjk>
+0xE4C1	U+83FD	# <cjk>
+0xE4C2	U+8403	# <cjk>
+0xE4C3	U+83D8	# <cjk>
+0xE4C4	U+840B	# <cjk>
+0xE4C5	U+83C1	# <cjk>
+0xE4C6	U+83F7	# <cjk>
+0xE4C7	U+8407	# <cjk>
+0xE4C8	U+83E0	# <cjk>
+0xE4C9	U+83F2	# <cjk>
+0xE4CA	U+840D	# <cjk>
+0xE4CB	U+8422	# <cjk>
+0xE4CC	U+8420	# <cjk>
+0xE4CD	U+83BD	# <cjk>
+0xE4CE	U+8438	# <cjk>
+0xE4CF	U+8506	# <cjk>
+0xE4D0	U+83FB	# <cjk>
+0xE4D1	U+846D	# <cjk>
+0xE4D2	U+842A	# <cjk>
+0xE4D3	U+843C	# <cjk>
+0xE4D4	U+855A	# <cjk>
+0xE4D5	U+8484	# <cjk>
+0xE4D6	U+8477	# <cjk>
+0xE4D7	U+846B	# <cjk>
+0xE4D8	U+84AD	# <cjk>
+0xE4D9	U+846E	# <cjk>
+0xE4DA	U+8482	# <cjk>
+0xE4DB	U+8469	# <cjk>
+0xE4DC	U+8446	# <cjk>
+0xE4DD	U+842C	# <cjk>
+0xE4DE	U+846F	# <cjk>
+0xE4DF	U+8479	# <cjk>
+0xE4E0	U+8435	# <cjk>
+0xE4E1	U+84CA	# <cjk>
+0xE4E2	U+8462	# <cjk>
+0xE4E3	U+84B9	# <cjk>
+0xE4E4	U+84BF	# <cjk>
+0xE4E5	U+849F	# <cjk>
+0xE4E6	U+84D9	# <cjk>
+0xE4E7	U+84CD	# <cjk>
+0xE4E8	U+84BB	# <cjk>
+0xE4E9	U+84DA	# <cjk>
+0xE4EA	U+84D0	# <cjk>
+0xE4EB	U+84C1	# <cjk>
+0xE4EC	U+84C6	# <cjk>
+0xE4ED	U+84D6	# <cjk>
+0xE4EE	U+84A1	# <cjk>
+0xE4EF	U+8521	# <cjk>
+0xE4F0	U+84FF	# <cjk>
+0xE4F1	U+84F4	# <cjk>
+0xE4F2	U+8517	# <cjk>
+0xE4F3	U+8518	# <cjk>
+0xE4F4	U+852C	# <cjk>
+0xE4F5	U+851F	# <cjk>
+0xE4F6	U+8515	# <cjk>
+0xE4F7	U+8514	# <cjk>
+0xE4F8	U+84FC	# <cjk>
+0xE4F9	U+8540	# <cjk>
+0xE4FA	U+8563	# <cjk>
+0xE4FB	U+8558	# <cjk>
+0xE4FC	U+8548	# <cjk>
+0xE540	U+8541	# <cjk>
+0xE541	U+8602	# <cjk>
+0xE542	U+854B	# <cjk>
+0xE543	U+8555	# <cjk>
+0xE544	U+8580	# <cjk>
+0xE545	U+85A4	# <cjk>
+0xE546	U+8588	# <cjk>
+0xE547	U+8591	# <cjk>
+0xE548	U+858A	# <cjk>
+0xE549	U+85A8	# <cjk>
+0xE54A	U+856D	# <cjk>
+0xE54B	U+8594	# <cjk>
+0xE54C	U+859B	# <cjk>
+0xE54D	U+85EA	# <cjk>
+0xE54E	U+8587	# <cjk>
+0xE54F	U+859C	# <cjk>
+0xE550	U+8577	# <cjk>
+0xE551	U+857E	# <cjk>
+0xE552	U+8590	# <cjk>
+0xE553	U+85C9	# <cjk>
+0xE554	U+85BA	# <cjk>
+0xE555	U+85CF	# <cjk>
+0xE556	U+85B9	# <cjk>
+0xE557	U+85D0	# <cjk>
+0xE558	U+85D5	# <cjk>
+0xE559	U+85DD	# <cjk>
+0xE55A	U+85E5	# <cjk>
+0xE55B	U+85DC	# <cjk>
+0xE55C	U+85F9	# <cjk>
+0xE55D	U+860A	# <cjk>
+0xE55E	U+8613	# <cjk>
+0xE55F	U+860B	# <cjk>
+0xE560	U+85FE	# <cjk>
+0xE561	U+85FA	# <cjk>
+0xE562	U+8606	# <cjk>
+0xE563	U+8622	# <cjk>
+0xE564	U+861A	# <cjk>
+0xE565	U+8630	# <cjk>
+0xE566	U+863F	# <cjk>
+0xE567	U+864D	# <cjk>
+0xE568	U+4E55	# <cjk>
+0xE569	U+8654	# <cjk>
+0xE56A	U+865F	# <cjk>
+0xE56B	U+8667	# <cjk>
+0xE56C	U+8671	# <cjk>
+0xE56D	U+8693	# <cjk>
+0xE56E	U+86A3	# <cjk>
+0xE56F	U+86A9	# <cjk>
+0xE570	U+86AA	# <cjk>
+0xE571	U+868B	# <cjk>
+0xE572	U+868C	# <cjk>
+0xE573	U+86B6	# <cjk>
+0xE574	U+86AF	# <cjk>
+0xE575	U+86C4	# <cjk>
+0xE576	U+86C6	# <cjk>
+0xE577	U+86B0	# <cjk>
+0xE578	U+86C9	# <cjk>
+0xE579	U+8823	# <cjk>
+0xE57A	U+86AB	# <cjk>
+0xE57B	U+86D4	# <cjk>
+0xE57C	U+86DE	# <cjk>
+0xE57D	U+86E9	# <cjk>
+0xE57E	U+86EC	# <cjk>
+0xE580	U+86DF	# <cjk>
+0xE581	U+86DB	# <cjk>
+0xE582	U+86EF	# <cjk>
+0xE583	U+8712	# <cjk>
+0xE584	U+8706	# <cjk>
+0xE585	U+8708	# <cjk>
+0xE586	U+8700	# <cjk>
+0xE587	U+8703	# <cjk>
+0xE588	U+86FB	# <cjk>
+0xE589	U+8711	# <cjk>
+0xE58A	U+8709	# <cjk>
+0xE58B	U+870D	# <cjk>
+0xE58C	U+86F9	# <cjk>
+0xE58D	U+870A	# <cjk>
+0xE58E	U+8734	# <cjk>
+0xE58F	U+873F	# <cjk>
+0xE590	U+8737	# <cjk>
+0xE591	U+873B	# <cjk>
+0xE592	U+8725	# <cjk>
+0xE593	U+8729	# <cjk>
+0xE594	U+871A	# <cjk>
+0xE595	U+8760	# <cjk>
+0xE596	U+875F	# <cjk>
+0xE597	U+8778	# <cjk>
+0xE598	U+874C	# <cjk>
+0xE599	U+874E	# <cjk>
+0xE59A	U+8774	# <cjk>
+0xE59B	U+8757	# <cjk>
+0xE59C	U+8768	# <cjk>
+0xE59D	U+876E	# <cjk>
+0xE59E	U+8759	# <cjk>
+0xE59F	U+8753	# <cjk>
+0xE5A0	U+8763	# <cjk>
+0xE5A1	U+876A	# <cjk>
+0xE5A2	U+8805	# <cjk>
+0xE5A3	U+87A2	# <cjk>
+0xE5A4	U+879F	# <cjk>
+0xE5A5	U+8782	# <cjk>
+0xE5A6	U+87AF	# <cjk>
+0xE5A7	U+87CB	# <cjk>
+0xE5A8	U+87BD	# <cjk>
+0xE5A9	U+87C0	# <cjk>
+0xE5AA	U+87D0	# <cjk>
+0xE5AB	U+96D6	# <cjk>
+0xE5AC	U+87AB	# <cjk>
+0xE5AD	U+87C4	# <cjk>
+0xE5AE	U+87B3	# <cjk>
+0xE5AF	U+87C7	# <cjk>
+0xE5B0	U+87C6	# <cjk>
+0xE5B1	U+87BB	# <cjk>
+0xE5B2	U+87EF	# <cjk>
+0xE5B3	U+87F2	# <cjk>
+0xE5B4	U+87E0	# <cjk>
+0xE5B5	U+880F	# <cjk>
+0xE5B6	U+880D	# <cjk>
+0xE5B7	U+87FE	# <cjk>
+0xE5B8	U+87F6	# <cjk>
+0xE5B9	U+87F7	# <cjk>
+0xE5BA	U+880E	# <cjk>
+0xE5BB	U+87D2	# <cjk>
+0xE5BC	U+8811	# <cjk>
+0xE5BD	U+8816	# <cjk>
+0xE5BE	U+8815	# <cjk>
+0xE5BF	U+8822	# <cjk>
+0xE5C0	U+8821	# <cjk>
+0xE5C1	U+8831	# <cjk>
+0xE5C2	U+8836	# <cjk>
+0xE5C3	U+8839	# <cjk>
+0xE5C4	U+8827	# <cjk>
+0xE5C5	U+883B	# <cjk>
+0xE5C6	U+8844	# <cjk>
+0xE5C7	U+8842	# <cjk>
+0xE5C8	U+8852	# <cjk>
+0xE5C9	U+8859	# <cjk>
+0xE5CA	U+885E	# <cjk>
+0xE5CB	U+8862	# <cjk>
+0xE5CC	U+886B	# <cjk>
+0xE5CD	U+8881	# <cjk>
+0xE5CE	U+887E	# <cjk>
+0xE5CF	U+889E	# <cjk>
+0xE5D0	U+8875	# <cjk>
+0xE5D1	U+887D	# <cjk>
+0xE5D2	U+88B5	# <cjk>
+0xE5D3	U+8872	# <cjk>
+0xE5D4	U+8882	# <cjk>
+0xE5D5	U+8897	# <cjk>
+0xE5D6	U+8892	# <cjk>
+0xE5D7	U+88AE	# <cjk>
+0xE5D8	U+8899	# <cjk>
+0xE5D9	U+88A2	# <cjk>
+0xE5DA	U+888D	# <cjk>
+0xE5DB	U+88A4	# <cjk>
+0xE5DC	U+88B0	# <cjk>
+0xE5DD	U+88BF	# <cjk>
+0xE5DE	U+88B1	# <cjk>
+0xE5DF	U+88C3	# <cjk>
+0xE5E0	U+88C4	# <cjk>
+0xE5E1	U+88D4	# <cjk>
+0xE5E2	U+88D8	# <cjk>
+0xE5E3	U+88D9	# <cjk>
+0xE5E4	U+88DD	# <cjk>
+0xE5E5	U+88F9	# <cjk>
+0xE5E6	U+8902	# <cjk>
+0xE5E7	U+88FC	# <cjk>
+0xE5E8	U+88F4	# <cjk>
+0xE5E9	U+88E8	# <cjk>
+0xE5EA	U+88F2	# <cjk>
+0xE5EB	U+8904	# <cjk>
+0xE5EC	U+890C	# <cjk>
+0xE5ED	U+890A	# <cjk>
+0xE5EE	U+8913	# <cjk>
+0xE5EF	U+8943	# <cjk>
+0xE5F0	U+891E	# <cjk>
+0xE5F1	U+8925	# <cjk>
+0xE5F2	U+892A	# <cjk>
+0xE5F3	U+892B	# <cjk>
+0xE5F4	U+8941	# <cjk>
+0xE5F5	U+8944	# <cjk>
+0xE5F6	U+893B	# <cjk>
+0xE5F7	U+8936	# <cjk>
+0xE5F8	U+8938	# <cjk>
+0xE5F9	U+894C	# <cjk>
+0xE5FA	U+891D	# <cjk>
+0xE5FB	U+8960	# <cjk>
+0xE5FC	U+895E	# <cjk>
+0xE640	U+8966	# <cjk>
+0xE641	U+8964	# <cjk>
+0xE642	U+896D	# <cjk>
+0xE643	U+896A	# <cjk>
+0xE644	U+896F	# <cjk>
+0xE645	U+8974	# <cjk>
+0xE646	U+8977	# <cjk>
+0xE647	U+897E	# <cjk>
+0xE648	U+8983	# <cjk>
+0xE649	U+8988	# <cjk>
+0xE64A	U+898A	# <cjk>
+0xE64B	U+8993	# <cjk>
+0xE64C	U+8998	# <cjk>
+0xE64D	U+89A1	# <cjk>
+0xE64E	U+89A9	# <cjk>
+0xE64F	U+89A6	# <cjk>
+0xE650	U+89AC	# <cjk>
+0xE651	U+89AF	# <cjk>
+0xE652	U+89B2	# <cjk>
+0xE653	U+89BA	# <cjk>
+0xE654	U+89BD	# <cjk>
+0xE655	U+89BF	# <cjk>
+0xE656	U+89C0	# <cjk>
+0xE657	U+89DA	# <cjk>
+0xE658	U+89DC	# <cjk>
+0xE659	U+89DD	# <cjk>
+0xE65A	U+89E7	# <cjk>
+0xE65B	U+89F4	# <cjk>
+0xE65C	U+89F8	# <cjk>
+0xE65D	U+8A03	# <cjk>
+0xE65E	U+8A16	# <cjk>
+0xE65F	U+8A10	# <cjk>
+0xE660	U+8A0C	# <cjk>
+0xE661	U+8A1B	# <cjk>
+0xE662	U+8A1D	# <cjk>
+0xE663	U+8A25	# <cjk>
+0xE664	U+8A36	# <cjk>
+0xE665	U+8A41	# <cjk>
+0xE666	U+8A5B	# <cjk>
+0xE667	U+8A52	# <cjk>
+0xE668	U+8A46	# <cjk>
+0xE669	U+8A48	# <cjk>
+0xE66A	U+8A7C	# <cjk>
+0xE66B	U+8A6D	# <cjk>
+0xE66C	U+8A6C	# <cjk>
+0xE66D	U+8A62	# <cjk>
+0xE66E	U+8A85	# <cjk>
+0xE66F	U+8A82	# <cjk>
+0xE670	U+8A84	# <cjk>
+0xE671	U+8AA8	# <cjk>
+0xE672	U+8AA1	# <cjk>
+0xE673	U+8A91	# <cjk>
+0xE674	U+8AA5	# <cjk>
+0xE675	U+8AA6	# <cjk>
+0xE676	U+8A9A	# <cjk>
+0xE677	U+8AA3	# <cjk>
+0xE678	U+8AC4	# <cjk>
+0xE679	U+8ACD	# <cjk>
+0xE67A	U+8AC2	# <cjk>
+0xE67B	U+8ADA	# <cjk>
+0xE67C	U+8AEB	# <cjk>
+0xE67D	U+8AF3	# <cjk>
+0xE67E	U+8AE7	# <cjk>
+0xE680	U+8AE4	# <cjk>
+0xE681	U+8AF1	# <cjk>
+0xE682	U+8B14	# <cjk>
+0xE683	U+8AE0	# <cjk>
+0xE684	U+8AE2	# <cjk>
+0xE685	U+8AF7	# <cjk>
+0xE686	U+8ADE	# <cjk>
+0xE687	U+8ADB	# <cjk>
+0xE688	U+8B0C	# <cjk>
+0xE689	U+8B07	# <cjk>
+0xE68A	U+8B1A	# <cjk>
+0xE68B	U+8AE1	# <cjk>
+0xE68C	U+8B16	# <cjk>
+0xE68D	U+8B10	# <cjk>
+0xE68E	U+8B17	# <cjk>
+0xE68F	U+8B20	# <cjk>
+0xE690	U+8B33	# <cjk>
+0xE691	U+97AB	# <cjk>
+0xE692	U+8B26	# <cjk>
+0xE693	U+8B2B	# <cjk>
+0xE694	U+8B3E	# <cjk>
+0xE695	U+8B28	# <cjk>
+0xE696	U+8B41	# <cjk>
+0xE697	U+8B4C	# <cjk>
+0xE698	U+8B4F	# <cjk>
+0xE699	U+8B4E	# <cjk>
+0xE69A	U+8B49	# <cjk>
+0xE69B	U+8B56	# <cjk>
+0xE69C	U+8B5B	# <cjk>
+0xE69D	U+8B5A	# <cjk>
+0xE69E	U+8B6B	# <cjk>
+0xE69F	U+8B5F	# <cjk>
+0xE6A0	U+8B6C	# <cjk>
+0xE6A1	U+8B6F	# <cjk>
+0xE6A2	U+8B74	# <cjk>
+0xE6A3	U+8B7D	# <cjk>
+0xE6A4	U+8B80	# <cjk>
+0xE6A5	U+8B8C	# <cjk>
+0xE6A6	U+8B8E	# <cjk>
+0xE6A7	U+8B92	# <cjk>
+0xE6A8	U+8B93	# <cjk>
+0xE6A9	U+8B96	# <cjk>
+0xE6AA	U+8B99	# <cjk>
+0xE6AB	U+8B9A	# <cjk>
+0xE6AC	U+8C3A	# <cjk>
+0xE6AD	U+8C41	# <cjk>
+0xE6AE	U+8C3F	# <cjk>
+0xE6AF	U+8C48	# <cjk>
+0xE6B0	U+8C4C	# <cjk>
+0xE6B1	U+8C4E	# <cjk>
+0xE6B2	U+8C50	# <cjk>
+0xE6B3	U+8C55	# <cjk>
+0xE6B4	U+8C62	# <cjk>
+0xE6B5	U+8C6C	# <cjk>
+0xE6B6	U+8C78	# <cjk>
+0xE6B7	U+8C7A	# <cjk>
+0xE6B8	U+8C82	# <cjk>
+0xE6B9	U+8C89	# <cjk>
+0xE6BA	U+8C85	# <cjk>
+0xE6BB	U+8C8A	# <cjk>
+0xE6BC	U+8C8D	# <cjk>
+0xE6BD	U+8C8E	# <cjk>
+0xE6BE	U+8C94	# <cjk>
+0xE6BF	U+8C7C	# <cjk>
+0xE6C0	U+8C98	# <cjk>
+0xE6C1	U+621D	# <cjk>
+0xE6C2	U+8CAD	# <cjk>
+0xE6C3	U+8CAA	# <cjk>
+0xE6C4	U+8CBD	# <cjk>
+0xE6C5	U+8CB2	# <cjk>
+0xE6C6	U+8CB3	# <cjk>
+0xE6C7	U+8CAE	# <cjk>
+0xE6C8	U+8CB6	# <cjk>
+0xE6C9	U+8CC8	# <cjk>
+0xE6CA	U+8CC1	# <cjk>
+0xE6CB	U+8CE4	# <cjk>
+0xE6CC	U+8CE3	# <cjk>
+0xE6CD	U+8CDA	# <cjk>
+0xE6CE	U+8CFD	# <cjk>
+0xE6CF	U+8CFA	# <cjk>
+0xE6D0	U+8CFB	# <cjk>
+0xE6D1	U+8D04	# <cjk>
+0xE6D2	U+8D05	# <cjk>
+0xE6D3	U+8D0A	# <cjk>
+0xE6D4	U+8D07	# <cjk>
+0xE6D5	U+8D0F	# <cjk>
+0xE6D6	U+8D0D	# <cjk>
+0xE6D7	U+8D10	# <cjk>
+0xE6D8	U+9F4E	# <cjk>
+0xE6D9	U+8D13	# <cjk>
+0xE6DA	U+8CCD	# <cjk>
+0xE6DB	U+8D14	# <cjk>
+0xE6DC	U+8D16	# <cjk>
+0xE6DD	U+8D67	# <cjk>
+0xE6DE	U+8D6D	# <cjk>
+0xE6DF	U+8D71	# <cjk>
+0xE6E0	U+8D73	# <cjk>
+0xE6E1	U+8D81	# <cjk>
+0xE6E2	U+8D99	# <cjk>
+0xE6E3	U+8DC2	# <cjk>
+0xE6E4	U+8DBE	# <cjk>
+0xE6E5	U+8DBA	# <cjk>
+0xE6E6	U+8DCF	# <cjk>
+0xE6E7	U+8DDA	# <cjk>
+0xE6E8	U+8DD6	# <cjk>
+0xE6E9	U+8DCC	# <cjk>
+0xE6EA	U+8DDB	# <cjk>
+0xE6EB	U+8DCB	# <cjk>
+0xE6EC	U+8DEA	# <cjk>
+0xE6ED	U+8DEB	# <cjk>
+0xE6EE	U+8DDF	# <cjk>
+0xE6EF	U+8DE3	# <cjk>
+0xE6F0	U+8DFC	# <cjk>
+0xE6F1	U+8E08	# <cjk>
+0xE6F2	U+8E09	# <cjk>
+0xE6F3	U+8DFF	# <cjk>
+0xE6F4	U+8E1D	# <cjk>
+0xE6F5	U+8E1E	# <cjk>
+0xE6F6	U+8E10	# <cjk>
+0xE6F7	U+8E1F	# <cjk>
+0xE6F8	U+8E42	# <cjk>
+0xE6F9	U+8E35	# <cjk>
+0xE6FA	U+8E30	# <cjk>
+0xE6FB	U+8E34	# <cjk>
+0xE6FC	U+8E4A	# <cjk>
+0xE740	U+8E47	# <cjk>
+0xE741	U+8E49	# <cjk>
+0xE742	U+8E4C	# <cjk>
+0xE743	U+8E50	# <cjk>
+0xE744	U+8E48	# <cjk>
+0xE745	U+8E59	# <cjk>
+0xE746	U+8E64	# <cjk>
+0xE747	U+8E60	# <cjk>
+0xE748	U+8E2A	# <cjk>
+0xE749	U+8E63	# <cjk>
+0xE74A	U+8E55	# <cjk>
+0xE74B	U+8E76	# <cjk>
+0xE74C	U+8E72	# <cjk>
+0xE74D	U+8E7C	# <cjk>
+0xE74E	U+8E81	# <cjk>
+0xE74F	U+8E87	# <cjk>
+0xE750	U+8E85	# <cjk>
+0xE751	U+8E84	# <cjk>
+0xE752	U+8E8B	# <cjk>
+0xE753	U+8E8A	# <cjk>
+0xE754	U+8E93	# <cjk>
+0xE755	U+8E91	# <cjk>
+0xE756	U+8E94	# <cjk>
+0xE757	U+8E99	# <cjk>
+0xE758	U+8EAA	# <cjk>
+0xE759	U+8EA1	# <cjk>
+0xE75A	U+8EAC	# <cjk>
+0xE75B	U+8EB0	# <cjk>
+0xE75C	U+8EC6	# <cjk>
+0xE75D	U+8EB1	# <cjk>
+0xE75E	U+8EBE	# <cjk>
+0xE75F	U+8EC5	# <cjk>
+0xE760	U+8EC8	# <cjk>
+0xE761	U+8ECB	# <cjk>
+0xE762	U+8EDB	# <cjk>
+0xE763	U+8EE3	# <cjk>
+0xE764	U+8EFC	# <cjk>
+0xE765	U+8EFB	# <cjk>
+0xE766	U+8EEB	# <cjk>
+0xE767	U+8EFE	# <cjk>
+0xE768	U+8F0A	# <cjk>
+0xE769	U+8F05	# <cjk>
+0xE76A	U+8F15	# <cjk>
+0xE76B	U+8F12	# <cjk>
+0xE76C	U+8F19	# <cjk>
+0xE76D	U+8F13	# <cjk>
+0xE76E	U+8F1C	# <cjk>
+0xE76F	U+8F1F	# <cjk>
+0xE770	U+8F1B	# <cjk>
+0xE771	U+8F0C	# <cjk>
+0xE772	U+8F26	# <cjk>
+0xE773	U+8F33	# <cjk>
+0xE774	U+8F3B	# <cjk>
+0xE775	U+8F39	# <cjk>
+0xE776	U+8F45	# <cjk>
+0xE777	U+8F42	# <cjk>
+0xE778	U+8F3E	# <cjk>
+0xE779	U+8F4C	# <cjk>
+0xE77A	U+8F49	# <cjk>
+0xE77B	U+8F46	# <cjk>
+0xE77C	U+8F4E	# <cjk>
+0xE77D	U+8F57	# <cjk>
+0xE77E	U+8F5C	# <cjk>
+0xE780	U+8F62	# <cjk>
+0xE781	U+8F63	# <cjk>
+0xE782	U+8F64	# <cjk>
+0xE783	U+8F9C	# <cjk>
+0xE784	U+8F9F	# <cjk>
+0xE785	U+8FA3	# <cjk>
+0xE786	U+8FAD	# <cjk>
+0xE787	U+8FAF	# <cjk>
+0xE788	U+8FB7	# <cjk>
+0xE789	U+8FDA	# <cjk>
+0xE78A	U+8FE5	# <cjk>
+0xE78B	U+8FE2	# <cjk>
+0xE78C	U+8FEA	# <cjk>
+0xE78D	U+8FEF	# <cjk>
+0xE78E	U+9087	# <cjk>
+0xE78F	U+8FF4	# <cjk>
+0xE790	U+9005	# <cjk>
+0xE791	U+8FF9	# <cjk>
+0xE792	U+8FFA	# <cjk>
+0xE793	U+9011	# <cjk>
+0xE794	U+9015	# <cjk>
+0xE795	U+9021	# <cjk>
+0xE796	U+900D	# <cjk>
+0xE797	U+901E	# <cjk>
+0xE798	U+9016	# <cjk>
+0xE799	U+900B	# <cjk>
+0xE79A	U+9027	# <cjk>
+0xE79B	U+9036	# <cjk>
+0xE79C	U+9035	# <cjk>
+0xE79D	U+9039	# <cjk>
+0xE79E	U+8FF8	# <cjk>
+0xE79F	U+904F	# <cjk>
+0xE7A0	U+9050	# <cjk>
+0xE7A1	U+9051	# <cjk>
+0xE7A2	U+9052	# <cjk>
+0xE7A3	U+900E	# <cjk>
+0xE7A4	U+9049	# <cjk>
+0xE7A5	U+903E	# <cjk>
+0xE7A6	U+9056	# <cjk>
+0xE7A7	U+9058	# <cjk>
+0xE7A8	U+905E	# <cjk>
+0xE7A9	U+9068	# <cjk>
+0xE7AA	U+906F	# <cjk>
+0xE7AB	U+9076	# <cjk>
+0xE7AC	U+96A8	# <cjk>
+0xE7AD	U+9072	# <cjk>
+0xE7AE	U+9082	# <cjk>
+0xE7AF	U+907D	# <cjk>
+0xE7B0	U+9081	# <cjk>
+0xE7B1	U+9080	# <cjk>
+0xE7B2	U+908A	# <cjk>
+0xE7B3	U+9089	# <cjk>
+0xE7B4	U+908F	# <cjk>
+0xE7B5	U+90A8	# <cjk>
+0xE7B6	U+90AF	# <cjk>
+0xE7B7	U+90B1	# <cjk>
+0xE7B8	U+90B5	# <cjk>
+0xE7B9	U+90E2	# <cjk>
+0xE7BA	U+90E4	# <cjk>
+0xE7BB	U+6248	# <cjk>
+0xE7BC	U+90DB	# <cjk>
+0xE7BD	U+9102	# <cjk>
+0xE7BE	U+9112	# <cjk>
+0xE7BF	U+9119	# <cjk>
+0xE7C0	U+9132	# <cjk>
+0xE7C1	U+9130	# <cjk>
+0xE7C2	U+914A	# <cjk>
+0xE7C3	U+9156	# <cjk>
+0xE7C4	U+9158	# <cjk>
+0xE7C5	U+9163	# <cjk>
+0xE7C6	U+9165	# <cjk>
+0xE7C7	U+9169	# <cjk>
+0xE7C8	U+9173	# <cjk>
+0xE7C9	U+9172	# <cjk>
+0xE7CA	U+918B	# <cjk>
+0xE7CB	U+9189	# <cjk>
+0xE7CC	U+9182	# <cjk>
+0xE7CD	U+91A2	# <cjk>
+0xE7CE	U+91AB	# <cjk>
+0xE7CF	U+91AF	# <cjk>
+0xE7D0	U+91AA	# <cjk>
+0xE7D1	U+91B5	# <cjk>
+0xE7D2	U+91B4	# <cjk>
+0xE7D3	U+91BA	# <cjk>
+0xE7D4	U+91C0	# <cjk>
+0xE7D5	U+91C1	# <cjk>
+0xE7D6	U+91C9	# <cjk>
+0xE7D7	U+91CB	# <cjk>
+0xE7D8	U+91D0	# <cjk>
+0xE7D9	U+91D6	# <cjk>
+0xE7DA	U+91DF	# <cjk>
+0xE7DB	U+91E1	# <cjk>
+0xE7DC	U+91DB	# <cjk>
+0xE7DD	U+91FC	# <cjk>
+0xE7DE	U+91F5	# <cjk>
+0xE7DF	U+91F6	# <cjk>
+0xE7E0	U+921E	# <cjk>
+0xE7E1	U+91FF	# <cjk>
+0xE7E2	U+9214	# <cjk>
+0xE7E3	U+922C	# <cjk>
+0xE7E4	U+9215	# <cjk>
+0xE7E5	U+9211	# <cjk>
+0xE7E6	U+925E	# <cjk>
+0xE7E7	U+9257	# <cjk>
+0xE7E8	U+9245	# <cjk>
+0xE7E9	U+9249	# <cjk>
+0xE7EA	U+9264	# <cjk>
+0xE7EB	U+9248	# <cjk>
+0xE7EC	U+9295	# <cjk>
+0xE7ED	U+923F	# <cjk>
+0xE7EE	U+924B	# <cjk>
+0xE7EF	U+9250	# <cjk>
+0xE7F0	U+929C	# <cjk>
+0xE7F1	U+9296	# <cjk>
+0xE7F2	U+9293	# <cjk>
+0xE7F3	U+929B	# <cjk>
+0xE7F4	U+925A	# <cjk>
+0xE7F5	U+92CF	# <cjk>
+0xE7F6	U+92B9	# <cjk>
+0xE7F7	U+92B7	# <cjk>
+0xE7F8	U+92E9	# <cjk>
+0xE7F9	U+930F	# <cjk>
+0xE7FA	U+92FA	# <cjk>
+0xE7FB	U+9344	# <cjk>
+0xE7FC	U+932E	# <cjk>
+0xE840	U+9319	# <cjk>
+0xE841	U+9322	# <cjk>
+0xE842	U+931A	# <cjk>
+0xE843	U+9323	# <cjk>
+0xE844	U+933A	# <cjk>
+0xE845	U+9335	# <cjk>
+0xE846	U+933B	# <cjk>
+0xE847	U+935C	# <cjk>
+0xE848	U+9360	# <cjk>
+0xE849	U+937C	# <cjk>
+0xE84A	U+936E	# <cjk>
+0xE84B	U+9356	# <cjk>
+0xE84C	U+93B0	# <cjk>
+0xE84D	U+93AC	# <cjk>
+0xE84E	U+93AD	# <cjk>
+0xE84F	U+9394	# <cjk>
+0xE850	U+93B9	# <cjk>
+0xE851	U+93D6	# <cjk>
+0xE852	U+93D7	# <cjk>
+0xE853	U+93E8	# <cjk>
+0xE854	U+93E5	# <cjk>
+0xE855	U+93D8	# <cjk>
+0xE856	U+93C3	# <cjk>
+0xE857	U+93DD	# <cjk>
+0xE858	U+93D0	# <cjk>
+0xE859	U+93C8	# <cjk>
+0xE85A	U+93E4	# <cjk>
+0xE85B	U+941A	# <cjk>
+0xE85C	U+9414	# <cjk>
+0xE85D	U+9413	# <cjk>
+0xE85E	U+9403	# <cjk>
+0xE85F	U+9407	# <cjk>
+0xE860	U+9410	# <cjk>
+0xE861	U+9436	# <cjk>
+0xE862	U+942B	# <cjk>
+0xE863	U+9435	# <cjk>
+0xE864	U+9421	# <cjk>
+0xE865	U+943A	# <cjk>
+0xE866	U+9441	# <cjk>
+0xE867	U+9452	# <cjk>
+0xE868	U+9444	# <cjk>
+0xE869	U+945B	# <cjk>
+0xE86A	U+9460	# <cjk>
+0xE86B	U+9462	# <cjk>
+0xE86C	U+945E	# <cjk>
+0xE86D	U+946A	# <cjk>
+0xE86E	U+9229	# <cjk>
+0xE86F	U+9470	# <cjk>
+0xE870	U+9475	# <cjk>
+0xE871	U+9477	# <cjk>
+0xE872	U+947D	# <cjk>
+0xE873	U+945A	# <cjk>
+0xE874	U+947C	# <cjk>
+0xE875	U+947E	# <cjk>
+0xE876	U+9481	# <cjk>
+0xE877	U+947F	# <cjk>
+0xE878	U+9582	# <cjk>
+0xE879	U+9587	# <cjk>
+0xE87A	U+958A	# <cjk>
+0xE87B	U+9594	# <cjk>
+0xE87C	U+9596	# <cjk>
+0xE87D	U+9598	# <cjk>
+0xE87E	U+9599	# <cjk>
+0xE880	U+95A0	# <cjk>
+0xE881	U+95A8	# <cjk>
+0xE882	U+95A7	# <cjk>
+0xE883	U+95AD	# <cjk>
+0xE884	U+95BC	# <cjk>
+0xE885	U+95BB	# <cjk>
+0xE886	U+95B9	# <cjk>
+0xE887	U+95BE	# <cjk>
+0xE888	U+95CA	# <cjk>
+0xE889	U+6FF6	# <cjk>
+0xE88A	U+95C3	# <cjk>
+0xE88B	U+95CD	# <cjk>
+0xE88C	U+95CC	# <cjk>
+0xE88D	U+95D5	# <cjk>
+0xE88E	U+95D4	# <cjk>
+0xE88F	U+95D6	# <cjk>
+0xE890	U+95DC	# <cjk>
+0xE891	U+95E1	# <cjk>
+0xE892	U+95E5	# <cjk>
+0xE893	U+95E2	# <cjk>
+0xE894	U+9621	# <cjk>
+0xE895	U+9628	# <cjk>
+0xE896	U+962E	# <cjk>
+0xE897	U+962F	# <cjk>
+0xE898	U+9642	# <cjk>
+0xE899	U+964C	# <cjk>
+0xE89A	U+964F	# <cjk>
+0xE89B	U+964B	# <cjk>
+0xE89C	U+9677	# <cjk>
+0xE89D	U+965C	# <cjk>
+0xE89E	U+965E	# <cjk>
+0xE89F	U+965D	# <cjk>
+0xE8A0	U+965F	# <cjk>
+0xE8A1	U+9666	# <cjk>
+0xE8A2	U+9672	# <cjk>
+0xE8A3	U+966C	# <cjk>
+0xE8A4	U+968D	# <cjk>
+0xE8A5	U+9698	# <cjk>
+0xE8A6	U+9695	# <cjk>
+0xE8A7	U+9697	# <cjk>
+0xE8A8	U+96AA	# <cjk>
+0xE8A9	U+96A7	# <cjk>
+0xE8AA	U+96B1	# <cjk>
+0xE8AB	U+96B2	# <cjk>
+0xE8AC	U+96B0	# <cjk>
+0xE8AD	U+96B4	# <cjk>
+0xE8AE	U+96B6	# <cjk>
+0xE8AF	U+96B8	# <cjk>
+0xE8B0	U+96B9	# <cjk>
+0xE8B1	U+96CE	# <cjk>
+0xE8B2	U+96CB	# <cjk>
+0xE8B3	U+96C9	# <cjk>
+0xE8B4	U+96CD	# <cjk>
+0xE8B5	U+894D	# <cjk>
+0xE8B6	U+96DC	# <cjk>
+0xE8B7	U+970D	# <cjk>
+0xE8B8	U+96D5	# <cjk>
+0xE8B9	U+96F9	# <cjk>
+0xE8BA	U+9704	# <cjk>
+0xE8BB	U+9706	# <cjk>
+0xE8BC	U+9708	# <cjk>
+0xE8BD	U+9713	# <cjk>
+0xE8BE	U+970E	# <cjk>
+0xE8BF	U+9711	# <cjk>
+0xE8C0	U+970F	# <cjk>
+0xE8C1	U+9716	# <cjk>
+0xE8C2	U+9719	# <cjk>
+0xE8C3	U+9724	# <cjk>
+0xE8C4	U+972A	# <cjk>
+0xE8C5	U+9730	# <cjk>
+0xE8C6	U+9739	# <cjk>
+0xE8C7	U+973D	# <cjk>
+0xE8C8	U+973E	# <cjk>
+0xE8C9	U+9744	# <cjk>
+0xE8CA	U+9746	# <cjk>
+0xE8CB	U+9748	# <cjk>
+0xE8CC	U+9742	# <cjk>
+0xE8CD	U+9749	# <cjk>
+0xE8CE	U+975C	# <cjk>
+0xE8CF	U+9760	# <cjk>
+0xE8D0	U+9764	# <cjk>
+0xE8D1	U+9766	# <cjk>
+0xE8D2	U+9768	# <cjk>
+0xE8D3	U+52D2	# <cjk>
+0xE8D4	U+976B	# <cjk>
+0xE8D5	U+9771	# <cjk>
+0xE8D6	U+9779	# <cjk>
+0xE8D7	U+9785	# <cjk>
+0xE8D8	U+977C	# <cjk>
+0xE8D9	U+9781	# <cjk>
+0xE8DA	U+977A	# <cjk>
+0xE8DB	U+9786	# <cjk>
+0xE8DC	U+978B	# <cjk>
+0xE8DD	U+978F	# <cjk>
+0xE8DE	U+9790	# <cjk>
+0xE8DF	U+979C	# <cjk>
+0xE8E0	U+97A8	# <cjk>
+0xE8E1	U+97A6	# <cjk>
+0xE8E2	U+97A3	# <cjk>
+0xE8E3	U+97B3	# <cjk>
+0xE8E4	U+97B4	# <cjk>
+0xE8E5	U+97C3	# <cjk>
+0xE8E6	U+97C6	# <cjk>
+0xE8E7	U+97C8	# <cjk>
+0xE8E8	U+97CB	# <cjk>
+0xE8E9	U+97DC	# <cjk>
+0xE8EA	U+97ED	# <cjk>
+0xE8EB	U+9F4F	# <cjk>
+0xE8EC	U+97F2	# <cjk>
+0xE8ED	U+7ADF	# <cjk>
+0xE8EE	U+97F6	# <cjk>
+0xE8EF	U+97F5	# <cjk>
+0xE8F0	U+980F	# <cjk>
+0xE8F1	U+980C	# <cjk>
+0xE8F2	U+9838	# <cjk>
+0xE8F3	U+9824	# <cjk>
+0xE8F4	U+9821	# <cjk>
+0xE8F5	U+9837	# <cjk>
+0xE8F6	U+983D	# <cjk>
+0xE8F7	U+9846	# <cjk>
+0xE8F8	U+984F	# <cjk>
+0xE8F9	U+984B	# <cjk>
+0xE8FA	U+986B	# <cjk>
+0xE8FB	U+986F	# <cjk>
+0xE8FC	U+9870	# <cjk>
+0xE940	U+9871	# <cjk>
+0xE941	U+9874	# <cjk>
+0xE942	U+9873	# <cjk>
+0xE943	U+98AA	# <cjk>
+0xE944	U+98AF	# <cjk>
+0xE945	U+98B1	# <cjk>
+0xE946	U+98B6	# <cjk>
+0xE947	U+98C4	# <cjk>
+0xE948	U+98C3	# <cjk>
+0xE949	U+98C6	# <cjk>
+0xE94A	U+98E9	# <cjk>
+0xE94B	U+98EB	# <cjk>
+0xE94C	U+9903	# <cjk>
+0xE94D	U+9909	# <cjk>
+0xE94E	U+9912	# <cjk>
+0xE94F	U+9914	# <cjk>
+0xE950	U+9918	# <cjk>
+0xE951	U+9921	# <cjk>
+0xE952	U+991D	# <cjk>
+0xE953	U+991E	# <cjk>
+0xE954	U+9924	# <cjk>
+0xE955	U+9920	# <cjk>
+0xE956	U+992C	# <cjk>
+0xE957	U+992E	# <cjk>
+0xE958	U+993D	# <cjk>
+0xE959	U+993E	# <cjk>
+0xE95A	U+9942	# <cjk>
+0xE95B	U+9949	# <cjk>
+0xE95C	U+9945	# <cjk>
+0xE95D	U+9950	# <cjk>
+0xE95E	U+994B	# <cjk>
+0xE95F	U+9951	# <cjk>
+0xE960	U+9952	# <cjk>
+0xE961	U+994C	# <cjk>
+0xE962	U+9955	# <cjk>
+0xE963	U+9997	# <cjk>
+0xE964	U+9998	# <cjk>
+0xE965	U+99A5	# <cjk>
+0xE966	U+99AD	# <cjk>
+0xE967	U+99AE	# <cjk>
+0xE968	U+99BC	# <cjk>
+0xE969	U+99DF	# <cjk>
+0xE96A	U+99DB	# <cjk>
+0xE96B	U+99DD	# <cjk>
+0xE96C	U+99D8	# <cjk>
+0xE96D	U+99D1	# <cjk>
+0xE96E	U+99ED	# <cjk>
+0xE96F	U+99EE	# <cjk>
+0xE970	U+99F1	# <cjk>
+0xE971	U+99F2	# <cjk>
+0xE972	U+99FB	# <cjk>
+0xE973	U+99F8	# <cjk>
+0xE974	U+9A01	# <cjk>
+0xE975	U+9A0F	# <cjk>
+0xE976	U+9A05	# <cjk>
+0xE977	U+99E2	# <cjk>
+0xE978	U+9A19	# <cjk>
+0xE979	U+9A2B	# <cjk>
+0xE97A	U+9A37	# <cjk>
+0xE97B	U+9A45	# <cjk>
+0xE97C	U+9A42	# <cjk>
+0xE97D	U+9A40	# <cjk>
+0xE97E	U+9A43	# <cjk>
+0xE980	U+9A3E	# <cjk>
+0xE981	U+9A55	# <cjk>
+0xE982	U+9A4D	# <cjk>
+0xE983	U+9A5B	# <cjk>
+0xE984	U+9A57	# <cjk>
+0xE985	U+9A5F	# <cjk>
+0xE986	U+9A62	# <cjk>
+0xE987	U+9A65	# <cjk>
+0xE988	U+9A64	# <cjk>
+0xE989	U+9A69	# <cjk>
+0xE98A	U+9A6B	# <cjk>
+0xE98B	U+9A6A	# <cjk>
+0xE98C	U+9AAD	# <cjk>
+0xE98D	U+9AB0	# <cjk>
+0xE98E	U+9ABC	# <cjk>
+0xE98F	U+9AC0	# <cjk>
+0xE990	U+9ACF	# <cjk>
+0xE991	U+9AD1	# <cjk>
+0xE992	U+9AD3	# <cjk>
+0xE993	U+9AD4	# <cjk>
+0xE994	U+9ADE	# <cjk>
+0xE995	U+9ADF	# <cjk>
+0xE996	U+9AE2	# <cjk>
+0xE997	U+9AE3	# <cjk>
+0xE998	U+9AE6	# <cjk>
+0xE999	U+9AEF	# <cjk>
+0xE99A	U+9AEB	# <cjk>
+0xE99B	U+9AEE	# <cjk>
+0xE99C	U+9AF4	# <cjk>
+0xE99D	U+9AF1	# <cjk>
+0xE99E	U+9AF7	# <cjk>
+0xE99F	U+9AFB	# <cjk>
+0xE9A0	U+9B06	# <cjk>
+0xE9A1	U+9B18	# <cjk>
+0xE9A2	U+9B1A	# <cjk>
+0xE9A3	U+9B1F	# <cjk>
+0xE9A4	U+9B22	# <cjk>
+0xE9A5	U+9B23	# <cjk>
+0xE9A6	U+9B25	# <cjk>
+0xE9A7	U+9B27	# <cjk>
+0xE9A8	U+9B28	# <cjk>
+0xE9A9	U+9B29	# <cjk>
+0xE9AA	U+9B2A	# <cjk>
+0xE9AB	U+9B2E	# <cjk>
+0xE9AC	U+9B2F	# <cjk>
+0xE9AD	U+9B32	# <cjk>
+0xE9AE	U+9B44	# <cjk>
+0xE9AF	U+9B43	# <cjk>
+0xE9B0	U+9B4F	# <cjk>
+0xE9B1	U+9B4D	# <cjk>
+0xE9B2	U+9B4E	# <cjk>
+0xE9B3	U+9B51	# <cjk>
+0xE9B4	U+9B58	# <cjk>
+0xE9B5	U+9B74	# <cjk>
+0xE9B6	U+9B93	# <cjk>
+0xE9B7	U+9B83	# <cjk>
+0xE9B8	U+9B91	# <cjk>
+0xE9B9	U+9B96	# <cjk>
+0xE9BA	U+9B97	# <cjk>
+0xE9BB	U+9B9F	# <cjk>
+0xE9BC	U+9BA0	# <cjk>
+0xE9BD	U+9BA8	# <cjk>
+0xE9BE	U+9BB4	# <cjk>
+0xE9BF	U+9BC0	# <cjk>
+0xE9C0	U+9BCA	# <cjk>
+0xE9C1	U+9BB9	# <cjk>
+0xE9C2	U+9BC6	# <cjk>
+0xE9C3	U+9BCF	# <cjk>
+0xE9C4	U+9BD1	# <cjk>
+0xE9C5	U+9BD2	# <cjk>
+0xE9C6	U+9BE3	# <cjk>
+0xE9C7	U+9BE2	# <cjk>
+0xE9C8	U+9BE4	# <cjk>
+0xE9C9	U+9BD4	# <cjk>
+0xE9CA	U+9BE1	# <cjk>
+0xE9CB	U+9C3A	# <cjk>
+0xE9CC	U+9BF2	# <cjk>
+0xE9CD	U+9BF1	# <cjk>
+0xE9CE	U+9BF0	# <cjk>
+0xE9CF	U+9C15	# <cjk>
+0xE9D0	U+9C14	# <cjk>
+0xE9D1	U+9C09	# <cjk>
+0xE9D2	U+9C13	# <cjk>
+0xE9D3	U+9C0C	# <cjk>
+0xE9D4	U+9C06	# <cjk>
+0xE9D5	U+9C08	# <cjk>
+0xE9D6	U+9C12	# <cjk>
+0xE9D7	U+9C0A	# <cjk>
+0xE9D8	U+9C04	# <cjk>
+0xE9D9	U+9C2E	# <cjk>
+0xE9DA	U+9C1B	# <cjk>
+0xE9DB	U+9C25	# <cjk>
+0xE9DC	U+9C24	# <cjk>
+0xE9DD	U+9C21	# <cjk>
+0xE9DE	U+9C30	# <cjk>
+0xE9DF	U+9C47	# <cjk>
+0xE9E0	U+9C32	# <cjk>
+0xE9E1	U+9C46	# <cjk>
+0xE9E2	U+9C3E	# <cjk>
+0xE9E3	U+9C5A	# <cjk>
+0xE9E4	U+9C60	# <cjk>
+0xE9E5	U+9C67	# <cjk>
+0xE9E6	U+9C76	# <cjk>
+0xE9E7	U+9C78	# <cjk>
+0xE9E8	U+9CE7	# <cjk>
+0xE9E9	U+9CEC	# <cjk>
+0xE9EA	U+9CF0	# <cjk>
+0xE9EB	U+9D09	# <cjk>
+0xE9EC	U+9D08	# <cjk>
+0xE9ED	U+9CEB	# <cjk>
+0xE9EE	U+9D03	# <cjk>
+0xE9EF	U+9D06	# <cjk>
+0xE9F0	U+9D2A	# <cjk>
+0xE9F1	U+9D26	# <cjk>
+0xE9F2	U+9DAF	# <cjk>
+0xE9F3	U+9D23	# <cjk>
+0xE9F4	U+9D1F	# <cjk>
+0xE9F5	U+9D44	# <cjk>
+0xE9F6	U+9D15	# <cjk>
+0xE9F7	U+9D12	# <cjk>
+0xE9F8	U+9D41	# <cjk>
+0xE9F9	U+9D3F	# <cjk>
+0xE9FA	U+9D3E	# <cjk>
+0xE9FB	U+9D46	# <cjk>
+0xE9FC	U+9D48	# <cjk>
+0xEA40	U+9D5D	# <cjk>
+0xEA41	U+9D5E	# <cjk>
+0xEA42	U+9D64	# <cjk>
+0xEA43	U+9D51	# <cjk>
+0xEA44	U+9D50	# <cjk>
+0xEA45	U+9D59	# <cjk>
+0xEA46	U+9D72	# <cjk>
+0xEA47	U+9D89	# <cjk>
+0xEA48	U+9D87	# <cjk>
+0xEA49	U+9DAB	# <cjk>
+0xEA4A	U+9D6F	# <cjk>
+0xEA4B	U+9D7A	# <cjk>
+0xEA4C	U+9D9A	# <cjk>
+0xEA4D	U+9DA4	# <cjk>
+0xEA4E	U+9DA9	# <cjk>
+0xEA4F	U+9DB2	# <cjk>
+0xEA50	U+9DC4	# <cjk>
+0xEA51	U+9DC1	# <cjk>
+0xEA52	U+9DBB	# <cjk>
+0xEA53	U+9DB8	# <cjk>
+0xEA54	U+9DBA	# <cjk>
+0xEA55	U+9DC6	# <cjk>
+0xEA56	U+9DCF	# <cjk>
+0xEA57	U+9DC2	# <cjk>
+0xEA58	U+9DD9	# <cjk>
+0xEA59	U+9DD3	# <cjk>
+0xEA5A	U+9DF8	# <cjk>
+0xEA5B	U+9DE6	# <cjk>
+0xEA5C	U+9DED	# <cjk>
+0xEA5D	U+9DEF	# <cjk>
+0xEA5E	U+9DFD	# <cjk>
+0xEA5F	U+9E1A	# <cjk>
+0xEA60	U+9E1B	# <cjk>
+0xEA61	U+9E1E	# <cjk>
+0xEA62	U+9E75	# <cjk>
+0xEA63	U+9E79	# <cjk>
+0xEA64	U+9E7D	# <cjk>
+0xEA65	U+9E81	# <cjk>
+0xEA66	U+9E88	# <cjk>
+0xEA67	U+9E8B	# <cjk>
+0xEA68	U+9E8C	# <cjk>
+0xEA69	U+9E92	# <cjk>
+0xEA6A	U+9E95	# <cjk>
+0xEA6B	U+9E91	# <cjk>
+0xEA6C	U+9E9D	# <cjk>
+0xEA6D	U+9EA5	# <cjk>
+0xEA6E	U+9EA9	# <cjk>
+0xEA6F	U+9EB8	# <cjk>
+0xEA70	U+9EAA	# <cjk>
+0xEA71	U+9EAD	# <cjk>
+0xEA72	U+9761	# <cjk>
+0xEA73	U+9ECC	# <cjk>
+0xEA74	U+9ECE	# <cjk>
+0xEA75	U+9ECF	# <cjk>
+0xEA76	U+9ED0	# <cjk>
+0xEA77	U+9ED4	# <cjk>
+0xEA78	U+9EDC	# <cjk>
+0xEA79	U+9EDE	# <cjk>
+0xEA7A	U+9EDD	# <cjk>
+0xEA7B	U+9EE0	# <cjk>
+0xEA7C	U+9EE5	# <cjk>
+0xEA7D	U+9EE8	# <cjk>
+0xEA7E	U+9EEF	# <cjk>
+0xEA80	U+9EF4	# <cjk>
+0xEA81	U+9EF6	# <cjk>
+0xEA82	U+9EF7	# <cjk>
+0xEA83	U+9EF9	# <cjk>
+0xEA84	U+9EFB	# <cjk>
+0xEA85	U+9EFC	# <cjk>
+0xEA86	U+9EFD	# <cjk>
+0xEA87	U+9F07	# <cjk>
+0xEA88	U+9F08	# <cjk>
+0xEA89	U+76B7	# <cjk>
+0xEA8A	U+9F15	# <cjk>
+0xEA8B	U+9F21	# <cjk>
+0xEA8C	U+9F2C	# <cjk>
+0xEA8D	U+9F3E	# <cjk>
+0xEA8E	U+9F4A	# <cjk>
+0xEA8F	U+9F52	# <cjk>
+0xEA90	U+9F54	# <cjk>
+0xEA91	U+9F63	# <cjk>
+0xEA92	U+9F5F	# <cjk>
+0xEA93	U+9F60	# <cjk>
+0xEA94	U+9F61	# <cjk>
+0xEA95	U+9F66	# <cjk>
+0xEA96	U+9F67	# <cjk>
+0xEA97	U+9F6C	# <cjk>
+0xEA98	U+9F6A	# <cjk>
+0xEA99	U+9F77	# <cjk>
+0xEA9A	U+9F72	# <cjk>
+0xEA9B	U+9F76	# <cjk>
+0xEA9C	U+9F95	# <cjk>
+0xEA9D	U+9F9C	# <cjk>
+0xEA9E	U+9FA0	# <cjk>
+0xEA9F	U+582F	# <cjk>	[1983]
+0xEAA0	U+69C7	# <cjk>	[1983]
+0xEAA1	U+9059	# <cjk>	[1983]
+0xEAA2	U+7464	# <cjk>	[1983]
+0xEAA3	U+51DC	# <cjk>	[1990]
+0xEAA4	U+7199	# <cjk>	[1990]
+0xEAA5	U+5653	# <cjk>	[2004]
+0xEAA6	U+5DE2	# <cjk>	[2000]
+0xEAA7	U+5E14	# <cjk>	[2000]
+0xEAA8	U+5E18	# <cjk>	[2000]
+0xEAA9	U+5E58	# <cjk>	[2000]
+0xEAAA	U+5E5E	# <cjk>	[2000]
+0xEAAB	U+5EBE	# <cjk>	[2000]
+0xEAAC	U+F928	# CJK COMPATIBILITY IDEOGRAPH-F928	[2000]
+0xEAAD	U+5ECB	# <cjk>	[2000]
+0xEAAE	U+5EF9	# <cjk>	[2000]
+0xEAAF	U+5F00	# <cjk>	[2000]
+0xEAB0	U+5F02	# <cjk>	[2000]
+0xEAB1	U+5F07	# <cjk>	[2000]
+0xEAB2	U+5F1D	# <cjk>	[2000]
+0xEAB3	U+5F23	# <cjk>	[2000]
+0xEAB4	U+5F34	# <cjk>	[2000]
+0xEAB5	U+5F36	# <cjk>	[2000]
+0xEAB6	U+5F3D	# <cjk>	[2000]
+0xEAB7	U+5F40	# <cjk>	[2000]
+0xEAB8	U+5F45	# <cjk>	[2000]
+0xEAB9	U+5F54	# <cjk>	[2000]
+0xEABA	U+5F58	# <cjk>	[2000]
+0xEABB	U+5F64	# <cjk>	[2000]
+0xEABC	U+5F67	# <cjk>	[2000]
+0xEABD	U+5F7D	# <cjk>	[2000]
+0xEABE	U+5F89	# <cjk>	[2000]
+0xEABF	U+5F9C	# <cjk>	[2000]
+0xEAC0	U+5FA7	# <cjk>	[2000]
+0xEAC1	U+5FAF	# <cjk>	[2000]
+0xEAC2	U+5FB5	# <cjk>	[2000]
+0xEAC3	U+5FB7	# <cjk>	[2000]
+0xEAC4	U+5FC9	# <cjk>	[2000]
+0xEAC5	U+5FDE	# <cjk>	[2000]
+0xEAC6	U+5FE1	# <cjk>	[2000]
+0xEAC7	U+5FE9	# <cjk>	[2000]
+0xEAC8	U+600D	# <cjk>	[2000]
+0xEAC9	U+6014	# <cjk>	[2000]
+0xEACA	U+6018	# <cjk>	[2000]
+0xEACB	U+6033	# <cjk>	[2000]
+0xEACC	U+6035	# <cjk>	[2000]
+0xEACD	U+6047	# <cjk>	[2000]
+0xEACE	U+FA3D	# CJK COMPATIBILITY IDEOGRAPH-FA3D	[2000]	[Unicode3.2]
+0xEACF	U+609D	# <cjk>	[2000]
+0xEAD0	U+609E	# <cjk>	[2000]
+0xEAD1	U+60CB	# <cjk>	[2000]
+0xEAD2	U+60D4	# <cjk>	[2000]
+0xEAD3	U+60D5	# <cjk>	[2000]
+0xEAD4	U+60DD	# <cjk>	[2000]
+0xEAD5	U+60F8	# <cjk>	[2000]
+0xEAD6	U+611C	# <cjk>	[2000]
+0xEAD7	U+612B	# <cjk>	[2000]
+0xEAD8	U+6130	# <cjk>	[2000]
+0xEAD9	U+6137	# <cjk>	[2000]
+0xEADA	U+FA3E	# CJK COMPATIBILITY IDEOGRAPH-FA3E	[2000]	[Unicode3.2]
+0xEADB	U+618D	# <cjk>	[2000]
+0xEADC	U+FA3F	# CJK COMPATIBILITY IDEOGRAPH-FA3F	[2000]	[Unicode3.2]
+0xEADD	U+61BC	# <cjk>	[2000]
+0xEADE	U+61B9	# <cjk>	[2000]
+0xEADF	U+FA40	# CJK COMPATIBILITY IDEOGRAPH-FA40	[2000]	[Unicode3.2]
+0xEAE0	U+6222	# <cjk>	[2000]
+0xEAE1	U+623E	# <cjk>	[2000]
+0xEAE2	U+6243	# <cjk>	[2000]
+0xEAE3	U+6256	# <cjk>	[2000]
+0xEAE4	U+625A	# <cjk>	[2000]
+0xEAE5	U+626F	# <cjk>	[2000]
+0xEAE6	U+6285	# <cjk>	[2000]
+0xEAE7	U+62C4	# <cjk>	[2000]
+0xEAE8	U+62D6	# <cjk>	[2000]
+0xEAE9	U+62FC	# <cjk>	[2000]
+0xEAEA	U+630A	# <cjk>	[2000]
+0xEAEB	U+6318	# <cjk>	[2000]
+0xEAEC	U+6339	# <cjk>	[2000]
+0xEAED	U+6343	# <cjk>	[2000]
+0xEAEE	U+6365	# <cjk>	[2000]
+0xEAEF	U+637C	# <cjk>	[2000]
+0xEAF0	U+63E5	# <cjk>	[2000]
+0xEAF1	U+63ED	# <cjk>	[2000]
+0xEAF2	U+63F5	# <cjk>	[2000]
+0xEAF3	U+6410	# <cjk>	[2000]
+0xEAF4	U+6414	# <cjk>	[2000]
+0xEAF5	U+6422	# <cjk>	[2000]
+0xEAF6	U+6479	# <cjk>	[2000]
+0xEAF7	U+6451	# <cjk>	[2000]
+0xEAF8	U+6460	# <cjk>	[2000]
+0xEAF9	U+646D	# <cjk>	[2000]
+0xEAFA	U+64CE	# <cjk>	[2000]
+0xEAFB	U+64BE	# <cjk>	[2000]
+0xEAFC	U+64BF	# <cjk>	[2000]
+0xEB40	U+64C4	# <cjk>	[2000]
+0xEB41	U+64CA	# <cjk>	[2000]
+0xEB42	U+64D0	# <cjk>	[2000]
+0xEB43	U+64F7	# <cjk>	[2000]
+0xEB44	U+64FB	# <cjk>	[2000]
+0xEB45	U+6522	# <cjk>	[2000]
+0xEB46	U+6529	# <cjk>	[2000]
+0xEB47	U+FA41	# CJK COMPATIBILITY IDEOGRAPH-FA41	[2000]	[Unicode3.2]
+0xEB48	U+6567	# <cjk>	[2000]
+0xEB49	U+659D	# <cjk>	[2000]
+0xEB4A	U+FA42	# CJK COMPATIBILITY IDEOGRAPH-FA42	[2000]	[Unicode3.2]
+0xEB4B	U+6600	# <cjk>	[2000]
+0xEB4C	U+6609	# <cjk>	[2000]
+0xEB4D	U+6615	# <cjk>	[2000]
+0xEB4E	U+661E	# <cjk>	[2000]
+0xEB4F	U+663A	# <cjk>	[2000]
+0xEB50	U+6622	# <cjk>	[2000]
+0xEB51	U+6624	# <cjk>	[2000]
+0xEB52	U+662B	# <cjk>	[2000]
+0xEB53	U+6630	# <cjk>	[2000]
+0xEB54	U+6631	# <cjk>	[2000]
+0xEB55	U+6633	# <cjk>	[2000]
+0xEB56	U+66FB	# <cjk>	[2000]
+0xEB57	U+6648	# <cjk>	[2000]
+0xEB58	U+664C	# <cjk>	[2000]
+0xEB59	U+231C4	# <cjk>	[2000]	[Unicode3.1]
+0xEB5A	U+6659	# <cjk>	[2000]
+0xEB5B	U+665A	# <cjk>	[2000]
+0xEB5C	U+6661	# <cjk>	[2000]
+0xEB5D	U+6665	# <cjk>	[2000]
+0xEB5E	U+6673	# <cjk>	[2000]
+0xEB5F	U+6677	# <cjk>	[2000]
+0xEB60	U+6678	# <cjk>	[2000]
+0xEB61	U+668D	# <cjk>	[2000]
+0xEB62	U+FA43	# CJK COMPATIBILITY IDEOGRAPH-FA43	[2000]	[Unicode3.2]
+0xEB63	U+66A0	# <cjk>	[2000]
+0xEB64	U+66B2	# <cjk>	[2000]
+0xEB65	U+66BB	# <cjk>	[2000]
+0xEB66	U+66C6	# <cjk>	[2000]
+0xEB67	U+66C8	# <cjk>	[2000]
+0xEB68	U+3B22	# <cjk>	[2000]
+0xEB69	U+66DB	# <cjk>	[2000]
+0xEB6A	U+66E8	# <cjk>	[2000]
+0xEB6B	U+66FA	# <cjk>	[2000]
+0xEB6C	U+6713	# <cjk>	[2000]
+0xEB6D	U+F929	# CJK COMPATIBILITY IDEOGRAPH-F929	[2000]
+0xEB6E	U+6733	# <cjk>	[2000]
+0xEB6F	U+6766	# <cjk>	[2000]
+0xEB70	U+6747	# <cjk>	[2000]
+0xEB71	U+6748	# <cjk>	[2000]
+0xEB72	U+677B	# <cjk>	[2000]
+0xEB73	U+6781	# <cjk>	[2000]
+0xEB74	U+6793	# <cjk>	[2000]
+0xEB75	U+6798	# <cjk>	[2000]
+0xEB76	U+679B	# <cjk>	[2000]
+0xEB77	U+67BB	# <cjk>	[2000]
+0xEB78	U+67F9	# <cjk>	[2000]
+0xEB79	U+67C0	# <cjk>	[2000]
+0xEB7A	U+67D7	# <cjk>	[2000]
+0xEB7B	U+67FC	# <cjk>	[2000]
+0xEB7C	U+6801	# <cjk>	[2000]
+0xEB7D	U+6852	# <cjk>	[2000]
+0xEB7E	U+681D	# <cjk>	[2000]
+0xEB80	U+682C	# <cjk>	[2000]
+0xEB81	U+6831	# <cjk>	[2000]
+0xEB82	U+685B	# <cjk>	[2000]
+0xEB83	U+6872	# <cjk>	[2000]
+0xEB84	U+6875	# <cjk>	[2000]
+0xEB85	U+FA44	# CJK COMPATIBILITY IDEOGRAPH-FA44	[2000]	[Unicode3.2]
+0xEB86	U+68A3	# <cjk>	[2000]
+0xEB87	U+68A5	# <cjk>	[2000]
+0xEB88	U+68B2	# <cjk>	[2000]
+0xEB89	U+68C8	# <cjk>	[2000]
+0xEB8A	U+68D0	# <cjk>	[2000]
+0xEB8B	U+68E8	# <cjk>	[2000]
+0xEB8C	U+68ED	# <cjk>	[2000]
+0xEB8D	U+68F0	# <cjk>	[2000]
+0xEB8E	U+68F1	# <cjk>	[2000]
+0xEB8F	U+68FC	# <cjk>	[2000]
+0xEB90	U+690A	# <cjk>	[2000]
+0xEB91	U+6949	# <cjk>	[2000]
+0xEB92	U+235C4	# <cjk>	[2000]	[Unicode3.1]
+0xEB93	U+6935	# <cjk>	[2000]
+0xEB94	U+6942	# <cjk>	[2000]
+0xEB95	U+6957	# <cjk>	[2000]
+0xEB96	U+6963	# <cjk>	[2000]
+0xEB97	U+6964	# <cjk>	[2000]
+0xEB98	U+6968	# <cjk>	[2000]
+0xEB99	U+6980	# <cjk>	[2000]
+0xEB9A	U+FA14	# CJK COMPATIBILITY IDEOGRAPH-FA14	[2000]
+0xEB9B	U+69A5	# <cjk>	[2000]
+0xEB9C	U+69AD	# <cjk>	[2000]
+0xEB9D	U+69CF	# <cjk>	[2000]
+0xEB9E	U+3BB6	# <cjk>	[2000]
+0xEB9F	U+3BC3	# <cjk>	[2000]
+0xEBA0	U+69E2	# <cjk>	[2000]
+0xEBA1	U+69E9	# <cjk>	[2000]
+0xEBA2	U+69EA	# <cjk>	[2000]
+0xEBA3	U+69F5	# <cjk>	[2000]
+0xEBA4	U+69F6	# <cjk>	[2000]
+0xEBA5	U+6A0F	# <cjk>	[2000]
+0xEBA6	U+6A15	# <cjk>	[2000]
+0xEBA7	U+2373F	# <cjk>	[2000]	[Unicode3.1]
+0xEBA8	U+6A3B	# <cjk>	[2000]
+0xEBA9	U+6A3E	# <cjk>	[2000]
+0xEBAA	U+6A45	# <cjk>	[2000]
+0xEBAB	U+6A50	# <cjk>	[2000]
+0xEBAC	U+6A56	# <cjk>	[2000]
+0xEBAD	U+6A5B	# <cjk>	[2000]
+0xEBAE	U+6A6B	# <cjk>	[2000]
+0xEBAF	U+6A73	# <cjk>	[2000]
+0xEBB0	U+23763	# <cjk>	[2000]	[Unicode3.1]
+0xEBB1	U+6A89	# <cjk>	[2000]
+0xEBB2	U+6A94	# <cjk>	[2000]
+0xEBB3	U+6A9D	# <cjk>	[2000]
+0xEBB4	U+6A9E	# <cjk>	[2000]
+0xEBB5	U+6AA5	# <cjk>	[2000]
+0xEBB6	U+6AE4	# <cjk>	[2000]
+0xEBB7	U+6AE7	# <cjk>	[2000]
+0xEBB8	U+3C0F	# <cjk>	[2000]
+0xEBB9	U+F91D	# CJK COMPATIBILITY IDEOGRAPH-F91D	[2000]
+0xEBBA	U+6B1B	# <cjk>	[2000]
+0xEBBB	U+6B1E	# <cjk>	[2000]
+0xEBBC	U+6B2C	# <cjk>	[2000]
+0xEBBD	U+6B35	# <cjk>	[2000]
+0xEBBE	U+6B46	# <cjk>	[2000]
+0xEBBF	U+6B56	# <cjk>	[2000]
+0xEBC0	U+6B60	# <cjk>	[2000]
+0xEBC1	U+6B65	# <cjk>	[2000]
+0xEBC2	U+6B67	# <cjk>	[2000]
+0xEBC3	U+6B77	# <cjk>	[2000]
+0xEBC4	U+6B82	# <cjk>	[2000]
+0xEBC5	U+6BA9	# <cjk>	[2000]
+0xEBC6	U+6BAD	# <cjk>	[2000]
+0xEBC7	U+F970	# CJK COMPATIBILITY IDEOGRAPH-F970	[2000]
+0xEBC8	U+6BCF	# <cjk>	[2000]
+0xEBC9	U+6BD6	# <cjk>	[2000]
+0xEBCA	U+6BD7	# <cjk>	[2000]
+0xEBCB	U+6BFF	# <cjk>	[2000]
+0xEBCC	U+6C05	# <cjk>	[2000]
+0xEBCD	U+6C10	# <cjk>	[2000]
+0xEBCE	U+6C33	# <cjk>	[2000]
+0xEBCF	U+6C59	# <cjk>	[2000]
+0xEBD0	U+6C5C	# <cjk>	[2000]
+0xEBD1	U+6CAA	# <cjk>	[2000]
+0xEBD2	U+6C74	# <cjk>	[2000]
+0xEBD3	U+6C76	# <cjk>	[2000]
+0xEBD4	U+6C85	# <cjk>	[2000]
+0xEBD5	U+6C86	# <cjk>	[2000]
+0xEBD6	U+6C98	# <cjk>	[2000]
+0xEBD7	U+6C9C	# <cjk>	[2000]
+0xEBD8	U+6CFB	# <cjk>	[2000]
+0xEBD9	U+6CC6	# <cjk>	[2000]
+0xEBDA	U+6CD4	# <cjk>	[2000]
+0xEBDB	U+6CE0	# <cjk>	[2000]
+0xEBDC	U+6CEB	# <cjk>	[2000]
+0xEBDD	U+6CEE	# <cjk>	[2000]
+0xEBDE	U+23CFE	# <cjk>	[2000]	[Unicode3.1]
+0xEBDF	U+6D04	# <cjk>	[2000]
+0xEBE0	U+6D0E	# <cjk>	[2000]
+0xEBE1	U+6D2E	# <cjk>	[2000]
+0xEBE2	U+6D31	# <cjk>	[2000]
+0xEBE3	U+6D39	# <cjk>	[2000]
+0xEBE4	U+6D3F	# <cjk>	[2000]
+0xEBE5	U+6D58	# <cjk>	[2000]
+0xEBE6	U+6D65	# <cjk>	[2000]
+0xEBE7	U+FA45	# CJK COMPATIBILITY IDEOGRAPH-FA45	[2000]	[Unicode3.2]
+0xEBE8	U+6D82	# <cjk>	[2000]
+0xEBE9	U+6D87	# <cjk>	[2000]
+0xEBEA	U+6D89	# <cjk>	[2000]
+0xEBEB	U+6D94	# <cjk>	[2000]
+0xEBEC	U+6DAA	# <cjk>	[2000]
+0xEBED	U+6DAC	# <cjk>	[2000]
+0xEBEE	U+6DBF	# <cjk>	[2000]
+0xEBEF	U+6DC4	# <cjk>	[2000]
+0xEBF0	U+6DD6	# <cjk>	[2000]
+0xEBF1	U+6DDA	# <cjk>	[2000]
+0xEBF2	U+6DDB	# <cjk>	[2000]
+0xEBF3	U+6DDD	# <cjk>	[2000]
+0xEBF4	U+6DFC	# <cjk>	[2000]
+0xEBF5	U+FA46	# CJK COMPATIBILITY IDEOGRAPH-FA46	[2000]	[Unicode3.2]
+0xEBF6	U+6E34	# <cjk>	[2000]
+0xEBF7	U+6E44	# <cjk>	[2000]
+0xEBF8	U+6E5C	# <cjk>	[2000]
+0xEBF9	U+6E5E	# <cjk>	[2000]
+0xEBFA	U+6EAB	# <cjk>	[2000]
+0xEBFB	U+6EB1	# <cjk>	[2000]
+0xEBFC	U+6EC1	# <cjk>	[2000]
+0xEC40	U+6EC7	# <cjk>	[2000]
+0xEC41	U+6ECE	# <cjk>	[2000]
+0xEC42	U+6F10	# <cjk>	[2000]
+0xEC43	U+6F1A	# <cjk>	[2000]
+0xEC44	U+FA47	# CJK COMPATIBILITY IDEOGRAPH-FA47	[2000]	[Unicode3.2]
+0xEC45	U+6F2A	# <cjk>	[2000]
+0xEC46	U+6F2F	# <cjk>	[2000]
+0xEC47	U+6F33	# <cjk>	[2000]
+0xEC48	U+6F51	# <cjk>	[2000]
+0xEC49	U+6F59	# <cjk>	[2000]
+0xEC4A	U+6F5E	# <cjk>	[2000]
+0xEC4B	U+6F61	# <cjk>	[2000]
+0xEC4C	U+6F62	# <cjk>	[2000]
+0xEC4D	U+6F7E	# <cjk>	[2000]
+0xEC4E	U+6F88	# <cjk>	[2000]
+0xEC4F	U+6F8C	# <cjk>	[2000]
+0xEC50	U+6F8D	# <cjk>	[2000]
+0xEC51	U+6F94	# <cjk>	[2000]
+0xEC52	U+6FA0	# <cjk>	[2000]
+0xEC53	U+6FA7	# <cjk>	[2000]
+0xEC54	U+6FB6	# <cjk>	[2000]
+0xEC55	U+6FBC	# <cjk>	[2000]
+0xEC56	U+6FC7	# <cjk>	[2000]
+0xEC57	U+6FCA	# <cjk>	[2000]
+0xEC58	U+6FF9	# <cjk>	[2000]
+0xEC59	U+6FF0	# <cjk>	[2000]
+0xEC5A	U+6FF5	# <cjk>	[2000]
+0xEC5B	U+7005	# <cjk>	[2000]
+0xEC5C	U+7006	# <cjk>	[2000]
+0xEC5D	U+7028	# <cjk>	[2000]
+0xEC5E	U+704A	# <cjk>	[2000]
+0xEC5F	U+705D	# <cjk>	[2000]
+0xEC60	U+705E	# <cjk>	[2000]
+0xEC61	U+704E	# <cjk>	[2000]
+0xEC62	U+7064	# <cjk>	[2000]
+0xEC63	U+7075	# <cjk>	[2000]
+0xEC64	U+7085	# <cjk>	[2000]
+0xEC65	U+70A4	# <cjk>	[2000]
+0xEC66	U+70AB	# <cjk>	[2000]
+0xEC67	U+70B7	# <cjk>	[2000]
+0xEC68	U+70D4	# <cjk>	[2000]
+0xEC69	U+70D8	# <cjk>	[2000]
+0xEC6A	U+70E4	# <cjk>	[2000]
+0xEC6B	U+710F	# <cjk>	[2000]
+0xEC6C	U+712B	# <cjk>	[2000]
+0xEC6D	U+711E	# <cjk>	[2000]
+0xEC6E	U+7120	# <cjk>	[2000]
+0xEC6F	U+712E	# <cjk>	[2000]
+0xEC70	U+7130	# <cjk>	[2000]
+0xEC71	U+7146	# <cjk>	[2000]
+0xEC72	U+7147	# <cjk>	[2000]
+0xEC73	U+7151	# <cjk>	[2000]
+0xEC74	U+FA48	# CJK COMPATIBILITY IDEOGRAPH-FA48	[2000]	[Unicode3.2]
+0xEC75	U+7152	# <cjk>	[2000]
+0xEC76	U+715C	# <cjk>	[2000]
+0xEC77	U+7160	# <cjk>	[2000]
+0xEC78	U+7168	# <cjk>	[2000]
+0xEC79	U+FA15	# CJK COMPATIBILITY IDEOGRAPH-FA15	[2000]
+0xEC7A	U+7185	# <cjk>	[2000]
+0xEC7B	U+7187	# <cjk>	[2000]
+0xEC7C	U+7192	# <cjk>	[2000]
+0xEC7D	U+71C1	# <cjk>	[2000]
+0xEC7E	U+71BA	# <cjk>	[2000]
+0xEC80	U+71C4	# <cjk>	[2000]
+0xEC81	U+71FE	# <cjk>	[2000]
+0xEC82	U+7200	# <cjk>	[2000]
+0xEC83	U+7215	# <cjk>	[2000]
+0xEC84	U+7255	# <cjk>	[2000]
+0xEC85	U+7256	# <cjk>	[2000]
+0xEC86	U+3E3F	# <cjk>	[2000]
+0xEC87	U+728D	# <cjk>	[2000]
+0xEC88	U+729B	# <cjk>	[2000]
+0xEC89	U+72BE	# <cjk>	[2000]
+0xEC8A	U+72C0	# <cjk>	[2000]
+0xEC8B	U+72FB	# <cjk>	[2000]
+0xEC8C	U+247F1	# <cjk>	[2000]	[Unicode3.1]
+0xEC8D	U+7327	# <cjk>	[2000]
+0xEC8E	U+7328	# <cjk>	[2000]
+0xEC8F	U+FA16	# CJK COMPATIBILITY IDEOGRAPH-FA16	[2000]
+0xEC90	U+7350	# <cjk>	[2000]
+0xEC91	U+7366	# <cjk>	[2000]
+0xEC92	U+737C	# <cjk>	[2000]
+0xEC93	U+7395	# <cjk>	[2000]
+0xEC94	U+739F	# <cjk>	[2000]
+0xEC95	U+73A0	# <cjk>	[2000]
+0xEC96	U+73A2	# <cjk>	[2000]
+0xEC97	U+73A6	# <cjk>	[2000]
+0xEC98	U+73AB	# <cjk>	[2000]
+0xEC99	U+73C9	# <cjk>	[2000]
+0xEC9A	U+73CF	# <cjk>	[2000]
+0xEC9B	U+73D6	# <cjk>	[2000]
+0xEC9C	U+73D9	# <cjk>	[2000]
+0xEC9D	U+73E3	# <cjk>	[2000]
+0xEC9E	U+73E9	# <cjk>	[2000]
+0xEC9F	U+7407	# <cjk>	[2000]
+0xECA0	U+740A	# <cjk>	[2000]
+0xECA1	U+741A	# <cjk>	[2000]
+0xECA2	U+741B	# <cjk>	[2000]
+0xECA3	U+FA4A	# CJK COMPATIBILITY IDEOGRAPH-FA4A	[2000]	[Unicode3.2]
+0xECA4	U+7426	# <cjk>	[2000]
+0xECA5	U+7428	# <cjk>	[2000]
+0xECA6	U+742A	# <cjk>	[2000]
+0xECA7	U+742B	# <cjk>	[2000]
+0xECA8	U+742C	# <cjk>	[2000]
+0xECA9	U+742E	# <cjk>	[2000]
+0xECAA	U+742F	# <cjk>	[2000]
+0xECAB	U+7430	# <cjk>	[2000]
+0xECAC	U+7444	# <cjk>	[2000]
+0xECAD	U+7446	# <cjk>	[2000]
+0xECAE	U+7447	# <cjk>	[2000]
+0xECAF	U+744B	# <cjk>	[2000]
+0xECB0	U+7457	# <cjk>	[2000]
+0xECB1	U+7462	# <cjk>	[2000]
+0xECB2	U+746B	# <cjk>	[2000]
+0xECB3	U+746D	# <cjk>	[2000]
+0xECB4	U+7486	# <cjk>	[2000]
+0xECB5	U+7487	# <cjk>	[2000]
+0xECB6	U+7489	# <cjk>	[2000]
+0xECB7	U+7498	# <cjk>	[2000]
+0xECB8	U+749C	# <cjk>	[2000]
+0xECB9	U+749F	# <cjk>	[2000]
+0xECBA	U+74A3	# <cjk>	[2000]
+0xECBB	U+7490	# <cjk>	[2000]
+0xECBC	U+74A6	# <cjk>	[2000]
+0xECBD	U+74A8	# <cjk>	[2000]
+0xECBE	U+74A9	# <cjk>	[2000]
+0xECBF	U+74B5	# <cjk>	[2000]
+0xECC0	U+74BF	# <cjk>	[2000]
+0xECC1	U+74C8	# <cjk>	[2000]
+0xECC2	U+74C9	# <cjk>	[2000]
+0xECC3	U+74DA	# <cjk>	[2000]
+0xECC4	U+74FF	# <cjk>	[2000]
+0xECC5	U+7501	# <cjk>	[2000]
+0xECC6	U+7517	# <cjk>	[2000]
+0xECC7	U+752F	# <cjk>	[2000]
+0xECC8	U+756F	# <cjk>	[2000]
+0xECC9	U+7579	# <cjk>	[2000]
+0xECCA	U+7592	# <cjk>	[2000]
+0xECCB	U+3F72	# <cjk>	[2000]
+0xECCC	U+75CE	# <cjk>	[2000]
+0xECCD	U+75E4	# <cjk>	[2000]
+0xECCE	U+7600	# <cjk>	[2000]
+0xECCF	U+7602	# <cjk>	[2000]
+0xECD0	U+7608	# <cjk>	[2000]
+0xECD1	U+7615	# <cjk>	[2000]
+0xECD2	U+7616	# <cjk>	[2000]
+0xECD3	U+7619	# <cjk>	[2000]
+0xECD4	U+761E	# <cjk>	[2000]
+0xECD5	U+762D	# <cjk>	[2000]
+0xECD6	U+7635	# <cjk>	[2000]
+0xECD7	U+7643	# <cjk>	[2000]
+0xECD8	U+764B	# <cjk>	[2000]
+0xECD9	U+7664	# <cjk>	[2000]
+0xECDA	U+7665	# <cjk>	[2000]
+0xECDB	U+766D	# <cjk>	[2000]
+0xECDC	U+766F	# <cjk>	[2000]
+0xECDD	U+7671	# <cjk>	[2000]
+0xECDE	U+7681	# <cjk>	[2000]
+0xECDF	U+769B	# <cjk>	[2000]
+0xECE0	U+769D	# <cjk>	[2000]
+0xECE1	U+769E	# <cjk>	[2000]
+0xECE2	U+76A6	# <cjk>	[2000]
+0xECE3	U+76AA	# <cjk>	[2000]
+0xECE4	U+76B6	# <cjk>	[2000]
+0xECE5	U+76C5	# <cjk>	[2000]
+0xECE6	U+76CC	# <cjk>	[2000]
+0xECE7	U+76CE	# <cjk>	[2000]
+0xECE8	U+76D4	# <cjk>	[2000]
+0xECE9	U+76E6	# <cjk>	[2000]
+0xECEA	U+76F1	# <cjk>	[2000]
+0xECEB	U+76FC	# <cjk>	[2000]
+0xECEC	U+770A	# <cjk>	[2000]
+0xECED	U+7719	# <cjk>	[2000]
+0xECEE	U+7734	# <cjk>	[2000]
+0xECEF	U+7736	# <cjk>	[2000]
+0xECF0	U+7746	# <cjk>	[2000]
+0xECF1	U+774D	# <cjk>	[2000]
+0xECF2	U+774E	# <cjk>	[2000]
+0xECF3	U+775C	# <cjk>	[2000]
+0xECF4	U+775F	# <cjk>	[2000]
+0xECF5	U+7762	# <cjk>	[2000]
+0xECF6	U+777A	# <cjk>	[2000]
+0xECF7	U+7780	# <cjk>	[2000]
+0xECF8	U+7794	# <cjk>	[2000]
+0xECF9	U+77AA	# <cjk>	[2000]
+0xECFA	U+77E0	# <cjk>	[2000]
+0xECFB	U+782D	# <cjk>	[2000]
+0xECFC	U+2548E	# <cjk>	[2000]	[Unicode3.1]
+0xED40	U+7843	# <cjk>	[2000]
+0xED41	U+784E	# <cjk>	[2000]
+0xED42	U+784F	# <cjk>	[2000]
+0xED43	U+7851	# <cjk>	[2000]
+0xED44	U+7868	# <cjk>	[2000]
+0xED45	U+786E	# <cjk>	[2000]
+0xED46	U+FA4B	# CJK COMPATIBILITY IDEOGRAPH-FA4B	[2000]	[Unicode3.2]
+0xED47	U+78B0	# <cjk>	[2000]
+0xED48	U+2550E	# <cjk>	[2000]	[Unicode3.1]
+0xED49	U+78AD	# <cjk>	[2000]
+0xED4A	U+78E4	# <cjk>	[2000]
+0xED4B	U+78F2	# <cjk>	[2000]
+0xED4C	U+7900	# <cjk>	[2000]
+0xED4D	U+78F7	# <cjk>	[2000]
+0xED4E	U+791C	# <cjk>	[2000]
+0xED4F	U+792E	# <cjk>	[2000]
+0xED50	U+7931	# <cjk>	[2000]
+0xED51	U+7934	# <cjk>	[2000]
+0xED52	U+FA4C	# CJK COMPATIBILITY IDEOGRAPH-FA4C	[2000]	[Unicode3.2]
+0xED53	U+FA4D	# CJK COMPATIBILITY IDEOGRAPH-FA4D	[2000]	[Unicode3.2]
+0xED54	U+7945	# <cjk>	[2000]
+0xED55	U+7946	# <cjk>	[2000]
+0xED56	U+FA4E	# CJK COMPATIBILITY IDEOGRAPH-FA4E	[2000]	[Unicode3.2]
+0xED57	U+FA4F	# CJK COMPATIBILITY IDEOGRAPH-FA4F	[2000]	[Unicode3.2]
+0xED58	U+FA50	# CJK COMPATIBILITY IDEOGRAPH-FA50	[2000]	[Unicode3.2]
+0xED59	U+795C	# <cjk>	[2000]
+0xED5A	U+FA51	# CJK COMPATIBILITY IDEOGRAPH-FA51	[2000]	[Unicode3.2]
+0xED5B	U+FA19	# CJK COMPATIBILITY IDEOGRAPH-FA19	[2000]
+0xED5C	U+FA1A	# CJK COMPATIBILITY IDEOGRAPH-FA1A	[2000]
+0xED5D	U+7979	# <cjk>	[2000]
+0xED5E	U+FA52	# CJK COMPATIBILITY IDEOGRAPH-FA52	[2000]	[Unicode3.2]
+0xED5F	U+FA53	# CJK COMPATIBILITY IDEOGRAPH-FA53	[2000]	[Unicode3.2]
+0xED60	U+FA1B	# CJK COMPATIBILITY IDEOGRAPH-FA1B	[2000]
+0xED61	U+7998	# <cjk>	[2000]
+0xED62	U+79B1	# <cjk>	[2000]
+0xED63	U+79B8	# <cjk>	[2000]
+0xED64	U+79C8	# <cjk>	[2000]
+0xED65	U+79CA	# <cjk>	[2000]
+0xED66	U+25771	# <cjk>	[2000]	[Unicode3.1]
+0xED67	U+79D4	# <cjk>	[2000]
+0xED68	U+79DE	# <cjk>	[2000]
+0xED69	U+79EB	# <cjk>	[2000]
+0xED6A	U+79ED	# <cjk>	[2000]
+0xED6B	U+7A03	# <cjk>	[2000]
+0xED6C	U+FA54	# CJK COMPATIBILITY IDEOGRAPH-FA54	[2000]	[Unicode3.2]
+0xED6D	U+7A39	# <cjk>	[2000]
+0xED6E	U+7A5D	# <cjk>	[2000]
+0xED6F	U+7A6D	# <cjk>	[2000]
+0xED70	U+FA55	# CJK COMPATIBILITY IDEOGRAPH-FA55	[2000]	[Unicode3.2]
+0xED71	U+7A85	# <cjk>	[2000]
+0xED72	U+7AA0	# <cjk>	[2000]
+0xED73	U+259C4	# <cjk>	[2000]	[Unicode3.1]
+0xED74	U+7AB3	# <cjk>	[2000]
+0xED75	U+7ABB	# <cjk>	[2000]
+0xED76	U+7ACE	# <cjk>	[2000]
+0xED77	U+7AEB	# <cjk>	[2000]
+0xED78	U+7AFD	# <cjk>	[2000]
+0xED79	U+7B12	# <cjk>	[2000]
+0xED7A	U+7B2D	# <cjk>	[2000]
+0xED7B	U+7B3B	# <cjk>	[2000]
+0xED7C	U+7B47	# <cjk>	[2000]
+0xED7D	U+7B4E	# <cjk>	[2000]
+0xED7E	U+7B60	# <cjk>	[2000]
+0xED80	U+7B6D	# <cjk>	[2000]
+0xED81	U+7B6F	# <cjk>	[2000]
+0xED82	U+7B72	# <cjk>	[2000]
+0xED83	U+7B9E	# <cjk>	[2000]
+0xED84	U+FA56	# CJK COMPATIBILITY IDEOGRAPH-FA56	[2000]	[Unicode3.2]
+0xED85	U+7BD7	# <cjk>	[2000]
+0xED86	U+7BD9	# <cjk>	[2000]
+0xED87	U+7C01	# <cjk>	[2000]
+0xED88	U+7C31	# <cjk>	[2000]
+0xED89	U+7C1E	# <cjk>	[2000]
+0xED8A	U+7C20	# <cjk>	[2000]
+0xED8B	U+7C33	# <cjk>	[2000]
+0xED8C	U+7C36	# <cjk>	[2000]
+0xED8D	U+4264	# <cjk>	[2000]
+0xED8E	U+25DA1	# <cjk>	[2000]	[Unicode3.1]
+0xED8F	U+7C59	# <cjk>	[2000]
+0xED90	U+7C6D	# <cjk>	[2000]
+0xED91	U+7C79	# <cjk>	[2000]
+0xED92	U+7C8F	# <cjk>	[2000]
+0xED93	U+7C94	# <cjk>	[2000]
+0xED94	U+7CA0	# <cjk>	[2000]
+0xED95	U+7CBC	# <cjk>	[2000]
+0xED96	U+7CD5	# <cjk>	[2000]
+0xED97	U+7CD9	# <cjk>	[2000]
+0xED98	U+7CDD	# <cjk>	[2000]
+0xED99	U+7D07	# <cjk>	[2000]
+0xED9A	U+7D08	# <cjk>	[2000]
+0xED9B	U+7D13	# <cjk>	[2000]
+0xED9C	U+7D1D	# <cjk>	[2000]
+0xED9D	U+7D23	# <cjk>	[2000]
+0xED9E	U+7D31	# <cjk>	[2000]
+0xED9F	U+7D41	# <cjk>	[2000]
+0xEDA0	U+7D48	# <cjk>	[2000]
+0xEDA1	U+7D53	# <cjk>	[2000]
+0xEDA2	U+7D5C	# <cjk>	[2000]
+0xEDA3	U+7D7A	# <cjk>	[2000]
+0xEDA4	U+7D83	# <cjk>	[2000]
+0xEDA5	U+7D8B	# <cjk>	[2000]
+0xEDA6	U+7DA0	# <cjk>	[2000]
+0xEDA7	U+7DA6	# <cjk>	[2000]
+0xEDA8	U+7DC2	# <cjk>	[2000]
+0xEDA9	U+7DCC	# <cjk>	[2000]
+0xEDAA	U+7DD6	# <cjk>	[2000]
+0xEDAB	U+7DE3	# <cjk>	[2000]
+0xEDAC	U+FA57	# CJK COMPATIBILITY IDEOGRAPH-FA57	[2000]	[Unicode3.2]
+0xEDAD	U+7E28	# <cjk>	[2000]
+0xEDAE	U+7E08	# <cjk>	[2000]
+0xEDAF	U+7E11	# <cjk>	[2000]
+0xEDB0	U+7E15	# <cjk>	[2000]
+0xEDB1	U+FA59	# CJK COMPATIBILITY IDEOGRAPH-FA59	[2000]	[Unicode3.2]
+0xEDB2	U+7E47	# <cjk>	[2000]
+0xEDB3	U+7E52	# <cjk>	[2000]
+0xEDB4	U+7E61	# <cjk>	[2000]
+0xEDB5	U+7E8A	# <cjk>	[2000]
+0xEDB6	U+7E8D	# <cjk>	[2000]
+0xEDB7	U+7F47	# <cjk>	[2000]
+0xEDB8	U+FA5A	# CJK COMPATIBILITY IDEOGRAPH-FA5A	[2000]	[Unicode3.2]
+0xEDB9	U+7F91	# <cjk>	[2000]
+0xEDBA	U+7F97	# <cjk>	[2000]
+0xEDBB	U+7FBF	# <cjk>	[2000]
+0xEDBC	U+7FCE	# <cjk>	[2000]
+0xEDBD	U+7FDB	# <cjk>	[2000]
+0xEDBE	U+7FDF	# <cjk>	[2000]
+0xEDBF	U+7FEC	# <cjk>	[2000]
+0xEDC0	U+7FEE	# <cjk>	[2000]
+0xEDC1	U+7FFA	# <cjk>	[2000]
+0xEDC2	U+FA5B	# CJK COMPATIBILITY IDEOGRAPH-FA5B	[2000]	[Unicode3.2]
+0xEDC3	U+8014	# <cjk>	[2000]
+0xEDC4	U+8026	# <cjk>	[2000]
+0xEDC5	U+8035	# <cjk>	[2000]
+0xEDC6	U+8037	# <cjk>	[2000]
+0xEDC7	U+803C	# <cjk>	[2000]
+0xEDC8	U+80CA	# <cjk>	[2000]
+0xEDC9	U+80D7	# <cjk>	[2000]
+0xEDCA	U+80E0	# <cjk>	[2000]
+0xEDCB	U+80F3	# <cjk>	[2000]
+0xEDCC	U+8118	# <cjk>	[2000]
+0xEDCD	U+814A	# <cjk>	[2000]
+0xEDCE	U+8160	# <cjk>	[2000]
+0xEDCF	U+8167	# <cjk>	[2000]
+0xEDD0	U+8168	# <cjk>	[2000]
+0xEDD1	U+816D	# <cjk>	[2000]
+0xEDD2	U+81BB	# <cjk>	[2000]
+0xEDD3	U+81CA	# <cjk>	[2000]
+0xEDD4	U+81CF	# <cjk>	[2000]
+0xEDD5	U+81D7	# <cjk>	[2000]
+0xEDD6	U+FA5C	# CJK COMPATIBILITY IDEOGRAPH-FA5C	[2000]	[Unicode3.2]
+0xEDD7	U+4453	# <cjk>	[2000]
+0xEDD8	U+445B	# <cjk>	[2000]
+0xEDD9	U+8260	# <cjk>	[2000]
+0xEDDA	U+8274	# <cjk>	[2000]
+0xEDDB	U+26AFF	# <cjk>	[2000]	[Unicode3.1]
+0xEDDC	U+828E	# <cjk>	[2000]
+0xEDDD	U+82A1	# <cjk>	[2000]
+0xEDDE	U+82A3	# <cjk>	[2000]
+0xEDDF	U+82A4	# <cjk>	[2000]
+0xEDE0	U+82A9	# <cjk>	[2000]
+0xEDE1	U+82AE	# <cjk>	[2000]
+0xEDE2	U+82B7	# <cjk>	[2000]
+0xEDE3	U+82BE	# <cjk>	[2000]
+0xEDE4	U+82BF	# <cjk>	[2000]
+0xEDE5	U+82C6	# <cjk>	[2000]
+0xEDE6	U+82D5	# <cjk>	[2000]
+0xEDE7	U+82FD	# <cjk>	[2000]
+0xEDE8	U+82FE	# <cjk>	[2000]
+0xEDE9	U+8300	# <cjk>	[2000]
+0xEDEA	U+8301	# <cjk>	[2000]
+0xEDEB	U+8362	# <cjk>	[2000]
+0xEDEC	U+8322	# <cjk>	[2000]
+0xEDED	U+832D	# <cjk>	[2000]
+0xEDEE	U+833A	# <cjk>	[2000]
+0xEDEF	U+8343	# <cjk>	[2000]
+0xEDF0	U+8347	# <cjk>	[2000]
+0xEDF1	U+8351	# <cjk>	[2000]
+0xEDF2	U+8355	# <cjk>	[2000]
+0xEDF3	U+837D	# <cjk>	[2000]
+0xEDF4	U+8386	# <cjk>	[2000]
+0xEDF5	U+8392	# <cjk>	[2000]
+0xEDF6	U+8398	# <cjk>	[2000]
+0xEDF7	U+83A7	# <cjk>	[2000]
+0xEDF8	U+83A9	# <cjk>	[2000]
+0xEDF9	U+83BF	# <cjk>	[2000]
+0xEDFA	U+83C0	# <cjk>	[2000]
+0xEDFB	U+83C7	# <cjk>	[2000]
+0xEDFC	U+83CF	# <cjk>	[2000]
+0xEE40	U+83D1	# <cjk>	[2000]
+0xEE41	U+83E1	# <cjk>	[2000]
+0xEE42	U+83EA	# <cjk>	[2000]
+0xEE43	U+8401	# <cjk>	[2000]
+0xEE44	U+8406	# <cjk>	[2000]
+0xEE45	U+840A	# <cjk>	[2000]
+0xEE46	U+FA5F	# CJK COMPATIBILITY IDEOGRAPH-FA5F	[2000]	[Unicode3.2]
+0xEE47	U+8448	# <cjk>	[2000]
+0xEE48	U+845F	# <cjk>	[2000]
+0xEE49	U+8470	# <cjk>	[2000]
+0xEE4A	U+8473	# <cjk>	[2000]
+0xEE4B	U+8485	# <cjk>	[2000]
+0xEE4C	U+849E	# <cjk>	[2000]
+0xEE4D	U+84AF	# <cjk>	[2000]
+0xEE4E	U+84B4	# <cjk>	[2000]
+0xEE4F	U+84BA	# <cjk>	[2000]
+0xEE50	U+84C0	# <cjk>	[2000]
+0xEE51	U+84C2	# <cjk>	[2000]
+0xEE52	U+26E40	# <cjk>	[2000]	[Unicode3.1]
+0xEE53	U+8532	# <cjk>	[2000]
+0xEE54	U+851E	# <cjk>	[2000]
+0xEE55	U+8523	# <cjk>	[2000]
+0xEE56	U+852F	# <cjk>	[2000]
+0xEE57	U+8559	# <cjk>	[2000]
+0xEE58	U+8564	# <cjk>	[2000]
+0xEE59	U+FA1F	# CJK COMPATIBILITY IDEOGRAPH-FA1F 	[2000]
+0xEE5A	U+85AD	# <cjk>	[2000]
+0xEE5B	U+857A	# <cjk>	[2000]
+0xEE5C	U+858C	# <cjk>	[2000]
+0xEE5D	U+858F	# <cjk>	[2000]
+0xEE5E	U+85A2	# <cjk>	[2000]
+0xEE5F	U+85B0	# <cjk>	[2000]
+0xEE60	U+85CB	# <cjk>	[2000]
+0xEE61	U+85CE	# <cjk>	[2000]
+0xEE62	U+85ED	# <cjk>	[2000]
+0xEE63	U+8612	# <cjk>	[2000]
+0xEE64	U+85FF	# <cjk>	[2000]
+0xEE65	U+8604	# <cjk>	[2000]
+0xEE66	U+8605	# <cjk>	[2000]
+0xEE67	U+8610	# <cjk>	[2000]
+0xEE68	U+270F4	# <cjk>	[2000]	[Unicode3.1]
+0xEE69	U+8618	# <cjk>	[2000]
+0xEE6A	U+8629	# <cjk>	[2000]
+0xEE6B	U+8638	# <cjk>	[2000]
+0xEE6C	U+8657	# <cjk>	[2000]
+0xEE6D	U+865B	# <cjk>	[2000]
+0xEE6E	U+F936	# CJK COMPATIBILITY IDEOGRAPH-F936	[2000]
+0xEE6F	U+8662	# <cjk>	[2000]
+0xEE70	U+459D	# <cjk>	[2000]
+0xEE71	U+866C	# <cjk>	[2000]
+0xEE72	U+8675	# <cjk>	[2000]
+0xEE73	U+8698	# <cjk>	[2000]
+0xEE74	U+86B8	# <cjk>	[2000]
+0xEE75	U+86FA	# <cjk>	[2000]
+0xEE76	U+86FC	# <cjk>	[2000]
+0xEE77	U+86FD	# <cjk>	[2000]
+0xEE78	U+870B	# <cjk>	[2000]
+0xEE79	U+8771	# <cjk>	[2000]
+0xEE7A	U+8787	# <cjk>	[2000]
+0xEE7B	U+8788	# <cjk>	[2000]
+0xEE7C	U+87AC	# <cjk>	[2000]
+0xEE7D	U+87AD	# <cjk>	[2000]
+0xEE7E	U+87B5	# <cjk>	[2000]
+0xEE80	U+45EA	# <cjk>	[2000]
+0xEE81	U+87D6	# <cjk>	[2000]
+0xEE82	U+87EC	# <cjk>	[2000]
+0xEE83	U+8806	# <cjk>	[2000]
+0xEE84	U+880A	# <cjk>	[2000]
+0xEE85	U+8810	# <cjk>	[2000]
+0xEE86	U+8814	# <cjk>	[2000]
+0xEE87	U+881F	# <cjk>	[2000]
+0xEE88	U+8898	# <cjk>	[2000]
+0xEE89	U+88AA	# <cjk>	[2000]
+0xEE8A	U+88CA	# <cjk>	[2000]
+0xEE8B	U+88CE	# <cjk>	[2000]
+0xEE8C	U+27684	# <cjk>	[2000]	[Unicode3.1]
+0xEE8D	U+88F5	# <cjk>	[2000]
+0xEE8E	U+891C	# <cjk>	[2000]
+0xEE8F	U+FA60	# CJK COMPATIBILITY IDEOGRAPH-FA60	[2000]	[Unicode3.2]
+0xEE90	U+8918	# <cjk>	[2000]
+0xEE91	U+8919	# <cjk>	[2000]
+0xEE92	U+891A	# <cjk>	[2000]
+0xEE93	U+8927	# <cjk>	[2000]
+0xEE94	U+8930	# <cjk>	[2000]
+0xEE95	U+8932	# <cjk>	[2000]
+0xEE96	U+8939	# <cjk>	[2000]
+0xEE97	U+8940	# <cjk>	[2000]
+0xEE98	U+8994	# <cjk>	[2000]
+0xEE99	U+FA61	# CJK COMPATIBILITY IDEOGRAPH-FA61	[2000]	[Unicode3.2]
+0xEE9A	U+89D4	# <cjk>	[2000]
+0xEE9B	U+89E5	# <cjk>	[2000]
+0xEE9C	U+89F6	# <cjk>	[2000]
+0xEE9D	U+8A12	# <cjk>	[2000]
+0xEE9E	U+8A15	# <cjk>	[2000]
+0xEE9F	U+8A22	# <cjk>	[2000]
+0xEEA0	U+8A37	# <cjk>	[2000]
+0xEEA1	U+8A47	# <cjk>	[2000]
+0xEEA2	U+8A4E	# <cjk>	[2000]
+0xEEA3	U+8A5D	# <cjk>	[2000]
+0xEEA4	U+8A61	# <cjk>	[2000]
+0xEEA5	U+8A75	# <cjk>	[2000]
+0xEEA6	U+8A79	# <cjk>	[2000]
+0xEEA7	U+8AA7	# <cjk>	[2000]
+0xEEA8	U+8AD0	# <cjk>	[2000]
+0xEEA9	U+8ADF	# <cjk>	[2000]
+0xEEAA	U+8AF4	# <cjk>	[2000]
+0xEEAB	U+8AF6	# <cjk>	[2000]
+0xEEAC	U+FA22	# CJK COMPATIBILITY IDEOGRAPH-FA22	[2000]
+0xEEAD	U+FA62	# CJK COMPATIBILITY IDEOGRAPH-FA62	[2000]	[Unicode3.2]
+0xEEAE	U+FA63	# CJK COMPATIBILITY IDEOGRAPH-FA63	[2000]	[Unicode3.2]
+0xEEAF	U+8B46	# <cjk>	[2000]
+0xEEB0	U+8B54	# <cjk>	[2000]
+0xEEB1	U+8B59	# <cjk>	[2000]
+0xEEB2	U+8B69	# <cjk>	[2000]
+0xEEB3	U+8B9D	# <cjk>	[2000]
+0xEEB4	U+8C49	# <cjk>	[2000]
+0xEEB5	U+8C68	# <cjk>	[2000]
+0xEEB6	U+FA64	# CJK COMPATIBILITY IDEOGRAPH-FA64	[2000]	[Unicode3.2]
+0xEEB7	U+8CE1	# <cjk>	[2000]
+0xEEB8	U+8CF4	# <cjk>	[2000]
+0xEEB9	U+8CF8	# <cjk>	[2000]
+0xEEBA	U+8CFE	# <cjk>	[2000]
+0xEEBB	U+FA65	# CJK COMPATIBILITY IDEOGRAPH-FA65	[2000]	[Unicode3.2]
+0xEEBC	U+8D12	# <cjk>	[2000]
+0xEEBD	U+8D1B	# <cjk>	[2000]
+0xEEBE	U+8DAF	# <cjk>	[2000]
+0xEEBF	U+8DCE	# <cjk>	[2000]
+0xEEC0	U+8DD1	# <cjk>	[2000]
+0xEEC1	U+8DD7	# <cjk>	[2000]
+0xEEC2	U+8E20	# <cjk>	[2000]
+0xEEC3	U+8E23	# <cjk>	[2000]
+0xEEC4	U+8E3D	# <cjk>	[2000]
+0xEEC5	U+8E70	# <cjk>	[2000]
+0xEEC6	U+8E7B	# <cjk>	[2000]
+0xEEC7	U+28277	# <cjk>	[2000]	[Unicode3.1]
+0xEEC8	U+8EC0	# <cjk>	[2000]
+0xEEC9	U+4844	# <cjk>	[2000]
+0xEECA	U+8EFA	# <cjk>	[2000]
+0xEECB	U+8F1E	# <cjk>	[2000]
+0xEECC	U+8F2D	# <cjk>	[2000]
+0xEECD	U+8F36	# <cjk>	[2000]
+0xEECE	U+8F54	# <cjk>	[2000]
+0xEECF	U+283CD	# <cjk>	[2000]	[Unicode3.1]
+0xEED0	U+8FA6	# <cjk>	[2000]
+0xEED1	U+8FB5	# <cjk>	[2000]
+0xEED2	U+8FE4	# <cjk>	[2000]
+0xEED3	U+8FE8	# <cjk>	[2000]
+0xEED4	U+8FEE	# <cjk>	[2000]
+0xEED5	U+9008	# <cjk>	[2000]
+0xEED6	U+902D	# <cjk>	[2000]
+0xEED7	U+FA67	# CJK COMPATIBILITY IDEOGRAPH-FA67	[2000]	[Unicode3.2]
+0xEED8	U+9088	# <cjk>	[2000]
+0xEED9	U+9095	# <cjk>	[2000]
+0xEEDA	U+9097	# <cjk>	[2000]
+0xEEDB	U+9099	# <cjk>	[2000]
+0xEEDC	U+909B	# <cjk>	[2000]
+0xEEDD	U+90A2	# <cjk>	[2000]
+0xEEDE	U+90B3	# <cjk>	[2000]
+0xEEDF	U+90BE	# <cjk>	[2000]
+0xEEE0	U+90C4	# <cjk>	[2000]
+0xEEE1	U+90C5	# <cjk>	[2000]
+0xEEE2	U+90C7	# <cjk>	[2000]
+0xEEE3	U+90D7	# <cjk>	[2000]
+0xEEE4	U+90DD	# <cjk>	[2000]
+0xEEE5	U+90DE	# <cjk>	[2000]
+0xEEE6	U+90EF	# <cjk>	[2000]
+0xEEE7	U+90F4	# <cjk>	[2000]
+0xEEE8	U+FA26	# CJK COMPATIBILITY IDEOGRAPH-FA26	[2000]
+0xEEE9	U+9114	# <cjk>	[2000]
+0xEEEA	U+9115	# <cjk>	[2000]
+0xEEEB	U+9116	# <cjk>	[2000]
+0xEEEC	U+9122	# <cjk>	[2000]
+0xEEED	U+9123	# <cjk>	[2000]
+0xEEEE	U+9127	# <cjk>	[2000]
+0xEEEF	U+912F	# <cjk>	[2000]
+0xEEF0	U+9131	# <cjk>	[2000]
+0xEEF1	U+9134	# <cjk>	[2000]
+0xEEF2	U+913D	# <cjk>	[2000]
+0xEEF3	U+9148	# <cjk>	[2000]
+0xEEF4	U+915B	# <cjk>	[2000]
+0xEEF5	U+9183	# <cjk>	[2000]
+0xEEF6	U+919E	# <cjk>	[2000]
+0xEEF7	U+91AC	# <cjk>	[2000]
+0xEEF8	U+91B1	# <cjk>	[2000]
+0xEEF9	U+91BC	# <cjk>	[2000]
+0xEEFA	U+91D7	# <cjk>	[2000]
+0xEEFB	U+91FB	# <cjk>	[2000]
+0xEEFC	U+91E4	# <cjk>	[2000]
+0xEF40	U+91E5	# <cjk>	[2000]
+0xEF41	U+91ED	# <cjk>	[2000]
+0xEF42	U+91F1	# <cjk>	[2000]
+0xEF43	U+9207	# <cjk>	[2000]
+0xEF44	U+9210	# <cjk>	[2000]
+0xEF45	U+9238	# <cjk>	[2000]
+0xEF46	U+9239	# <cjk>	[2000]
+0xEF47	U+923A	# <cjk>	[2000]
+0xEF48	U+923C	# <cjk>	[2000]
+0xEF49	U+9240	# <cjk>	[2000]
+0xEF4A	U+9243	# <cjk>	[2000]
+0xEF4B	U+924F	# <cjk>	[2000]
+0xEF4C	U+9278	# <cjk>	[2000]
+0xEF4D	U+9288	# <cjk>	[2000]
+0xEF4E	U+92C2	# <cjk>	[2000]
+0xEF4F	U+92CB	# <cjk>	[2000]
+0xEF50	U+92CC	# <cjk>	[2000]
+0xEF51	U+92D3	# <cjk>	[2000]
+0xEF52	U+92E0	# <cjk>	[2000]
+0xEF53	U+92FF	# <cjk>	[2000]
+0xEF54	U+9304	# <cjk>	[2000]
+0xEF55	U+931F	# <cjk>	[2000]
+0xEF56	U+9321	# <cjk>	[2000]
+0xEF57	U+9325	# <cjk>	[2000]
+0xEF58	U+9348	# <cjk>	[2000]
+0xEF59	U+9349	# <cjk>	[2000]
+0xEF5A	U+934A	# <cjk>	[2000]
+0xEF5B	U+9364	# <cjk>	[2000]
+0xEF5C	U+9365	# <cjk>	[2000]
+0xEF5D	U+936A	# <cjk>	[2000]
+0xEF5E	U+9370	# <cjk>	[2000]
+0xEF5F	U+939B	# <cjk>	[2000]
+0xEF60	U+93A3	# <cjk>	[2000]
+0xEF61	U+93BA	# <cjk>	[2000]
+0xEF62	U+93C6	# <cjk>	[2000]
+0xEF63	U+93DE	# <cjk>	[2000]
+0xEF64	U+93DF	# <cjk>	[2000]
+0xEF65	U+9404	# <cjk>	[2000]
+0xEF66	U+93FD	# <cjk>	[2000]
+0xEF67	U+9433	# <cjk>	[2000]
+0xEF68	U+944A	# <cjk>	[2000]
+0xEF69	U+9463	# <cjk>	[2000]
+0xEF6A	U+946B	# <cjk>	[2000]
+0xEF6B	U+9471	# <cjk>	[2000]
+0xEF6C	U+9472	# <cjk>	[2000]
+0xEF6D	U+958E	# <cjk>	[2000]
+0xEF6E	U+959F	# <cjk>	[2000]
+0xEF6F	U+95A6	# <cjk>	[2000]
+0xEF70	U+95A9	# <cjk>	[2000]
+0xEF71	U+95AC	# <cjk>	[2000]
+0xEF72	U+95B6	# <cjk>	[2000]
+0xEF73	U+95BD	# <cjk>	[2000]
+0xEF74	U+95CB	# <cjk>	[2000]
+0xEF75	U+95D0	# <cjk>	[2000]
+0xEF76	U+95D3	# <cjk>	[2000]
+0xEF77	U+49B0	# <cjk>	[2000]
+0xEF78	U+95DA	# <cjk>	[2000]
+0xEF79	U+95DE	# <cjk>	[2000]
+0xEF7A	U+9658	# <cjk>	[2000]
+0xEF7B	U+9684	# <cjk>	[2000]
+0xEF7C	U+F9DC	# CJK COMPATIBILITY IDEOGRAPH-F9DC	[2000]
+0xEF7D	U+969D	# <cjk>	[2000]
+0xEF7E	U+96A4	# <cjk>	[2000]
+0xEF80	U+96A5	# <cjk>	[2000]
+0xEF81	U+96D2	# <cjk>	[2000]
+0xEF82	U+96DE	# <cjk>	[2000]
+0xEF83	U+FA68	# CJK COMPATIBILITY IDEOGRAPH-FA68	[2000]	[Unicode3.2]
+0xEF84	U+96E9	# <cjk>	[2000]
+0xEF85	U+96EF	# <cjk>	[2000]
+0xEF86	U+9733	# <cjk>	[2000]
+0xEF87	U+973B	# <cjk>	[2000]
+0xEF88	U+974D	# <cjk>	[2000]
+0xEF89	U+974E	# <cjk>	[2000]
+0xEF8A	U+974F	# <cjk>	[2000]
+0xEF8B	U+975A	# <cjk>	[2000]
+0xEF8C	U+976E	# <cjk>	[2000]
+0xEF8D	U+9773	# <cjk>	[2000]
+0xEF8E	U+9795	# <cjk>	[2000]
+0xEF8F	U+97AE	# <cjk>	[2000]
+0xEF90	U+97BA	# <cjk>	[2000]
+0xEF91	U+97C1	# <cjk>	[2000]
+0xEF92	U+97C9	# <cjk>	[2000]
+0xEF93	U+97DE	# <cjk>	[2000]
+0xEF94	U+97DB	# <cjk>	[2000]
+0xEF95	U+97F4	# <cjk>	[2000]
+0xEF96	U+FA69	# CJK COMPATIBILITY IDEOGRAPH-FA69	[2000]	[Unicode3.2]
+0xEF97	U+980A	# <cjk>	[2000]
+0xEF98	U+981E	# <cjk>	[2000]
+0xEF99	U+982B	# <cjk>	[2000]
+0xEF9A	U+9830	# <cjk>	[2000]
+0xEF9B	U+FA6A	# CJK COMPATIBILITY IDEOGRAPH-FA6A	[2000]	[Unicode3.2]
+0xEF9C	U+9852	# <cjk>	[2000]
+0xEF9D	U+9853	# <cjk>	[2000]
+0xEF9E	U+9856	# <cjk>	[2000]
+0xEF9F	U+9857	# <cjk>	[2000]
+0xEFA0	U+9859	# <cjk>	[2000]
+0xEFA1	U+985A	# <cjk>	[2000]
+0xEFA2	U+F9D0	# CJK COMPATIBILITY IDEOGRAPH-F9D0	[2000]
+0xEFA3	U+9865	# <cjk>	[2000]
+0xEFA4	U+986C	# <cjk>	[2000]
+0xEFA5	U+98BA	# <cjk>	[2000]
+0xEFA6	U+98C8	# <cjk>	[2000]
+0xEFA7	U+98E7	# <cjk>	[2000]
+0xEFA8	U+9958	# <cjk>	[2000]
+0xEFA9	U+999E	# <cjk>	[2000]
+0xEFAA	U+9A02	# <cjk>	[2000]
+0xEFAB	U+9A03	# <cjk>	[2000]
+0xEFAC	U+9A24	# <cjk>	[2000]
+0xEFAD	U+9A2D	# <cjk>	[2000]
+0xEFAE	U+9A2E	# <cjk>	[2000]
+0xEFAF	U+9A38	# <cjk>	[2000]
+0xEFB0	U+9A4A	# <cjk>	[2000]
+0xEFB1	U+9A4E	# <cjk>	[2000]
+0xEFB2	U+9A52	# <cjk>	[2000]
+0xEFB3	U+9AB6	# <cjk>	[2000]
+0xEFB4	U+9AC1	# <cjk>	[2000]
+0xEFB5	U+9AC3	# <cjk>	[2000]
+0xEFB6	U+9ACE	# <cjk>	[2000]
+0xEFB7	U+9AD6	# <cjk>	[2000]
+0xEFB8	U+9AF9	# <cjk>	[2000]
+0xEFB9	U+9B02	# <cjk>	[2000]
+0xEFBA	U+9B08	# <cjk>	[2000]
+0xEFBB	U+9B20	# <cjk>	[2000]
+0xEFBC	U+4C17	# <cjk>	[2000]
+0xEFBD	U+9B2D	# <cjk>	[2000]
+0xEFBE	U+9B5E	# <cjk>	[2000]
+0xEFBF	U+9B79	# <cjk>	[2000]
+0xEFC0	U+9B66	# <cjk>	[2000]
+0xEFC1	U+9B72	# <cjk>	[2000]
+0xEFC2	U+9B75	# <cjk>	[2000]
+0xEFC3	U+9B84	# <cjk>	[2000]
+0xEFC4	U+9B8A	# <cjk>	[2000]
+0xEFC5	U+9B8F	# <cjk>	[2000]
+0xEFC6	U+9B9E	# <cjk>	[2000]
+0xEFC7	U+9BA7	# <cjk>	[2000]
+0xEFC8	U+9BC1	# <cjk>	[2000]
+0xEFC9	U+9BCE	# <cjk>	[2000]
+0xEFCA	U+9BE5	# <cjk>	[2000]
+0xEFCB	U+9BF8	# <cjk>	[2000]
+0xEFCC	U+9BFD	# <cjk>	[2000]
+0xEFCD	U+9C00	# <cjk>	[2000]
+0xEFCE	U+9C23	# <cjk>	[2000]
+0xEFCF	U+9C41	# <cjk>	[2000]
+0xEFD0	U+9C4F	# <cjk>	[2000]
+0xEFD1	U+9C50	# <cjk>	[2000]
+0xEFD2	U+9C53	# <cjk>	[2000]
+0xEFD3	U+9C63	# <cjk>	[2000]
+0xEFD4	U+9C65	# <cjk>	[2000]
+0xEFD5	U+9C77	# <cjk>	[2000]
+0xEFD6	U+9D1D	# <cjk>	[2000]
+0xEFD7	U+9D1E	# <cjk>	[2000]
+0xEFD8	U+9D43	# <cjk>	[2000]
+0xEFD9	U+9D47	# <cjk>	[2000]
+0xEFDA	U+9D52	# <cjk>	[2000]
+0xEFDB	U+9D63	# <cjk>	[2000]
+0xEFDC	U+9D70	# <cjk>	[2000]
+0xEFDD	U+9D7C	# <cjk>	[2000]
+0xEFDE	U+9D8A	# <cjk>	[2000]
+0xEFDF	U+9D96	# <cjk>	[2000]
+0xEFE0	U+9DC0	# <cjk>	[2000]
+0xEFE1	U+9DAC	# <cjk>	[2000]
+0xEFE2	U+9DBC	# <cjk>	[2000]
+0xEFE3	U+9DD7	# <cjk>	[2000]
+0xEFE4	U+2A190	# <cjk>	[2000]	[Unicode3.1]
+0xEFE5	U+9DE7	# <cjk>	[2000]
+0xEFE6	U+9E07	# <cjk>	[2000]
+0xEFE7	U+9E15	# <cjk>	[2000]
+0xEFE8	U+9E7C	# <cjk>	[2000]
+0xEFE9	U+9E9E	# <cjk>	[2000]
+0xEFEA	U+9EA4	# <cjk>	[2000]
+0xEFEB	U+9EAC	# <cjk>	[2000]
+0xEFEC	U+9EAF	# <cjk>	[2000]
+0xEFED	U+9EB4	# <cjk>	[2000]
+0xEFEE	U+9EB5	# <cjk>	[2000]
+0xEFEF	U+9EC3	# <cjk>	[2000]
+0xEFF0	U+9ED1	# <cjk>	[2000]
+0xEFF1	U+9F10	# <cjk>	[2000]
+0xEFF2	U+9F39	# <cjk>	[2000]
+0xEFF3	U+9F57	# <cjk>	[2000]
+0xEFF4	U+9F90	# <cjk>	[2000]
+0xEFF5	U+9F94	# <cjk>	[2000]
+0xEFF6	U+9F97	# <cjk>	[2000]
+0xEFF7	U+9FA2	# <cjk>	[2000]
+0xEFF8	U+59F8	# <cjk>	[2004]
+0xEFF9	U+5C5B	# <cjk>	[2004]
+0xEFFA	U+5E77	# <cjk>	[2004]
+0xEFFB	U+7626	# <cjk>	[2004]
+0xEFFC	U+7E6B	# <cjk>	[2004]
+0xF040	U+20089	# <cjk>	[2000]	[Unicode3.1]
+0xF041	U+4E02	# <cjk>	[2000]
+0xF042	U+4E0F	# <cjk>	[2000]
+0xF043	U+4E12	# <cjk>	[2000]
+0xF044	U+4E29	# <cjk>	[2000]
+0xF045	U+4E2B	# <cjk>	[2000]
+0xF046	U+4E2E	# <cjk>	[2000]
+0xF047	U+4E40	# <cjk>	[2000]
+0xF048	U+4E47	# <cjk>	[2000]
+0xF049	U+4E48	# <cjk>	[2000]
+0xF04A	U+200A2	# <cjk>	[2000]	[Unicode3.1]
+0xF04B	U+4E51	# <cjk>	[2000]
+0xF04C	U+3406	# <cjk>	[2000]
+0xF04D	U+200A4	# <cjk>	[2000]	[Unicode3.1]
+0xF04E	U+4E5A	# <cjk>	[2000]
+0xF04F	U+4E69	# <cjk>	[2000]
+0xF050	U+4E9D	# <cjk>	[2000]
+0xF051	U+342C	# <cjk>	[2000]
+0xF052	U+342E	# <cjk>	[2000]
+0xF053	U+4EB9	# <cjk>	[2000]
+0xF054	U+4EBB	# <cjk>	[2000]
+0xF055	U+201A2	# <cjk>	[2000]	[Unicode3.1]
+0xF056	U+4EBC	# <cjk>	[2000]
+0xF057	U+4EC3	# <cjk>	[2000]
+0xF058	U+4EC8	# <cjk>	[2000]
+0xF059	U+4ED0	# <cjk>	[2000]
+0xF05A	U+4EEB	# <cjk>	[2000]
+0xF05B	U+4EDA	# <cjk>	[2000]
+0xF05C	U+4EF1	# <cjk>	[2000]
+0xF05D	U+4EF5	# <cjk>	[2000]
+0xF05E	U+4F00	# <cjk>	[2000]
+0xF05F	U+4F16	# <cjk>	[2000]
+0xF060	U+4F64	# <cjk>	[2000]
+0xF061	U+4F37	# <cjk>	[2000]
+0xF062	U+4F3E	# <cjk>	[2000]
+0xF063	U+4F54	# <cjk>	[2000]
+0xF064	U+4F58	# <cjk>	[2000]
+0xF065	U+20213	# <cjk>	[2000]	[Unicode3.1]
+0xF066	U+4F77	# <cjk>	[2000]
+0xF067	U+4F78	# <cjk>	[2000]
+0xF068	U+4F7A	# <cjk>	[2000]
+0xF069	U+4F7D	# <cjk>	[2000]
+0xF06A	U+4F82	# <cjk>	[2000]
+0xF06B	U+4F85	# <cjk>	[2000]
+0xF06C	U+4F92	# <cjk>	[2000]
+0xF06D	U+4F9A	# <cjk>	[2000]
+0xF06E	U+4FE6	# <cjk>	[2000]
+0xF06F	U+4FB2	# <cjk>	[2000]
+0xF070	U+4FBE	# <cjk>	[2000]
+0xF071	U+4FC5	# <cjk>	[2000]
+0xF072	U+4FCB	# <cjk>	[2000]
+0xF073	U+4FCF	# <cjk>	[2000]
+0xF074	U+4FD2	# <cjk>	[2000]
+0xF075	U+346A	# <cjk>	[2000]
+0xF076	U+4FF2	# <cjk>	[2000]
+0xF077	U+5000	# <cjk>	[2000]
+0xF078	U+5010	# <cjk>	[2000]
+0xF079	U+5013	# <cjk>	[2000]
+0xF07A	U+501C	# <cjk>	[2000]
+0xF07B	U+501E	# <cjk>	[2000]
+0xF07C	U+5022	# <cjk>	[2000]
+0xF07D	U+3468	# <cjk>	[2000]
+0xF07E	U+5042	# <cjk>	[2000]
+0xF080	U+5046	# <cjk>	[2000]
+0xF081	U+504E	# <cjk>	[2000]
+0xF082	U+5053	# <cjk>	[2000]
+0xF083	U+5057	# <cjk>	[2000]
+0xF084	U+5063	# <cjk>	[2000]
+0xF085	U+5066	# <cjk>	[2000]
+0xF086	U+506A	# <cjk>	[2000]
+0xF087	U+5070	# <cjk>	[2000]
+0xF088	U+50A3	# <cjk>	[2000]
+0xF089	U+5088	# <cjk>	[2000]
+0xF08A	U+5092	# <cjk>	[2000]
+0xF08B	U+5093	# <cjk>	[2000]
+0xF08C	U+5095	# <cjk>	[2000]
+0xF08D	U+5096	# <cjk>	[2000]
+0xF08E	U+509C	# <cjk>	[2000]
+0xF08F	U+50AA	# <cjk>	[2000]
+0xF090	U+2032B	# <cjk>	[2000]	[Unicode3.1]
+0xF091	U+50B1	# <cjk>	[2000]
+0xF092	U+50BA	# <cjk>	[2000]
+0xF093	U+50BB	# <cjk>	[2000]
+0xF094	U+50C4	# <cjk>	[2000]
+0xF095	U+50C7	# <cjk>	[2000]
+0xF096	U+50F3	# <cjk>	[2000]
+0xF097	U+20381	# <cjk>	[2000]	[Unicode3.1]
+0xF098	U+50CE	# <cjk>	[2000]
+0xF099	U+20371	# <cjk>	[2000]	[Unicode3.1]
+0xF09A	U+50D4	# <cjk>	[2000]
+0xF09B	U+50D9	# <cjk>	[2000]
+0xF09C	U+50E1	# <cjk>	[2000]
+0xF09D	U+50E9	# <cjk>	[2000]
+0xF09E	U+3492	# <cjk>	[2000]
+0xF09F	U+5B96	# <cjk>	[2000]
+0xF0A0	U+5BAC	# <cjk>	[2000]
+0xF0A1	U+3761	# <cjk>	[2000]
+0xF0A2	U+5BC0	# <cjk>	[2000]
+0xF0A3	U+3762	# <cjk>	[2000]
+0xF0A4	U+5BCE	# <cjk>	[2000]
+0xF0A5	U+5BD6	# <cjk>	[2000]
+0xF0A6	U+376C	# <cjk>	[2000]
+0xF0A7	U+376B	# <cjk>	[2000]
+0xF0A8	U+5BF1	# <cjk>	[2000]
+0xF0A9	U+5BFD	# <cjk>	[2000]
+0xF0AA	U+3775	# <cjk>	[2000]
+0xF0AB	U+5C03	# <cjk>	[2000]
+0xF0AC	U+5C29	# <cjk>	[2000]
+0xF0AD	U+5C30	# <cjk>	[2000]
+0xF0AE	U+21C56	# <cjk>	[2000]	[Unicode3.1]
+0xF0AF	U+5C5F	# <cjk>	[2000]
+0xF0B0	U+5C63	# <cjk>	[2000]
+0xF0B1	U+5C67	# <cjk>	[2000]
+0xF0B2	U+5C68	# <cjk>	[2000]
+0xF0B3	U+5C69	# <cjk>	[2000]
+0xF0B4	U+5C70	# <cjk>	[2000]
+0xF0B5	U+21D2D	# <cjk>	[2000]	[Unicode3.1]
+0xF0B6	U+21D45	# <cjk>	[2000]	[Unicode3.1]
+0xF0B7	U+5C7C	# <cjk>	[2000]
+0xF0B8	U+21D78	# <cjk>	[2000]	[Unicode3.1]
+0xF0B9	U+21D62	# <cjk>	[2000]	[Unicode3.1]
+0xF0BA	U+5C88	# <cjk>	[2000]
+0xF0BB	U+5C8A	# <cjk>	[2000]
+0xF0BC	U+37C1	# <cjk>	[2000]
+0xF0BD	U+21DA1	# <cjk>	[2000]	[Unicode3.1]
+0xF0BE	U+21D9C	# <cjk>	[2000]	[Unicode3.1]
+0xF0BF	U+5CA0	# <cjk>	[2000]
+0xF0C0	U+5CA2	# <cjk>	[2000]
+0xF0C1	U+5CA6	# <cjk>	[2000]
+0xF0C2	U+5CA7	# <cjk>	[2000]
+0xF0C3	U+21D92	# <cjk>	[2000]	[Unicode3.1]
+0xF0C4	U+5CAD	# <cjk>	[2000]
+0xF0C5	U+5CB5	# <cjk>	[2000]
+0xF0C6	U+21DB7	# <cjk>	[2000]	[Unicode3.1]
+0xF0C7	U+5CC9	# <cjk>	[2000]
+0xF0C8	U+21DE0	# <cjk>	[2000]	[Unicode3.1]
+0xF0C9	U+21E33	# <cjk>	[2000]	[Unicode3.1]
+0xF0CA	U+5D06	# <cjk>	[2000]
+0xF0CB	U+5D10	# <cjk>	[2000]
+0xF0CC	U+5D2B	# <cjk>	[2000]
+0xF0CD	U+5D1D	# <cjk>	[2000]
+0xF0CE	U+5D20	# <cjk>	[2000]
+0xF0CF	U+5D24	# <cjk>	[2000]
+0xF0D0	U+5D26	# <cjk>	[2000]
+0xF0D1	U+5D31	# <cjk>	[2000]
+0xF0D2	U+5D39	# <cjk>	[2000]
+0xF0D3	U+5D42	# <cjk>	[2000]
+0xF0D4	U+37E8	# <cjk>	[2000]
+0xF0D5	U+5D61	# <cjk>	[2000]
+0xF0D6	U+5D6A	# <cjk>	[2000]
+0xF0D7	U+37F4	# <cjk>	[2000]
+0xF0D8	U+5D70	# <cjk>	[2000]
+0xF0D9	U+21F1E	# <cjk>	[2000]	[Unicode3.1]
+0xF0DA	U+37FD	# <cjk>	[2000]
+0xF0DB	U+5D88	# <cjk>	[2000]
+0xF0DC	U+3800	# <cjk>	[2000]
+0xF0DD	U+5D92	# <cjk>	[2000]
+0xF0DE	U+5D94	# <cjk>	[2000]
+0xF0DF	U+5D97	# <cjk>	[2000]
+0xF0E0	U+5D99	# <cjk>	[2000]
+0xF0E1	U+5DB0	# <cjk>	[2000]
+0xF0E2	U+5DB2	# <cjk>	[2000]
+0xF0E3	U+5DB4	# <cjk>	[2000]
+0xF0E4	U+21F76	# <cjk>	[2000]	[Unicode3.1]
+0xF0E5	U+5DB9	# <cjk>	[2000]
+0xF0E6	U+5DD1	# <cjk>	[2000]
+0xF0E7	U+5DD7	# <cjk>	[2000]
+0xF0E8	U+5DD8	# <cjk>	[2000]
+0xF0E9	U+5DE0	# <cjk>	[2000]
+0xF0EA	U+21FFA	# <cjk>	[2000]	[Unicode3.1]
+0xF0EB	U+5DE4	# <cjk>	[2000]
+0xF0EC	U+5DE9	# <cjk>	[2000]
+0xF0ED	U+382F	# <cjk>	[2000]
+0xF0EE	U+5E00	# <cjk>	[2000]
+0xF0EF	U+3836	# <cjk>	[2000]
+0xF0F0	U+5E12	# <cjk>	[2000]
+0xF0F1	U+5E15	# <cjk>	[2000]
+0xF0F2	U+3840	# <cjk>	[2000]
+0xF0F3	U+5E1F	# <cjk>	[2000]
+0xF0F4	U+5E2E	# <cjk>	[2000]
+0xF0F5	U+5E3E	# <cjk>	[2000]
+0xF0F6	U+5E49	# <cjk>	[2000]
+0xF0F7	U+385C	# <cjk>	[2000]
+0xF0F8	U+5E56	# <cjk>	[2000]
+0xF0F9	U+3861	# <cjk>	[2000]
+0xF0FA	U+5E6B	# <cjk>	[2000]
+0xF0FB	U+5E6C	# <cjk>	[2000]
+0xF0FC	U+5E6D	# <cjk>	[2000]
+0xF140	U+5108	# <cjk>	[2000]
+0xF141	U+203F9	# <cjk>	[2000]	[Unicode3.1]
+0xF142	U+5117	# <cjk>	[2000]
+0xF143	U+511B	# <cjk>	[2000]
+0xF144	U+2044A	# <cjk>	[2000]	[Unicode3.1]
+0xF145	U+5160	# <cjk>	[2000]
+0xF146	U+20509	# <cjk>	[2000]	[Unicode3.1]
+0xF147	U+5173	# <cjk>	[2000]
+0xF148	U+5183	# <cjk>	[2000]
+0xF149	U+518B	# <cjk>	[2000]
+0xF14A	U+34BC	# <cjk>	[2000]
+0xF14B	U+5198	# <cjk>	[2000]
+0xF14C	U+51A3	# <cjk>	[2000]
+0xF14D	U+51AD	# <cjk>	[2000]
+0xF14E	U+34C7	# <cjk>	[2000]
+0xF14F	U+51BC	# <cjk>	[2000]
+0xF150	U+205D6	# <cjk>	[2000]	[Unicode3.1]
+0xF151	U+20628	# <cjk>	[2000]	[Unicode3.1]
+0xF152	U+51F3	# <cjk>	[2000]
+0xF153	U+51F4	# <cjk>	[2000]
+0xF154	U+5202	# <cjk>	[2000]
+0xF155	U+5212	# <cjk>	[2000]
+0xF156	U+5216	# <cjk>	[2000]
+0xF157	U+2074F	# <cjk>	[2000]	[Unicode3.1]
+0xF158	U+5255	# <cjk>	[2000]
+0xF159	U+525C	# <cjk>	[2000]
+0xF15A	U+526C	# <cjk>	[2000]
+0xF15B	U+5277	# <cjk>	[2000]
+0xF15C	U+5284	# <cjk>	[2000]
+0xF15D	U+5282	# <cjk>	[2000]
+0xF15E	U+20807	# <cjk>	[2000]	[Unicode3.1]
+0xF15F	U+5298	# <cjk>	[2000]
+0xF160	U+2083A	# <cjk>	[2000]	[Unicode3.1]
+0xF161	U+52A4	# <cjk>	[2000]
+0xF162	U+52A6	# <cjk>	[2000]
+0xF163	U+52AF	# <cjk>	[2000]
+0xF164	U+52BA	# <cjk>	[2000]
+0xF165	U+52BB	# <cjk>	[2000]
+0xF166	U+52CA	# <cjk>	[2000]
+0xF167	U+351F	# <cjk>	[2000]
+0xF168	U+52D1	# <cjk>	[2000]
+0xF169	U+208B9	# <cjk>	[2000]	[Unicode3.1]
+0xF16A	U+52F7	# <cjk>	[2000]
+0xF16B	U+530A	# <cjk>	[2000]
+0xF16C	U+530B	# <cjk>	[2000]
+0xF16D	U+5324	# <cjk>	[2000]
+0xF16E	U+5335	# <cjk>	[2000]
+0xF16F	U+533E	# <cjk>	[2000]
+0xF170	U+5342	# <cjk>	[2000]
+0xF171	U+2097C	# <cjk>	[2000]	[Unicode3.1]
+0xF172	U+2099D	# <cjk>	[2000]	[Unicode3.1]
+0xF173	U+5367	# <cjk>	[2000]
+0xF174	U+536C	# <cjk>	[2000]
+0xF175	U+537A	# <cjk>	[2000]
+0xF176	U+53A4	# <cjk>	[2000]
+0xF177	U+53B4	# <cjk>	[2000]
+0xF178	U+20AD3	# <cjk>	[2000]	[Unicode3.1]
+0xF179	U+53B7	# <cjk>	[2000]
+0xF17A	U+53C0	# <cjk>	[2000]
+0xF17B	U+20B1D	# <cjk>	[2000]	[Unicode3.1]
+0xF17C	U+355D	# <cjk>	[2000]
+0xF17D	U+355E	# <cjk>	[2000]
+0xF17E	U+53D5	# <cjk>	[2000]
+0xF180	U+53DA	# <cjk>	[2000]
+0xF181	U+3563	# <cjk>	[2000]
+0xF182	U+53F4	# <cjk>	[2000]
+0xF183	U+53F5	# <cjk>	[2000]
+0xF184	U+5455	# <cjk>	[2000]
+0xF185	U+5424	# <cjk>	[2000]
+0xF186	U+5428	# <cjk>	[2000]
+0xF187	U+356E	# <cjk>	[2000]
+0xF188	U+5443	# <cjk>	[2000]
+0xF189	U+5462	# <cjk>	[2000]
+0xF18A	U+5466	# <cjk>	[2000]
+0xF18B	U+546C	# <cjk>	[2000]
+0xF18C	U+548A	# <cjk>	[2000]
+0xF18D	U+548D	# <cjk>	[2000]
+0xF18E	U+5495	# <cjk>	[2000]
+0xF18F	U+54A0	# <cjk>	[2000]
+0xF190	U+54A6	# <cjk>	[2000]
+0xF191	U+54AD	# <cjk>	[2000]
+0xF192	U+54AE	# <cjk>	[2000]
+0xF193	U+54B7	# <cjk>	[2000]
+0xF194	U+54BA	# <cjk>	[2000]
+0xF195	U+54BF	# <cjk>	[2000]
+0xF196	U+54C3	# <cjk>	[2000]
+0xF197	U+20D45	# <cjk>	[2000]	[Unicode3.1]
+0xF198	U+54EC	# <cjk>	[2000]
+0xF199	U+54EF	# <cjk>	[2000]
+0xF19A	U+54F1	# <cjk>	[2000]
+0xF19B	U+54F3	# <cjk>	[2000]
+0xF19C	U+5500	# <cjk>	[2000]
+0xF19D	U+5501	# <cjk>	[2000]
+0xF19E	U+5509	# <cjk>	[2000]
+0xF19F	U+553C	# <cjk>	[2000]
+0xF1A0	U+5541	# <cjk>	[2000]
+0xF1A1	U+35A6	# <cjk>	[2000]
+0xF1A2	U+5547	# <cjk>	[2000]
+0xF1A3	U+554A	# <cjk>	[2000]
+0xF1A4	U+35A8	# <cjk>	[2000]
+0xF1A5	U+5560	# <cjk>	[2000]
+0xF1A6	U+5561	# <cjk>	[2000]
+0xF1A7	U+5564	# <cjk>	[2000]
+0xF1A8	U+20DE1	# <cjk>	[2000]	[Unicode3.1]
+0xF1A9	U+557D	# <cjk>	[2000]
+0xF1AA	U+5582	# <cjk>	[2000]
+0xF1AB	U+5588	# <cjk>	[2000]
+0xF1AC	U+5591	# <cjk>	[2000]
+0xF1AD	U+35C5	# <cjk>	[2000]
+0xF1AE	U+55D2	# <cjk>	[2000]
+0xF1AF	U+20E95	# <cjk>	[2000]	[Unicode3.1]
+0xF1B0	U+20E6D	# <cjk>	[2000]	[Unicode3.1]
+0xF1B1	U+55BF	# <cjk>	[2000]
+0xF1B2	U+55C9	# <cjk>	[2000]
+0xF1B3	U+55CC	# <cjk>	[2000]
+0xF1B4	U+55D1	# <cjk>	[2000]
+0xF1B5	U+55DD	# <cjk>	[2000]
+0xF1B6	U+35DA	# <cjk>	[2000]
+0xF1B7	U+55E2	# <cjk>	[2000]
+0xF1B8	U+20E64	# <cjk>	[2000]	[Unicode3.1]
+0xF1B9	U+55E9	# <cjk>	[2000]
+0xF1BA	U+5628	# <cjk>	[2000]
+0xF1BB	U+20F5F	# <cjk>	[2000]	[Unicode3.1]
+0xF1BC	U+5607	# <cjk>	[2000]
+0xF1BD	U+5610	# <cjk>	[2000]
+0xF1BE	U+5630	# <cjk>	[2000]
+0xF1BF	U+5637	# <cjk>	[2000]
+0xF1C0	U+35F4	# <cjk>	[2000]
+0xF1C1	U+563D	# <cjk>	[2000]
+0xF1C2	U+563F	# <cjk>	[2000]
+0xF1C3	U+5640	# <cjk>	[2000]
+0xF1C4	U+5647	# <cjk>	[2000]
+0xF1C5	U+565E	# <cjk>	[2000]
+0xF1C6	U+5660	# <cjk>	[2000]
+0xF1C7	U+566D	# <cjk>	[2000]
+0xF1C8	U+3605	# <cjk>	[2000]
+0xF1C9	U+5688	# <cjk>	[2000]
+0xF1CA	U+568C	# <cjk>	[2000]
+0xF1CB	U+5695	# <cjk>	[2000]
+0xF1CC	U+569A	# <cjk>	[2000]
+0xF1CD	U+569D	# <cjk>	[2000]
+0xF1CE	U+56A8	# <cjk>	[2000]
+0xF1CF	U+56AD	# <cjk>	[2000]
+0xF1D0	U+56B2	# <cjk>	[2000]
+0xF1D1	U+56C5	# <cjk>	[2000]
+0xF1D2	U+56CD	# <cjk>	[2000]
+0xF1D3	U+56DF	# <cjk>	[2000]
+0xF1D4	U+56E8	# <cjk>	[2000]
+0xF1D5	U+56F6	# <cjk>	[2000]
+0xF1D6	U+56F7	# <cjk>	[2000]
+0xF1D7	U+21201	# <cjk>	[2000]	[Unicode3.1]
+0xF1D8	U+5715	# <cjk>	[2000]
+0xF1D9	U+5723	# <cjk>	[2000]
+0xF1DA	U+21255	# <cjk>	[2000]	[Unicode3.1]
+0xF1DB	U+5729	# <cjk>	[2000]
+0xF1DC	U+2127B	# <cjk>	[2000]	[Unicode3.1]
+0xF1DD	U+5745	# <cjk>	[2000]
+0xF1DE	U+5746	# <cjk>	[2000]
+0xF1DF	U+574C	# <cjk>	[2000]
+0xF1E0	U+574D	# <cjk>	[2000]
+0xF1E1	U+21274	# <cjk>	[2000]	[Unicode3.1]
+0xF1E2	U+5768	# <cjk>	[2000]
+0xF1E3	U+576F	# <cjk>	[2000]
+0xF1E4	U+5773	# <cjk>	[2000]
+0xF1E5	U+5774	# <cjk>	[2000]
+0xF1E6	U+5775	# <cjk>	[2000]
+0xF1E7	U+577B	# <cjk>	[2000]
+0xF1E8	U+212E4	# <cjk>	[2000]	[Unicode3.1]
+0xF1E9	U+212D7	# <cjk>	[2000]	[Unicode3.1]
+0xF1EA	U+57AC	# <cjk>	[2000]
+0xF1EB	U+579A	# <cjk>	[2000]
+0xF1EC	U+579D	# <cjk>	[2000]
+0xF1ED	U+579E	# <cjk>	[2000]
+0xF1EE	U+57A8	# <cjk>	[2000]
+0xF1EF	U+57D7	# <cjk>	[2000]
+0xF1F0	U+212FD	# <cjk>	[2000]	[Unicode3.1]
+0xF1F1	U+57CC	# <cjk>	[2000]
+0xF1F2	U+21336	# <cjk>	[2000]	[Unicode3.1]
+0xF1F3	U+21344	# <cjk>	[2000]	[Unicode3.1]
+0xF1F4	U+57DE	# <cjk>	[2000]
+0xF1F5	U+57E6	# <cjk>	[2000]
+0xF1F6	U+57F0	# <cjk>	[2000]
+0xF1F7	U+364A	# <cjk>	[2000]
+0xF1F8	U+57F8	# <cjk>	[2000]
+0xF1F9	U+57FB	# <cjk>	[2000]
+0xF1FA	U+57FD	# <cjk>	[2000]
+0xF1FB	U+5804	# <cjk>	[2000]
+0xF1FC	U+581E	# <cjk>	[2000]
+0xF240	U+5820	# <cjk>	[2000]
+0xF241	U+5827	# <cjk>	[2000]
+0xF242	U+5832	# <cjk>	[2000]
+0xF243	U+5839	# <cjk>	[2000]
+0xF244	U+213C4	# <cjk>	[2000]	[Unicode3.1]
+0xF245	U+5849	# <cjk>	[2000]
+0xF246	U+584C	# <cjk>	[2000]
+0xF247	U+5867	# <cjk>	[2000]
+0xF248	U+588A	# <cjk>	[2000]
+0xF249	U+588B	# <cjk>	[2000]
+0xF24A	U+588D	# <cjk>	[2000]
+0xF24B	U+588F	# <cjk>	[2000]
+0xF24C	U+5890	# <cjk>	[2000]
+0xF24D	U+5894	# <cjk>	[2000]
+0xF24E	U+589D	# <cjk>	[2000]
+0xF24F	U+58AA	# <cjk>	[2000]
+0xF250	U+58B1	# <cjk>	[2000]
+0xF251	U+2146D	# <cjk>	[2000]	[Unicode3.1]
+0xF252	U+58C3	# <cjk>	[2000]
+0xF253	U+58CD	# <cjk>	[2000]
+0xF254	U+58E2	# <cjk>	[2000]
+0xF255	U+58F3	# <cjk>	[2000]
+0xF256	U+58F4	# <cjk>	[2000]
+0xF257	U+5905	# <cjk>	[2000]
+0xF258	U+5906	# <cjk>	[2000]
+0xF259	U+590B	# <cjk>	[2000]
+0xF25A	U+590D	# <cjk>	[2000]
+0xF25B	U+5914	# <cjk>	[2000]
+0xF25C	U+5924	# <cjk>	[2000]
+0xF25D	U+215D7	# <cjk>	[2000]	[Unicode3.1]
+0xF25E	U+3691	# <cjk>	[2000]
+0xF25F	U+593D	# <cjk>	[2000]
+0xF260	U+3699	# <cjk>	[2000]
+0xF261	U+5946	# <cjk>	[2000]
+0xF262	U+3696	# <cjk>	[2000]
+0xF263	U+26C29	# <cjk>	[2000]	[Unicode3.1]
+0xF264	U+595B	# <cjk>	[2000]
+0xF265	U+595F	# <cjk>	[2000]
+0xF266	U+21647	# <cjk>	[2000]	[Unicode3.1]
+0xF267	U+5975	# <cjk>	[2000]
+0xF268	U+5976	# <cjk>	[2000]
+0xF269	U+597C	# <cjk>	[2000]
+0xF26A	U+599F	# <cjk>	[2000]
+0xF26B	U+59AE	# <cjk>	[2000]
+0xF26C	U+59BC	# <cjk>	[2000]
+0xF26D	U+59C8	# <cjk>	[2000]
+0xF26E	U+59CD	# <cjk>	[2000]
+0xF26F	U+59DE	# <cjk>	[2000]
+0xF270	U+59E3	# <cjk>	[2000]
+0xF271	U+59E4	# <cjk>	[2000]
+0xF272	U+59E7	# <cjk>	[2000]
+0xF273	U+59EE	# <cjk>	[2000]
+0xF274	U+21706	# <cjk>	[2000]	[Unicode3.1]
+0xF275	U+21742	# <cjk>	[2000]	[Unicode3.1]
+0xF276	U+36CF	# <cjk>	[2000]
+0xF277	U+5A0C	# <cjk>	[2000]
+0xF278	U+5A0D	# <cjk>	[2000]
+0xF279	U+5A17	# <cjk>	[2000]
+0xF27A	U+5A27	# <cjk>	[2000]
+0xF27B	U+5A2D	# <cjk>	[2000]
+0xF27C	U+5A55	# <cjk>	[2000]
+0xF27D	U+5A65	# <cjk>	[2000]
+0xF27E	U+5A7A	# <cjk>	[2000]
+0xF280	U+5A8B	# <cjk>	[2000]
+0xF281	U+5A9C	# <cjk>	[2000]
+0xF282	U+5A9F	# <cjk>	[2000]
+0xF283	U+5AA0	# <cjk>	[2000]
+0xF284	U+5AA2	# <cjk>	[2000]
+0xF285	U+5AB1	# <cjk>	[2000]
+0xF286	U+5AB3	# <cjk>	[2000]
+0xF287	U+5AB5	# <cjk>	[2000]
+0xF288	U+5ABA	# <cjk>	[2000]
+0xF289	U+5ABF	# <cjk>	[2000]
+0xF28A	U+5ADA	# <cjk>	[2000]
+0xF28B	U+5ADC	# <cjk>	[2000]
+0xF28C	U+5AE0	# <cjk>	[2000]
+0xF28D	U+5AE5	# <cjk>	[2000]
+0xF28E	U+5AF0	# <cjk>	[2000]
+0xF28F	U+5AEE	# <cjk>	[2000]
+0xF290	U+5AF5	# <cjk>	[2000]
+0xF291	U+5B00	# <cjk>	[2000]
+0xF292	U+5B08	# <cjk>	[2000]
+0xF293	U+5B17	# <cjk>	[2000]
+0xF294	U+5B34	# <cjk>	[2000]
+0xF295	U+5B2D	# <cjk>	[2000]
+0xF296	U+5B4C	# <cjk>	[2000]
+0xF297	U+5B52	# <cjk>	[2000]
+0xF298	U+5B68	# <cjk>	[2000]
+0xF299	U+5B6F	# <cjk>	[2000]
+0xF29A	U+5B7C	# <cjk>	[2000]
+0xF29B	U+5B7F	# <cjk>	[2000]
+0xF29C	U+5B81	# <cjk>	[2000]
+0xF29D	U+5B84	# <cjk>	[2000]
+0xF29E	U+219C3	# <cjk>	[2000]	[Unicode3.1]
+0xF29F	U+5E6E	# <cjk>	[2000]
+0xF2A0	U+2217B	# <cjk>	[2000]	[Unicode3.1]
+0xF2A1	U+5EA5	# <cjk>	[2000]
+0xF2A2	U+5EAA	# <cjk>	[2000]
+0xF2A3	U+5EAC	# <cjk>	[2000]
+0xF2A4	U+5EB9	# <cjk>	[2000]
+0xF2A5	U+5EBF	# <cjk>	[2000]
+0xF2A6	U+5EC6	# <cjk>	[2000]
+0xF2A7	U+5ED2	# <cjk>	[2000]
+0xF2A8	U+5ED9	# <cjk>	[2000]
+0xF2A9	U+2231E	# <cjk>	[2000]	[Unicode3.1]
+0xF2AA	U+5EFD	# <cjk>	[2000]
+0xF2AB	U+5F08	# <cjk>	[2000]
+0xF2AC	U+5F0E	# <cjk>	[2000]
+0xF2AD	U+5F1C	# <cjk>	[2000]
+0xF2AE	U+223AD	# <cjk>	[2000]	[Unicode3.1]
+0xF2AF	U+5F1E	# <cjk>	[2000]
+0xF2B0	U+5F47	# <cjk>	[2000]
+0xF2B1	U+5F63	# <cjk>	[2000]
+0xF2B2	U+5F72	# <cjk>	[2000]
+0xF2B3	U+5F7E	# <cjk>	[2000]
+0xF2B4	U+5F8F	# <cjk>	[2000]
+0xF2B5	U+5FA2	# <cjk>	[2000]
+0xF2B6	U+5FA4	# <cjk>	[2000]
+0xF2B7	U+5FB8	# <cjk>	[2000]
+0xF2B8	U+5FC4	# <cjk>	[2000]
+0xF2B9	U+38FA	# <cjk>	[2000]
+0xF2BA	U+5FC7	# <cjk>	[2000]
+0xF2BB	U+5FCB	# <cjk>	[2000]
+0xF2BC	U+5FD2	# <cjk>	[2000]
+0xF2BD	U+5FD3	# <cjk>	[2000]
+0xF2BE	U+5FD4	# <cjk>	[2000]
+0xF2BF	U+5FE2	# <cjk>	[2000]
+0xF2C0	U+5FEE	# <cjk>	[2000]
+0xF2C1	U+5FEF	# <cjk>	[2000]
+0xF2C2	U+5FF3	# <cjk>	[2000]
+0xF2C3	U+5FFC	# <cjk>	[2000]
+0xF2C4	U+3917	# <cjk>	[2000]
+0xF2C5	U+6017	# <cjk>	[2000]
+0xF2C6	U+6022	# <cjk>	[2000]
+0xF2C7	U+6024	# <cjk>	[2000]
+0xF2C8	U+391A	# <cjk>	[2000]
+0xF2C9	U+604C	# <cjk>	[2000]
+0xF2CA	U+607F	# <cjk>	[2000]
+0xF2CB	U+608A	# <cjk>	[2000]
+0xF2CC	U+6095	# <cjk>	[2000]
+0xF2CD	U+60A8	# <cjk>	[2000]
+0xF2CE	U+226F3	# <cjk>	[2000]	[Unicode3.1]
+0xF2CF	U+60B0	# <cjk>	[2000]
+0xF2D0	U+60B1	# <cjk>	[2000]
+0xF2D1	U+60BE	# <cjk>	[2000]
+0xF2D2	U+60C8	# <cjk>	[2000]
+0xF2D3	U+60D9	# <cjk>	[2000]
+0xF2D4	U+60DB	# <cjk>	[2000]
+0xF2D5	U+60EE	# <cjk>	[2000]
+0xF2D6	U+60F2	# <cjk>	[2000]
+0xF2D7	U+60F5	# <cjk>	[2000]
+0xF2D8	U+6110	# <cjk>	[2000]
+0xF2D9	U+6112	# <cjk>	[2000]
+0xF2DA	U+6113	# <cjk>	[2000]
+0xF2DB	U+6119	# <cjk>	[2000]
+0xF2DC	U+611E	# <cjk>	[2000]
+0xF2DD	U+613A	# <cjk>	[2000]
+0xF2DE	U+396F	# <cjk>	[2000]
+0xF2DF	U+6141	# <cjk>	[2000]
+0xF2E0	U+6146	# <cjk>	[2000]
+0xF2E1	U+6160	# <cjk>	[2000]
+0xF2E2	U+617C	# <cjk>	[2000]
+0xF2E3	U+2285B	# <cjk>	[2000]	[Unicode3.1]
+0xF2E4	U+6192	# <cjk>	[2000]
+0xF2E5	U+6193	# <cjk>	[2000]
+0xF2E6	U+6197	# <cjk>	[2000]
+0xF2E7	U+6198	# <cjk>	[2000]
+0xF2E8	U+61A5	# <cjk>	[2000]
+0xF2E9	U+61A8	# <cjk>	[2000]
+0xF2EA	U+61AD	# <cjk>	[2000]
+0xF2EB	U+228AB	# <cjk>	[2000]	[Unicode3.1]
+0xF2EC	U+61D5	# <cjk>	[2000]
+0xF2ED	U+61DD	# <cjk>	[2000]
+0xF2EE	U+61DF	# <cjk>	[2000]
+0xF2EF	U+61F5	# <cjk>	[2000]
+0xF2F0	U+2298F	# <cjk>	[2000]	[Unicode3.1]
+0xF2F1	U+6215	# <cjk>	[2000]
+0xF2F2	U+6223	# <cjk>	[2000]
+0xF2F3	U+6229	# <cjk>	[2000]
+0xF2F4	U+6246	# <cjk>	[2000]
+0xF2F5	U+624C	# <cjk>	[2000]
+0xF2F6	U+6251	# <cjk>	[2000]
+0xF2F7	U+6252	# <cjk>	[2000]
+0xF2F8	U+6261	# <cjk>	[2000]
+0xF2F9	U+6264	# <cjk>	[2000]
+0xF2FA	U+627B	# <cjk>	[2000]
+0xF2FB	U+626D	# <cjk>	[2000]
+0xF2FC	U+6273	# <cjk>	[2000]
+0xF340	U+6299	# <cjk>	[2000]
+0xF341	U+62A6	# <cjk>	[2000]
+0xF342	U+62D5	# <cjk>	[2000]
+0xF343	U+22AB8	# <cjk>	[2000]	[Unicode3.1]
+0xF344	U+62FD	# <cjk>	[2000]
+0xF345	U+6303	# <cjk>	[2000]
+0xF346	U+630D	# <cjk>	[2000]
+0xF347	U+6310	# <cjk>	[2000]
+0xF348	U+22B4F	# <cjk>	[2000]	[Unicode3.1]
+0xF349	U+22B50	# <cjk>	[2000]	[Unicode3.1]
+0xF34A	U+6332	# <cjk>	[2000]
+0xF34B	U+6335	# <cjk>	[2000]
+0xF34C	U+633B	# <cjk>	[2000]
+0xF34D	U+633C	# <cjk>	[2000]
+0xF34E	U+6341	# <cjk>	[2000]
+0xF34F	U+6344	# <cjk>	[2000]
+0xF350	U+634E	# <cjk>	[2000]
+0xF351	U+22B46	# <cjk>	[2000]	[Unicode3.1]
+0xF352	U+6359	# <cjk>	[2000]
+0xF353	U+22C1D	# <cjk>	[2000]	[Unicode3.1]
+0xF354	U+22BA6	# <cjk>	[2000]	[Unicode3.1]
+0xF355	U+636C	# <cjk>	[2000]
+0xF356	U+6384	# <cjk>	[2000]
+0xF357	U+6399	# <cjk>	[2000]
+0xF358	U+22C24	# <cjk>	[2000]	[Unicode3.1]
+0xF359	U+6394	# <cjk>	[2000]
+0xF35A	U+63BD	# <cjk>	[2000]
+0xF35B	U+63F7	# <cjk>	[2000]
+0xF35C	U+63D4	# <cjk>	[2000]
+0xF35D	U+63D5	# <cjk>	[2000]
+0xF35E	U+63DC	# <cjk>	[2000]
+0xF35F	U+63E0	# <cjk>	[2000]
+0xF360	U+63EB	# <cjk>	[2000]
+0xF361	U+63EC	# <cjk>	[2000]
+0xF362	U+63F2	# <cjk>	[2000]
+0xF363	U+6409	# <cjk>	[2000]
+0xF364	U+641E	# <cjk>	[2000]
+0xF365	U+6425	# <cjk>	[2000]
+0xF366	U+6429	# <cjk>	[2000]
+0xF367	U+642F	# <cjk>	[2000]
+0xF368	U+645A	# <cjk>	[2000]
+0xF369	U+645B	# <cjk>	[2000]
+0xF36A	U+645D	# <cjk>	[2000]
+0xF36B	U+6473	# <cjk>	[2000]
+0xF36C	U+647D	# <cjk>	[2000]
+0xF36D	U+6487	# <cjk>	[2000]
+0xF36E	U+6491	# <cjk>	[2000]
+0xF36F	U+649D	# <cjk>	[2000]
+0xF370	U+649F	# <cjk>	[2000]
+0xF371	U+64CB	# <cjk>	[2000]
+0xF372	U+64CC	# <cjk>	[2000]
+0xF373	U+64D5	# <cjk>	[2000]
+0xF374	U+64D7	# <cjk>	[2000]
+0xF375	U+22DE1	# <cjk>	[2000]	[Unicode3.1]
+0xF376	U+64E4	# <cjk>	[2000]
+0xF377	U+64E5	# <cjk>	[2000]
+0xF378	U+64FF	# <cjk>	[2000]
+0xF379	U+6504	# <cjk>	[2000]
+0xF37A	U+3A6E	# <cjk>	[2000]
+0xF37B	U+650F	# <cjk>	[2000]
+0xF37C	U+6514	# <cjk>	[2000]
+0xF37D	U+6516	# <cjk>	[2000]
+0xF37E	U+3A73	# <cjk>	[2000]
+0xF380	U+651E	# <cjk>	[2000]
+0xF381	U+6532	# <cjk>	[2000]
+0xF382	U+6544	# <cjk>	[2000]
+0xF383	U+6554	# <cjk>	[2000]
+0xF384	U+656B	# <cjk>	[2000]
+0xF385	U+657A	# <cjk>	[2000]
+0xF386	U+6581	# <cjk>	[2000]
+0xF387	U+6584	# <cjk>	[2000]
+0xF388	U+6585	# <cjk>	[2000]
+0xF389	U+658A	# <cjk>	[2000]
+0xF38A	U+65B2	# <cjk>	[2000]
+0xF38B	U+65B5	# <cjk>	[2000]
+0xF38C	U+65B8	# <cjk>	[2000]
+0xF38D	U+65BF	# <cjk>	[2000]
+0xF38E	U+65C2	# <cjk>	[2000]
+0xF38F	U+65C9	# <cjk>	[2000]
+0xF390	U+65D4	# <cjk>	[2000]
+0xF391	U+3AD6	# <cjk>	[2000]
+0xF392	U+65F2	# <cjk>	[2000]
+0xF393	U+65F9	# <cjk>	[2000]
+0xF394	U+65FC	# <cjk>	[2000]
+0xF395	U+6604	# <cjk>	[2000]
+0xF396	U+6608	# <cjk>	[2000]
+0xF397	U+6621	# <cjk>	[2000]
+0xF398	U+662A	# <cjk>	[2000]
+0xF399	U+6645	# <cjk>	[2000]
+0xF39A	U+6651	# <cjk>	[2000]
+0xF39B	U+664E	# <cjk>	[2000]
+0xF39C	U+3AEA	# <cjk>	[2000]
+0xF39D	U+231C3	# <cjk>	[2000]	[Unicode3.1]
+0xF39E	U+6657	# <cjk>	[2000]
+0xF39F	U+665B	# <cjk>	[2000]
+0xF3A0	U+6663	# <cjk>	[2000]
+0xF3A1	U+231F5	# <cjk>	[2000]	[Unicode3.1]
+0xF3A2	U+231B6	# <cjk>	[2000]	[Unicode3.1]
+0xF3A3	U+666A	# <cjk>	[2000]
+0xF3A4	U+666B	# <cjk>	[2000]
+0xF3A5	U+666C	# <cjk>	[2000]
+0xF3A6	U+666D	# <cjk>	[2000]
+0xF3A7	U+667B	# <cjk>	[2000]
+0xF3A8	U+6680	# <cjk>	[2000]
+0xF3A9	U+6690	# <cjk>	[2000]
+0xF3AA	U+6692	# <cjk>	[2000]
+0xF3AB	U+6699	# <cjk>	[2000]
+0xF3AC	U+3B0E	# <cjk>	[2000]
+0xF3AD	U+66AD	# <cjk>	[2000]
+0xF3AE	U+66B1	# <cjk>	[2000]
+0xF3AF	U+66B5	# <cjk>	[2000]
+0xF3B0	U+3B1A	# <cjk>	[2000]
+0xF3B1	U+66BF	# <cjk>	[2000]
+0xF3B2	U+3B1C	# <cjk>	[2000]
+0xF3B3	U+66EC	# <cjk>	[2000]
+0xF3B4	U+3AD7	# <cjk>	[2000]
+0xF3B5	U+6701	# <cjk>	[2000]
+0xF3B6	U+6705	# <cjk>	[2000]
+0xF3B7	U+6712	# <cjk>	[2000]
+0xF3B8	U+23372	# <cjk>	[2000]	[Unicode3.1]
+0xF3B9	U+6719	# <cjk>	[2000]
+0xF3BA	U+233D3	# <cjk>	[2000]	[Unicode3.1]
+0xF3BB	U+233D2	# <cjk>	[2000]	[Unicode3.1]
+0xF3BC	U+674C	# <cjk>	[2000]
+0xF3BD	U+674D	# <cjk>	[2000]
+0xF3BE	U+6754	# <cjk>	[2000]
+0xF3BF	U+675D	# <cjk>	[2000]
+0xF3C0	U+233D0	# <cjk>	[2000]	[Unicode3.1]
+0xF3C1	U+233E4	# <cjk>	[2000]	[Unicode3.1]
+0xF3C2	U+233D5	# <cjk>	[2000]	[Unicode3.1]
+0xF3C3	U+6774	# <cjk>	[2000]
+0xF3C4	U+6776	# <cjk>	[2000]
+0xF3C5	U+233DA	# <cjk>	[2000]	[Unicode3.1]
+0xF3C6	U+6792	# <cjk>	[2000]
+0xF3C7	U+233DF	# <cjk>	[2000]	[Unicode3.1]
+0xF3C8	U+8363	# <cjk>	[2000]
+0xF3C9	U+6810	# <cjk>	[2000]
+0xF3CA	U+67B0	# <cjk>	[2000]
+0xF3CB	U+67B2	# <cjk>	[2000]
+0xF3CC	U+67C3	# <cjk>	[2000]
+0xF3CD	U+67C8	# <cjk>	[2000]
+0xF3CE	U+67D2	# <cjk>	[2000]
+0xF3CF	U+67D9	# <cjk>	[2000]
+0xF3D0	U+67DB	# <cjk>	[2000]
+0xF3D1	U+67F0	# <cjk>	[2000]
+0xF3D2	U+67F7	# <cjk>	[2000]
+0xF3D3	U+2344A	# <cjk>	[2000]	[Unicode3.1]
+0xF3D4	U+23451	# <cjk>	[2000]	[Unicode3.1]
+0xF3D5	U+2344B	# <cjk>	[2000]	[Unicode3.1]
+0xF3D6	U+6818	# <cjk>	[2000]
+0xF3D7	U+681F	# <cjk>	[2000]
+0xF3D8	U+682D	# <cjk>	[2000]
+0xF3D9	U+23465	# <cjk>	[2000]	[Unicode3.1]
+0xF3DA	U+6833	# <cjk>	[2000]
+0xF3DB	U+683B	# <cjk>	[2000]
+0xF3DC	U+683E	# <cjk>	[2000]
+0xF3DD	U+6844	# <cjk>	[2000]
+0xF3DE	U+6845	# <cjk>	[2000]
+0xF3DF	U+6849	# <cjk>	[2000]
+0xF3E0	U+684C	# <cjk>	[2000]
+0xF3E1	U+6855	# <cjk>	[2000]
+0xF3E2	U+6857	# <cjk>	[2000]
+0xF3E3	U+3B77	# <cjk>	[2000]
+0xF3E4	U+686B	# <cjk>	[2000]
+0xF3E5	U+686E	# <cjk>	[2000]
+0xF3E6	U+687A	# <cjk>	[2000]
+0xF3E7	U+687C	# <cjk>	[2000]
+0xF3E8	U+6882	# <cjk>	[2000]
+0xF3E9	U+6890	# <cjk>	[2000]
+0xF3EA	U+6896	# <cjk>	[2000]
+0xF3EB	U+3B6D	# <cjk>	[2000]
+0xF3EC	U+6898	# <cjk>	[2000]
+0xF3ED	U+6899	# <cjk>	[2000]
+0xF3EE	U+689A	# <cjk>	[2000]
+0xF3EF	U+689C	# <cjk>	[2000]
+0xF3F0	U+68AA	# <cjk>	[2000]
+0xF3F1	U+68AB	# <cjk>	[2000]
+0xF3F2	U+68B4	# <cjk>	[2000]
+0xF3F3	U+68BB	# <cjk>	[2000]
+0xF3F4	U+68FB	# <cjk>	[2000]
+0xF3F5	U+234E4	# <cjk>	[2000]	[Unicode3.1]
+0xF3F6	U+2355A	# <cjk>	[2000]	[Unicode3.1]
+0xF3F7	U+FA13	# CJK COMPATIBILITY IDEOGRAPH-FA13	[2000]
+0xF3F8	U+68C3	# <cjk>	[2000]
+0xF3F9	U+68C5	# <cjk>	[2000]
+0xF3FA	U+68CC	# <cjk>	[2000]
+0xF3FB	U+68CF	# <cjk>	[2000]
+0xF3FC	U+68D6	# <cjk>	[2000]
+0xF440	U+68D9	# <cjk>	[2000]
+0xF441	U+68E4	# <cjk>	[2000]
+0xF442	U+68E5	# <cjk>	[2000]
+0xF443	U+68EC	# <cjk>	[2000]
+0xF444	U+68F7	# <cjk>	[2000]
+0xF445	U+6903	# <cjk>	[2000]
+0xF446	U+6907	# <cjk>	[2000]
+0xF447	U+3B87	# <cjk>	[2000]
+0xF448	U+3B88	# <cjk>	[2000]
+0xF449	U+23594	# <cjk>	[2000]	[Unicode3.1]
+0xF44A	U+693B	# <cjk>	[2000]
+0xF44B	U+3B8D	# <cjk>	[2000]
+0xF44C	U+6946	# <cjk>	[2000]
+0xF44D	U+6969	# <cjk>	[2000]
+0xF44E	U+696C	# <cjk>	[2000]
+0xF44F	U+6972	# <cjk>	[2000]
+0xF450	U+697A	# <cjk>	[2000]
+0xF451	U+697F	# <cjk>	[2000]
+0xF452	U+6992	# <cjk>	[2000]
+0xF453	U+3BA4	# <cjk>	[2000]
+0xF454	U+6996	# <cjk>	[2000]
+0xF455	U+6998	# <cjk>	[2000]
+0xF456	U+69A6	# <cjk>	[2000]
+0xF457	U+69B0	# <cjk>	[2000]
+0xF458	U+69B7	# <cjk>	[2000]
+0xF459	U+69BA	# <cjk>	[2000]
+0xF45A	U+69BC	# <cjk>	[2000]
+0xF45B	U+69C0	# <cjk>	[2000]
+0xF45C	U+69D1	# <cjk>	[2000]
+0xF45D	U+69D6	# <cjk>	[2000]
+0xF45E	U+23639	# <cjk>	[2000]	[Unicode3.1]
+0xF45F	U+23647	# <cjk>	[2000]	[Unicode3.1]
+0xF460	U+6A30	# <cjk>	[2000]
+0xF461	U+23638	# <cjk>	[2000]	[Unicode3.1]
+0xF462	U+2363A	# <cjk>	[2000]	[Unicode3.1]
+0xF463	U+69E3	# <cjk>	[2000]
+0xF464	U+69EE	# <cjk>	[2000]
+0xF465	U+69EF	# <cjk>	[2000]
+0xF466	U+69F3	# <cjk>	[2000]
+0xF467	U+3BCD	# <cjk>	[2000]
+0xF468	U+69F4	# <cjk>	[2000]
+0xF469	U+69FE	# <cjk>	[2000]
+0xF46A	U+6A11	# <cjk>	[2000]
+0xF46B	U+6A1A	# <cjk>	[2000]
+0xF46C	U+6A1D	# <cjk>	[2000]
+0xF46D	U+2371C	# <cjk>	[2000]	[Unicode3.1]
+0xF46E	U+6A32	# <cjk>	[2000]
+0xF46F	U+6A33	# <cjk>	[2000]
+0xF470	U+6A34	# <cjk>	[2000]
+0xF471	U+6A3F	# <cjk>	[2000]
+0xF472	U+6A46	# <cjk>	[2000]
+0xF473	U+6A49	# <cjk>	[2000]
+0xF474	U+6A7A	# <cjk>	[2000]
+0xF475	U+6A4E	# <cjk>	[2000]
+0xF476	U+6A52	# <cjk>	[2000]
+0xF477	U+6A64	# <cjk>	[2000]
+0xF478	U+2370C	# <cjk>	[2000]	[Unicode3.1]
+0xF479	U+6A7E	# <cjk>	[2000]
+0xF47A	U+6A83	# <cjk>	[2000]
+0xF47B	U+6A8B	# <cjk>	[2000]
+0xF47C	U+3BF0	# <cjk>	[2000]
+0xF47D	U+6A91	# <cjk>	[2000]
+0xF47E	U+6A9F	# <cjk>	[2000]
+0xF480	U+6AA1	# <cjk>	[2000]
+0xF481	U+23764	# <cjk>	[2000]	[Unicode3.1]
+0xF482	U+6AAB	# <cjk>	[2000]
+0xF483	U+6ABD	# <cjk>	[2000]
+0xF484	U+6AC6	# <cjk>	[2000]
+0xF485	U+6AD4	# <cjk>	[2000]
+0xF486	U+6AD0	# <cjk>	[2000]
+0xF487	U+6ADC	# <cjk>	[2000]
+0xF488	U+6ADD	# <cjk>	[2000]
+0xF489	U+237FF	# <cjk>	[2000]	[Unicode3.1]
+0xF48A	U+237E7	# <cjk>	[2000]	[Unicode3.1]
+0xF48B	U+6AEC	# <cjk>	[2000]
+0xF48C	U+6AF1	# <cjk>	[2000]
+0xF48D	U+6AF2	# <cjk>	[2000]
+0xF48E	U+6AF3	# <cjk>	[2000]
+0xF48F	U+6AFD	# <cjk>	[2000]
+0xF490	U+23824	# <cjk>	[2000]	[Unicode3.1]
+0xF491	U+6B0B	# <cjk>	[2000]
+0xF492	U+6B0F	# <cjk>	[2000]
+0xF493	U+6B10	# <cjk>	[2000]
+0xF494	U+6B11	# <cjk>	[2000]
+0xF495	U+2383D	# <cjk>	[2000]	[Unicode3.1]
+0xF496	U+6B17	# <cjk>	[2000]
+0xF497	U+3C26	# <cjk>	[2000]
+0xF498	U+6B2F	# <cjk>	[2000]
+0xF499	U+6B4A	# <cjk>	[2000]
+0xF49A	U+6B58	# <cjk>	[2000]
+0xF49B	U+6B6C	# <cjk>	[2000]
+0xF49C	U+6B75	# <cjk>	[2000]
+0xF49D	U+6B7A	# <cjk>	[2000]
+0xF49E	U+6B81	# <cjk>	[2000]
+0xF49F	U+6B9B	# <cjk>	[2000]
+0xF4A0	U+6BAE	# <cjk>	[2000]
+0xF4A1	U+23A98	# <cjk>	[2000]	[Unicode3.1]
+0xF4A2	U+6BBD	# <cjk>	[2000]
+0xF4A3	U+6BBE	# <cjk>	[2000]
+0xF4A4	U+6BC7	# <cjk>	[2000]
+0xF4A5	U+6BC8	# <cjk>	[2000]
+0xF4A6	U+6BC9	# <cjk>	[2000]
+0xF4A7	U+6BDA	# <cjk>	[2000]
+0xF4A8	U+6BE6	# <cjk>	[2000]
+0xF4A9	U+6BE7	# <cjk>	[2000]
+0xF4AA	U+6BEE	# <cjk>	[2000]
+0xF4AB	U+6BF1	# <cjk>	[2000]
+0xF4AC	U+6C02	# <cjk>	[2000]
+0xF4AD	U+6C0A	# <cjk>	[2000]
+0xF4AE	U+6C0E	# <cjk>	[2000]
+0xF4AF	U+6C35	# <cjk>	[2000]
+0xF4B0	U+6C36	# <cjk>	[2000]
+0xF4B1	U+6C3A	# <cjk>	[2000]
+0xF4B2	U+23C7F	# <cjk>	[2000]	[Unicode3.1]
+0xF4B3	U+6C3F	# <cjk>	[2000]
+0xF4B4	U+6C4D	# <cjk>	[2000]
+0xF4B5	U+6C5B	# <cjk>	[2000]
+0xF4B6	U+6C6D	# <cjk>	[2000]
+0xF4B7	U+6C84	# <cjk>	[2000]
+0xF4B8	U+6C89	# <cjk>	[2000]
+0xF4B9	U+3CC3	# <cjk>	[2000]
+0xF4BA	U+6C94	# <cjk>	[2000]
+0xF4BB	U+6C95	# <cjk>	[2000]
+0xF4BC	U+6C97	# <cjk>	[2000]
+0xF4BD	U+6CAD	# <cjk>	[2000]
+0xF4BE	U+6CC2	# <cjk>	[2000]
+0xF4BF	U+6CD0	# <cjk>	[2000]
+0xF4C0	U+3CD2	# <cjk>	[2000]
+0xF4C1	U+6CD6	# <cjk>	[2000]
+0xF4C2	U+6CDA	# <cjk>	[2000]
+0xF4C3	U+6CDC	# <cjk>	[2000]
+0xF4C4	U+6CE9	# <cjk>	[2000]
+0xF4C5	U+6CEC	# <cjk>	[2000]
+0xF4C6	U+6CED	# <cjk>	[2000]
+0xF4C7	U+23D00	# <cjk>	[2000]	[Unicode3.1]
+0xF4C8	U+6D00	# <cjk>	[2000]
+0xF4C9	U+6D0A	# <cjk>	[2000]
+0xF4CA	U+6D24	# <cjk>	[2000]
+0xF4CB	U+6D26	# <cjk>	[2000]
+0xF4CC	U+6D27	# <cjk>	[2000]
+0xF4CD	U+6C67	# <cjk>	[2000]
+0xF4CE	U+6D2F	# <cjk>	[2000]
+0xF4CF	U+6D3C	# <cjk>	[2000]
+0xF4D0	U+6D5B	# <cjk>	[2000]
+0xF4D1	U+6D5E	# <cjk>	[2000]
+0xF4D2	U+6D60	# <cjk>	[2000]
+0xF4D3	U+6D70	# <cjk>	[2000]
+0xF4D4	U+6D80	# <cjk>	[2000]
+0xF4D5	U+6D81	# <cjk>	[2000]
+0xF4D6	U+6D8A	# <cjk>	[2000]
+0xF4D7	U+6D8D	# <cjk>	[2000]
+0xF4D8	U+6D91	# <cjk>	[2000]
+0xF4D9	U+6D98	# <cjk>	[2000]
+0xF4DA	U+23D40	# <cjk>	[2000]	[Unicode3.1]
+0xF4DB	U+6E17	# <cjk>	[2000]
+0xF4DC	U+23DFA	# <cjk>	[2000]	[Unicode3.1]
+0xF4DD	U+23DF9	# <cjk>	[2000]	[Unicode3.1]
+0xF4DE	U+23DD3	# <cjk>	[2000]	[Unicode3.1]
+0xF4DF	U+6DAB	# <cjk>	[2000]
+0xF4E0	U+6DAE	# <cjk>	[2000]
+0xF4E1	U+6DB4	# <cjk>	[2000]
+0xF4E2	U+6DC2	# <cjk>	[2000]
+0xF4E3	U+6D34	# <cjk>	[2000]
+0xF4E4	U+6DC8	# <cjk>	[2000]
+0xF4E5	U+6DCE	# <cjk>	[2000]
+0xF4E6	U+6DCF	# <cjk>	[2000]
+0xF4E7	U+6DD0	# <cjk>	[2000]
+0xF4E8	U+6DDF	# <cjk>	[2000]
+0xF4E9	U+6DE9	# <cjk>	[2000]
+0xF4EA	U+6DF6	# <cjk>	[2000]
+0xF4EB	U+6E36	# <cjk>	[2000]
+0xF4EC	U+6E1E	# <cjk>	[2000]
+0xF4ED	U+6E22	# <cjk>	[2000]
+0xF4EE	U+6E27	# <cjk>	[2000]
+0xF4EF	U+3D11	# <cjk>	[2000]
+0xF4F0	U+6E32	# <cjk>	[2000]
+0xF4F1	U+6E3C	# <cjk>	[2000]
+0xF4F2	U+6E48	# <cjk>	[2000]
+0xF4F3	U+6E49	# <cjk>	[2000]
+0xF4F4	U+6E4B	# <cjk>	[2000]
+0xF4F5	U+6E4C	# <cjk>	[2000]
+0xF4F6	U+6E4F	# <cjk>	[2000]
+0xF4F7	U+6E51	# <cjk>	[2000]
+0xF4F8	U+6E53	# <cjk>	[2000]
+0xF4F9	U+6E54	# <cjk>	[2000]
+0xF4FA	U+6E57	# <cjk>	[2000]
+0xF4FB	U+6E63	# <cjk>	[2000]
+0xF4FC	U+3D1E	# <cjk>	[2000]
+0xF540	U+6E93	# <cjk>	[2000]
+0xF541	U+6EA7	# <cjk>	[2000]
+0xF542	U+6EB4	# <cjk>	[2000]
+0xF543	U+6EBF	# <cjk>	[2000]
+0xF544	U+6EC3	# <cjk>	[2000]
+0xF545	U+6ECA	# <cjk>	[2000]
+0xF546	U+6ED9	# <cjk>	[2000]
+0xF547	U+6F35	# <cjk>	[2000]
+0xF548	U+6EEB	# <cjk>	[2000]
+0xF549	U+6EF9	# <cjk>	[2000]
+0xF54A	U+6EFB	# <cjk>	[2000]
+0xF54B	U+6F0A	# <cjk>	[2000]
+0xF54C	U+6F0C	# <cjk>	[2000]
+0xF54D	U+6F18	# <cjk>	[2000]
+0xF54E	U+6F25	# <cjk>	[2000]
+0xF54F	U+6F36	# <cjk>	[2000]
+0xF550	U+6F3C	# <cjk>	[2000]
+0xF551	U+23F7E	# <cjk>	[2000]	[Unicode3.1]
+0xF552	U+6F52	# <cjk>	[2000]
+0xF553	U+6F57	# <cjk>	[2000]
+0xF554	U+6F5A	# <cjk>	[2000]
+0xF555	U+6F60	# <cjk>	[2000]
+0xF556	U+6F68	# <cjk>	[2000]
+0xF557	U+6F98	# <cjk>	[2000]
+0xF558	U+6F7D	# <cjk>	[2000]
+0xF559	U+6F90	# <cjk>	[2000]
+0xF55A	U+6F96	# <cjk>	[2000]
+0xF55B	U+6FBE	# <cjk>	[2000]
+0xF55C	U+6F9F	# <cjk>	[2000]
+0xF55D	U+6FA5	# <cjk>	[2000]
+0xF55E	U+6FAF	# <cjk>	[2000]
+0xF55F	U+3D64	# <cjk>	[2000]
+0xF560	U+6FB5	# <cjk>	[2000]
+0xF561	U+6FC8	# <cjk>	[2000]
+0xF562	U+6FC9	# <cjk>	[2000]
+0xF563	U+6FDA	# <cjk>	[2000]
+0xF564	U+6FDE	# <cjk>	[2000]
+0xF565	U+6FE9	# <cjk>	[2000]
+0xF566	U+24096	# <cjk>	[2000]	[Unicode3.1]
+0xF567	U+6FFC	# <cjk>	[2000]
+0xF568	U+7000	# <cjk>	[2000]
+0xF569	U+7007	# <cjk>	[2000]
+0xF56A	U+700A	# <cjk>	[2000]
+0xF56B	U+7023	# <cjk>	[2000]
+0xF56C	U+24103	# <cjk>	[2000]	[Unicode3.1]
+0xF56D	U+7039	# <cjk>	[2000]
+0xF56E	U+703A	# <cjk>	[2000]
+0xF56F	U+703C	# <cjk>	[2000]
+0xF570	U+7043	# <cjk>	[2000]
+0xF571	U+7047	# <cjk>	[2000]
+0xF572	U+704B	# <cjk>	[2000]
+0xF573	U+3D9A	# <cjk>	[2000]
+0xF574	U+7054	# <cjk>	[2000]
+0xF575	U+7065	# <cjk>	[2000]
+0xF576	U+7069	# <cjk>	[2000]
+0xF577	U+706C	# <cjk>	[2000]
+0xF578	U+706E	# <cjk>	[2000]
+0xF579	U+7076	# <cjk>	[2000]
+0xF57A	U+707E	# <cjk>	[2000]
+0xF57B	U+7081	# <cjk>	[2000]
+0xF57C	U+7086	# <cjk>	[2000]
+0xF57D	U+7095	# <cjk>	[2000]
+0xF57E	U+7097	# <cjk>	[2000]
+0xF580	U+70BB	# <cjk>	[2000]
+0xF581	U+241C6	# <cjk>	[2000]	[Unicode3.1]
+0xF582	U+709F	# <cjk>	[2000]
+0xF583	U+70B1	# <cjk>	[2000]
+0xF584	U+241FE	# <cjk>	[2000]	[Unicode3.1]
+0xF585	U+70EC	# <cjk>	[2000]
+0xF586	U+70CA	# <cjk>	[2000]
+0xF587	U+70D1	# <cjk>	[2000]
+0xF588	U+70D3	# <cjk>	[2000]
+0xF589	U+70DC	# <cjk>	[2000]
+0xF58A	U+7103	# <cjk>	[2000]
+0xF58B	U+7104	# <cjk>	[2000]
+0xF58C	U+7106	# <cjk>	[2000]
+0xF58D	U+7107	# <cjk>	[2000]
+0xF58E	U+7108	# <cjk>	[2000]
+0xF58F	U+710C	# <cjk>	[2000]
+0xF590	U+3DC0	# <cjk>	[2000]
+0xF591	U+712F	# <cjk>	[2000]
+0xF592	U+7131	# <cjk>	[2000]
+0xF593	U+7150	# <cjk>	[2000]
+0xF594	U+714A	# <cjk>	[2000]
+0xF595	U+7153	# <cjk>	[2000]
+0xF596	U+715E	# <cjk>	[2000]
+0xF597	U+3DD4	# <cjk>	[2000]
+0xF598	U+7196	# <cjk>	[2000]
+0xF599	U+7180	# <cjk>	[2000]
+0xF59A	U+719B	# <cjk>	[2000]
+0xF59B	U+71A0	# <cjk>	[2000]
+0xF59C	U+71A2	# <cjk>	[2000]
+0xF59D	U+71AE	# <cjk>	[2000]
+0xF59E	U+71AF	# <cjk>	[2000]
+0xF59F	U+71B3	# <cjk>	[2000]
+0xF5A0	U+243BC	# <cjk>	[2000]	[Unicode3.1]
+0xF5A1	U+71CB	# <cjk>	[2000]
+0xF5A2	U+71D3	# <cjk>	[2000]
+0xF5A3	U+71D9	# <cjk>	[2000]
+0xF5A4	U+71DC	# <cjk>	[2000]
+0xF5A5	U+7207	# <cjk>	[2000]
+0xF5A6	U+3E05	# <cjk>	[2000]
+0xF5A7	U+FA49	# CJK COMPATIBILITY IDEOGRAPH-FA49	[2000]	[Unicode3.2]
+0xF5A8	U+722B	# <cjk>	[2000]
+0xF5A9	U+7234	# <cjk>	[2000]
+0xF5AA	U+7238	# <cjk>	[2000]
+0xF5AB	U+7239	# <cjk>	[2000]
+0xF5AC	U+4E2C	# <cjk>	[2000]
+0xF5AD	U+7242	# <cjk>	[2000]
+0xF5AE	U+7253	# <cjk>	[2000]
+0xF5AF	U+7257	# <cjk>	[2000]
+0xF5B0	U+7263	# <cjk>	[2000]
+0xF5B1	U+24629	# <cjk>	[2000]	[Unicode3.1]
+0xF5B2	U+726E	# <cjk>	[2000]
+0xF5B3	U+726F	# <cjk>	[2000]
+0xF5B4	U+7278	# <cjk>	[2000]
+0xF5B5	U+727F	# <cjk>	[2000]
+0xF5B6	U+728E	# <cjk>	[2000]
+0xF5B7	U+246A5	# <cjk>	[2000]	[Unicode3.1]
+0xF5B8	U+72AD	# <cjk>	[2000]
+0xF5B9	U+72AE	# <cjk>	[2000]
+0xF5BA	U+72B0	# <cjk>	[2000]
+0xF5BB	U+72B1	# <cjk>	[2000]
+0xF5BC	U+72C1	# <cjk>	[2000]
+0xF5BD	U+3E60	# <cjk>	[2000]
+0xF5BE	U+72CC	# <cjk>	[2000]
+0xF5BF	U+3E66	# <cjk>	[2000]
+0xF5C0	U+3E68	# <cjk>	[2000]
+0xF5C1	U+72F3	# <cjk>	[2000]
+0xF5C2	U+72FA	# <cjk>	[2000]
+0xF5C3	U+7307	# <cjk>	[2000]
+0xF5C4	U+7312	# <cjk>	[2000]
+0xF5C5	U+7318	# <cjk>	[2000]
+0xF5C6	U+7319	# <cjk>	[2000]
+0xF5C7	U+3E83	# <cjk>	[2000]
+0xF5C8	U+7339	# <cjk>	[2000]
+0xF5C9	U+732C	# <cjk>	[2000]
+0xF5CA	U+7331	# <cjk>	[2000]
+0xF5CB	U+7333	# <cjk>	[2000]
+0xF5CC	U+733D	# <cjk>	[2000]
+0xF5CD	U+7352	# <cjk>	[2000]
+0xF5CE	U+3E94	# <cjk>	[2000]
+0xF5CF	U+736B	# <cjk>	[2000]
+0xF5D0	U+736C	# <cjk>	[2000]
+0xF5D1	U+24896	# <cjk>	[2000]	[Unicode3.1]
+0xF5D2	U+736E	# <cjk>	[2000]
+0xF5D3	U+736F	# <cjk>	[2000]
+0xF5D4	U+7371	# <cjk>	[2000]
+0xF5D5	U+7377	# <cjk>	[2000]
+0xF5D6	U+7381	# <cjk>	[2000]
+0xF5D7	U+7385	# <cjk>	[2000]
+0xF5D8	U+738A	# <cjk>	[2000]
+0xF5D9	U+7394	# <cjk>	[2000]
+0xF5DA	U+7398	# <cjk>	[2000]
+0xF5DB	U+739C	# <cjk>	[2000]
+0xF5DC	U+739E	# <cjk>	[2000]
+0xF5DD	U+73A5	# <cjk>	[2000]
+0xF5DE	U+73A8	# <cjk>	[2000]
+0xF5DF	U+73B5	# <cjk>	[2000]
+0xF5E0	U+73B7	# <cjk>	[2000]
+0xF5E1	U+73B9	# <cjk>	[2000]
+0xF5E2	U+73BC	# <cjk>	[2000]
+0xF5E3	U+73BF	# <cjk>	[2000]
+0xF5E4	U+73C5	# <cjk>	[2000]
+0xF5E5	U+73CB	# <cjk>	[2000]
+0xF5E6	U+73E1	# <cjk>	[2000]
+0xF5E7	U+73E7	# <cjk>	[2000]
+0xF5E8	U+73F9	# <cjk>	[2000]
+0xF5E9	U+7413	# <cjk>	[2000]
+0xF5EA	U+73FA	# <cjk>	[2000]
+0xF5EB	U+7401	# <cjk>	[2000]
+0xF5EC	U+7424	# <cjk>	[2000]
+0xF5ED	U+7431	# <cjk>	[2000]
+0xF5EE	U+7439	# <cjk>	[2000]
+0xF5EF	U+7453	# <cjk>	[2000]
+0xF5F0	U+7440	# <cjk>	[2000]
+0xF5F1	U+7443	# <cjk>	[2000]
+0xF5F2	U+744D	# <cjk>	[2000]
+0xF5F3	U+7452	# <cjk>	[2000]
+0xF5F4	U+745D	# <cjk>	[2000]
+0xF5F5	U+7471	# <cjk>	[2000]
+0xF5F6	U+7481	# <cjk>	[2000]
+0xF5F7	U+7485	# <cjk>	[2000]
+0xF5F8	U+7488	# <cjk>	[2000]
+0xF5F9	U+24A4D	# <cjk>	[2000]	[Unicode3.1]
+0xF5FA	U+7492	# <cjk>	[2000]
+0xF5FB	U+7497	# <cjk>	[2000]
+0xF5FC	U+7499	# <cjk>	[2000]
+0xF640	U+74A0	# <cjk>	[2000]
+0xF641	U+74A1	# <cjk>	[2000]
+0xF642	U+74A5	# <cjk>	[2000]
+0xF643	U+74AA	# <cjk>	[2000]
+0xF644	U+74AB	# <cjk>	[2000]
+0xF645	U+74B9	# <cjk>	[2000]
+0xF646	U+74BB	# <cjk>	[2000]
+0xF647	U+74BA	# <cjk>	[2000]
+0xF648	U+74D6	# <cjk>	[2000]
+0xF649	U+74D8	# <cjk>	[2000]
+0xF64A	U+74DE	# <cjk>	[2000]
+0xF64B	U+74EF	# <cjk>	[2000]
+0xF64C	U+74EB	# <cjk>	[2000]
+0xF64D	U+24B56	# <cjk>	[2000]	[Unicode3.1]
+0xF64E	U+74FA	# <cjk>	[2000]
+0xF64F	U+24B6F	# <cjk>	[2000]	[Unicode3.1]
+0xF650	U+7520	# <cjk>	[2000]
+0xF651	U+7524	# <cjk>	[2000]
+0xF652	U+752A	# <cjk>	[2000]
+0xF653	U+3F57	# <cjk>	[2000]
+0xF654	U+24C16	# <cjk>	[2000]	[Unicode3.1]
+0xF655	U+753D	# <cjk>	[2000]
+0xF656	U+753E	# <cjk>	[2000]
+0xF657	U+7540	# <cjk>	[2000]
+0xF658	U+7548	# <cjk>	[2000]
+0xF659	U+754E	# <cjk>	[2000]
+0xF65A	U+7550	# <cjk>	[2000]
+0xF65B	U+7552	# <cjk>	[2000]
+0xF65C	U+756C	# <cjk>	[2000]
+0xF65D	U+7572	# <cjk>	[2000]
+0xF65E	U+7571	# <cjk>	[2000]
+0xF65F	U+757A	# <cjk>	[2000]
+0xF660	U+757D	# <cjk>	[2000]
+0xF661	U+757E	# <cjk>	[2000]
+0xF662	U+7581	# <cjk>	[2000]
+0xF663	U+24D14	# <cjk>	[2000]	[Unicode3.1]
+0xF664	U+758C	# <cjk>	[2000]
+0xF665	U+3F75	# <cjk>	[2000]
+0xF666	U+75A2	# <cjk>	[2000]
+0xF667	U+3F77	# <cjk>	[2000]
+0xF668	U+75B0	# <cjk>	[2000]
+0xF669	U+75B7	# <cjk>	[2000]
+0xF66A	U+75BF	# <cjk>	[2000]
+0xF66B	U+75C0	# <cjk>	[2000]
+0xF66C	U+75C6	# <cjk>	[2000]
+0xF66D	U+75CF	# <cjk>	[2000]
+0xF66E	U+75D3	# <cjk>	[2000]
+0xF66F	U+75DD	# <cjk>	[2000]
+0xF670	U+75DF	# <cjk>	[2000]
+0xF671	U+75E0	# <cjk>	[2000]
+0xF672	U+75E7	# <cjk>	[2000]
+0xF673	U+75EC	# <cjk>	[2000]
+0xF674	U+75EE	# <cjk>	[2000]
+0xF675	U+75F1	# <cjk>	[2000]
+0xF676	U+75F9	# <cjk>	[2000]
+0xF677	U+7603	# <cjk>	[2000]
+0xF678	U+7618	# <cjk>	[2000]
+0xF679	U+7607	# <cjk>	[2000]
+0xF67A	U+760F	# <cjk>	[2000]
+0xF67B	U+3FAE	# <cjk>	[2000]
+0xF67C	U+24E0E	# <cjk>	[2000]	[Unicode3.1]
+0xF67D	U+7613	# <cjk>	[2000]
+0xF67E	U+761B	# <cjk>	[2000]
+0xF680	U+761C	# <cjk>	[2000]
+0xF681	U+24E37	# <cjk>	[2000]	[Unicode3.1]
+0xF682	U+7625	# <cjk>	[2000]
+0xF683	U+7628	# <cjk>	[2000]
+0xF684	U+763C	# <cjk>	[2000]
+0xF685	U+7633	# <cjk>	[2000]
+0xF686	U+24E6A	# <cjk>	[2000]	[Unicode3.1]
+0xF687	U+3FC9	# <cjk>	[2000]
+0xF688	U+7641	# <cjk>	[2000]
+0xF689	U+24E8B	# <cjk>	[2000]	[Unicode3.1]
+0xF68A	U+7649	# <cjk>	[2000]
+0xF68B	U+7655	# <cjk>	[2000]
+0xF68C	U+3FD7	# <cjk>	[2000]
+0xF68D	U+766E	# <cjk>	[2000]
+0xF68E	U+7695	# <cjk>	[2000]
+0xF68F	U+769C	# <cjk>	[2000]
+0xF690	U+76A1	# <cjk>	[2000]
+0xF691	U+76A0	# <cjk>	[2000]
+0xF692	U+76A7	# <cjk>	[2000]
+0xF693	U+76A8	# <cjk>	[2000]
+0xF694	U+76AF	# <cjk>	[2000]
+0xF695	U+2504A	# <cjk>	[2000]	[Unicode3.1]
+0xF696	U+76C9	# <cjk>	[2000]
+0xF697	U+25055	# <cjk>	[2000]	[Unicode3.1]
+0xF698	U+76E8	# <cjk>	[2000]
+0xF699	U+76EC	# <cjk>	[2000]
+0xF69A	U+25122	# <cjk>	[2000]	[Unicode3.1]
+0xF69B	U+7717	# <cjk>	[2000]
+0xF69C	U+771A	# <cjk>	[2000]
+0xF69D	U+772D	# <cjk>	[2000]
+0xF69E	U+7735	# <cjk>	[2000]
+0xF69F	U+251A9	# <cjk>	[2000]	[Unicode3.1]
+0xF6A0	U+4039	# <cjk>	[2000]
+0xF6A1	U+251E5	# <cjk>	[2000]	[Unicode3.1]
+0xF6A2	U+251CD	# <cjk>	[2000]	[Unicode3.1]
+0xF6A3	U+7758	# <cjk>	[2000]
+0xF6A4	U+7760	# <cjk>	[2000]
+0xF6A5	U+776A	# <cjk>	[2000]
+0xF6A6	U+2521E	# <cjk>	[2000]	[Unicode3.1]
+0xF6A7	U+7772	# <cjk>	[2000]
+0xF6A8	U+777C	# <cjk>	[2000]
+0xF6A9	U+777D	# <cjk>	[2000]
+0xF6AA	U+2524C	# <cjk>	[2000]	[Unicode3.1]
+0xF6AB	U+4058	# <cjk>	[2000]
+0xF6AC	U+779A	# <cjk>	[2000]
+0xF6AD	U+779F	# <cjk>	[2000]
+0xF6AE	U+77A2	# <cjk>	[2000]
+0xF6AF	U+77A4	# <cjk>	[2000]
+0xF6B0	U+77A9	# <cjk>	[2000]
+0xF6B1	U+77DE	# <cjk>	[2000]
+0xF6B2	U+77DF	# <cjk>	[2000]
+0xF6B3	U+77E4	# <cjk>	[2000]
+0xF6B4	U+77E6	# <cjk>	[2000]
+0xF6B5	U+77EA	# <cjk>	[2000]
+0xF6B6	U+77EC	# <cjk>	[2000]
+0xF6B7	U+4093	# <cjk>	[2000]
+0xF6B8	U+77F0	# <cjk>	[2000]
+0xF6B9	U+77F4	# <cjk>	[2000]
+0xF6BA	U+77FB	# <cjk>	[2000]
+0xF6BB	U+2542E	# <cjk>	[2000]	[Unicode3.1]
+0xF6BC	U+7805	# <cjk>	[2000]
+0xF6BD	U+7806	# <cjk>	[2000]
+0xF6BE	U+7809	# <cjk>	[2000]
+0xF6BF	U+780D	# <cjk>	[2000]
+0xF6C0	U+7819	# <cjk>	[2000]
+0xF6C1	U+7821	# <cjk>	[2000]
+0xF6C2	U+782C	# <cjk>	[2000]
+0xF6C3	U+7847	# <cjk>	[2000]
+0xF6C4	U+7864	# <cjk>	[2000]
+0xF6C5	U+786A	# <cjk>	[2000]
+0xF6C6	U+254D9	# <cjk>	[2000]	[Unicode3.1]
+0xF6C7	U+788A	# <cjk>	[2000]
+0xF6C8	U+7894	# <cjk>	[2000]
+0xF6C9	U+78A4	# <cjk>	[2000]
+0xF6CA	U+789D	# <cjk>	[2000]
+0xF6CB	U+789E	# <cjk>	[2000]
+0xF6CC	U+789F	# <cjk>	[2000]
+0xF6CD	U+78BB	# <cjk>	[2000]
+0xF6CE	U+78C8	# <cjk>	[2000]
+0xF6CF	U+78CC	# <cjk>	[2000]
+0xF6D0	U+78CE	# <cjk>	[2000]
+0xF6D1	U+78D5	# <cjk>	[2000]
+0xF6D2	U+78E0	# <cjk>	[2000]
+0xF6D3	U+78E1	# <cjk>	[2000]
+0xF6D4	U+78E6	# <cjk>	[2000]
+0xF6D5	U+78F9	# <cjk>	[2000]
+0xF6D6	U+78FA	# <cjk>	[2000]
+0xF6D7	U+78FB	# <cjk>	[2000]
+0xF6D8	U+78FE	# <cjk>	[2000]
+0xF6D9	U+255A7	# <cjk>	[2000]	[Unicode3.1]
+0xF6DA	U+7910	# <cjk>	[2000]
+0xF6DB	U+791B	# <cjk>	[2000]
+0xF6DC	U+7930	# <cjk>	[2000]
+0xF6DD	U+7925	# <cjk>	[2000]
+0xF6DE	U+793B	# <cjk>	[2000]
+0xF6DF	U+794A	# <cjk>	[2000]
+0xF6E0	U+7958	# <cjk>	[2000]
+0xF6E1	U+795B	# <cjk>	[2000]
+0xF6E2	U+4105	# <cjk>	[2000]
+0xF6E3	U+7967	# <cjk>	[2000]
+0xF6E4	U+7972	# <cjk>	[2000]
+0xF6E5	U+7994	# <cjk>	[2000]
+0xF6E6	U+7995	# <cjk>	[2000]
+0xF6E7	U+7996	# <cjk>	[2000]
+0xF6E8	U+799B	# <cjk>	[2000]
+0xF6E9	U+79A1	# <cjk>	[2000]
+0xF6EA	U+79A9	# <cjk>	[2000]
+0xF6EB	U+79B4	# <cjk>	[2000]
+0xF6EC	U+79BB	# <cjk>	[2000]
+0xF6ED	U+79C2	# <cjk>	[2000]
+0xF6EE	U+79C7	# <cjk>	[2000]
+0xF6EF	U+79CC	# <cjk>	[2000]
+0xF6F0	U+79CD	# <cjk>	[2000]
+0xF6F1	U+79D6	# <cjk>	[2000]
+0xF6F2	U+4148	# <cjk>	[2000]
+0xF6F3	U+257A9	# <cjk>	[2000]	[Unicode3.1]
+0xF6F4	U+257B4	# <cjk>	[2000]	[Unicode3.1]
+0xF6F5	U+414F	# <cjk>	[2000]
+0xF6F6	U+7A0A	# <cjk>	[2000]
+0xF6F7	U+7A11	# <cjk>	[2000]
+0xF6F8	U+7A15	# <cjk>	[2000]
+0xF6F9	U+7A1B	# <cjk>	[2000]
+0xF6FA	U+7A1E	# <cjk>	[2000]
+0xF6FB	U+4163	# <cjk>	[2000]
+0xF6FC	U+7A2D	# <cjk>	[2000]
+0xF740	U+7A38	# <cjk>	[2000]
+0xF741	U+7A47	# <cjk>	[2000]
+0xF742	U+7A4C	# <cjk>	[2000]
+0xF743	U+7A56	# <cjk>	[2000]
+0xF744	U+7A59	# <cjk>	[2000]
+0xF745	U+7A5C	# <cjk>	[2000]
+0xF746	U+7A5F	# <cjk>	[2000]
+0xF747	U+7A60	# <cjk>	[2000]
+0xF748	U+7A67	# <cjk>	[2000]
+0xF749	U+7A6A	# <cjk>	[2000]
+0xF74A	U+7A75	# <cjk>	[2000]
+0xF74B	U+7A78	# <cjk>	[2000]
+0xF74C	U+7A82	# <cjk>	[2000]
+0xF74D	U+7A8A	# <cjk>	[2000]
+0xF74E	U+7A90	# <cjk>	[2000]
+0xF74F	U+7AA3	# <cjk>	[2000]
+0xF750	U+7AAC	# <cjk>	[2000]
+0xF751	U+259D4	# <cjk>	[2000]	[Unicode3.1]
+0xF752	U+41B4	# <cjk>	[2000]
+0xF753	U+7AB9	# <cjk>	[2000]
+0xF754	U+7ABC	# <cjk>	[2000]
+0xF755	U+7ABE	# <cjk>	[2000]
+0xF756	U+41BF	# <cjk>	[2000]
+0xF757	U+7ACC	# <cjk>	[2000]
+0xF758	U+7AD1	# <cjk>	[2000]
+0xF759	U+7AE7	# <cjk>	[2000]
+0xF75A	U+7AE8	# <cjk>	[2000]
+0xF75B	U+7AF4	# <cjk>	[2000]
+0xF75C	U+25AE4	# <cjk>	[2000]	[Unicode3.1]
+0xF75D	U+25AE3	# <cjk>	[2000]	[Unicode3.1]
+0xF75E	U+7B07	# <cjk>	[2000]
+0xF75F	U+25AF1	# <cjk>	[2000]	[Unicode3.1]
+0xF760	U+7B3D	# <cjk>	[2000]
+0xF761	U+7B27	# <cjk>	[2000]
+0xF762	U+7B2A	# <cjk>	[2000]
+0xF763	U+7B2E	# <cjk>	[2000]
+0xF764	U+7B2F	# <cjk>	[2000]
+0xF765	U+7B31	# <cjk>	[2000]
+0xF766	U+41E6	# <cjk>	[2000]
+0xF767	U+41F3	# <cjk>	[2000]
+0xF768	U+7B7F	# <cjk>	[2000]
+0xF769	U+7B41	# <cjk>	[2000]
+0xF76A	U+41EE	# <cjk>	[2000]
+0xF76B	U+7B55	# <cjk>	[2000]
+0xF76C	U+7B79	# <cjk>	[2000]
+0xF76D	U+7B64	# <cjk>	[2000]
+0xF76E	U+7B66	# <cjk>	[2000]
+0xF76F	U+7B69	# <cjk>	[2000]
+0xF770	U+7B73	# <cjk>	[2000]
+0xF771	U+25BB2	# <cjk>	[2000]	[Unicode3.1]
+0xF772	U+4207	# <cjk>	[2000]
+0xF773	U+7B90	# <cjk>	[2000]
+0xF774	U+7B91	# <cjk>	[2000]
+0xF775	U+7B9B	# <cjk>	[2000]
+0xF776	U+420E	# <cjk>	[2000]
+0xF777	U+7BAF	# <cjk>	[2000]
+0xF778	U+7BB5	# <cjk>	[2000]
+0xF779	U+7BBC	# <cjk>	[2000]
+0xF77A	U+7BC5	# <cjk>	[2000]
+0xF77B	U+7BCA	# <cjk>	[2000]
+0xF77C	U+25C4B	# <cjk>	[2000]	[Unicode3.1]
+0xF77D	U+25C64	# <cjk>	[2000]	[Unicode3.1]
+0xF77E	U+7BD4	# <cjk>	[2000]
+0xF780	U+7BD6	# <cjk>	[2000]
+0xF781	U+7BDA	# <cjk>	[2000]
+0xF782	U+7BEA	# <cjk>	[2000]
+0xF783	U+7BF0	# <cjk>	[2000]
+0xF784	U+7C03	# <cjk>	[2000]
+0xF785	U+7C0B	# <cjk>	[2000]
+0xF786	U+7C0E	# <cjk>	[2000]
+0xF787	U+7C0F	# <cjk>	[2000]
+0xF788	U+7C26	# <cjk>	[2000]
+0xF789	U+7C45	# <cjk>	[2000]
+0xF78A	U+7C4A	# <cjk>	[2000]
+0xF78B	U+7C51	# <cjk>	[2000]
+0xF78C	U+7C57	# <cjk>	[2000]
+0xF78D	U+7C5E	# <cjk>	[2000]
+0xF78E	U+7C61	# <cjk>	[2000]
+0xF78F	U+7C69	# <cjk>	[2000]
+0xF790	U+7C6E	# <cjk>	[2000]
+0xF791	U+7C6F	# <cjk>	[2000]
+0xF792	U+7C70	# <cjk>	[2000]
+0xF793	U+25E2E	# <cjk>	[2000]	[Unicode3.1]
+0xF794	U+25E56	# <cjk>	[2000]	[Unicode3.1]
+0xF795	U+25E65	# <cjk>	[2000]	[Unicode3.1]
+0xF796	U+7CA6	# <cjk>	[2000]
+0xF797	U+25E62	# <cjk>	[2000]	[Unicode3.1]
+0xF798	U+7CB6	# <cjk>	[2000]
+0xF799	U+7CB7	# <cjk>	[2000]
+0xF79A	U+7CBF	# <cjk>	[2000]
+0xF79B	U+25ED8	# <cjk>	[2000]	[Unicode3.1]
+0xF79C	U+7CC4	# <cjk>	[2000]
+0xF79D	U+25EC2	# <cjk>	[2000]	[Unicode3.1]
+0xF79E	U+7CC8	# <cjk>	[2000]
+0xF79F	U+7CCD	# <cjk>	[2000]
+0xF7A0	U+25EE8	# <cjk>	[2000]	[Unicode3.1]
+0xF7A1	U+7CD7	# <cjk>	[2000]
+0xF7A2	U+25F23	# <cjk>	[2000]	[Unicode3.1]
+0xF7A3	U+7CE6	# <cjk>	[2000]
+0xF7A4	U+7CEB	# <cjk>	[2000]
+0xF7A5	U+25F5C	# <cjk>	[2000]	[Unicode3.1]
+0xF7A6	U+7CF5	# <cjk>	[2000]
+0xF7A7	U+7D03	# <cjk>	[2000]
+0xF7A8	U+7D09	# <cjk>	[2000]
+0xF7A9	U+42C6	# <cjk>	[2000]
+0xF7AA	U+7D12	# <cjk>	[2000]
+0xF7AB	U+7D1E	# <cjk>	[2000]
+0xF7AC	U+25FE0	# <cjk>	[2000]	[Unicode3.1]
+0xF7AD	U+25FD4	# <cjk>	[2000]	[Unicode3.1]
+0xF7AE	U+7D3D	# <cjk>	[2000]
+0xF7AF	U+7D3E	# <cjk>	[2000]
+0xF7B0	U+7D40	# <cjk>	[2000]
+0xF7B1	U+7D47	# <cjk>	[2000]
+0xF7B2	U+2600C	# <cjk>	[2000]	[Unicode3.1]
+0xF7B3	U+25FFB	# <cjk>	[2000]	[Unicode3.1]
+0xF7B4	U+42D6	# <cjk>	[2000]
+0xF7B5	U+7D59	# <cjk>	[2000]
+0xF7B6	U+7D5A	# <cjk>	[2000]
+0xF7B7	U+7D6A	# <cjk>	[2000]
+0xF7B8	U+7D70	# <cjk>	[2000]
+0xF7B9	U+42DD	# <cjk>	[2000]
+0xF7BA	U+7D7F	# <cjk>	[2000]
+0xF7BB	U+26017	# <cjk>	[2000]	[Unicode3.1]
+0xF7BC	U+7D86	# <cjk>	[2000]
+0xF7BD	U+7D88	# <cjk>	[2000]
+0xF7BE	U+7D8C	# <cjk>	[2000]
+0xF7BF	U+7D97	# <cjk>	[2000]
+0xF7C0	U+26060	# <cjk>	[2000]	[Unicode3.1]
+0xF7C1	U+7D9D	# <cjk>	[2000]
+0xF7C2	U+7DA7	# <cjk>	[2000]
+0xF7C3	U+7DAA	# <cjk>	[2000]
+0xF7C4	U+7DB6	# <cjk>	[2000]
+0xF7C5	U+7DB7	# <cjk>	[2000]
+0xF7C6	U+7DC0	# <cjk>	[2000]
+0xF7C7	U+7DD7	# <cjk>	[2000]
+0xF7C8	U+7DD9	# <cjk>	[2000]
+0xF7C9	U+7DE6	# <cjk>	[2000]
+0xF7CA	U+7DF1	# <cjk>	[2000]
+0xF7CB	U+7DF9	# <cjk>	[2000]
+0xF7CC	U+4302	# <cjk>	[2000]
+0xF7CD	U+260ED	# <cjk>	[2000]	[Unicode3.1]
+0xF7CE	U+FA58	# CJK COMPATIBILITY IDEOGRAPH-FA58	[2000]	[Unicode3.2]
+0xF7CF	U+7E10	# <cjk>	[2000]
+0xF7D0	U+7E17	# <cjk>	[2000]
+0xF7D1	U+7E1D	# <cjk>	[2000]
+0xF7D2	U+7E20	# <cjk>	[2000]
+0xF7D3	U+7E27	# <cjk>	[2000]
+0xF7D4	U+7E2C	# <cjk>	[2000]
+0xF7D5	U+7E45	# <cjk>	[2000]
+0xF7D6	U+7E73	# <cjk>	[2000]
+0xF7D7	U+7E75	# <cjk>	[2000]
+0xF7D8	U+7E7E	# <cjk>	[2000]
+0xF7D9	U+7E86	# <cjk>	[2000]
+0xF7DA	U+7E87	# <cjk>	[2000]
+0xF7DB	U+432B	# <cjk>	[2000]
+0xF7DC	U+7E91	# <cjk>	[2000]
+0xF7DD	U+7E98	# <cjk>	[2000]
+0xF7DE	U+7E9A	# <cjk>	[2000]
+0xF7DF	U+4343	# <cjk>	[2000]
+0xF7E0	U+7F3C	# <cjk>	[2000]
+0xF7E1	U+7F3B	# <cjk>	[2000]
+0xF7E2	U+7F3E	# <cjk>	[2000]
+0xF7E3	U+7F43	# <cjk>	[2000]
+0xF7E4	U+7F44	# <cjk>	[2000]
+0xF7E5	U+7F4F	# <cjk>	[2000]
+0xF7E6	U+34C1	# <cjk>	[2000]
+0xF7E7	U+26270	# <cjk>	[2000]	[Unicode3.1]
+0xF7E8	U+7F52	# <cjk>	[2000]
+0xF7E9	U+26286	# <cjk>	[2000]	[Unicode3.1]
+0xF7EA	U+7F61	# <cjk>	[2000]
+0xF7EB	U+7F63	# <cjk>	[2000]
+0xF7EC	U+7F64	# <cjk>	[2000]
+0xF7ED	U+7F6D	# <cjk>	[2000]
+0xF7EE	U+7F7D	# <cjk>	[2000]
+0xF7EF	U+7F7E	# <cjk>	[2000]
+0xF7F0	U+2634C	# <cjk>	[2000]	[Unicode3.1]
+0xF7F1	U+7F90	# <cjk>	[2000]
+0xF7F2	U+517B	# <cjk>	[2000]
+0xF7F3	U+23D0E	# <cjk>	[2000]	[Unicode3.1]
+0xF7F4	U+7F96	# <cjk>	[2000]
+0xF7F5	U+7F9C	# <cjk>	[2000]
+0xF7F6	U+7FAD	# <cjk>	[2000]
+0xF7F7	U+26402	# <cjk>	[2000]	[Unicode3.1]
+0xF7F8	U+7FC3	# <cjk>	[2000]
+0xF7F9	U+7FCF	# <cjk>	[2000]
+0xF7FA	U+7FE3	# <cjk>	[2000]
+0xF7FB	U+7FE5	# <cjk>	[2000]
+0xF7FC	U+7FEF	# <cjk>	[2000]
+0xF840	U+7FF2	# <cjk>	[2000]
+0xF841	U+8002	# <cjk>	[2000]
+0xF842	U+800A	# <cjk>	[2000]
+0xF843	U+8008	# <cjk>	[2000]
+0xF844	U+800E	# <cjk>	[2000]
+0xF845	U+8011	# <cjk>	[2000]
+0xF846	U+8016	# <cjk>	[2000]
+0xF847	U+8024	# <cjk>	[2000]
+0xF848	U+802C	# <cjk>	[2000]
+0xF849	U+8030	# <cjk>	[2000]
+0xF84A	U+8043	# <cjk>	[2000]
+0xF84B	U+8066	# <cjk>	[2000]
+0xF84C	U+8071	# <cjk>	[2000]
+0xF84D	U+8075	# <cjk>	[2000]
+0xF84E	U+807B	# <cjk>	[2000]
+0xF84F	U+8099	# <cjk>	[2000]
+0xF850	U+809C	# <cjk>	[2000]
+0xF851	U+80A4	# <cjk>	[2000]
+0xF852	U+80A7	# <cjk>	[2000]
+0xF853	U+80B8	# <cjk>	[2000]
+0xF854	U+2667E	# <cjk>	[2000]	[Unicode3.1]
+0xF855	U+80C5	# <cjk>	[2000]
+0xF856	U+80D5	# <cjk>	[2000]
+0xF857	U+80D8	# <cjk>	[2000]
+0xF858	U+80E6	# <cjk>	[2000]
+0xF859	U+266B0	# <cjk>	[2000]	[Unicode3.1]
+0xF85A	U+810D	# <cjk>	[2000]
+0xF85B	U+80F5	# <cjk>	[2000]
+0xF85C	U+80FB	# <cjk>	[2000]
+0xF85D	U+43EE	# <cjk>	[2000]
+0xF85E	U+8135	# <cjk>	[2000]
+0xF85F	U+8116	# <cjk>	[2000]
+0xF860	U+811E	# <cjk>	[2000]
+0xF861	U+43F0	# <cjk>	[2000]
+0xF862	U+8124	# <cjk>	[2000]
+0xF863	U+8127	# <cjk>	[2000]
+0xF864	U+812C	# <cjk>	[2000]
+0xF865	U+2671D	# <cjk>	[2000]	[Unicode3.1]
+0xF866	U+813D	# <cjk>	[2000]
+0xF867	U+4408	# <cjk>	[2000]
+0xF868	U+8169	# <cjk>	[2000]
+0xF869	U+4417	# <cjk>	[2000]
+0xF86A	U+8181	# <cjk>	[2000]
+0xF86B	U+441C	# <cjk>	[2000]
+0xF86C	U+8184	# <cjk>	[2000]
+0xF86D	U+8185	# <cjk>	[2000]
+0xF86E	U+4422	# <cjk>	[2000]
+0xF86F	U+8198	# <cjk>	[2000]
+0xF870	U+81B2	# <cjk>	[2000]
+0xF871	U+81C1	# <cjk>	[2000]
+0xF872	U+81C3	# <cjk>	[2000]
+0xF873	U+81D6	# <cjk>	[2000]
+0xF874	U+81DB	# <cjk>	[2000]
+0xF875	U+268DD	# <cjk>	[2000]	[Unicode3.1]
+0xF876	U+81E4	# <cjk>	[2000]
+0xF877	U+268EA	# <cjk>	[2000]	[Unicode3.1]
+0xF878	U+81EC	# <cjk>	[2000]
+0xF879	U+26951	# <cjk>	[2000]	[Unicode3.1]
+0xF87A	U+81FD	# <cjk>	[2000]
+0xF87B	U+81FF	# <cjk>	[2000]
+0xF87C	U+2696F	# <cjk>	[2000]	[Unicode3.1]
+0xF87D	U+8204	# <cjk>	[2000]
+0xF87E	U+269DD	# <cjk>	[2000]	[Unicode3.1]
+0xF880	U+8219	# <cjk>	[2000]
+0xF881	U+8221	# <cjk>	[2000]
+0xF882	U+8222	# <cjk>	[2000]
+0xF883	U+26A1E	# <cjk>	[2000]	[Unicode3.1]
+0xF884	U+8232	# <cjk>	[2000]
+0xF885	U+8234	# <cjk>	[2000]
+0xF886	U+823C	# <cjk>	[2000]
+0xF887	U+8246	# <cjk>	[2000]
+0xF888	U+8249	# <cjk>	[2000]
+0xF889	U+8245	# <cjk>	[2000]
+0xF88A	U+26A58	# <cjk>	[2000]	[Unicode3.1]
+0xF88B	U+824B	# <cjk>	[2000]
+0xF88C	U+4476	# <cjk>	[2000]
+0xF88D	U+824F	# <cjk>	[2000]
+0xF88E	U+447A	# <cjk>	[2000]
+0xF88F	U+8257	# <cjk>	[2000]
+0xF890	U+26A8C	# <cjk>	[2000]	[Unicode3.1]
+0xF891	U+825C	# <cjk>	[2000]
+0xF892	U+8263	# <cjk>	[2000]
+0xF893	U+26AB7	# <cjk>	[2000]	[Unicode3.1]
+0xF894	U+FA5D	# CJK COMPATIBILITY IDEOGRAPH-FA5D	[2000]	[Unicode3.2]
+0xF895	U+FA5E	# CJK COMPATIBILITY IDEOGRAPH-FA5E	[2000]	[Unicode3.2]
+0xF896	U+8279	# <cjk>	[2000]
+0xF897	U+4491	# <cjk>	[2000]
+0xF898	U+827D	# <cjk>	[2000]
+0xF899	U+827F	# <cjk>	[2000]
+0xF89A	U+8283	# <cjk>	[2000]
+0xF89B	U+828A	# <cjk>	[2000]
+0xF89C	U+8293	# <cjk>	[2000]
+0xF89D	U+82A7	# <cjk>	[2000]
+0xF89E	U+82A8	# <cjk>	[2000]
+0xF89F	U+82B2	# <cjk>	[2000]
+0xF8A0	U+82B4	# <cjk>	[2000]
+0xF8A1	U+82BA	# <cjk>	[2000]
+0xF8A2	U+82BC	# <cjk>	[2000]
+0xF8A3	U+82E2	# <cjk>	[2000]
+0xF8A4	U+82E8	# <cjk>	[2000]
+0xF8A5	U+82F7	# <cjk>	[2000]
+0xF8A6	U+8307	# <cjk>	[2000]
+0xF8A7	U+8308	# <cjk>	[2000]
+0xF8A8	U+830C	# <cjk>	[2000]
+0xF8A9	U+8354	# <cjk>	[2000]
+0xF8AA	U+831B	# <cjk>	[2000]
+0xF8AB	U+831D	# <cjk>	[2000]
+0xF8AC	U+8330	# <cjk>	[2000]
+0xF8AD	U+833C	# <cjk>	[2000]
+0xF8AE	U+8344	# <cjk>	[2000]
+0xF8AF	U+8357	# <cjk>	[2000]
+0xF8B0	U+44BE	# <cjk>	[2000]
+0xF8B1	U+837F	# <cjk>	[2000]
+0xF8B2	U+44D4	# <cjk>	[2000]
+0xF8B3	U+44B3	# <cjk>	[2000]
+0xF8B4	U+838D	# <cjk>	[2000]
+0xF8B5	U+8394	# <cjk>	[2000]
+0xF8B6	U+8395	# <cjk>	[2000]
+0xF8B7	U+839B	# <cjk>	[2000]
+0xF8B8	U+839D	# <cjk>	[2000]
+0xF8B9	U+83C9	# <cjk>	[2000]
+0xF8BA	U+83D0	# <cjk>	[2000]
+0xF8BB	U+83D4	# <cjk>	[2000]
+0xF8BC	U+83DD	# <cjk>	[2000]
+0xF8BD	U+83E5	# <cjk>	[2000]
+0xF8BE	U+83F9	# <cjk>	[2000]
+0xF8BF	U+840F	# <cjk>	[2000]
+0xF8C0	U+8411	# <cjk>	[2000]
+0xF8C1	U+8415	# <cjk>	[2000]
+0xF8C2	U+26C73	# <cjk>	[2000]	[Unicode3.1]
+0xF8C3	U+8417	# <cjk>	[2000]
+0xF8C4	U+8439	# <cjk>	[2000]
+0xF8C5	U+844A	# <cjk>	[2000]
+0xF8C6	U+844F	# <cjk>	[2000]
+0xF8C7	U+8451	# <cjk>	[2000]
+0xF8C8	U+8452	# <cjk>	[2000]
+0xF8C9	U+8459	# <cjk>	[2000]
+0xF8CA	U+845A	# <cjk>	[2000]
+0xF8CB	U+845C	# <cjk>	[2000]
+0xF8CC	U+26CDD	# <cjk>	[2000]	[Unicode3.1]
+0xF8CD	U+8465	# <cjk>	[2000]
+0xF8CE	U+8476	# <cjk>	[2000]
+0xF8CF	U+8478	# <cjk>	[2000]
+0xF8D0	U+847C	# <cjk>	[2000]
+0xF8D1	U+8481	# <cjk>	[2000]
+0xF8D2	U+450D	# <cjk>	[2000]
+0xF8D3	U+84DC	# <cjk>	[2000]
+0xF8D4	U+8497	# <cjk>	[2000]
+0xF8D5	U+84A6	# <cjk>	[2000]
+0xF8D6	U+84BE	# <cjk>	[2000]
+0xF8D7	U+4508	# <cjk>	[2000]
+0xF8D8	U+84CE	# <cjk>	[2000]
+0xF8D9	U+84CF	# <cjk>	[2000]
+0xF8DA	U+84D3	# <cjk>	[2000]
+0xF8DB	U+26E65	# <cjk>	[2000]	[Unicode3.1]
+0xF8DC	U+84E7	# <cjk>	[2000]
+0xF8DD	U+84EA	# <cjk>	[2000]
+0xF8DE	U+84EF	# <cjk>	[2000]
+0xF8DF	U+84F0	# <cjk>	[2000]
+0xF8E0	U+84F1	# <cjk>	[2000]
+0xF8E1	U+84FA	# <cjk>	[2000]
+0xF8E2	U+84FD	# <cjk>	[2000]
+0xF8E3	U+850C	# <cjk>	[2000]
+0xF8E4	U+851B	# <cjk>	[2000]
+0xF8E5	U+8524	# <cjk>	[2000]
+0xF8E6	U+8525	# <cjk>	[2000]
+0xF8E7	U+852B	# <cjk>	[2000]
+0xF8E8	U+8534	# <cjk>	[2000]
+0xF8E9	U+854F	# <cjk>	[2000]
+0xF8EA	U+856F	# <cjk>	[2000]
+0xF8EB	U+4525	# <cjk>	[2000]
+0xF8EC	U+4543	# <cjk>	[2000]
+0xF8ED	U+853E	# <cjk>	[2000]
+0xF8EE	U+8551	# <cjk>	[2000]
+0xF8EF	U+8553	# <cjk>	[2000]
+0xF8F0	U+855E	# <cjk>	[2000]
+0xF8F1	U+8561	# <cjk>	[2000]
+0xF8F2	U+8562	# <cjk>	[2000]
+0xF8F3	U+26F94	# <cjk>	[2000]	[Unicode3.1]
+0xF8F4	U+857B	# <cjk>	[2000]
+0xF8F5	U+857D	# <cjk>	[2000]
+0xF8F6	U+857F	# <cjk>	[2000]
+0xF8F7	U+8581	# <cjk>	[2000]
+0xF8F8	U+8586	# <cjk>	[2000]
+0xF8F9	U+8593	# <cjk>	[2000]
+0xF8FA	U+859D	# <cjk>	[2000]
+0xF8FB	U+859F	# <cjk>	[2000]
+0xF8FC	U+26FF8	# <cjk>	[2000]	[Unicode3.1]
+0xF940	U+26FF6	# <cjk>	[2000]	[Unicode3.1]
+0xF941	U+26FF7	# <cjk>	[2000]	[Unicode3.1]
+0xF942	U+85B7	# <cjk>	[2000]
+0xF943	U+85BC	# <cjk>	[2000]
+0xF944	U+85C7	# <cjk>	[2000]
+0xF945	U+85CA	# <cjk>	[2000]
+0xF946	U+85D8	# <cjk>	[2000]
+0xF947	U+85D9	# <cjk>	[2000]
+0xF948	U+85DF	# <cjk>	[2000]
+0xF949	U+85E1	# <cjk>	[2000]
+0xF94A	U+85E6	# <cjk>	[2000]
+0xF94B	U+85F6	# <cjk>	[2000]
+0xF94C	U+8600	# <cjk>	[2000]
+0xF94D	U+8611	# <cjk>	[2000]
+0xF94E	U+861E	# <cjk>	[2000]
+0xF94F	U+8621	# <cjk>	[2000]
+0xF950	U+8624	# <cjk>	[2000]
+0xF951	U+8627	# <cjk>	[2000]
+0xF952	U+2710D	# <cjk>	[2000]	[Unicode3.1]
+0xF953	U+8639	# <cjk>	[2000]
+0xF954	U+863C	# <cjk>	[2000]
+0xF955	U+27139	# <cjk>	[2000]	[Unicode3.1]
+0xF956	U+8640	# <cjk>	[2000]
+0xF957	U+FA20	# CJK COMPATIBILITY IDEOGRAPH-FA20	[2000]
+0xF958	U+8653	# <cjk>	[2000]
+0xF959	U+8656	# <cjk>	[2000]
+0xF95A	U+866F	# <cjk>	[2000]
+0xF95B	U+8677	# <cjk>	[2000]
+0xF95C	U+867A	# <cjk>	[2000]
+0xF95D	U+8687	# <cjk>	[2000]
+0xF95E	U+8689	# <cjk>	[2000]
+0xF95F	U+868D	# <cjk>	[2000]
+0xF960	U+8691	# <cjk>	[2000]
+0xF961	U+869C	# <cjk>	[2000]
+0xF962	U+869D	# <cjk>	[2000]
+0xF963	U+86A8	# <cjk>	[2000]
+0xF964	U+FA21	# CJK COMPATIBILITY IDEOGRAPH-FA21	[2000]
+0xF965	U+86B1	# <cjk>	[2000]
+0xF966	U+86B3	# <cjk>	[2000]
+0xF967	U+86C1	# <cjk>	[2000]
+0xF968	U+86C3	# <cjk>	[2000]
+0xF969	U+86D1	# <cjk>	[2000]
+0xF96A	U+86D5	# <cjk>	[2000]
+0xF96B	U+86D7	# <cjk>	[2000]
+0xF96C	U+86E3	# <cjk>	[2000]
+0xF96D	U+86E6	# <cjk>	[2000]
+0xF96E	U+45B8	# <cjk>	[2000]
+0xF96F	U+8705	# <cjk>	[2000]
+0xF970	U+8707	# <cjk>	[2000]
+0xF971	U+870E	# <cjk>	[2000]
+0xF972	U+8710	# <cjk>	[2000]
+0xF973	U+8713	# <cjk>	[2000]
+0xF974	U+8719	# <cjk>	[2000]
+0xF975	U+871F	# <cjk>	[2000]
+0xF976	U+8721	# <cjk>	[2000]
+0xF977	U+8723	# <cjk>	[2000]
+0xF978	U+8731	# <cjk>	[2000]
+0xF979	U+873A	# <cjk>	[2000]
+0xF97A	U+873E	# <cjk>	[2000]
+0xF97B	U+8740	# <cjk>	[2000]
+0xF97C	U+8743	# <cjk>	[2000]
+0xF97D	U+8751	# <cjk>	[2000]
+0xF97E	U+8758	# <cjk>	[2000]
+0xF980	U+8764	# <cjk>	[2000]
+0xF981	U+8765	# <cjk>	[2000]
+0xF982	U+8772	# <cjk>	[2000]
+0xF983	U+877C	# <cjk>	[2000]
+0xF984	U+273DB	# <cjk>	[2000]	[Unicode3.1]
+0xF985	U+273DA	# <cjk>	[2000]	[Unicode3.1]
+0xF986	U+87A7	# <cjk>	[2000]
+0xF987	U+8789	# <cjk>	[2000]
+0xF988	U+878B	# <cjk>	[2000]
+0xF989	U+8793	# <cjk>	[2000]
+0xF98A	U+87A0	# <cjk>	[2000]
+0xF98B	U+273FE	# <cjk>	[2000]	[Unicode3.1]
+0xF98C	U+45E5	# <cjk>	[2000]
+0xF98D	U+87BE	# <cjk>	[2000]
+0xF98E	U+27410	# <cjk>	[2000]	[Unicode3.1]
+0xF98F	U+87C1	# <cjk>	[2000]
+0xF990	U+87CE	# <cjk>	[2000]
+0xF991	U+87F5	# <cjk>	[2000]
+0xF992	U+87DF	# <cjk>	[2000]
+0xF993	U+27449	# <cjk>	[2000]	[Unicode3.1]
+0xF994	U+87E3	# <cjk>	[2000]
+0xF995	U+87E5	# <cjk>	[2000]
+0xF996	U+87E6	# <cjk>	[2000]
+0xF997	U+87EA	# <cjk>	[2000]
+0xF998	U+87EB	# <cjk>	[2000]
+0xF999	U+87ED	# <cjk>	[2000]
+0xF99A	U+8801	# <cjk>	[2000]
+0xF99B	U+8803	# <cjk>	[2000]
+0xF99C	U+880B	# <cjk>	[2000]
+0xF99D	U+8813	# <cjk>	[2000]
+0xF99E	U+8828	# <cjk>	[2000]
+0xF99F	U+882E	# <cjk>	[2000]
+0xF9A0	U+8832	# <cjk>	[2000]
+0xF9A1	U+883C	# <cjk>	[2000]
+0xF9A2	U+460F	# <cjk>	[2000]
+0xF9A3	U+884A	# <cjk>	[2000]
+0xF9A4	U+8858	# <cjk>	[2000]
+0xF9A5	U+885F	# <cjk>	[2000]
+0xF9A6	U+8864	# <cjk>	[2000]
+0xF9A7	U+27615	# <cjk>	[2000]	[Unicode3.1]
+0xF9A8	U+27614	# <cjk>	[2000]	[Unicode3.1]
+0xF9A9	U+8869	# <cjk>	[2000]
+0xF9AA	U+27631	# <cjk>	[2000]	[Unicode3.1]
+0xF9AB	U+886F	# <cjk>	[2000]
+0xF9AC	U+88A0	# <cjk>	[2000]
+0xF9AD	U+88BC	# <cjk>	[2000]
+0xF9AE	U+88BD	# <cjk>	[2000]
+0xF9AF	U+88BE	# <cjk>	[2000]
+0xF9B0	U+88C0	# <cjk>	[2000]
+0xF9B1	U+88D2	# <cjk>	[2000]
+0xF9B2	U+27693	# <cjk>	[2000]	[Unicode3.1]
+0xF9B3	U+88D1	# <cjk>	[2000]
+0xF9B4	U+88D3	# <cjk>	[2000]
+0xF9B5	U+88DB	# <cjk>	[2000]
+0xF9B6	U+88F0	# <cjk>	[2000]
+0xF9B7	U+88F1	# <cjk>	[2000]
+0xF9B8	U+4641	# <cjk>	[2000]
+0xF9B9	U+8901	# <cjk>	[2000]
+0xF9BA	U+2770E	# <cjk>	[2000]	[Unicode3.1]
+0xF9BB	U+8937	# <cjk>	[2000]
+0xF9BC	U+27723	# <cjk>	[2000]	[Unicode3.1]
+0xF9BD	U+8942	# <cjk>	[2000]
+0xF9BE	U+8945	# <cjk>	[2000]
+0xF9BF	U+8949	# <cjk>	[2000]
+0xF9C0	U+27752	# <cjk>	[2000]	[Unicode3.1]
+0xF9C1	U+4665	# <cjk>	[2000]
+0xF9C2	U+8962	# <cjk>	[2000]
+0xF9C3	U+8980	# <cjk>	[2000]
+0xF9C4	U+8989	# <cjk>	[2000]
+0xF9C5	U+8990	# <cjk>	[2000]
+0xF9C6	U+899F	# <cjk>	[2000]
+0xF9C7	U+89B0	# <cjk>	[2000]
+0xF9C8	U+89B7	# <cjk>	[2000]
+0xF9C9	U+89D6	# <cjk>	[2000]
+0xF9CA	U+89D8	# <cjk>	[2000]
+0xF9CB	U+89EB	# <cjk>	[2000]
+0xF9CC	U+46A1	# <cjk>	[2000]
+0xF9CD	U+89F1	# <cjk>	[2000]
+0xF9CE	U+89F3	# <cjk>	[2000]
+0xF9CF	U+89FD	# <cjk>	[2000]
+0xF9D0	U+89FF	# <cjk>	[2000]
+0xF9D1	U+46AF	# <cjk>	[2000]
+0xF9D2	U+8A11	# <cjk>	[2000]
+0xF9D3	U+8A14	# <cjk>	[2000]
+0xF9D4	U+27985	# <cjk>	[2000]	[Unicode3.1]
+0xF9D5	U+8A21	# <cjk>	[2000]
+0xF9D6	U+8A35	# <cjk>	[2000]
+0xF9D7	U+8A3E	# <cjk>	[2000]
+0xF9D8	U+8A45	# <cjk>	[2000]
+0xF9D9	U+8A4D	# <cjk>	[2000]
+0xF9DA	U+8A58	# <cjk>	[2000]
+0xF9DB	U+8AAE	# <cjk>	[2000]
+0xF9DC	U+8A90	# <cjk>	[2000]
+0xF9DD	U+8AB7	# <cjk>	[2000]
+0xF9DE	U+8ABE	# <cjk>	[2000]
+0xF9DF	U+8AD7	# <cjk>	[2000]
+0xF9E0	U+8AFC	# <cjk>	[2000]
+0xF9E1	U+27A84	# <cjk>	[2000]	[Unicode3.1]
+0xF9E2	U+8B0A	# <cjk>	[2000]
+0xF9E3	U+8B05	# <cjk>	[2000]
+0xF9E4	U+8B0D	# <cjk>	[2000]
+0xF9E5	U+8B1C	# <cjk>	[2000]
+0xF9E6	U+8B1F	# <cjk>	[2000]
+0xF9E7	U+8B2D	# <cjk>	[2000]
+0xF9E8	U+8B43	# <cjk>	[2000]
+0xF9E9	U+470C	# <cjk>	[2000]
+0xF9EA	U+8B51	# <cjk>	[2000]
+0xF9EB	U+8B5E	# <cjk>	[2000]
+0xF9EC	U+8B76	# <cjk>	[2000]
+0xF9ED	U+8B7F	# <cjk>	[2000]
+0xF9EE	U+8B81	# <cjk>	[2000]
+0xF9EF	U+8B8B	# <cjk>	[2000]
+0xF9F0	U+8B94	# <cjk>	[2000]
+0xF9F1	U+8B95	# <cjk>	[2000]
+0xF9F2	U+8B9C	# <cjk>	[2000]
+0xF9F3	U+8B9E	# <cjk>	[2000]
+0xF9F4	U+8C39	# <cjk>	[2000]
+0xF9F5	U+27BB3	# <cjk>	[2000]	[Unicode3.1]
+0xF9F6	U+8C3D	# <cjk>	[2000]
+0xF9F7	U+27BBE	# <cjk>	[2000]	[Unicode3.1]
+0xF9F8	U+27BC7	# <cjk>	[2000]	[Unicode3.1]
+0xF9F9	U+8C45	# <cjk>	[2000]
+0xF9FA	U+8C47	# <cjk>	[2000]
+0xF9FB	U+8C4F	# <cjk>	[2000]
+0xF9FC	U+8C54	# <cjk>	[2000]
+0xFA40	U+8C57	# <cjk>	[2000]
+0xFA41	U+8C69	# <cjk>	[2000]
+0xFA42	U+8C6D	# <cjk>	[2000]
+0xFA43	U+8C73	# <cjk>	[2000]
+0xFA44	U+27CB8	# <cjk>	[2000]	[Unicode3.1]
+0xFA45	U+8C93	# <cjk>	[2000]
+0xFA46	U+8C92	# <cjk>	[2000]
+0xFA47	U+8C99	# <cjk>	[2000]
+0xFA48	U+4764	# <cjk>	[2000]
+0xFA49	U+8C9B	# <cjk>	[2000]
+0xFA4A	U+8CA4	# <cjk>	[2000]
+0xFA4B	U+8CD6	# <cjk>	[2000]
+0xFA4C	U+8CD5	# <cjk>	[2000]
+0xFA4D	U+8CD9	# <cjk>	[2000]
+0xFA4E	U+27DA0	# <cjk>	[2000]	[Unicode3.1]
+0xFA4F	U+8CF0	# <cjk>	[2000]
+0xFA50	U+8CF1	# <cjk>	[2000]
+0xFA51	U+27E10	# <cjk>	[2000]	[Unicode3.1]
+0xFA52	U+8D09	# <cjk>	[2000]
+0xFA53	U+8D0E	# <cjk>	[2000]
+0xFA54	U+8D6C	# <cjk>	[2000]
+0xFA55	U+8D84	# <cjk>	[2000]
+0xFA56	U+8D95	# <cjk>	[2000]
+0xFA57	U+8DA6	# <cjk>	[2000]
+0xFA58	U+27FB7	# <cjk>	[2000]	[Unicode3.1]
+0xFA59	U+8DC6	# <cjk>	[2000]
+0xFA5A	U+8DC8	# <cjk>	[2000]
+0xFA5B	U+8DD9	# <cjk>	[2000]
+0xFA5C	U+8DEC	# <cjk>	[2000]
+0xFA5D	U+8E0C	# <cjk>	[2000]
+0xFA5E	U+47FD	# <cjk>	[2000]
+0xFA5F	U+8DFD	# <cjk>	[2000]
+0xFA60	U+8E06	# <cjk>	[2000]
+0xFA61	U+2808A	# <cjk>	[2000]	[Unicode3.1]
+0xFA62	U+8E14	# <cjk>	[2000]
+0xFA63	U+8E16	# <cjk>	[2000]
+0xFA64	U+8E21	# <cjk>	[2000]
+0xFA65	U+8E22	# <cjk>	[2000]
+0xFA66	U+8E27	# <cjk>	[2000]
+0xFA67	U+280BB	# <cjk>	[2000]	[Unicode3.1]
+0xFA68	U+4816	# <cjk>	[2000]
+0xFA69	U+8E36	# <cjk>	[2000]
+0xFA6A	U+8E39	# <cjk>	[2000]
+0xFA6B	U+8E4B	# <cjk>	[2000]
+0xFA6C	U+8E54	# <cjk>	[2000]
+0xFA6D	U+8E62	# <cjk>	[2000]
+0xFA6E	U+8E6C	# <cjk>	[2000]
+0xFA6F	U+8E6D	# <cjk>	[2000]
+0xFA70	U+8E6F	# <cjk>	[2000]
+0xFA71	U+8E98	# <cjk>	[2000]
+0xFA72	U+8E9E	# <cjk>	[2000]
+0xFA73	U+8EAE	# <cjk>	[2000]
+0xFA74	U+8EB3	# <cjk>	[2000]
+0xFA75	U+8EB5	# <cjk>	[2000]
+0xFA76	U+8EB6	# <cjk>	[2000]
+0xFA77	U+8EBB	# <cjk>	[2000]
+0xFA78	U+28282	# <cjk>	[2000]	[Unicode3.1]
+0xFA79	U+8ED1	# <cjk>	[2000]
+0xFA7A	U+8ED4	# <cjk>	[2000]
+0xFA7B	U+484E	# <cjk>	[2000]
+0xFA7C	U+8EF9	# <cjk>	[2000]
+0xFA7D	U+282F3	# <cjk>	[2000]	[Unicode3.1]
+0xFA7E	U+8F00	# <cjk>	[2000]
+0xFA80	U+8F08	# <cjk>	[2000]
+0xFA81	U+8F17	# <cjk>	[2000]
+0xFA82	U+8F2B	# <cjk>	[2000]
+0xFA83	U+8F40	# <cjk>	[2000]
+0xFA84	U+8F4A	# <cjk>	[2000]
+0xFA85	U+8F58	# <cjk>	[2000]
+0xFA86	U+2840C	# <cjk>	[2000]	[Unicode3.1]
+0xFA87	U+8FA4	# <cjk>	[2000]
+0xFA88	U+8FB4	# <cjk>	[2000]
+0xFA89	U+FA66	# CJK COMPATIBILITY IDEOGRAPH-FA66	[2000]	[Unicode3.2]
+0xFA8A	U+8FB6	# <cjk>	[2000]
+0xFA8B	U+28455	# <cjk>	[2000]	[Unicode3.1]
+0xFA8C	U+8FC1	# <cjk>	[2000]
+0xFA8D	U+8FC6	# <cjk>	[2000]
+0xFA8E	U+FA24	# CJK COMPATIBILITY IDEOGRAPH-FA24	[2000]
+0xFA8F	U+8FCA	# <cjk>	[2000]
+0xFA90	U+8FCD	# <cjk>	[2000]
+0xFA91	U+8FD3	# <cjk>	[2000]
+0xFA92	U+8FD5	# <cjk>	[2000]
+0xFA93	U+8FE0	# <cjk>	[2000]
+0xFA94	U+8FF1	# <cjk>	[2000]
+0xFA95	U+8FF5	# <cjk>	[2000]
+0xFA96	U+8FFB	# <cjk>	[2000]
+0xFA97	U+9002	# <cjk>	[2000]
+0xFA98	U+900C	# <cjk>	[2000]
+0xFA99	U+9037	# <cjk>	[2000]
+0xFA9A	U+2856B	# <cjk>	[2000]	[Unicode3.1]
+0xFA9B	U+9043	# <cjk>	[2000]
+0xFA9C	U+9044	# <cjk>	[2000]
+0xFA9D	U+905D	# <cjk>	[2000]
+0xFA9E	U+285C8	# <cjk>	[2000]	[Unicode3.1]
+0xFA9F	U+285C9	# <cjk>	[2000]	[Unicode3.1]
+0xFAA0	U+9085	# <cjk>	[2000]
+0xFAA1	U+908C	# <cjk>	[2000]
+0xFAA2	U+9090	# <cjk>	[2000]
+0xFAA3	U+961D	# <cjk>	[2000]
+0xFAA4	U+90A1	# <cjk>	[2000]
+0xFAA5	U+48B5	# <cjk>	[2000]
+0xFAA6	U+90B0	# <cjk>	[2000]
+0xFAA7	U+90B6	# <cjk>	[2000]
+0xFAA8	U+90C3	# <cjk>	[2000]
+0xFAA9	U+90C8	# <cjk>	[2000]
+0xFAAA	U+286D7	# <cjk>	[2000]	[Unicode3.1]
+0xFAAB	U+90DC	# <cjk>	[2000]
+0xFAAC	U+90DF	# <cjk>	[2000]
+0xFAAD	U+286FA	# <cjk>	[2000]	[Unicode3.1]
+0xFAAE	U+90F6	# <cjk>	[2000]
+0xFAAF	U+90F2	# <cjk>	[2000]
+0xFAB0	U+9100	# <cjk>	[2000]
+0xFAB1	U+90EB	# <cjk>	[2000]
+0xFAB2	U+90FE	# <cjk>	[2000]
+0xFAB3	U+90FF	# <cjk>	[2000]
+0xFAB4	U+9104	# <cjk>	[2000]
+0xFAB5	U+9106	# <cjk>	[2000]
+0xFAB6	U+9118	# <cjk>	[2000]
+0xFAB7	U+911C	# <cjk>	[2000]
+0xFAB8	U+911E	# <cjk>	[2000]
+0xFAB9	U+9137	# <cjk>	[2000]
+0xFABA	U+9139	# <cjk>	[2000]
+0xFABB	U+913A	# <cjk>	[2000]
+0xFABC	U+9146	# <cjk>	[2000]
+0xFABD	U+9147	# <cjk>	[2000]
+0xFABE	U+9157	# <cjk>	[2000]
+0xFABF	U+9159	# <cjk>	[2000]
+0xFAC0	U+9161	# <cjk>	[2000]
+0xFAC1	U+9164	# <cjk>	[2000]
+0xFAC2	U+9174	# <cjk>	[2000]
+0xFAC3	U+9179	# <cjk>	[2000]
+0xFAC4	U+9185	# <cjk>	[2000]
+0xFAC5	U+918E	# <cjk>	[2000]
+0xFAC6	U+91A8	# <cjk>	[2000]
+0xFAC7	U+91AE	# <cjk>	[2000]
+0xFAC8	U+91B3	# <cjk>	[2000]
+0xFAC9	U+91B6	# <cjk>	[2000]
+0xFACA	U+91C3	# <cjk>	[2000]
+0xFACB	U+91C4	# <cjk>	[2000]
+0xFACC	U+91DA	# <cjk>	[2000]
+0xFACD	U+28949	# <cjk>	[2000]	[Unicode3.1]
+0xFACE	U+28946	# <cjk>	[2000]	[Unicode3.1]
+0xFACF	U+91EC	# <cjk>	[2000]
+0xFAD0	U+91EE	# <cjk>	[2000]
+0xFAD1	U+9201	# <cjk>	[2000]
+0xFAD2	U+920A	# <cjk>	[2000]
+0xFAD3	U+9216	# <cjk>	[2000]
+0xFAD4	U+9217	# <cjk>	[2000]
+0xFAD5	U+2896B	# <cjk>	[2000]	[Unicode3.1]
+0xFAD6	U+9233	# <cjk>	[2000]
+0xFAD7	U+9242	# <cjk>	[2000]
+0xFAD8	U+9247	# <cjk>	[2000]
+0xFAD9	U+924A	# <cjk>	[2000]
+0xFADA	U+924E	# <cjk>	[2000]
+0xFADB	U+9251	# <cjk>	[2000]
+0xFADC	U+9256	# <cjk>	[2000]
+0xFADD	U+9259	# <cjk>	[2000]
+0xFADE	U+9260	# <cjk>	[2000]
+0xFADF	U+9261	# <cjk>	[2000]
+0xFAE0	U+9265	# <cjk>	[2000]
+0xFAE1	U+9267	# <cjk>	[2000]
+0xFAE2	U+9268	# <cjk>	[2000]
+0xFAE3	U+28987	# <cjk>	[2000]	[Unicode3.1]
+0xFAE4	U+28988	# <cjk>	[2000]	[Unicode3.1]
+0xFAE5	U+927C	# <cjk>	[2000]
+0xFAE6	U+927D	# <cjk>	[2000]
+0xFAE7	U+927F	# <cjk>	[2000]
+0xFAE8	U+9289	# <cjk>	[2000]
+0xFAE9	U+928D	# <cjk>	[2000]
+0xFAEA	U+9297	# <cjk>	[2000]
+0xFAEB	U+9299	# <cjk>	[2000]
+0xFAEC	U+929F	# <cjk>	[2000]
+0xFAED	U+92A7	# <cjk>	[2000]
+0xFAEE	U+92AB	# <cjk>	[2000]
+0xFAEF	U+289BA	# <cjk>	[2000]	[Unicode3.1]
+0xFAF0	U+289BB	# <cjk>	[2000]	[Unicode3.1]
+0xFAF1	U+92B2	# <cjk>	[2000]
+0xFAF2	U+92BF	# <cjk>	[2000]
+0xFAF3	U+92C0	# <cjk>	[2000]
+0xFAF4	U+92C6	# <cjk>	[2000]
+0xFAF5	U+92CE	# <cjk>	[2000]
+0xFAF6	U+92D0	# <cjk>	[2000]
+0xFAF7	U+92D7	# <cjk>	[2000]
+0xFAF8	U+92D9	# <cjk>	[2000]
+0xFAF9	U+92E5	# <cjk>	[2000]
+0xFAFA	U+92E7	# <cjk>	[2000]
+0xFAFB	U+9311	# <cjk>	[2000]
+0xFAFC	U+28A1E	# <cjk>	[2000]	[Unicode3.1]
+0xFB40	U+28A29	# <cjk>	[2000]	[Unicode3.1]
+0xFB41	U+92F7	# <cjk>	[2000]
+0xFB42	U+92F9	# <cjk>	[2000]
+0xFB43	U+92FB	# <cjk>	[2000]
+0xFB44	U+9302	# <cjk>	[2000]
+0xFB45	U+930D	# <cjk>	[2000]
+0xFB46	U+9315	# <cjk>	[2000]
+0xFB47	U+931D	# <cjk>	[2000]
+0xFB48	U+931E	# <cjk>	[2000]
+0xFB49	U+9327	# <cjk>	[2000]
+0xFB4A	U+9329	# <cjk>	[2000]
+0xFB4B	U+28A71	# <cjk>	[2000]	[Unicode3.1]
+0xFB4C	U+28A43	# <cjk>	[2000]	[Unicode3.1]
+0xFB4D	U+9347	# <cjk>	[2000]
+0xFB4E	U+9351	# <cjk>	[2000]
+0xFB4F	U+9357	# <cjk>	[2000]
+0xFB50	U+935A	# <cjk>	[2000]
+0xFB51	U+936B	# <cjk>	[2000]
+0xFB52	U+9371	# <cjk>	[2000]
+0xFB53	U+9373	# <cjk>	[2000]
+0xFB54	U+93A1	# <cjk>	[2000]
+0xFB55	U+28A99	# <cjk>	[2000]	[Unicode3.1]
+0xFB56	U+28ACD	# <cjk>	[2000]	[Unicode3.1]
+0xFB57	U+9388	# <cjk>	[2000]
+0xFB58	U+938B	# <cjk>	[2000]
+0xFB59	U+938F	# <cjk>	[2000]
+0xFB5A	U+939E	# <cjk>	[2000]
+0xFB5B	U+93F5	# <cjk>	[2000]
+0xFB5C	U+28AE4	# <cjk>	[2000]	[Unicode3.1]
+0xFB5D	U+28ADD	# <cjk>	[2000]	[Unicode3.1]
+0xFB5E	U+93F1	# <cjk>	[2000]
+0xFB5F	U+93C1	# <cjk>	[2000]
+0xFB60	U+93C7	# <cjk>	[2000]
+0xFB61	U+93DC	# <cjk>	[2000]
+0xFB62	U+93E2	# <cjk>	[2000]
+0xFB63	U+93E7	# <cjk>	[2000]
+0xFB64	U+9409	# <cjk>	[2000]
+0xFB65	U+940F	# <cjk>	[2000]
+0xFB66	U+9416	# <cjk>	[2000]
+0xFB67	U+9417	# <cjk>	[2000]
+0xFB68	U+93FB	# <cjk>	[2000]
+0xFB69	U+9432	# <cjk>	[2000]
+0xFB6A	U+9434	# <cjk>	[2000]
+0xFB6B	U+943B	# <cjk>	[2000]
+0xFB6C	U+9445	# <cjk>	[2000]
+0xFB6D	U+28BC1	# <cjk>	[2000]	[Unicode3.1]
+0xFB6E	U+28BEF	# <cjk>	[2000]	[Unicode3.1]
+0xFB6F	U+946D	# <cjk>	[2000]
+0xFB70	U+946F	# <cjk>	[2000]
+0xFB71	U+9578	# <cjk>	[2000]
+0xFB72	U+9579	# <cjk>	[2000]
+0xFB73	U+9586	# <cjk>	[2000]
+0xFB74	U+958C	# <cjk>	[2000]
+0xFB75	U+958D	# <cjk>	[2000]
+0xFB76	U+28D10	# <cjk>	[2000]	[Unicode3.1]
+0xFB77	U+95AB	# <cjk>	[2000]
+0xFB78	U+95B4	# <cjk>	[2000]
+0xFB79	U+28D71	# <cjk>	[2000]	[Unicode3.1]
+0xFB7A	U+95C8	# <cjk>	[2000]
+0xFB7B	U+28DFB	# <cjk>	[2000]	[Unicode3.1]
+0xFB7C	U+28E1F	# <cjk>	[2000]	[Unicode3.1]
+0xFB7D	U+962C	# <cjk>	[2000]
+0xFB7E	U+9633	# <cjk>	[2000]
+0xFB80	U+9634	# <cjk>	[2000]
+0xFB81	U+28E36	# <cjk>	[2000]	[Unicode3.1]
+0xFB82	U+963C	# <cjk>	[2000]
+0xFB83	U+9641	# <cjk>	[2000]
+0xFB84	U+9661	# <cjk>	[2000]
+0xFB85	U+28E89	# <cjk>	[2000]	[Unicode3.1]
+0xFB86	U+9682	# <cjk>	[2000]
+0xFB87	U+28EEB	# <cjk>	[2000]	[Unicode3.1]
+0xFB88	U+969A	# <cjk>	[2000]
+0xFB89	U+28F32	# <cjk>	[2000]	[Unicode3.1]
+0xFB8A	U+49E7	# <cjk>	[2000]
+0xFB8B	U+96A9	# <cjk>	[2000]
+0xFB8C	U+96AF	# <cjk>	[2000]
+0xFB8D	U+96B3	# <cjk>	[2000]
+0xFB8E	U+96BA	# <cjk>	[2000]
+0xFB8F	U+96BD	# <cjk>	[2000]
+0xFB90	U+49FA	# <cjk>	[2000]
+0xFB91	U+28FF8	# <cjk>	[2000]	[Unicode3.1]
+0xFB92	U+96D8	# <cjk>	[2000]
+0xFB93	U+96DA	# <cjk>	[2000]
+0xFB94	U+96DD	# <cjk>	[2000]
+0xFB95	U+4A04	# <cjk>	[2000]
+0xFB96	U+9714	# <cjk>	[2000]
+0xFB97	U+9723	# <cjk>	[2000]
+0xFB98	U+4A29	# <cjk>	[2000]
+0xFB99	U+9736	# <cjk>	[2000]
+0xFB9A	U+9741	# <cjk>	[2000]
+0xFB9B	U+9747	# <cjk>	[2000]
+0xFB9C	U+9755	# <cjk>	[2000]
+0xFB9D	U+9757	# <cjk>	[2000]
+0xFB9E	U+975B	# <cjk>	[2000]
+0xFB9F	U+976A	# <cjk>	[2000]
+0xFBA0	U+292A0	# <cjk>	[2000]	[Unicode3.1]
+0xFBA1	U+292B1	# <cjk>	[2000]	[Unicode3.1]
+0xFBA2	U+9796	# <cjk>	[2000]
+0xFBA3	U+979A	# <cjk>	[2000]
+0xFBA4	U+979E	# <cjk>	[2000]
+0xFBA5	U+97A2	# <cjk>	[2000]
+0xFBA6	U+97B1	# <cjk>	[2000]
+0xFBA7	U+97B2	# <cjk>	[2000]
+0xFBA8	U+97BE	# <cjk>	[2000]
+0xFBA9	U+97CC	# <cjk>	[2000]
+0xFBAA	U+97D1	# <cjk>	[2000]
+0xFBAB	U+97D4	# <cjk>	[2000]
+0xFBAC	U+97D8	# <cjk>	[2000]
+0xFBAD	U+97D9	# <cjk>	[2000]
+0xFBAE	U+97E1	# <cjk>	[2000]
+0xFBAF	U+97F1	# <cjk>	[2000]
+0xFBB0	U+9804	# <cjk>	[2000]
+0xFBB1	U+980D	# <cjk>	[2000]
+0xFBB2	U+980E	# <cjk>	[2000]
+0xFBB3	U+9814	# <cjk>	[2000]
+0xFBB4	U+9816	# <cjk>	[2000]
+0xFBB5	U+4ABC	# <cjk>	[2000]
+0xFBB6	U+29490	# <cjk>	[2000]	[Unicode3.1]
+0xFBB7	U+9823	# <cjk>	[2000]
+0xFBB8	U+9832	# <cjk>	[2000]
+0xFBB9	U+9833	# <cjk>	[2000]
+0xFBBA	U+9825	# <cjk>	[2000]
+0xFBBB	U+9847	# <cjk>	[2000]
+0xFBBC	U+9866	# <cjk>	[2000]
+0xFBBD	U+98AB	# <cjk>	[2000]
+0xFBBE	U+98AD	# <cjk>	[2000]
+0xFBBF	U+98B0	# <cjk>	[2000]
+0xFBC0	U+295CF	# <cjk>	[2000]	[Unicode3.1]
+0xFBC1	U+98B7	# <cjk>	[2000]
+0xFBC2	U+98B8	# <cjk>	[2000]
+0xFBC3	U+98BB	# <cjk>	[2000]
+0xFBC4	U+98BC	# <cjk>	[2000]
+0xFBC5	U+98BF	# <cjk>	[2000]
+0xFBC6	U+98C2	# <cjk>	[2000]
+0xFBC7	U+98C7	# <cjk>	[2000]
+0xFBC8	U+98CB	# <cjk>	[2000]
+0xFBC9	U+98E0	# <cjk>	[2000]
+0xFBCA	U+2967F	# <cjk>	[2000]	[Unicode3.1]
+0xFBCB	U+98E1	# <cjk>	[2000]
+0xFBCC	U+98E3	# <cjk>	[2000]
+0xFBCD	U+98E5	# <cjk>	[2000]
+0xFBCE	U+98EA	# <cjk>	[2000]
+0xFBCF	U+98F0	# <cjk>	[2000]
+0xFBD0	U+98F1	# <cjk>	[2000]
+0xFBD1	U+98F3	# <cjk>	[2000]
+0xFBD2	U+9908	# <cjk>	[2000]
+0xFBD3	U+4B3B	# <cjk>	[2000]
+0xFBD4	U+296F0	# <cjk>	[2000]	[Unicode3.1]
+0xFBD5	U+9916	# <cjk>	[2000]
+0xFBD6	U+9917	# <cjk>	[2000]
+0xFBD7	U+29719	# <cjk>	[2000]	[Unicode3.1]
+0xFBD8	U+991A	# <cjk>	[2000]
+0xFBD9	U+991B	# <cjk>	[2000]
+0xFBDA	U+991C	# <cjk>	[2000]
+0xFBDB	U+29750	# <cjk>	[2000]	[Unicode3.1]
+0xFBDC	U+9931	# <cjk>	[2000]
+0xFBDD	U+9932	# <cjk>	[2000]
+0xFBDE	U+9933	# <cjk>	[2000]
+0xFBDF	U+993A	# <cjk>	[2000]
+0xFBE0	U+993B	# <cjk>	[2000]
+0xFBE1	U+993C	# <cjk>	[2000]
+0xFBE2	U+9940	# <cjk>	[2000]
+0xFBE3	U+9941	# <cjk>	[2000]
+0xFBE4	U+9946	# <cjk>	[2000]
+0xFBE5	U+994D	# <cjk>	[2000]
+0xFBE6	U+994E	# <cjk>	[2000]
+0xFBE7	U+995C	# <cjk>	[2000]
+0xFBE8	U+995F	# <cjk>	[2000]
+0xFBE9	U+9960	# <cjk>	[2000]
+0xFBEA	U+99A3	# <cjk>	[2000]
+0xFBEB	U+99A6	# <cjk>	[2000]
+0xFBEC	U+99B9	# <cjk>	[2000]
+0xFBED	U+99BD	# <cjk>	[2000]
+0xFBEE	U+99BF	# <cjk>	[2000]
+0xFBEF	U+99C3	# <cjk>	[2000]
+0xFBF0	U+99C9	# <cjk>	[2000]
+0xFBF1	U+99D4	# <cjk>	[2000]
+0xFBF2	U+99D9	# <cjk>	[2000]
+0xFBF3	U+99DE	# <cjk>	[2000]
+0xFBF4	U+298C6	# <cjk>	[2000]	[Unicode3.1]
+0xFBF5	U+99F0	# <cjk>	[2000]
+0xFBF6	U+99F9	# <cjk>	[2000]
+0xFBF7	U+99FC	# <cjk>	[2000]
+0xFBF8	U+9A0A	# <cjk>	[2000]
+0xFBF9	U+9A11	# <cjk>	[2000]
+0xFBFA	U+9A16	# <cjk>	[2000]
+0xFBFB	U+9A1A	# <cjk>	[2000]
+0xFBFC	U+9A20	# <cjk>	[2000]
+0xFC40	U+9A31	# <cjk>	[2000]
+0xFC41	U+9A36	# <cjk>	[2000]
+0xFC42	U+9A44	# <cjk>	[2000]
+0xFC43	U+9A4C	# <cjk>	[2000]
+0xFC44	U+9A58	# <cjk>	[2000]
+0xFC45	U+4BC2	# <cjk>	[2000]
+0xFC46	U+9AAF	# <cjk>	[2000]
+0xFC47	U+4BCA	# <cjk>	[2000]
+0xFC48	U+9AB7	# <cjk>	[2000]
+0xFC49	U+4BD2	# <cjk>	[2000]
+0xFC4A	U+9AB9	# <cjk>	[2000]
+0xFC4B	U+29A72	# <cjk>	[2000]	[Unicode3.1]
+0xFC4C	U+9AC6	# <cjk>	[2000]
+0xFC4D	U+9AD0	# <cjk>	[2000]
+0xFC4E	U+9AD2	# <cjk>	[2000]
+0xFC4F	U+9AD5	# <cjk>	[2000]
+0xFC50	U+4BE8	# <cjk>	[2000]
+0xFC51	U+9ADC	# <cjk>	[2000]
+0xFC52	U+9AE0	# <cjk>	[2000]
+0xFC53	U+9AE5	# <cjk>	[2000]
+0xFC54	U+9AE9	# <cjk>	[2000]
+0xFC55	U+9B03	# <cjk>	[2000]
+0xFC56	U+9B0C	# <cjk>	[2000]
+0xFC57	U+9B10	# <cjk>	[2000]
+0xFC58	U+9B12	# <cjk>	[2000]
+0xFC59	U+9B16	# <cjk>	[2000]
+0xFC5A	U+9B1C	# <cjk>	[2000]
+0xFC5B	U+9B2B	# <cjk>	[2000]
+0xFC5C	U+9B33	# <cjk>	[2000]
+0xFC5D	U+9B3D	# <cjk>	[2000]
+0xFC5E	U+4C20	# <cjk>	[2000]
+0xFC5F	U+9B4B	# <cjk>	[2000]
+0xFC60	U+9B63	# <cjk>	[2000]
+0xFC61	U+9B65	# <cjk>	[2000]
+0xFC62	U+9B6B	# <cjk>	[2000]
+0xFC63	U+9B6C	# <cjk>	[2000]
+0xFC64	U+9B73	# <cjk>	[2000]
+0xFC65	U+9B76	# <cjk>	[2000]
+0xFC66	U+9B77	# <cjk>	[2000]
+0xFC67	U+9BA6	# <cjk>	[2000]
+0xFC68	U+9BAC	# <cjk>	[2000]
+0xFC69	U+9BB1	# <cjk>	[2000]
+0xFC6A	U+29DDB	# <cjk>	[2000]	[Unicode3.1]
+0xFC6B	U+29E3D	# <cjk>	[2000]	[Unicode3.1]
+0xFC6C	U+9BB2	# <cjk>	[2000]
+0xFC6D	U+9BB8	# <cjk>	[2000]
+0xFC6E	U+9BBE	# <cjk>	[2000]
+0xFC6F	U+9BC7	# <cjk>	[2000]
+0xFC70	U+9BF3	# <cjk>	[2000]
+0xFC71	U+9BD8	# <cjk>	[2000]
+0xFC72	U+9BDD	# <cjk>	[2000]
+0xFC73	U+9BE7	# <cjk>	[2000]
+0xFC74	U+9BEA	# <cjk>	[2000]
+0xFC75	U+9BEB	# <cjk>	[2000]
+0xFC76	U+9BEF	# <cjk>	[2000]
+0xFC77	U+9BEE	# <cjk>	[2000]
+0xFC78	U+29E15	# <cjk>	[2000]	[Unicode3.1]
+0xFC79	U+9BFA	# <cjk>	[2000]
+0xFC7A	U+29E8A	# <cjk>	[2000]	[Unicode3.1]
+0xFC7B	U+9BF7	# <cjk>	[2000]
+0xFC7C	U+29E49	# <cjk>	[2000]	[Unicode3.1]
+0xFC7D	U+9C16	# <cjk>	[2000]
+0xFC7E	U+9C18	# <cjk>	[2000]
+0xFC80	U+9C19	# <cjk>	[2000]
+0xFC81	U+9C1A	# <cjk>	[2000]
+0xFC82	U+9C1D	# <cjk>	[2000]
+0xFC83	U+9C22	# <cjk>	[2000]
+0xFC84	U+9C27	# <cjk>	[2000]
+0xFC85	U+9C29	# <cjk>	[2000]
+0xFC86	U+9C2A	# <cjk>	[2000]
+0xFC87	U+29EC4	# <cjk>	[2000]	[Unicode3.1]
+0xFC88	U+9C31	# <cjk>	[2000]
+0xFC89	U+9C36	# <cjk>	[2000]
+0xFC8A	U+9C37	# <cjk>	[2000]
+0xFC8B	U+9C45	# <cjk>	[2000]
+0xFC8C	U+9C5C	# <cjk>	[2000]
+0xFC8D	U+29EE9	# <cjk>	[2000]	[Unicode3.1]
+0xFC8E	U+9C49	# <cjk>	[2000]
+0xFC8F	U+9C4A	# <cjk>	[2000]
+0xFC90	U+29EDB	# <cjk>	[2000]	[Unicode3.1]
+0xFC91	U+9C54	# <cjk>	[2000]
+0xFC92	U+9C58	# <cjk>	[2000]
+0xFC93	U+9C5B	# <cjk>	[2000]
+0xFC94	U+9C5D	# <cjk>	[2000]
+0xFC95	U+9C5F	# <cjk>	[2000]
+0xFC96	U+9C69	# <cjk>	[2000]
+0xFC97	U+9C6A	# <cjk>	[2000]
+0xFC98	U+9C6B	# <cjk>	[2000]
+0xFC99	U+9C6D	# <cjk>	[2000]
+0xFC9A	U+9C6E	# <cjk>	[2000]
+0xFC9B	U+9C70	# <cjk>	[2000]
+0xFC9C	U+9C72	# <cjk>	[2000]
+0xFC9D	U+9C75	# <cjk>	[2000]
+0xFC9E	U+9C7A	# <cjk>	[2000]
+0xFC9F	U+9CE6	# <cjk>	[2000]
+0xFCA0	U+9CF2	# <cjk>	[2000]
+0xFCA1	U+9D0B	# <cjk>	[2000]
+0xFCA2	U+9D02	# <cjk>	[2000]
+0xFCA3	U+29FCE	# <cjk>	[2000]	[Unicode3.1]
+0xFCA4	U+9D11	# <cjk>	[2000]
+0xFCA5	U+9D17	# <cjk>	[2000]
+0xFCA6	U+9D18	# <cjk>	[2000]
+0xFCA7	U+2A02F	# <cjk>	[2000]	[Unicode3.1]
+0xFCA8	U+4CC4	# <cjk>	[2000]
+0xFCA9	U+2A01A	# <cjk>	[2000]	[Unicode3.1]
+0xFCAA	U+9D32	# <cjk>	[2000]
+0xFCAB	U+4CD1	# <cjk>	[2000]
+0xFCAC	U+9D42	# <cjk>	[2000]
+0xFCAD	U+9D4A	# <cjk>	[2000]
+0xFCAE	U+9D5F	# <cjk>	[2000]
+0xFCAF	U+9D62	# <cjk>	[2000]
+0xFCB0	U+2A0F9	# <cjk>	[2000]	[Unicode3.1]
+0xFCB1	U+9D69	# <cjk>	[2000]
+0xFCB2	U+9D6B	# <cjk>	[2000]
+0xFCB3	U+2A082	# <cjk>	[2000]	[Unicode3.1]
+0xFCB4	U+9D73	# <cjk>	[2000]
+0xFCB5	U+9D76	# <cjk>	[2000]
+0xFCB6	U+9D77	# <cjk>	[2000]
+0xFCB7	U+9D7E	# <cjk>	[2000]
+0xFCB8	U+9D84	# <cjk>	[2000]
+0xFCB9	U+9D8D	# <cjk>	[2000]
+0xFCBA	U+9D99	# <cjk>	[2000]
+0xFCBB	U+9DA1	# <cjk>	[2000]
+0xFCBC	U+9DBF	# <cjk>	[2000]
+0xFCBD	U+9DB5	# <cjk>	[2000]
+0xFCBE	U+9DB9	# <cjk>	[2000]
+0xFCBF	U+9DBD	# <cjk>	[2000]
+0xFCC0	U+9DC3	# <cjk>	[2000]
+0xFCC1	U+9DC7	# <cjk>	[2000]
+0xFCC2	U+9DC9	# <cjk>	[2000]
+0xFCC3	U+9DD6	# <cjk>	[2000]
+0xFCC4	U+9DDA	# <cjk>	[2000]
+0xFCC5	U+9DDF	# <cjk>	[2000]
+0xFCC6	U+9DE0	# <cjk>	[2000]
+0xFCC7	U+9DE3	# <cjk>	[2000]
+0xFCC8	U+9DF4	# <cjk>	[2000]
+0xFCC9	U+4D07	# <cjk>	[2000]
+0xFCCA	U+9E0A	# <cjk>	[2000]
+0xFCCB	U+9E02	# <cjk>	[2000]
+0xFCCC	U+9E0D	# <cjk>	[2000]
+0xFCCD	U+9E19	# <cjk>	[2000]
+0xFCCE	U+9E1C	# <cjk>	[2000]
+0xFCCF	U+9E1D	# <cjk>	[2000]
+0xFCD0	U+9E7B	# <cjk>	[2000]
+0xFCD1	U+22218	# <cjk>	[2000]	[Unicode3.1]
+0xFCD2	U+9E80	# <cjk>	[2000]
+0xFCD3	U+9E85	# <cjk>	[2000]
+0xFCD4	U+9E9B	# <cjk>	[2000]
+0xFCD5	U+9EA8	# <cjk>	[2000]
+0xFCD6	U+2A38C	# <cjk>	[2000]	[Unicode3.1]
+0xFCD7	U+9EBD	# <cjk>	[2000]
+0xFCD8	U+2A437	# <cjk>	[2000]	[Unicode3.1]
+0xFCD9	U+9EDF	# <cjk>	[2000]
+0xFCDA	U+9EE7	# <cjk>	[2000]
+0xFCDB	U+9EEE	# <cjk>	[2000]
+0xFCDC	U+9EFF	# <cjk>	[2000]
+0xFCDD	U+9F02	# <cjk>	[2000]
+0xFCDE	U+4D77	# <cjk>	[2000]
+0xFCDF	U+9F03	# <cjk>	[2000]
+0xFCE0	U+9F17	# <cjk>	[2000]
+0xFCE1	U+9F19	# <cjk>	[2000]
+0xFCE2	U+9F2F	# <cjk>	[2000]
+0xFCE3	U+9F37	# <cjk>	[2000]
+0xFCE4	U+9F3A	# <cjk>	[2000]
+0xFCE5	U+9F3D	# <cjk>	[2000]
+0xFCE6	U+9F41	# <cjk>	[2000]
+0xFCE7	U+9F45	# <cjk>	[2000]
+0xFCE8	U+9F46	# <cjk>	[2000]
+0xFCE9	U+9F53	# <cjk>	[2000]
+0xFCEA	U+9F55	# <cjk>	[2000]
+0xFCEB	U+9F58	# <cjk>	[2000]
+0xFCEC	U+2A5F1	# <cjk>	[2000]	[Unicode3.1]
+0xFCED	U+9F5D	# <cjk>	[2000]
+0xFCEE	U+2A602	# <cjk>	[2000]	[Unicode3.1]
+0xFCEF	U+9F69	# <cjk>	[2000]
+0xFCF0	U+2A61A	# <cjk>	[2000]	[Unicode3.1]
+0xFCF1	U+9F6D	# <cjk>	[2000]
+0xFCF2	U+9F70	# <cjk>	[2000]
+0xFCF3	U+9F75	# <cjk>	[2000]
+0xFCF4	U+2A6B2	# <cjk>	[2000]	[Unicode3.1]
--- a/jdk/make/tools/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/tools/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -40,6 +40,7 @@
   dir_diff                  \
   dtdbuilder                \
   fontchecker               \
+  freetypecheck             \
   generate_break_iterator   \
   GenerateCharacter         \
   generatecurrencydata      \
@@ -50,7 +51,8 @@
   jdwpgen                   \
   makeclasslist             \
   strip_properties          \
-  winver
+  winver                    \
+  CharsetMapping
 
 all build clean clobber::
 	$(SUBDIRS-loop)
@@ -58,4 +60,5 @@
 clean clobber::
 	$(RM) -r $(BUILDTOOLCLASSDIR)
 	$(RM) -r $(BUILDTOOLJARDIR)
+	$(RM) -r $(BUILDTOOLBINDIR)
 
--- a/jdk/make/tools/freetypecheck/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/tools/freetypecheck/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -22,55 +22,58 @@
 # CA 95054 USA or visit www.sun.com if you need additional information or
 # have any questions.
 
-# Builds test program for freetype sanity check.
-#
-# Makefile should be called with following input parameters
-#   FT_TEST    - full name of test program
-#   FT_HEADERS - path to freetype headers
-#   FT_LIB     - location of directory with library
-#   XARCH      - xarch option if required
+# Builds and runs test program for freetype sanity check.
 
 BUILDDIR = ../..
 include $(BUILDDIR)/common/Defs.gmk
 
-#test program is expected in the TEMPDIR
-FT_TEST_PATH = $(TEMPDIR)/$(FT_TEST)
+# Default name
+FT_TEST = $(BUILDTOOLBINDIR)/freetype_versioncheck$(EXE_SUFFIX)
 
-all: $(FT_TEST_PATH)
+# Used on openjdk only
+ifeq ($(OPENJDK),true)
 
 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
 ifeq ($(PLATFORM), windows)
-  FT_OPTIONS  =
+  FT_OPTIONS  = /nologo $(CC_OBJECT_OUTPUT_FLAG)$(TEMPDIR)
+  FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
+  FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
 else
   FT_OPTIONS  = $(CFLAGS)
-endif
-
-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
-FT_OPTIONS += $(XARCH)
-
-#add runtime library search path
-ifeq ($(PLATFORM), windows)
-  FREETYPE_LIB=$(FT_LIB)/freetype.lib
-  FREETYPE_DLL=$(FT_LIB)/freetype.dll
-  DFLAG=/D
-else
-  FT_OPTIONS += -L$(FT_LIB)
-  DFLAG = -D
-
-  #add runtime lib search path to ensure test will be runnable
+  FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
+  # Add runtime lib search path to ensure test will be runnable
   ifeq ($(PLATFORM), solaris)
-    FT_OPTIONS += -R $(FT_LIB) -lfreetype
+    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH) -lfreetype
   else #linux
-      FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype
+      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
   endif
 endif
-
-FT_OPTIONS += $(DFLAG)REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
+FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
+FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)/freetype2
+FT_OPTIONS += -DREQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
+FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
 
-# On windows we need to copy dll to test dir
-#  ti ensure it will be found in runtime
-$(FT_TEST_PATH): freetypecheck.c
-	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FREETYPE_LIB) $(LFLAGS_$(COMPILER_VERSION))
+# Create test program
+all: $(FT_TEST)
+	@$(FT_TEST)
+
+# On windows we need to copy dll to test dir to ensure it will be found
+#   at runtime
+$(FT_TEST): freetypecheck.c
+	@$(prep-target)
+	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
 ifeq ($(PLATFORM), windows)
 	@$(CP) $(FREETYPE_DLL) `dirname $@`
 endif
+
+else
+
+# Inform user this is openjdk only
+all:
+	@$(ECHO) "The freetype files are only used with OpenJDK"
+
+endif
+
+clean::
+	$(RM) $(FT_TEST)
+
--- a/jdk/make/tools/freetypecheck/freetypecheck.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/make/tools/freetypecheck/freetypecheck.c	Sun May 04 07:05:42 2008 -0700
@@ -26,13 +26,16 @@
 /* Test program for freetype sanity check.
    Prints "Failed" messages to STDOUT if check fails. */
 
+#include <stdio.h>
+#include <string.h>
+
 #include "ft2build.h"
 #include FT_FREETYPE_H
 
 #define QUOTEMACRO(x) QUOTEME(x)
 #define QUOTEME(x) #x
 
-int main(char** argv, int argc) {
+int main(int argc, char** argv) {
    char v[50];
    FT_Int major, minor, patch;
    FT_Library library;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/src/build/tools/charsetmapping/CharsetMapping.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,271 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package build.tools.charsetmapping;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.*;
+
+public class CharsetMapping {
+    public final static char UNMAPPABLE_DECODING = '\uFFFD';
+    public final static int  UNMAPPABLE_ENCODING = -1;
+
+    public static class Entry {
+        public int bs;   //byte sequence reps
+        public int cp;   //Unicode codepoint
+        public int cp2;  //CC of composite
+
+        public Entry () {}
+        public Entry (int bytes, int cp, int cp2) {
+            this.bs = bytes;
+            this.cp = cp;
+            this.cp2 = cp2;
+        }
+    }
+
+    static Comparator<Entry> comparatorCP =
+        new Comparator<Entry>() {
+            public int compare(Entry m1, Entry m2) {
+                return m1.cp - m2.cp;
+            }
+            public boolean equals(Object obj) {
+                return this == obj;
+            }
+    };
+
+    public static class Parser {
+        static final Pattern basic = Pattern.compile("(?:0x)?(\\p{XDigit}++)\\s++(?:0x)?(\\p{XDigit}++)?\\s*+.*");
+        static final int gBS = 1;
+        static final int gCP = 2;
+        static final int gCP2 = 3;
+
+        BufferedReader reader;
+        boolean closed;
+        Matcher matcher;
+        int gbs, gcp, gcp2;
+
+        public Parser (InputStream in, Pattern p, int gbs, int gcp, int gcp2)
+            throws IOException
+        {
+            this.reader = new BufferedReader(new InputStreamReader(in));
+            this.closed = false;
+            this.matcher = p.matcher("");
+            this.gbs = gbs;
+            this.gcp = gcp;
+            this.gcp2 = gcp2;
+        }
+
+        public Parser (InputStream in, Pattern p) throws IOException {
+            this(in, p, gBS, gCP, gCP2);
+        }
+
+        public Parser (InputStream in) throws IOException {
+            this(in, basic, gBS, gCP, gCP2);
+        }
+
+        protected boolean isDirective(String line) {
+            return line.startsWith("#");
+        }
+
+        protected Entry parse(Matcher matcher, Entry mapping) {
+            mapping.bs = Integer.parseInt(matcher.group(gbs), 16);
+            mapping.cp = Integer.parseInt(matcher.group(gcp), 16);
+            if (gcp2 <= matcher.groupCount() &&
+                matcher.group(gcp2) != null)
+                mapping.cp2 = Integer.parseInt(matcher.group(gcp2), 16);
+            else
+                mapping.cp2 = 0;
+            return mapping;
+        }
+
+        public Entry next() throws Exception {
+            return next(new Entry());
+        }
+
+        // returns null and closes the input stream if the eof has beenreached.
+        public Entry next(Entry mapping) throws Exception {
+            if (closed)
+                return null;
+            String line;
+            while ((line = reader.readLine()) != null) {
+                if (isDirective(line))
+                    continue;
+                matcher.reset(line);
+                if (!matcher.lookingAt()) {
+                    //System.out.println("Missed: " + line);
+                    continue;
+                }
+                return parse(matcher, mapping);
+            }
+            reader.close();
+            closed = true;
+            return null;
+        }
+    }
+
+    // tags of different charset mapping tables
+    private final static int MAP_SINGLEBYTE      = 0x1; // 0..256  : c
+    private final static int MAP_DOUBLEBYTE1     = 0x2; // min..max: c
+    private final static int MAP_DOUBLEBYTE2     = 0x3; // min..max: c [DB2]
+    private final static int MAP_SUPPLEMENT      = 0x5; //           db,c
+    private final static int MAP_SUPPLEMENT_C2B  = 0x6; //           c,db
+    private final static int MAP_COMPOSITE       = 0x7; //           db,base,cc
+    private final static int MAP_INDEXC2B        = 0x8; // index table of c->bb
+
+    private static final void writeShort(OutputStream out, int data)
+        throws IOException
+    {
+        out.write((data >>> 8) & 0xFF);
+        out.write((data      ) & 0xFF);
+    }
+
+    private static final void writeShortArray(OutputStream out,
+                                              int type,
+                                              int[] array,
+                                              int off,
+                                              int size)   // exclusive
+        throws IOException
+    {
+        writeShort(out, type);
+        writeShort(out, size);
+        for (int i = off; i < size; i++) {
+            writeShort(out, array[off+i]);
+        }
+    }
+
+    public static final void writeSIZE(OutputStream out, int data)
+        throws IOException
+    {
+        out.write((data >>> 24) & 0xFF);
+        out.write((data >>> 16) & 0xFF);
+        out.write((data >>>  8) & 0xFF);
+        out.write((data       ) & 0xFF);
+    }
+
+    public static void writeINDEXC2B(OutputStream out, int[] indexC2B)
+        throws IOException
+    {
+        writeShort(out, MAP_INDEXC2B);
+        writeShort(out, indexC2B.length);
+        int off = 0;
+        for (int i = 0; i < indexC2B.length; i++) {
+            if (indexC2B[i] != 0) {
+                writeShort(out, off);
+                off += 256;
+            } else {
+                writeShort(out, -1);
+            }
+        }
+    }
+
+    public static void writeSINGLEBYTE(OutputStream out, int[] sb)
+        throws IOException
+    {
+        writeShortArray(out, MAP_SINGLEBYTE, sb, 0, 256);
+    }
+
+    private static void writeDOUBLEBYTE(OutputStream out,
+                                        int type,
+                                        int[] db,
+                                        int b1Min, int b1Max,
+                                        int b2Min, int b2Max)
+        throws IOException
+    {
+        writeShort(out, type);
+        writeShort(out, b1Min);
+        writeShort(out, b1Max);
+        writeShort(out, b2Min);
+        writeShort(out, b2Max);
+        writeShort(out, (b1Max - b1Min + 1) * (b2Max - b2Min + 1));
+
+        for (int b1 = b1Min; b1 <= b1Max; b1++) {
+            for (int b2 = b2Min; b2 <= b2Max; b2++) {
+                writeShort(out, db[b1 * 256 + b2]);
+            }
+        }
+    }
+    public static void writeDOUBLEBYTE1(OutputStream out,
+                                        int[] db,
+                                        int b1Min, int b1Max,
+                                        int b2Min, int b2Max)
+        throws IOException
+    {
+        writeDOUBLEBYTE(out, MAP_DOUBLEBYTE1, db, b1Min, b1Max, b2Min, b2Max);
+    }
+
+    public static void writeDOUBLEBYTE2(OutputStream out,
+                                        int[] db,
+                                        int b1Min, int b1Max,
+                                        int b2Min, int b2Max)
+        throws IOException
+    {
+        writeDOUBLEBYTE(out, MAP_DOUBLEBYTE2, db, b1Min, b1Max, b2Min, b2Max);
+    }
+
+    // the c2b table is output as well
+    public static void writeSUPPLEMENT(OutputStream out, Entry[] supp, int size)
+        throws IOException
+    {
+        writeShort(out, MAP_SUPPLEMENT);
+        writeShort(out, size * 2);
+        // db at first half, cc at the low half
+        for (int i = 0; i < size; i++) {
+            writeShort(out, supp[i].bs);
+        }
+        for (int i = 0; i < size; i++) {
+            writeShort(out, supp[i].cp);
+        }
+
+        //c2b
+        writeShort(out, MAP_SUPPLEMENT_C2B);
+        writeShort(out, size*2);
+        Arrays.sort(supp, 0, size, comparatorCP);
+        for (int i = 0; i < size; i++) {
+            writeShort(out, supp[i].cp);
+        }
+        for (int i = 0; i < size; i++) {
+            writeShort(out, supp[i].bs);
+        }
+    }
+
+    public static void writeCOMPOSITE(OutputStream out, Entry[] comp, int size)
+        throws IOException
+    {
+        writeShort(out, MAP_COMPOSITE);
+        writeShort(out, size*3);
+        // comp is sorted already
+        for (int i = 0; i < size; i++) {
+            writeShort(out, (char)comp[i].bs);
+            writeShort(out, (char)comp[i].cp);
+            writeShort(out, (char)comp[i].cp2);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/src/build/tools/charsetmapping/GenerateMapping.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package build.tools.charsetmapping;
+
+import java.io.*;
+import java.util.regex.*;
+import static build.tools.charsetmapping.CharsetMapping.*;
+
+public class GenerateMapping {
+    public static void main(String argv[]) throws IOException {
+        if (argv.length < 2) {
+            System.out.println("Usage: java GenCSData fMap fDat");
+            System.exit(1);
+        }
+        genDataJIS0213(new FileInputStream(argv[0]),
+                       new FileOutputStream(argv[1]));
+    }
+
+    // regex pattern to parse the "jis0213.map" file
+    static Pattern sjis0213 = Pattern.compile("0x(\\p{XDigit}++)\\s++U\\+(\\p{XDigit}++)(?:\\+(\\p{XDigit}++))?\\s++#.*");
+    private static void genDataJIS0213(InputStream in, OutputStream out)
+    {
+        int[] sb = new int[0x100];                         // singlebyte
+        int[] db = new int[0x10000];                       // doublebyte
+        int[] indexC2B = new int[256];
+        Entry[] supp = new Entry[0x10000];
+        Entry[] comp = new Entry[0x100];
+        int suppTotal = 0;
+        int compTotal = 0;
+
+        int b1Min1 = 0x81;
+        int b1Max1 = 0x9f;
+        int b1Min2 = 0xe0;
+        int b1Max2 = 0xfc;
+        int b2Min = 0x40;
+        int b2Max = 0xfe;
+
+        //init
+        for (int i = 0; i < 0x80; i++) sb[i] = i;
+        for (int i = 0x80; i < 0x100; i++) sb[i] = UNMAPPABLE_DECODING;
+        for (int i = 0; i < 0x10000; i++) db[i] = UNMAPPABLE_DECODING;
+        try {
+            Parser p = new Parser(in, sjis0213);
+            Entry  e = null;
+            while ((e = p.next()) != null) {
+                if (e.cp2 != 0) {
+                    comp[compTotal++] = e;
+                } else {
+                    if (e.cp <= 0xffff) {
+                        if (e.bs <= 0xff)
+                            sb[e.bs] = e.cp;
+                        else
+                            db[e.bs] = e.cp;
+                        indexC2B[e.cp>>8] = 1;
+                    } else {
+                        supp[suppTotal++] = e;
+                    }
+                }
+            }
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            // c2b Index Table, always the first one
+            writeINDEXC2B(baos, indexC2B);
+            writeSINGLEBYTE(baos, sb);
+            writeDOUBLEBYTE1(baos, db, b1Min1, b1Max1, b2Min, b2Max);
+            writeDOUBLEBYTE2(baos, db, b1Min2, b1Max2, b2Min, b2Max);
+            writeSUPPLEMENT(baos, supp, suppTotal);
+            writeCOMPOSITE(baos, comp, compTotal);
+            writeSIZE(out, baos.size());
+            baos.writeTo(out);
+            out.close();
+        } catch (Exception x) {
+            x.printStackTrace();
+        }
+    }
+}
--- a/jdk/src/share/bin/emessages.h	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/bin/emessages.h	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2008 Sun Microsystems, Inc.  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
@@ -50,7 +50,7 @@
 #define JAR_ERROR2      "Error: Unable to access jarfile %s"
 #define JAR_ERROR3      "Error: Invalid or corrupt jarfile %s"
 
-#define CLS_ERROR1      "Error: Could not find the main class.\n" JNI_ERROR
+#define CLS_ERROR1      "Error: Could not find the main class %s.\n" JNI_ERROR
 #define CLS_ERROR2      "Error: Failed to load Main Class: %s\n%s"
 #define CLS_ERROR3      "Error: No main method found in specified class.\n" GEN_ERROR
 #define CLS_ERROR4      "Error: Main method not public\n" GEN_ERROR
--- a/jdk/src/share/bin/java.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/bin/java.c	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1995-2008 Sun Microsystems, Inc.  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
@@ -414,7 +414,7 @@
         mainClass = LoadClass(env, classname);
         if(mainClass == NULL) { /* exception occured */
             ReportExceptionDescription(env);
-            ReportErrorMessage(CLS_ERROR1);
+            ReportErrorMessage(CLS_ERROR1, classname);
             goto leave;
         }
         (*env)->ReleaseStringUTFChars(env, mainClassName, classname);
@@ -433,7 +433,7 @@
       mainClass = LoadClass(env, classname);
       if(mainClass == NULL) { /* exception occured */
         ReportExceptionDescription(env);
-        ReportErrorMessage(CLS_ERROR1);
+        ReportErrorMessage(CLS_ERROR1, classname);
         goto leave;
       }
       (*env)->ReleaseStringUTFChars(env, mainClassName, classname);
--- a/jdk/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/inputmethods/internal/indicim/resources/DisplayNames.properties	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,6 @@
-#
-# Default Input method display names for Indic input methods
-#
-
-DisplayName.Devanagari  = Devanagari Input Method
+#
+# Default Input method display names for Indic input methods
+#
+
+DisplayName.Devanagari  = Devanagari Input Method
+
--- a/jdk/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/inputmethods/internal/thaiim/resources/DisplayNames.properties	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,6 @@
-#
-# Default Input method display names for Thai input methods
-#
-
-DisplayName.Thai     = Thai Input Method
+#
+# Default Input method display names for Thai input methods
+#
+
+DisplayName.Thai     = Thai Input Method
+
--- a/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Sun May 04 07:05:42 2008 -0700
@@ -34,8 +34,6 @@
 import java.util.HashSet;
 import java.util.WeakHashMap;
 import java.lang.ref.WeakReference;
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.security.AccessControlContext;
 import java.security.Permission;
 import java.security.ProtectionDomain;
@@ -51,7 +49,6 @@
 import javax.management.InstanceNotFoundException;
 import javax.management.IntrospectionException;
 import javax.management.InvalidAttributeValueException;
-import javax.management.JMException;
 import javax.management.JMRuntimeException;
 import javax.management.ListenerNotFoundException;
 import javax.management.MalformedObjectNameException;
@@ -84,11 +81,10 @@
 import com.sun.jmx.mbeanserver.DynamicMBean2;
 import com.sun.jmx.mbeanserver.ModifiableClassLoaderRepository;
 import com.sun.jmx.mbeanserver.MBeanInstantiator;
-import com.sun.jmx.mbeanserver.MXBeanSupport;
 import com.sun.jmx.mbeanserver.Repository;
 import com.sun.jmx.mbeanserver.NamedObject;
-import com.sun.jmx.defaults.ServiceName;
 import com.sun.jmx.mbeanserver.Introspector;
+import com.sun.jmx.mbeanserver.Util;
 import com.sun.jmx.remote.util.EnvHelp;
 
 /**
@@ -623,18 +619,9 @@
             List<String> result = new ArrayList<String>(domains.length);
             for (int i = 0; i < domains.length; i++) {
                 try {
-                    ObjectName domain = new ObjectName(domains[i] + ":x=x");
+                    ObjectName domain = Util.newObjectName(domains[i] + ":x=x");
                     checkMBeanPermission((String) null, null, domain, "getDomains");
                     result.add(domains[i]);
-                } catch (MalformedObjectNameException e) {
-                    // Should never occur... But let's log it just in case.
-                    if (MBEANSERVER_LOGGER.isLoggable(Level.SEVERE)) {
-                        MBEANSERVER_LOGGER.logp(Level.SEVERE,
-                                DefaultMBeanServerInterceptor.class.getName(),
-                                "getDomains",
-                                "Failed to check permission for domain = " +
-                                domains[i], e);
-                    }
                 } catch (SecurityException e) {
                     // OK: Do not add this domain to the list
                 }
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanAnalyzer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanAnalyzer.java	Sun May 04 07:05:42 2008 -0700
@@ -107,10 +107,7 @@
     private MBeanAnalyzer(Class<?> mbeanInterface,
             MBeanIntrospector<M> introspector)
             throws NotCompliantMBeanException {
-        if (!mbeanInterface.isInterface()) {
-            throw new NotCompliantMBeanException("Not an interface: " +
-                    mbeanInterface.getName());
-        }
+        introspector.checkCompliance(mbeanInterface);
 
         try {
             initMaps(mbeanInterface, introspector);
@@ -121,11 +118,10 @@
 
     // Introspect the mbeanInterface and initialize this object's maps.
     //
-    private void initMaps(Class<?> mbeanInterface,
+    private void initMaps(Class<?> mbeanType,
             MBeanIntrospector<M> introspector) throws Exception {
-        final Method[] methodArray = mbeanInterface.getMethods();
-
-        final List<Method> methods = eliminateCovariantMethods(methodArray);
+        final List<Method> methods1 = introspector.getMethods(mbeanType);
+        final List<Method> methods = eliminateCovariantMethods(methods1);
 
         /* Run through the methods to detect inconsistencies and to enable
            us to give getter and setter together to visitAttribute. */
@@ -234,13 +230,13 @@
        but existing code may depend on it and users may be used to seeing
        operations or attributes appear in a particular order.  */
     static List<Method>
-            eliminateCovariantMethods(Method[] methodArray) {
+            eliminateCovariantMethods(List<Method> startMethods) {
         // We are assuming that you never have very many methods with the
         // same name, so it is OK to use algorithms that are quadratic
         // in the number of methods with the same name.
 
-        final int len = methodArray.length;
-        final Method[] sorted = methodArray.clone();
+        final int len = startMethods.size();
+        final Method[] sorted = startMethods.toArray(new Method[len]);
         Arrays.sort(sorted,MethodOrder.instance);
         final Set<Method> overridden = newSet();
         for (int i=1;i<len;i++) {
@@ -259,7 +255,7 @@
             }
         }
 
-        final List<Method> methods = newList(Arrays.asList(methodArray));
+        final List<Method> methods = newList(startMethods);
         methods.removeAll(overridden);
         return methods;
     }
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java	Sun May 04 07:05:42 2008 -0700
@@ -34,6 +34,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
+import java.util.Arrays;
 import java.util.List;
 import java.util.WeakHashMap;
 
@@ -169,6 +170,19 @@
      */
     abstract Descriptor getMBeanDescriptor(Class<?> resourceClass);
 
+    void checkCompliance(Class<?> mbeanType) throws NotCompliantMBeanException {
+        if (!mbeanType.isInterface()) {
+            throw new NotCompliantMBeanException("Not an interface: " +
+                    mbeanType.getName());
+        }
+    }
+
+    /**
+     * Get the methods to be analyzed to build the MBean interface.
+     */
+    List<Method> getMethods(final Class<?> mbeanType) throws Exception {
+        return Arrays.asList(mbeanType.getMethods());
+    }
 
     final PerInterface<M> getPerInterface(Class<?> mbeanInterface)
     throws NotCompliantMBeanException {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/NotificationMBeanSupport.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.jmx.mbeanserver;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import javax.management.NotCompliantMBeanException;
+import javax.management.Notification;
+
+/**
+ * <p>A variant of {@code StandardMBeanSupport} where the only
+ * methods included are public getters.  This is used by
+ * {@code QueryNotificationFilter} to pretend that a Notification is
+ * an MBean so it can have a query evaluated on it.  Standard queries
+ * never set attributes or invoke methods but custom queries could and
+ * we don't want to allow that.  Also we don't want to fail if a
+ * Notification happens to have inconsistent types in a pair of getX and
+ * setX methods, and we want to include the Object.getClass() method.
+ */
+public class NotificationMBeanSupport extends StandardMBeanSupport {
+    public <T extends Notification> NotificationMBeanSupport(T n)
+            throws NotCompliantMBeanException {
+        super(n, Util.<Class<T>>cast(n.getClass()));
+    }
+
+    @Override
+    MBeanIntrospector<Method> getMBeanIntrospector() {
+        return introspector;
+    }
+
+    private static class Introspector extends StandardMBeanIntrospector {
+        @Override
+        void checkCompliance(Class<?> mbeanType) {}
+
+        @Override
+        List<Method> getMethods(final Class<?> mbeanType)
+                throws Exception {
+            List<Method> methods = new ArrayList<Method>();
+            for (Method m : mbeanType.getMethods()) {
+                String name = m.getName();
+                Class<?> ret = m.getReturnType();
+                if (m.getParameterTypes().length == 0) {
+                    if ((name.startsWith("is") && name.length() > 2 &&
+                            ret == boolean.class) ||
+                        (name.startsWith("get") && name.length() > 3 &&
+                            ret != void.class)) {
+                        methods.add(m);
+                    }
+                }
+            }
+            return methods;
+        }
+
+    }
+    private static final MBeanIntrospector<Method> introspector =
+            new Introspector();
+}
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java	Sun May 04 07:05:42 2008 -0700
@@ -438,7 +438,7 @@
                 c.getClassLoader() == null);
 
         final List<Method> methods =
-                MBeanAnalyzer.eliminateCovariantMethods(c.getMethods());
+                MBeanAnalyzer.eliminateCovariantMethods(Arrays.asList(c.getMethods()));
         final SortedMap<String,Method> getterMap = newSortedMap();
 
         /* Select public methods that look like "T getX()" or "boolean
@@ -1118,11 +1118,11 @@
             final Class<ConstructorProperties> propertyNamesClass = ConstructorProperties.class;
 
             Class targetClass = getTargetClass();
-            Constructor[] constrs = targetClass.getConstructors();
+            Constructor<?>[] constrs = targetClass.getConstructors();
 
             // Applicable if and only if there are any annotated constructors
-            List<Constructor> annotatedConstrList = newList();
-            for (Constructor constr : constrs) {
+            List<Constructor<?>> annotatedConstrList = newList();
+            for (Constructor<?> constr : constrs) {
                 if (Modifier.isPublic(constr.getModifiers())
                         && constr.getAnnotation(propertyNamesClass) != null)
                     annotatedConstrList.add(constr);
@@ -1152,7 +1152,7 @@
             // Also remember the set of properties in that constructor
             // so we can test unambiguity.
             Set<BitSet> getterIndexSets = newSet();
-            for (Constructor constr : annotatedConstrList) {
+            for (Constructor<?> constr : annotatedConstrList) {
                 String[] propertyNames =
                     constr.getAnnotation(propertyNamesClass).value();
 
@@ -1309,10 +1309,10 @@
         }
 
         private static class Constr {
-            final Constructor constructor;
+            final Constructor<?> constructor;
             final int[] paramIndexes;
             final BitSet presentParams;
-            Constr(Constructor constructor, int[] paramIndexes,
+            Constr(Constructor<?> constructor, int[] paramIndexes,
                    BitSet presentParams) {
                 this.constructor = constructor;
                 this.paramIndexes = paramIndexes;
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/Repository.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/Repository.java	Sun May 04 07:05:42 2008 -0700
@@ -415,17 +415,8 @@
         boolean to_default_domain = false;
 
         // Set domain to default if domain is empty and not already set
-        if (dom.length() == 0) {
-             try {
-                name = new ObjectName(domain + name.toString());
-            } catch (MalformedObjectNameException e) {
-                if (MBEANSERVER_LOGGER.isLoggable(Level.FINEST)) {
-                    MBEANSERVER_LOGGER.logp(Level.FINEST,
-                            Repository.class.getName(), "addMBean",
-                            "Unexpected MalformedObjectNameException", e);
-                }
-            }
-        }
+        if (dom.length() == 0)
+            name = Util.newObjectName(domain + name.toString());
 
         // Do we have default domain ?
         if (dom == domain) {
--- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/Util.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/Util.java	Sun May 04 07:05:42 2008 -0700
@@ -38,6 +38,8 @@
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
 
 public class Util {
     static <K, V> Map<K, V> newMap() {
@@ -85,6 +87,14 @@
         return new ArrayList<E>(c);
     }
 
+    public static ObjectName newObjectName(String s) {
+        try {
+            return new ObjectName(s);
+        } catch (MalformedObjectNameException e) {
+            throw new IllegalArgumentException(e);
+        }
+    }
+
     /* This method can be used by code that is deliberately violating the
      * allowed checked casts.  Rather than marking the whole method containing
      * the code with @SuppressWarnings, you can use a call to this method for
--- a/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -25,6 +25,8 @@
 
 package com.sun.management;
 
+import java.lang.management.PlatformManagedObject;
+
 /**
  * Diagnostic management interface for the HotSpot Virtual Machine.
  * The diagnostic MBean is registered to the platform MBeanServer
@@ -35,8 +37,13 @@
  * <blockquote>
  *    <tt>com.sun.management:type=HotSpotDiagnostic</tt>
  * </blockquote>
+.*
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  */
-public interface HotSpotDiagnosticMXBean {
+public interface HotSpotDiagnosticMXBean extends PlatformManagedObject {
     /**
      * Dumps the heap to the <tt>outputFile</tt> file in the same
      * format as the hprof heap dump.
--- a/jdk/src/share/classes/com/sun/management/package.html	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/management/package.html	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-CTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
 <head>
 <!--
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.dtd	Sun May 04 07:05:42 2008 -0700
@@ -1,73 +1,73 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
-
-<!ATTLIST Configuration  xmlns CDATA  #FIXED 'http://www.xmlsecurity.org/NS/#configuration' 
-target        CDATA  #IMPLIED>
-<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
-
-<!ATTLIST CanonicalizationMethods  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
-<!ELEMENT CanonicalizationMethod EMPTY>
-
-<!ATTLIST CanonicalizationMethod  URI       CDATA  #REQUIRED
-                                    JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
-
-<!ATTLIST TransformAlgorithms  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
-<!ELEMENT TransformAlgorithm EMPTY>
-
-<!ATTLIST TransformAlgorithm  URI       CDATA  #REQUIRED
-                                JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
-
-<!ELEMENT Providers (Provider+)>
-
-<!ELEMENT Provider EMPTY>
-
-<!ATTLIST Provider  Id          ID     #REQUIRED
-                      Class       CDATA  #REQUIRED
-                      Info        CDATA  #IMPLIED
-                      ProviderURL CDATA  #IMPLIED >
-<!ELEMENT Algorithms (Algorithm+)>
-
-<!ELEMENT Algorithm (ProviderAlgo+)>
-
-<!ATTLIST Algorithm  URI            CDATA  #REQUIRED
-                       Description    CDATA  #IMPLIED
-                       AlgorithmClass CDATA  #IMPLIED >
-<!ELEMENT ProviderAlgo EMPTY>
-
-<!ATTLIST ProviderAlgo  ProviderId IDREF  #REQUIRED
-                          JCEName    CDATA  #REQUIRED
-                          JCEAlias   CDATA  #IMPLIED >
-<!ELEMENT Log4J EMPTY>
-
-<!ATTLIST Log4J  configFile CDATA  'data/log4j.xml' >
-<!ELEMENT ResourceBundles (ResourceBundle+)>
-
-<!ATTLIST ResourceBundles  defaultLanguageCode CDATA  'de'
-                             defaultCountryCode  CDATA  'DE' >
-<!ELEMENT ResourceBundle EMPTY>
-
-<!ATTLIST ResourceBundle  LanguageCode CDATA  #REQUIRED
-                            CountryCode  CDATA  #REQUIRED
-                            LOCATION     CDATA  #REQUIRED >
-<!ELEMENT UnitTests (UnitTest+)>
-
-<!ATTLIST UnitTests  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
-<!ELEMENT ResourceResolvers (Resolver+)>
-
-<!ELEMENT Resolver EMPTY>
-
-<!ATTLIST Resolver  JAVACLASS   CDATA  #REQUIRED
-                      DESCRIPTION CDATA  #IMPLIED >
-<!ELEMENT KeyResolvers (KeyResolver+)>
-<!ATTLIST KeyResolvers  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
-
-<!ELEMENT KeyResolver EMPTY>
-
-<!ATTLIST KeyResolver  URI       CDATA  #REQUIRED
-                         JAVACLASS CDATA  #REQUIRED >
-<!ELEMENT UnitTest (#PCDATA)>
-
-<!ATTLIST UnitTest  JAVACLASS CDATA  #REQUIRED >
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
+
+<!ATTLIST Configuration  xmlns CDATA  #FIXED 'http://www.xmlsecurity.org/NS/#configuration' 
+target        CDATA  #IMPLIED>
+<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
+
+<!ATTLIST CanonicalizationMethods  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
+<!ELEMENT CanonicalizationMethod EMPTY>
+
+<!ATTLIST CanonicalizationMethod  URI       CDATA  #REQUIRED
+                                    JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
+
+<!ATTLIST TransformAlgorithms  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
+<!ELEMENT TransformAlgorithm EMPTY>
+
+<!ATTLIST TransformAlgorithm  URI       CDATA  #REQUIRED
+                                JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
+
+<!ELEMENT Providers (Provider+)>
+
+<!ELEMENT Provider EMPTY>
+
+<!ATTLIST Provider  Id          ID     #REQUIRED
+                      Class       CDATA  #REQUIRED
+                      Info        CDATA  #IMPLIED
+                      ProviderURL CDATA  #IMPLIED >
+<!ELEMENT Algorithms (Algorithm+)>
+
+<!ELEMENT Algorithm (ProviderAlgo+)>
+
+<!ATTLIST Algorithm  URI            CDATA  #REQUIRED
+                       Description    CDATA  #IMPLIED
+                       AlgorithmClass CDATA  #IMPLIED >
+<!ELEMENT ProviderAlgo EMPTY>
+
+<!ATTLIST ProviderAlgo  ProviderId IDREF  #REQUIRED
+                          JCEName    CDATA  #REQUIRED
+                          JCEAlias   CDATA  #IMPLIED >
+<!ELEMENT Log4J EMPTY>
+
+<!ATTLIST Log4J  configFile CDATA  'data/log4j.xml' >
+<!ELEMENT ResourceBundles (ResourceBundle+)>
+
+<!ATTLIST ResourceBundles  defaultLanguageCode CDATA  'de'
+                             defaultCountryCode  CDATA  'DE' >
+<!ELEMENT ResourceBundle EMPTY>
+
+<!ATTLIST ResourceBundle  LanguageCode CDATA  #REQUIRED
+                            CountryCode  CDATA  #REQUIRED
+                            LOCATION     CDATA  #REQUIRED >
+<!ELEMENT UnitTests (UnitTest+)>
+
+<!ATTLIST UnitTests  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
+<!ELEMENT ResourceResolvers (Resolver+)>
+
+<!ELEMENT Resolver EMPTY>
+
+<!ATTLIST Resolver  JAVACLASS   CDATA  #REQUIRED
+                      DESCRIPTION CDATA  #IMPLIED >
+<!ELEMENT KeyResolvers (KeyResolver+)>
+<!ATTLIST KeyResolvers  JAVACLASS CDATA  #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
+
+<!ELEMENT KeyResolver EMPTY>
+
+<!ATTLIST KeyResolver  URI       CDATA  #REQUIRED
+                         JAVACLASS CDATA  #REQUIRED >
+<!ELEMENT UnitTest (#PCDATA)>
+
+<!ATTLIST UnitTest  JAVACLASS CDATA  #REQUIRED >
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/config.xml	Sun May 04 07:05:42 2008 -0700
@@ -1,380 +1,380 @@
-<?xml version="1.0"?>
-<!--
-<!DOCTYPE Configuration SYSTEM "config.dtd">
--->
-<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
-<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
-   <CanonicalizationMethods>
-      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
-      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
-
-      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
-      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
-                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
-   </CanonicalizationMethods>
-   <TransformAlgorithms>
-      <!-- Base64 -->
-      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
-      <!-- c14n omitting comments -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
-      <!-- c14n with comments -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
-      <!-- exclusive c14n omitting comments -->
-      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
-      <!-- exclusive c14n with comments -->
-      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
-
-      <!-- XPath transform -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
-      <!-- enveloped signature -->
-      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
-      <!-- XSLT -->
-      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
-      <!-- XPath version 2 -->
-      <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
-      <!-- XPath version 2b -->
-      <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
-   </TransformAlgorithms>
-   <SignatureAlgorithms>
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
-      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
-
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
-
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
-      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
-                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
-   </SignatureAlgorithms>
-   <JCEAlgorithmMappings>
-      <Algorithms>
-         <!-- MessageDigest Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
-                    Description="MD5 message digest from RFC 1321"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="MD5"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
-                    Description="RIPEMD-160 message digest"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    JCEName="RIPEMD160"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
-                    Description="SHA-1 message digest"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="REQUIRED"
-                    JCEName="SHA-1"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
-                    Description="SHA-1 message digest with 256 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="RECOMMENDED"
-                    JCEName="SHA-256"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
-                    Description="SHA message digest with 384 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA-384"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
-                    Description="SHA-1 message digest with 512 bit"
-                    AlgorithmClass="MessageDigest"
-                    RequirementLevel="OPTIONAL"
-                    JCEName="SHA-512"/>
-
-         <!-- Signature Algorithms -->
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
-                    Description="Digital Signature Algorithm with SHA-1 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="REQUIRED"
-                    JCEName="SHA1withDSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
-                    Description="RSA Signature with MD5 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="MD5withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
-                    Description="RSA Signature with RIPEMD-160 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="RIPEMD160withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
-                    Description="RSA Signature with SHA-1 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="RECOMMENDED"
-                    JCEName="SHA1withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
-                    Description="RSA Signature with SHA-256 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA256withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
-                    Description="RSA Signature with SHA-384 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA384withRSA"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
-                    Description="RSA Signature with SHA-512 message digest"
-                    AlgorithmClass="Signature"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="SHA512withRSA"/>
-
-         <!-- MAC Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
-                    Description="Message Authentication code using MD5"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="NOT RECOMMENDED"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacMD5"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
-                    Description="Message Authentication code using RIPEMD-160"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HMACRIPEMD160"/>
-
-         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
-                    Description="Message Authentication code using SHA1"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="REQUIRED"
-                    JCEName="HmacSHA1"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
-                    Description="Message Authentication code using SHA-256"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA256"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
-                    Description="Message Authentication code using SHA-384"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA384"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
-                    Description="Message Authentication code using SHA-512"
-                    AlgorithmClass="Mac"
-                    RequirementLevel="OPTIONAL"
-                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
-                    JCEName="HmacSHA512"/>
-
-         <!-- Block encryption Algorithms -->
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
-                    Description="Block encryption using Triple-DES"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="192"
-                    RequiredKey="DESede"
-                    JCEName="DESede/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
-                    Description="Block encryption using AES with a key length of 128 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="128"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
-                    Description="Block encryption using AES with a key length of 192 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="OPTIONAL"
-                    KeyLength="192"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
-                    Description="Block encryption using AES with a key length of 256 bit"
-                    AlgorithmClass="BlockEncryption"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="256"
-                    RequiredKey="AES"
-                    JCEName="AES/CBC/ISO10126Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
-                    Description="Key Transport RSA-v1.5"
-                    AlgorithmClass="KeyTransport"
-                    RequirementLevel="REQUIRED"
-                    RequiredKey="RSA"
-                    JCEName="RSA/ECB/PKCS1Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
-                    Description="Key Transport RSA-OAEP"
-                    AlgorithmClass="KeyTransport"
-                    RequirementLevel="REQUIRED"
-                    RequiredKey="RSA"
-                    JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
-                    Description="Key Agreement Diffie-Hellman"
-                    AlgorithmClass="KeyAgreement"
-                    RequirementLevel="OPTIONAL"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
-                    Description="Symmetric Key Wrap using Triple DES"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="192"
-                    RequiredKey="DESede"
-                    JCEName="DESedeWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
-                    Description="Symmetric Key Wrap using AES with a key length of 128 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="128"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
-                    Description="Symmetric Key Wrap using AES with a key length of 192 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="OPTIONAL"
-                    KeyLength="192"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
-                    Description="Symmetric Key Wrap using AES with a key length of 256 bit"
-                    AlgorithmClass="SymmetricKeyWrap"
-                    RequirementLevel="REQUIRED"
-                    KeyLength="256"
-                    RequiredKey="AES"
-                    JCEName="AESWrap"/>
-
-      </Algorithms>
-   </JCEAlgorithmMappings>
-   <ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
-      <ResourceBundle LanguageCode="en"
-                      CountryCode="US"
-                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
-      <ResourceBundle LanguageCode="de"
-                      CountryCode="DE"
-                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
-   </ResourceBundles>
-   <ResourceResolvers>
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
-                DESCRIPTION="A simple resolver for requests to HTTP space" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
-                DESCRIPTION="A simple resolver for requests to the local file system" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
-                DESCRIPTION="A simple resolver for requests of same-document URIs" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
-                DESCRIPTION="A simple resolver for requests of XPointer fragents" />
-   </ResourceResolvers>
-   <!-- <defaultLocale languageCode="en" countryCode="US" /> -->
-   <KeyInfo>
-      <ContentHandler LOCALNAME="KeyName"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
-      <ContentHandler LOCALNAME="KeyValue"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
-      <ContentHandler LOCALNAME="RetrievalMethod"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
-      <ContentHandler LOCALNAME="X509Data"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
-      <ContentHandler LOCALNAME="PGPData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
-      <ContentHandler LOCALNAME="SPKIData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
-      <ContentHandler LOCALNAME="MgmtData"
-                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
-                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
-   </KeyInfo>
-   <KeyResolver>
-      <!-- This section contains a list of KeyResolvers that are available in
-           every KeyInfo object -->
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
-                DESCRIPTION="Can extract RSA public keys" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
-                DESCRIPTION="Can extract DSA public keys" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
-                DESCRIPTION="Can extract public keys from X509 certificates" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
-                DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
-                DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
-                DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
-      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
-                DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
-   </KeyResolver>
- 
-   <PrefixMappings>
-      <!-- Many classes create Elements which are in a specific namespace;
-           here, the prefixes for these namespaces are defined. But this
-           can also be overwritten using the ElementProxy#setDefaultPrefix()
-           method. You can even set all prefixes to "" so that the corresponding
-           elements are created using the default namespace -->
-      <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
-                     prefix="ds" />
-      <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
-                     prefix="xenc" />
-      <PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
-                     prefix="experimental" />
-      <PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
-                     prefix="dsig-xpath-old" />
-      <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
-                     prefix="dsig-xpath" />
-      <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
-                     prefix="ec" />
-      <PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
-                     prefix="xx" />
-   </PrefixMappings>
-</Configuration>
+<?xml version="1.0"?>
+<!--
+<!DOCTYPE Configuration SYSTEM "config.dtd">
+-->
+<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
+<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
+   <CanonicalizationMethods>
+      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
+      <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
+
+      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
+      <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+                              JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
+   </CanonicalizationMethods>
+   <TransformAlgorithms>
+      <!-- Base64 -->
+      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
+      <!-- c14n omitting comments -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
+      <!-- c14n with comments -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
+      <!-- exclusive c14n omitting comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
+      <!-- exclusive c14n with comments -->
+      <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
+
+      <!-- XPath transform -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
+      <!-- enveloped signature -->
+      <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
+      <!-- XSLT -->
+      <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
+      <!-- XPath version 2 -->
+      <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
+      <!-- XPath version 2b -->
+      <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
+   </TransformAlgorithms>
+   <SignatureAlgorithms>
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
+      <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
+
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
+
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
+      <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+                          JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
+   </SignatureAlgorithms>
+   <JCEAlgorithmMappings>
+      <Algorithms>
+         <!-- MessageDigest Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
+                    Description="MD5 message digest from RFC 1321"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="MD5"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
+                    Description="RIPEMD-160 message digest"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    JCEName="RIPEMD160"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
+                    Description="SHA-1 message digest"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="REQUIRED"
+                    JCEName="SHA-1"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
+                    Description="SHA-1 message digest with 256 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="RECOMMENDED"
+                    JCEName="SHA-256"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
+                    Description="SHA message digest with 384 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA-384"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
+                    Description="SHA-1 message digest with 512 bit"
+                    AlgorithmClass="MessageDigest"
+                    RequirementLevel="OPTIONAL"
+                    JCEName="SHA-512"/>
+
+         <!-- Signature Algorithms -->
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+                    Description="Digital Signature Algorithm with SHA-1 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="REQUIRED"
+                    JCEName="SHA1withDSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+                    Description="RSA Signature with MD5 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="MD5withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+                    Description="RSA Signature with RIPEMD-160 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="RIPEMD160withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+                    Description="RSA Signature with SHA-1 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="RECOMMENDED"
+                    JCEName="SHA1withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+                    Description="RSA Signature with SHA-256 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA256withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+                    Description="RSA Signature with SHA-384 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA384withRSA"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+                    Description="RSA Signature with SHA-512 message digest"
+                    AlgorithmClass="Signature"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="SHA512withRSA"/>
+
+         <!-- MAC Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+                    Description="Message Authentication code using MD5"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="NOT RECOMMENDED"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacMD5"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+                    Description="Message Authentication code using RIPEMD-160"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HMACRIPEMD160"/>
+
+         <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+                    Description="Message Authentication code using SHA1"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="REQUIRED"
+                    JCEName="HmacSHA1"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+                    Description="Message Authentication code using SHA-256"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA256"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+                    Description="Message Authentication code using SHA-384"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA384"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+                    Description="Message Authentication code using SHA-512"
+                    AlgorithmClass="Mac"
+                    RequirementLevel="OPTIONAL"
+                    SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+                    JCEName="HmacSHA512"/>
+
+         <!-- Block encryption Algorithms -->
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
+                    Description="Block encryption using Triple-DES"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="192"
+                    RequiredKey="DESede"
+                    JCEName="DESede/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
+                    Description="Block encryption using AES with a key length of 128 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="128"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
+                    Description="Block encryption using AES with a key length of 192 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="OPTIONAL"
+                    KeyLength="192"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+                    Description="Block encryption using AES with a key length of 256 bit"
+                    AlgorithmClass="BlockEncryption"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="256"
+                    RequiredKey="AES"
+                    JCEName="AES/CBC/ISO10126Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+                    Description="Key Transport RSA-v1.5"
+                    AlgorithmClass="KeyTransport"
+                    RequirementLevel="REQUIRED"
+                    RequiredKey="RSA"
+                    JCEName="RSA/ECB/PKCS1Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
+                    Description="Key Transport RSA-OAEP"
+                    AlgorithmClass="KeyTransport"
+                    RequirementLevel="REQUIRED"
+                    RequiredKey="RSA"
+                    JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
+                    Description="Key Agreement Diffie-Hellman"
+                    AlgorithmClass="KeyAgreement"
+                    RequirementLevel="OPTIONAL"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
+                    Description="Symmetric Key Wrap using Triple DES"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="192"
+                    RequiredKey="DESede"
+                    JCEName="DESedeWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
+                    Description="Symmetric Key Wrap using AES with a key length of 128 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="128"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
+                    Description="Symmetric Key Wrap using AES with a key length of 192 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="OPTIONAL"
+                    KeyLength="192"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+         <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
+                    Description="Symmetric Key Wrap using AES with a key length of 256 bit"
+                    AlgorithmClass="SymmetricKeyWrap"
+                    RequirementLevel="REQUIRED"
+                    KeyLength="256"
+                    RequiredKey="AES"
+                    JCEName="AESWrap"/>
+
+      </Algorithms>
+   </JCEAlgorithmMappings>
+   <ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
+      <ResourceBundle LanguageCode="en"
+                      CountryCode="US"
+                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
+      <ResourceBundle LanguageCode="de"
+                      CountryCode="DE"
+                      LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
+   </ResourceBundles>
+   <ResourceResolvers>
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
+                DESCRIPTION="A simple resolver for requests to HTTP space" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
+                DESCRIPTION="A simple resolver for requests to the local file system" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
+                DESCRIPTION="A simple resolver for requests of same-document URIs" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
+                DESCRIPTION="A simple resolver for requests of XPointer fragents" />
+   </ResourceResolvers>
+   <!-- <defaultLocale languageCode="en" countryCode="US" /> -->
+   <KeyInfo>
+      <ContentHandler LOCALNAME="KeyName"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
+      <ContentHandler LOCALNAME="KeyValue"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
+      <ContentHandler LOCALNAME="RetrievalMethod"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
+      <ContentHandler LOCALNAME="X509Data"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
+      <ContentHandler LOCALNAME="PGPData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
+      <ContentHandler LOCALNAME="SPKIData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
+      <ContentHandler LOCALNAME="MgmtData"
+                      NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+                      JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
+   </KeyInfo>
+   <KeyResolver>
+      <!-- This section contains a list of KeyResolvers that are available in
+           every KeyInfo object -->
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
+                DESCRIPTION="Can extract RSA public keys" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
+                DESCRIPTION="Can extract DSA public keys" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
+                DESCRIPTION="Can extract public keys from X509 certificates" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
+                DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
+                DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
+                DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
+      <Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
+                DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
+   </KeyResolver>
+ 
+   <PrefixMappings>
+      <!-- Many classes create Elements which are in a specific namespace;
+           here, the prefixes for these namespaces are defined. But this
+           can also be overwritten using the ElementProxy#setDefaultPrefix()
+           method. You can even set all prefixes to "" so that the corresponding
+           elements are created using the default namespace -->
+      <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
+                     prefix="ds" />
+      <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
+                     prefix="xenc" />
+      <PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
+                     prefix="experimental" />
+      <PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
+                     prefix="dsig-xpath-old" />
+      <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
+                     prefix="dsig-xpath" />
+      <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
+                     prefix="ec" />
+      <PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
+                     prefix="xx" />
+   </PrefixMappings>
+</Configuration>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd	Sun May 04 07:05:42 2008 -0700
@@ -1,347 +1,347 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
-<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
-	<xsd:element name="Any" type="AnyType"/>
-	<xsd:complexType name="AnyType" mixed="true">
-		<xsd:sequence>
-			<xsd:any namespace="##any"/>
-		</xsd:sequence>
-		<xsd:anyAttribute namespace="##any"/>
-	</xsd:complexType>
-	<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
-	<xsd:complexType name="ObjectIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="Identifier" type="IdentifierType"/>
-			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="IdentifierType">
-		<xsd:simpleContent>
-			<xsd:extension base="xsd:anyURI">
-				<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
-			</xsd:extension>
-		</xsd:simpleContent>
-	</xsd:complexType>
-	<xsd:simpleType name="QualifierType">
-		<xsd:restriction base="xsd:string">
-			<xsd:enumeration value="OIDAsURI"/>
-			<xsd:enumeration value="OIDAsURN"/>
-		</xsd:restriction>
-	</xsd:simpleType>
-	<xsd:complexType name="DocumentationReferencesType">
-		<xsd:sequence maxOccurs="unbounded">
-			<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
-	<xsd:complexType name="EncapsulatedPKIDataType">
-		<xsd:simpleContent>
-			<xsd:extension base="xsd:base64Binary">
-				<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-			</xsd:extension>
-		</xsd:simpleContent>
-	</xsd:complexType>
-	<xsd:element name="TimeStamp" type="TimeStampType"/>
-	<xsd:complexType name="TimeStampType">
-		<xsd:sequence>
-			<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
-			<xsd:choice>
-				<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
-				<xsd:element name="XMLTimeStamp" type="AnyType"/>
-			</xsd:choice>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="HashDataInfoType">
-		<xsd:sequence>
-			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
-	</xsd:complexType>
-	<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
-	<xsd:complexType name="QualifyingPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
-			<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
-	<xsd:complexType name="SignedPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
-			<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
-	<xsd:complexType name="UnsignedPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
-			<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
-	<xsd:complexType name="SignedSignaturePropertiesType">
-		<xsd:sequence>
-			<xsd:element name="SigningTime" type="xsd:dateTime"/>
-			<xsd:element name="SigningCertificate" type="CertIDListType"/>
-			<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
-			<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
-			<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
-	<xsd:complexType name="SignedDataObjectPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
-	<xsd:complexType name="UnsignedSignaturePropertiesType">
-		<xsd:sequence>
-			<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
-			<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
-			<xsd:choice>
-				<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-				<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-			</xsd:choice>
-			<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
-			<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
-			<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
-	<xsd:complexType name="UnsignedDataObjectPropertiesType">
-		<xsd:sequence>
-			<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
-	<xsd:complexType name="QualifyingPropertiesReferenceType">
-		<xsd:sequence>
-			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="SigningTime" type="xsd:dateTime"/>
-	<xsd:element name="SigningCertificate" type="CertIDListType"/>
-	<xsd:complexType name="CertIDListType">
-		<xsd:sequence>
-			<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CertIDType">
-		<xsd:sequence>
-			<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
-			<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="DigestAlgAndValueType">
-		<xsd:sequence>
-			<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
-			<xsd:element name="DigestValue" type="ds:DigestValueType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
-	<xsd:complexType name="SignaturePolicyIdentifierType">
-		<xsd:choice>
-			<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
-			<xsd:element name="SignaturePolicyImplied"/>
-		</xsd:choice>
-	</xsd:complexType>
-	<xsd:complexType name="SignaturePolicyIdType">
-		<xsd:sequence>
-			<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
-			<xsd:element ref="ds:Transforms" minOccurs="0"/>
-			<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
-			<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="SigPolicyQualifiersListType">
-		<xsd:sequence>
-			<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SPURI" type="xsd:anyURI"/>
-	<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
-	<xsd:complexType name="SPUserNoticeType">
-		<xsd:sequence>
-			<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
-			<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="NoticeReferenceType">
-		<xsd:sequence>
-			<xsd:element name="Organization" type="xsd:string"/>
-			<xsd:element name="NoticeNumbers" type="IntegerListType"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="IntegerListType">
-		<xsd:sequence>
-			<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="CounterSignature" type="CounterSignatureType"/>
-	<xsd:complexType name="CounterSignatureType">
-		<xsd:sequence>
-			<xsd:element ref="ds:Signature"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
-	<xsd:complexType name="DataObjectFormatType">
-		<xsd:sequence>
-			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
-			<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
-	</xsd:complexType>
-	<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
-	<xsd:complexType name="CommitmentTypeIndicationType">
-		<xsd:sequence>
-			<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
-			<xsd:choice>
-				<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
-				<xsd:element name="AllSignedDataObjects"/>
-			</xsd:choice>
-			<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CommitmentTypeQualifiersListType">
-		<xsd:sequence>
-			<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
-	<xsd:complexType name="SignatureProductionPlaceType">
-		<xsd:sequence>
-			<xsd:element name="City" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
-			<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SignerRole" type="SignerRoleType"/>
-	<xsd:complexType name="SignerRoleType">
-		<xsd:sequence>
-			<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
-			<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="ClaimedRolesListType">
-		<xsd:sequence>
-			<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CertifiedRolesListType">
-		<xsd:sequence>
-			<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
-	<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
-	<xsd:complexType name="CompleteCertificateRefsType">
-		<xsd:sequence>
-			<xsd:element name="CertRefs" type="CertIDListType"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
-	<xsd:complexType name="CompleteRevocationRefsType">
-		<xsd:sequence>
-			<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
-			<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
-			<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="CRLRefsType">
-		<xsd:sequence>
-			<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CRLRefType">
-		<xsd:sequence>
-			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
-			<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="CRLIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="Issuer" type="xsd:string"/>
-			<xsd:element name="IssueTime" type="xsd:dateTime"/>
-			<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPRefsType">
-		<xsd:sequence>
-			<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPRefType">
-		<xsd:sequence>
-			<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
-			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPIdentifierType">
-		<xsd:sequence>
-			<xsd:element name="ResponderID" type="xsd:string"/>
-			<xsd:element name="ProducedAt" type="xsd:dateTime"/>
-		</xsd:sequence>
-		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="OtherCertStatusRefsType">
-		<xsd:sequence>
-			<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
-	<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
-	<xsd:element name="CertificateValues" type="CertificateValuesType"/>
-	<xsd:complexType name="CertificateValuesType">
-		<xsd:choice minOccurs="0" maxOccurs="unbounded">
-			<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
-			<xsd:element name="OtherCertificate" type="AnyType"/>
-		</xsd:choice>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:element name="RevocationValues" type="RevocationValuesType"/>
-	<xsd:complexType name="RevocationValuesType">
-		<xsd:sequence>
-			<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
-			<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
-			<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
-		</xsd:sequence>
-		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
-	</xsd:complexType>
-	<xsd:complexType name="CRLValuesType">
-		<xsd:sequence>
-			<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OCSPValuesType">
-		<xsd:sequence>
-			<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:complexType name="OtherCertStatusValuesType">
-		<xsd:sequence>
-			<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
-		</xsd:sequence>
-	</xsd:complexType>
-	<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
+	<xsd:element name="Any" type="AnyType"/>
+	<xsd:complexType name="AnyType" mixed="true">
+		<xsd:sequence>
+			<xsd:any namespace="##any"/>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##any"/>
+	</xsd:complexType>
+	<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
+	<xsd:complexType name="ObjectIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="Identifier" type="IdentifierType"/>
+			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="IdentifierType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:anyURI">
+				<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:simpleType name="QualifierType">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="OIDAsURI"/>
+			<xsd:enumeration value="OIDAsURN"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:complexType name="DocumentationReferencesType">
+		<xsd:sequence maxOccurs="unbounded">
+			<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
+	<xsd:complexType name="EncapsulatedPKIDataType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:base64Binary">
+				<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:element name="TimeStamp" type="TimeStampType"/>
+	<xsd:complexType name="TimeStampType">
+		<xsd:sequence>
+			<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
+			<xsd:choice>
+				<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+				<xsd:element name="XMLTimeStamp" type="AnyType"/>
+			</xsd:choice>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="HashDataInfoType">
+		<xsd:sequence>
+			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
+	<xsd:complexType name="QualifyingPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
+			<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
+	<xsd:complexType name="SignedPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+			<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
+	<xsd:complexType name="UnsignedPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
+			<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+	<xsd:complexType name="SignedSignaturePropertiesType">
+		<xsd:sequence>
+			<xsd:element name="SigningTime" type="xsd:dateTime"/>
+			<xsd:element name="SigningCertificate" type="CertIDListType"/>
+			<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+			<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
+			<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
+	<xsd:complexType name="SignedDataObjectPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
+	<xsd:complexType name="UnsignedSignaturePropertiesType">
+		<xsd:sequence>
+			<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
+			<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
+			<xsd:choice>
+				<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+				<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+			</xsd:choice>
+			<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
+			<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
+			<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
+	<xsd:complexType name="UnsignedDataObjectPropertiesType">
+		<xsd:sequence>
+			<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
+	<xsd:complexType name="QualifyingPropertiesReferenceType">
+		<xsd:sequence>
+			<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="SigningTime" type="xsd:dateTime"/>
+	<xsd:element name="SigningCertificate" type="CertIDListType"/>
+	<xsd:complexType name="CertIDListType">
+		<xsd:sequence>
+			<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CertIDType">
+		<xsd:sequence>
+			<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
+			<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="DigestAlgAndValueType">
+		<xsd:sequence>
+			<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
+			<xsd:element name="DigestValue" type="ds:DigestValueType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+	<xsd:complexType name="SignaturePolicyIdentifierType">
+		<xsd:choice>
+			<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
+			<xsd:element name="SignaturePolicyImplied"/>
+		</xsd:choice>
+	</xsd:complexType>
+	<xsd:complexType name="SignaturePolicyIdType">
+		<xsd:sequence>
+			<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
+			<xsd:element ref="ds:Transforms" minOccurs="0"/>
+			<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
+			<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="SigPolicyQualifiersListType">
+		<xsd:sequence>
+			<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SPURI" type="xsd:anyURI"/>
+	<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
+	<xsd:complexType name="SPUserNoticeType">
+		<xsd:sequence>
+			<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
+			<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="NoticeReferenceType">
+		<xsd:sequence>
+			<xsd:element name="Organization" type="xsd:string"/>
+			<xsd:element name="NoticeNumbers" type="IntegerListType"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="IntegerListType">
+		<xsd:sequence>
+			<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="CounterSignature" type="CounterSignatureType"/>
+	<xsd:complexType name="CounterSignatureType">
+		<xsd:sequence>
+			<xsd:element ref="ds:Signature"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
+	<xsd:complexType name="DataObjectFormatType">
+		<xsd:sequence>
+			<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
+			<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
+	</xsd:complexType>
+	<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
+	<xsd:complexType name="CommitmentTypeIndicationType">
+		<xsd:sequence>
+			<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
+			<xsd:choice>
+				<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+				<xsd:element name="AllSignedDataObjects"/>
+			</xsd:choice>
+			<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CommitmentTypeQualifiersListType">
+		<xsd:sequence>
+			<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
+	<xsd:complexType name="SignatureProductionPlaceType">
+		<xsd:sequence>
+			<xsd:element name="City" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+			<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SignerRole" type="SignerRoleType"/>
+	<xsd:complexType name="SignerRoleType">
+		<xsd:sequence>
+			<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
+			<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="ClaimedRolesListType">
+		<xsd:sequence>
+			<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CertifiedRolesListType">
+		<xsd:sequence>
+			<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
+	<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+	<xsd:complexType name="CompleteCertificateRefsType">
+		<xsd:sequence>
+			<xsd:element name="CertRefs" type="CertIDListType"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+	<xsd:complexType name="CompleteRevocationRefsType">
+		<xsd:sequence>
+			<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
+			<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
+			<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="CRLRefsType">
+		<xsd:sequence>
+			<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CRLRefType">
+		<xsd:sequence>
+			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
+			<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="CRLIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="Issuer" type="xsd:string"/>
+			<xsd:element name="IssueTime" type="xsd:dateTime"/>
+			<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPRefsType">
+		<xsd:sequence>
+			<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPRefType">
+		<xsd:sequence>
+			<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
+			<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPIdentifierType">
+		<xsd:sequence>
+			<xsd:element name="ResponderID" type="xsd:string"/>
+			<xsd:element name="ProducedAt" type="xsd:dateTime"/>
+		</xsd:sequence>
+		<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="OtherCertStatusRefsType">
+		<xsd:sequence>
+			<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
+	<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
+	<xsd:element name="CertificateValues" type="CertificateValuesType"/>
+	<xsd:complexType name="CertificateValuesType">
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
+			<xsd:element name="OtherCertificate" type="AnyType"/>
+		</xsd:choice>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:element name="RevocationValues" type="RevocationValuesType"/>
+	<xsd:complexType name="RevocationValuesType">
+		<xsd:sequence>
+			<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
+			<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
+			<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
+		</xsd:sequence>
+		<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+	</xsd:complexType>
+	<xsd:complexType name="CRLValuesType">
+		<xsd:sequence>
+			<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OCSPValuesType">
+		<xsd:sequence>
+			<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="OtherCertStatusValuesType">
+		<xsd:sequence>
+			<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
+</xsd:schema>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/xmlsecurity_en.properties	Sun May 04 07:05:42 2008 -0700
@@ -1,123 +1,123 @@
-algorithm.alreadyRegistered = URI {0} already assigned to class {1}
-algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
-algorithm.ClassDoesNotExist = Class {0} does not exist
-algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
-algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
-algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
-algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
-algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
-algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
-algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
-algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
-algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
-algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
-attributeValueIllegal = The attribute {0} has value {1} but must be {2}
-c14n.Canonicalizer.Exception = Exception during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
-c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
-c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
-c14n.Canonicalizer.SAXException = SAXException during Canonicalization:  Original Message was {0}
-c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
-c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
-c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
-c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
-certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
-certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
-certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
-defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
-ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
-empty = {0}
-encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
-encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
-encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
-encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
-encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
-encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
-encryption.RSAOAEP.dataHashWrong = data hash wrong
-encryption.RSAOAEP.dataStartWrong = data wrong start {0}
-encryption.RSAOAEP.dataTooShort = data too short
-encryption.RSAPKCS15.blockTruncated = block truncated
-encryption.RSAPKCS15.noDataInBlock = no data in block
-encryption.RSAPKCS15.unknownBlockType = unknown block type
-encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
-endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
-errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
-errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
-errorMessages.IOException = Other file I/O and similar exceptions.
-errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
-errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
-errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
-errorMessages.NotYetImplementedException = Functionality not yet there.
-errorMessages.XMLSignatureException = Verification failed for some other reason.
-decoding.divisible.four = It should be divisible by four
-decoding.general = Error while decoding
-FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
-FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
-FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
-FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
-generic.dontHaveConstructionElement = I do not have a construction Element
-generic.EmptyMessage = {0}
-generic.NotYetImplemented = {0} Not YET implemented ;-((
-java.security.InvalidKeyException = Invalid key
-java.security.NoSuchProviderException = Unknown or unsupported provider
-java.security.UnknownKeyType = Unknown or unsupported key type {0}
-KeyInfo.needKeyResolver = More than one keyResovler have to be registered
-KeyInfo.nokey = Cannot get key from {0}
-KeyInfo.noKey = Cannot get the public key
-KeyInfo.wrongNumberOfObject = Need {0} keyObjects
-KeyInfo.wrongUse = This object was made for getting {0}
-keyResolver.alreadyRegistered = {1} class has already been registered for {0}
-KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
-KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
-KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
-KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
-KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
-KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
-KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
-KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
-KeyResoverSpiImpl.wrongKeyObject =  Need {1} type of KeyObject for generation Element in implement class{0}
-KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
-KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
-KeyStore.register = {1} type class register error  in class {0}
-KeyStore.registerStore.register = Registeration error for type {0}
-KeyValue.IllegalArgument = Cannot create a {0} from {1}
-namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
-notYetInitialized = The module {0} is not yet initialized
-prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
-signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
-signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
-signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
-signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
-signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
-signature.Transform.NotYetImplemented = Transform {0} not yet implemented
-signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
-signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
-signature.Transform.node = Current Node: {0}
-signature.Transform.nodeAndType = Current Node: {0}, type: {1} 
-signature.Util.BignumNonPositive = bigInteger.signum() must be positive
-signature.Util.NonTextNode = Not a text node
-signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
-signature.Verification.certificateError = Certificate error
-signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
-signature.Verification.internalError = Internal error
-signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
-signature.Verification.keyStore = KeyStore error
-signature.Verification.MissingID = Cannot resolve element with ID {0}
-signature.Verification.MissingResources = Cannot resolve external resource {0}
-signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
-signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
-signature.Verification.SignatureError = Signature error
-signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
-signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
-signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
-transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
-transform.init.NotInitialized =
-transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
-utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
-Base64Decoding = Error while decoding
-utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
-xml.WrongContent = Cannot find {0} in {1}
-xml.WrongElement = Cannot create a {0} from a {1} element
-xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
-xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}
+algorithm.alreadyRegistered = URI {0} already assigned to class {1}
+algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
+algorithm.ClassDoesNotExist = Class {0} does not exist
+algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
+algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
+algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
+algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
+algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
+algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
+algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
+algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
+algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
+algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
+attributeValueIllegal = The attribute {0} has value {1} but must be {2}
+c14n.Canonicalizer.Exception = Exception during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
+c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
+c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
+c14n.Canonicalizer.SAXException = SAXException during Canonicalization:  Original Message was {0}
+c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
+c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
+c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
+c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
+certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
+certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
+certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
+defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
+ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
+empty = {0}
+encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
+encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
+encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
+encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
+encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
+encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
+encryption.RSAOAEP.dataHashWrong = data hash wrong
+encryption.RSAOAEP.dataStartWrong = data wrong start {0}
+encryption.RSAOAEP.dataTooShort = data too short
+encryption.RSAPKCS15.blockTruncated = block truncated
+encryption.RSAPKCS15.noDataInBlock = no data in block
+encryption.RSAPKCS15.unknownBlockType = unknown block type
+encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
+endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
+errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
+errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
+errorMessages.IOException = Other file I/O and similar exceptions.
+errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
+errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
+errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
+errorMessages.NotYetImplementedException = Functionality not yet there.
+errorMessages.XMLSignatureException = Verification failed for some other reason.
+decoding.divisible.four = It should be divisible by four
+decoding.general = Error while decoding
+FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
+FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
+FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
+FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
+generic.dontHaveConstructionElement = I do not have a construction Element
+generic.EmptyMessage = {0}
+generic.NotYetImplemented = {0} Not YET implemented ;-((
+java.security.InvalidKeyException = Invalid key
+java.security.NoSuchProviderException = Unknown or unsupported provider
+java.security.UnknownKeyType = Unknown or unsupported key type {0}
+KeyInfo.needKeyResolver = More than one keyResovler have to be registered
+KeyInfo.nokey = Cannot get key from {0}
+KeyInfo.noKey = Cannot get the public key
+KeyInfo.wrongNumberOfObject = Need {0} keyObjects
+KeyInfo.wrongUse = This object was made for getting {0}
+keyResolver.alreadyRegistered = {1} class has already been registered for {0}
+KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
+KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
+KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
+KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
+KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
+KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
+KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
+KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
+KeyResoverSpiImpl.wrongKeyObject =  Need {1} type of KeyObject for generation Element in implement class{0}
+KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
+KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
+KeyStore.register = {1} type class register error  in class {0}
+KeyStore.registerStore.register = Registeration error for type {0}
+KeyValue.IllegalArgument = Cannot create a {0} from {1}
+namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
+notYetInitialized = The module {0} is not yet initialized
+prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
+signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
+signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
+signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
+signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
+signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
+signature.Transform.NotYetImplemented = Transform {0} not yet implemented
+signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
+signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
+signature.Transform.node = Current Node: {0}
+signature.Transform.nodeAndType = Current Node: {0}, type: {1} 
+signature.Util.BignumNonPositive = bigInteger.signum() must be positive
+signature.Util.NonTextNode = Not a text node
+signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
+signature.Verification.certificateError = Certificate error
+signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
+signature.Verification.internalError = Internal error
+signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
+signature.Verification.keyStore = KeyStore error
+signature.Verification.MissingID = Cannot resolve element with ID {0}
+signature.Verification.MissingResources = Cannot resolve external resource {0}
+signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
+signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
+signature.Verification.SignatureError = Signature error
+signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
+signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
+signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
+transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
+transform.init.NotInitialized =
+transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
+utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
+Base64Decoding = Error while decoding
+utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
+xml.WrongContent = Cannot find {0} in {1}
+xml.WrongElement = Cannot create a {0} from a {1} element
+xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
+xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/Probe.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing;
+
+/**
+ * The {@code Probe} interface represents a tracepoint.
+ *
+ * A {@code Probe} instance is obtained by calling the
+ * {@code Provider.getProbe()} method of a provider instance created by
+ * {@code ProviderFactory.createProvider()}.  A {@code Probe} can be used to
+ * trigger a probe manually (provided the correct arguments are passed to
+ * it), or to check a probe to see if anything is currently tracing it.
+ * <p>
+ * A tracing check can be used to avoid lengthy work that might be
+ * needed to set up the probe's arguments.  However, checking
+ * whether the probe is enabled generally takes the same amount of time
+ * as actually triggering the probe. So, you should only check a probe's status
+ * without triggering it if setting up the arguments is very expensive.
+ * <p>
+ * Users do not need to implement this interface: instances are
+ * created automatically by the system when a {@code Provider)} instance is
+ * created.
+ * <p>
+ * @since 1.7
+ */
+
+public interface Probe {
+    /**
+     * Checks whether there is an active trace of this probe.
+     *
+     * @return true if an active trace is detected.
+     */
+    boolean isEnabled();
+
+    /**
+     * Determines whether a tracepoint is enabled.
+     *
+     * Typically, users do not need to use this method. It is called
+     * automatically when a Provider's instance method is called. Calls to
+     * this method expect the arguments to match the declared parameters for
+     * the method associated with the probe.
+     *
+     * @param args the parameters to pass to the method.
+     * @throws IllegalArgumentException if the provided parameters do not
+     * match the method declaration for this probe.
+     */
+    void trigger(Object ... args);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/ProbeName.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * An annotation used to override the name of a probe.
+ * <p>
+ * This annotation can be added to a method in a user-defined {@code Provider}
+ * interface, to set the name that will be used for the generated probe
+ * associated with that method.  Without this annotation, the name will be the
+ * name of the method.
+ * <p>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface ProbeName {
+    String value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/Provider.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing;
+
+/**
+ * {@code Provider} is a superinterface for user-defined tracing providers.
+ * <p>
+ * To define tracepoints, users must extend this interface
+ * and then use a {@code ProviderFactory} to create an instance of the
+ * newly-defined interface.  Each method in the defined interface represents a
+ * tracepoint (or probe), which can be triggered by calling the associated
+ * method on the returned instance.
+ * <p>
+ * This interface also contains a {@code getProbe()} method, which can be
+ * used to get direct handles to the {@code Probe} objects themselves.
+ * {@code Probe} objects can be triggered manually, or they can be queried to
+ * check their state.
+ * <p>
+ * When an application has finished triggering probes, it should call
+ * {@code dispose()} to free up any system resources associated with the
+ * Provider.
+ * <p>
+ * All methods declared in a subclass of this interface should have a
+ * {@code void} return type. Methods can have parameters, and when called the
+ * values of the arguments will be passed to the tracing implementation.
+ * If any methods do not have a {@code void} return type, an
+ * {@code java.lang.IllegalArgumentException} will be thrown when the
+ * provider is registered.
+ * @since 1.7
+ */
+
+public interface Provider {
+    /**
+     * Retrieves a reference to a Probe object, which is used to check status
+     * or to trigger the probe manually.
+     *
+     * If the provided method parameter is not a method of the provider
+     * interface,  or if the provider interface has been disposed, then
+     * this returns null
+     *
+     * @param method a method declared in the provider.
+     * @return the specified probe represented by that method, or null.
+     */
+    Probe getProbe(java.lang.reflect.Method method);
+
+    /**
+     * Disposes system resources associated with this provider.
+     *
+     * After calling this method, triggering the probes will have no effect.
+     * Additional calls to this method after the first call are ignored.
+     */
+    void dispose();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/ProviderFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,110 @@
+
+package com.sun.tracing;
+
+import java.util.HashSet;
+import java.io.PrintStream;
+import java.lang.reflect.Field;
+import java.util.logging.Logger;
+
+import sun.tracing.NullProviderFactory;
+import sun.tracing.PrintStreamProviderFactory;
+import sun.tracing.MultiplexProviderFactory;
+import sun.tracing.dtrace.DTraceProviderFactory;
+
+/**
+ * {@code ProviderFactory} is a factory class used to create instances of
+ * providers.
+ *
+ * To enable tracing in an application, this class must be used to create
+ * instances of the provider interfaces defined by users.
+ * The system-defined factory is obtained by using the
+ * {@code getDefaultFactory()} static method.  The resulting instance can be
+ * used to create any number of providers.
+ *
+ * @since 1.7
+ */
+public abstract class ProviderFactory {
+
+    protected ProviderFactory() {}
+
+    /**
+     * Creates an implementation of a Provider interface.
+     *
+     * @param cls the provider interface to be defined.
+     * @return an implementation of {@code cls}, whose methods, when called,
+     * will trigger tracepoints in the application.
+     * @throws NullPointerException if cls is null
+     * @throws IllegalArgumentException if the class definition contains
+     * non-void methods
+     */
+    public abstract <T extends Provider> T createProvider(Class<T> cls);
+
+    /**
+     * Returns an implementation of a {@code ProviderFactory} which
+     * creates instances of Providers.
+     *
+     * The created Provider instances will be linked to all appropriate
+     * and enabled system-defined tracing mechanisms in the JDK.
+     *
+     * @return a {@code ProviderFactory} that is used to create Providers.
+     */
+    public static ProviderFactory getDefaultFactory() {
+        HashSet<ProviderFactory> factories = new HashSet<ProviderFactory>();
+
+        // Try to instantiate a DTraceProviderFactory
+        String prop = null;
+        try { prop = System.getProperty("com.sun.tracing.dtrace"); }
+        catch (java.security.AccessControlException e) {
+            Logger.getAnonymousLogger().fine(
+                "Cannot access property com.sun.tracing.dtrace");
+        }
+        if ( (prop == null || !prop.equals("disable")) &&
+             DTraceProviderFactory.isSupported() ) {
+            factories.add(new DTraceProviderFactory());
+        }
+
+        // Try to instantiate an output stream factory
+        try { prop = System.getProperty("sun.tracing.stream"); }
+        catch (java.security.AccessControlException e) {
+            Logger.getAnonymousLogger().fine(
+                "Cannot access property sun.tracing.stream");
+        }
+        if (prop != null) {
+            for (String spec : prop.split(",")) {
+                PrintStream ps = getPrintStreamFromSpec(spec);
+                if (ps != null) {
+                    factories.add(new PrintStreamProviderFactory(ps));
+                }
+            }
+        }
+
+        // See how many factories we instantiated, and return an appropriate
+        // factory that encapsulates that.
+        if (factories.size() == 0) {
+            return new NullProviderFactory();
+        } else if (factories.size() == 1) {
+            return factories.toArray(new ProviderFactory[1])[0];
+        } else {
+            return new MultiplexProviderFactory(factories);
+        }
+    }
+
+    private static PrintStream getPrintStreamFromSpec(String spec) {
+        try {
+            // spec is in the form of <class>.<field>, where <class> is
+            // a fully specified class name, and <field> is a static member
+            // in that class.  The <field> must be a 'PrintStream' or subtype
+            // in order to be used.
+            int fieldpos = spec.lastIndexOf('.');
+            Class<?> cls = Class.forName(spec.substring(0, fieldpos));
+            Field f = cls.getField(spec.substring(fieldpos + 1));
+            Class<?> fieldType = f.getType();
+            return (PrintStream)f.get(null);
+        } catch (Exception e) {
+            Logger.getAnonymousLogger().warning(
+                "Could not parse sun.tracing.stream property: " + e);
+        }
+        return null;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/ProviderName.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * An annotation used to specify the name of a provider.
+ * <p>
+ * This annotation can be added to a user-defined {@code Provider}
+ * interface, to set the name that will be used
+ * for the provider in the generated probes.  Without this annotation,
+ * the simple class name of the provider interface is used.
+ * <p>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface ProviderName {
+    String value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/ArgsAttributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+
+/**
+ * This annotation describes the interface attributes of the probe arguments in
+ * a single provider.
+ *
+ * This annotation can be added to a user-defined {@code Provider} specification
+ * interface to set the stability attributes of the probe arguments, for
+ * all the probes specified in that provider.
+ * <p>
+ * If this annotation is not present, the interface attributes for the
+ * arguments are Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE })
+public @interface ArgsAttributes {
+  Attributes value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/Attributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+
+/**
+ * This annotation describes the interface's field attributes
+ * for the probes in a provider.
+ *
+ * This annotation provides the contents of field-specific annotations
+ * that specify the stability attributes and dependency class of a
+ * particular field, for the probes in a provider.
+ * <p>
+ * The default interface attributes for unspecified fields is
+ * Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({})
+public @interface Attributes {
+  /**
+   * The stability level of the name.
+   */
+  StabilityLevel name() default StabilityLevel.PRIVATE;
+
+  /**
+   * The stability level of the data.
+   */
+  StabilityLevel data() default StabilityLevel.PRIVATE;
+
+  /**
+   * The interface attribute's dependency class.
+   */
+  DependencyClass dependency()  default DependencyClass.UNKNOWN;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/DependencyClass.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+/**
+ * Enumeration for the DTrace dependency classes.
+ *
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide for details, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+public enum DependencyClass {
+    /**
+     * The interface has an unknown set of architectural dependencies.
+     */
+    UNKNOWN  (0),
+    /**
+     * The interface is specific to the CPU model of the current system.
+     */
+    CPU      (1),
+    /**
+     * The interface is specific to the hardware platform of the current
+     * system.
+     */
+    PLATFORM (2),
+    /**
+     * The interface is specific to the hardware platform group of the
+     * current system.
+     */
+    GROUP    (3),
+    /**
+     * The interface is specific to the instruction set architecture (ISA)
+     * supported by the microprocessors on this system.
+     */
+    ISA      (4),
+    /**
+     * The interface is common to all Solaris systems regardless of the
+     * underlying hardware.
+     */
+    COMMON   (5);
+
+    public String toDisplayString() {
+        return toString().substring(0,1) +
+               toString().substring(1).toLowerCase();
+    }
+
+    public int getEncoding() { return encoding; }
+
+    private int encoding;
+
+    private DependencyClass(int encoding) {
+        this.encoding = encoding;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/FunctionAttributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * This annotation describes the interface attributes of the
+ * {@code function} field for a single provider.
+ *
+ * This annotation can be added to a user-defined {@code Provider} specification
+ * interface to set the stability attributes of the {@code function} field for
+ * all probes specified in that provider.
+ * <p>
+ * If this annotation is not present, the interface attributes for the
+ * {@code function} field are Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE })
+public @interface FunctionAttributes {
+    Attributes value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/FunctionName.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * An annotation used to specify the {@code function} field for a DTrace probe.
+ *
+ * This annotation can be added to a method in a user-defined Provider
+ * specification interface to set the {@code function} field that is used
+ * for the generated DTrace probe associated with that method.
+ * <p>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface FunctionName {
+    String value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/ModuleAttributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * This annotation is used to describe the interface attributes of the
+ * {@code module} field for a single provider.
+ *
+ * This annotation can be added to a user-defined Provider specification
+ * interface to set the stability attributes of the {@code module} field for
+ * all probes specified in that provider.
+ * <p>
+ * If this annotation is not present, the interface attributes for the
+ * {@code module} field is Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE })
+public @interface ModuleAttributes {
+    Attributes value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/ModuleName.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * An annotation used to specify the {@code module} field for a DTrace probe.
+ *
+ * This annotation can be added to a method in a user-defined Provider
+ * specification interface to set the {@code module} field that will be used
+ * for the generated DTrace probe associated with that method.
+ * <p>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface ModuleName {
+    String value();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/NameAttributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * This annotation describes the interface attributes of the
+ * {@code name} field for a single provider.
+ *
+ * This annotation can be added to a user-defined Provider specification
+ * interface to set the stability attributes of the {@code name} field for
+ * all probes specified in that provider.
+ * <p>
+ * If this annotation is not present, the interface attributes for the
+ * {@code name} field will be Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE })
+public @interface NameAttributes {
+    Attributes value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/ProviderAttributes.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.ElementType;
+
+/**
+ * This annotation is used to describe the interface attributes of the
+ * {@code provider} field for a single provider.
+ *
+ * This annotation can be added to a user-defined Provider specification
+ * interface to set the stability attributes of the {@code provider} field for
+ * all probes specified in that provider.
+ * <p>
+ * If this annotation is not present, the interface attributes for the
+ * {@code provider} field will be Private/Private/Unknown.
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE })
+public @interface ProviderAttributes {
+    Attributes value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/StabilityLevel.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package com.sun.tracing.dtrace;
+
+/**
+ * Enumeration for the DTrace stability levels.
+ *
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ * @since 1.7
+ */
+public enum StabilityLevel {
+    /**
+     * The interface is private to DTrace and represents an implementation
+     * detail of DTrace.
+     */
+    INTERNAL  (0),
+    /**
+     * The interface is private to Sun for use by other Sun products. It is
+     * not yet publicly documented for use by customers and ISVs.
+     */
+    PRIVATE  (1),
+    /**
+     * The interface is supported in the current release but is scheduled
+     * to be removed, most likely in a future minor release.
+     */
+    OBSOLETE (2),
+    /**
+     * The interface is controlled by an entity other than Sun.
+     */
+    EXTERNAL (3),
+    /**
+     * The interface gives developers early access to new or
+     * rapidly changing technology or to an implementation artifact that is
+     * essential for observing or debugging system behavior. A more
+     * stable solution is anticipated in the future.
+     */
+    UNSTABLE (4),
+    /**
+     * The interface might eventually become Standard or Stable but is
+     * still in transition.
+     */
+    EVOLVING (5),
+    /**
+     * The interface is a mature interface under Sun's control.
+     */
+    STABLE   (6),
+    /**
+     * The interface complies with an industry standard.
+     */
+    STANDARD (7);
+
+    String toDisplayString() {
+        return toString().substring(0,1) +
+               toString().substring(1).toLowerCase();
+    }
+
+    public int getEncoding() { return encoding; }
+
+    private int encoding;
+
+    private StabilityLevel(int encoding) {
+        this.encoding = encoding;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/dtrace/package-info.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+/**
+ * This package contains annotations and enumerations that are used to
+ * add DTrace-specific information to a tracing provider.
+ * <p>
+ * The DTrace-specific annotations modify the attributes of a DTrace provider
+ * implementation when it is used by the tracing subsystem.  The annotations are
+ * added to a {@code com.sun.tracing} provider specification to control
+ * specific attributes of the provider as it relates to DTrace.
+ * <p>
+ * Any other tracing subsystems supported by the system will ignore these
+ * annotations.
+ * <p>
+ * DTrace probes have additional fields and stability attributes that are
+ * not accounted for in the generic tracing package.  If unspecified, the
+ * default values are used for the stability and dependency attributes of
+ * probes, as well as for the module and field names of the generated probes.
+ * The values can be specified by adding the appropriate annotations to the
+ * provider specification.
+ * <p>
+ * The {@code FunctionName} annotation is used to annotate the tracepoint
+ * methods defined in the provider specification.  The value of this annotation
+ * is used as the {@code function} field in the generated DTrace probes. It
+ * is typically set to the name of the enclosing function where the
+ * tracepoint is triggered.
+ * <p>
+ * The {@code ModuleName} annotation is used to annotate the provider
+ * specification itself and applies to all the probes in the provider.  It
+ * sets the value of the {@code module} field in the generated DTrace probes.
+ * <p>
+ * The remaining annotations, are also applied to the provider itself, and
+ * are used to set the stability and dependency attributes of all probes in
+ * that provider.  Each probe field and the probe arguments can be
+ * independently assigned interface attributes to control the stability
+ * ratings of the probes.
+ * <p>
+ * Here is an example of how to declare a provider, specifying additional DTrace
+ * data:
+<PRE>
+    &#064;ProviderName("my_app_provider")
+    &#064;ModuleName("app.jar")
+    &#064;ProviderAttributes(&#064;Attributes={
+        name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
+        dependency=DependencyClass.COMMON})
+    &#064;ProbeAttributes(&#064;Attributes={
+        name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
+        dependency=DependencyClass.COMMON})
+    &#064;ModuleAttributes(&#064;Attributes={name=StabilityLevel.UNSTABLE})
+    public class MyProvider {
+        &#064;FunctionName("main") void startProbe();
+    }
+</PRE>
+ * <p>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlms?a=view">Solaris Dynamic Tracing Guide, Chapter 34: Statically Defined Tracing for User Applications</a>
+ * @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
+ */
+
+package com.sun.tracing.dtrace;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tracing/package-info.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+/**
+ * This package provides a mechanism for defining and
+ * inserting tracepoints into Java-technology based applications, which
+ * can then be monitored by the tracing tools available on the system.
+ * <p>
+ * To add tracepoints to a program, you must first decide where to place the
+ * tracepoints, what the logical names are for these points, what information
+ * will be available to the tracing mechanisms at each point, and decide upon
+ * any logical grouping.
+ * <p>
+ * You add instrumentation to a program in three steps:
+ * <ul>
+ * <li>First, declare tracepoints by creating interfaces to define
+ * them, and include these interfaces in the program definition.
+ * The declared interfaces are standard Java technology-based
+ * interfaces and are compiled with the program.</li>
+ * <li>Second, add code in the application to create an instance of the
+ * interface at some point during the initialization of the application,
+ * using a factory class provided by the system. The reference to the
+ * instance can be stored as a global static, or passed as context to all
+ * the places where it is needed.</li>
+ * <li>Finally, add the actual tracepoints to the desired locations in the
+ * application by inserting a call to one of the methods defined in the
+ * interface, via the factory-created reference.</li>
+ * </ul>
+ * <p>
+ * The method calls representing the tracepoints have no logical
+ * impact on the program.  The side effect of the call is that any
+ * activated tracing mechanisms will be notified that the tracepoint has
+ * been hit, and will take whatever actions are appropriate (for example,
+ * logging  the tracepoint, or triggering a DTrace probe, etc.).  In most
+ * cases, the impact on performance of adding tracepoints to the application
+ * will be minimal.
+ * <p>
+ * Each logical grouping of tracepoints should be defined in a common
+ * interface, called a <i>provider</i>.  An application can have one or many
+ * providers.  Each provider is independent and can be created whenever
+ * it is appropriate for that provider, for example, when a subsytem is
+ * initialized.  Providers should be disposed of when they are no longer
+ * needed, to free up any associated system resources.  Each tracepoint
+ * in a provider is represented by a method in that interface.  These methods
+ * are referred to as <i>probes</i>.  The method signature determines the probe
+ * parameters.  A call to the method with the specified parameters triggers
+ * the probe and makes its parameter values visible to any associated tracing
+ * mechanism.
+ * <p>
+ * User-defined interfaces which represent providers must extend the
+ * {@code Provider} interface.  To activate the system-defined
+ * tracing mechanisms, you must obtain an instance of the
+ * {@code ProviderFactory} class, and pass the class of the provider to
+ * the {@code createProvider()} method.  The returned instance is then used to
+ * trigger the probes later in the application.
+ * <p>
+ * In addition to triggering the probes, the provider instance can be used
+ * to obtain direct references to the {@code Probe} objects, which can be used
+ * directly for triggering, or can be queried to determine whether the probe is
+ * currently being traced.  The {@code Provider} interface also defines a
+ * {@code Provider.dispose()} method which is used to free up any resources
+ * that might be associated with that provider.
+ * <p>
+ * When a probe is triggered, any activated tracing system will be given
+ * the provider name, the probe name, and the values of the probe arguments.
+ * The tracing system is free to consume this data is whatever way is
+ * appropriate.
+ * By default, the provider name is the same as the class name of the interface
+ * that defines the provider. Similarly, the probe name is
+ * the name of the method that defines the probe. These default values
+ * can be over-ridden by annotations.  The provider definition can be
+ * annotated with the {@code @ProviderName} annotation, whose value will
+ * indicate the provider name that the tracing system will use.  Similarly,
+ * the {@code @ProbeName} annotation annotates a declared method and
+ * indicates the probe name that should be used in the place of the
+ * method name.  These annotations can be used to define providers and
+ * probes with the same name, in cases where the semantics of the Java language
+ * may prevent this.
+ * <p>
+ * Here is a very small and simple usage example:
+ * <p>
+ *
+<PRE>
+   import com.sun.tracing.Provider;
+   import com.sun.tracing.ProviderFactory;
+
+   interface MyProvider extends Provider {
+       void startProbe();
+       void finishProbe(int value);
+   }
+
+   public class MyApplication {
+       public static void main(String argv[]) {
+           ProviderFactory factory = ProviderFactory.getDefaultFactory();
+           MyProvider trace = factory.createProvider(MyProvider.class);
+
+           trace.startProbe();
+           int result = foo();
+           trace.finishProbe(result);
+
+           trace.dispose();
+       }
+   }
+</PRE>
+ * <p>
+ * The Java Development Kit (JDK) currently only includes one system-defined
+ * tracing framework: DTrace. DTrace is enabled automatically whenever an
+ * application is run on a system and a JDK release that supports it. When
+ * DTrace is enabled, probes are made available for listing and matching by
+ * DTrace scripts as soon as the provider is created. At the tracepoint, an
+ * associated DTrace script is informed of the creation of the provider, and
+ * it takes whatever action it is designed to take. Tracepoints in the
+ * program have the following DTrace probe names:<br>
+ *   {@code <provider><pid>:<module>:<function>:<probe>}
+ * Where:
+ * <ul>
+ * <li>{@code <provider>} the provider name as specified by the application</li>
+ * <li>{@code <pid>} the operating system process ID</li>
+ * <li>{@code <module>} undefined, unless specified by the application</li>
+ * <li>{@code <function>} undefined, unless specified by the application</li>
+ * <li>{@code <probe>} the probe name as specified by the application</li>
+ * </ul>
+ * <p>
+ * The {@code com.sun.tracing.dtrace} package contains additional
+ * annotations that can be used to control the names used for the
+ * <code>module</code> and <code>function</code> fields, as well as annotations
+ * that can be added to the provider to control probe stability and dependency
+ * attributes.
+ * <p>
+ * Integer, float and string probe parameters are made available to DTrace
+ * using
+ * the built-in argument variables, {@code arg0 ... arg_n}.  Integer-types
+ * are passed by value (boxed values are unboxed), floating-point types are
+ * passed as encoded integer
+ * arguments, and {@code java.lang.String} objects are converted
+ * to UTF8 strings, so they can be read into the DTrace script using the
+ * {@code copyinstr()} intrinsic.  Non-string and non-boxed primitive
+ * reference arguments are only
+ * placeholders and have no value.
+ * <p>
+ * Using the example above, with a theoretical process ID of 123, these are
+ * the probes that can be traced from DTrace:
+<PRE>
+    MyProvider123:::startProbe
+    MyProvider123:::finishProbe
+</PRE>
+ * When {@code finishProbe} executes, {@code arg0} will contain the
+ * value of {@code result}.
+ * <p>
+ * The DTrace tracing mechanism is enabled for all providers, apart from in the
+ * following circumstances:
+ * <ul>
+ * <li>DTrace is not supported on the underlying system.</li>
+ * <li>The property {@code com.sun.tracing.dtrace} is set to "disable".</li>
+ * <li>The RuntimePermission {@code com.sun.tracing.dtrace.createProvider}
+ * is denied to the process.</li>
+ * </ul>
+ * <p>
+ */
+
+package com.sun.tracing;
--- a/jdk/src/share/classes/java/beans/MetaData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/beans/MetaData.java	Sun May 04 07:05:42 2008 -0700
@@ -1553,7 +1553,7 @@
     private static String[] getConstructorProperties(Class type) {
         String[] names = null;
         int length = 0;
-        for (Constructor constructor : type.getConstructors()) {
+        for (Constructor<?> constructor : type.getConstructors()) {
             String[] value = getAnnotationValue(constructor);
             if ((value != null) && (length < value.length) && isValid(constructor, value)) {
                 names = value;
@@ -1563,14 +1563,14 @@
         return names;
     }
 
-    private static String[] getAnnotationValue(Constructor constructor) {
+    private static String[] getAnnotationValue(Constructor<?> constructor) {
         ConstructorProperties annotation = constructor.getAnnotation(ConstructorProperties.class);
         return (annotation != null)
                 ? annotation.value()
                 : null;
     }
 
-    private static boolean isValid(Constructor constructor, String[] names) {
+    private static boolean isValid(Constructor<?> constructor, String[] names) {
         Class[] parameters = constructor.getParameterTypes();
         if (names.length != parameters.length) {
             return false;
--- a/jdk/src/share/classes/java/lang/instrument/Instrumentation.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/instrument/Instrumentation.java	Sun May 04 07:05:42 2008 -0700
@@ -636,7 +636,11 @@
      * @param   transformer
      *          The ClassFileTransformer which wraps using this prefix.
      * @param   prefix
-     *          The prefix which has been applied to wrapped native methods.
+     *          The prefix to apply to wrapped native methods when
+     *          retrying a failed native method resolution. If prefix
+     *          is either <code>null</code> or the empty string, then
+     *          failed native method resolutions are not retried for
+     *          this transformer.
      * @throws java.lang.NullPointerException if passed a <code>null</code> transformer.
      * @throws java.lang.UnsupportedOperationException if the current configuration of
      *           the JVM does not allow setting a native method prefix
--- a/jdk/src/share/classes/java/lang/management/ClassLoadingMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/ClassLoadingMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -35,7 +35,7 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getClassLoadingMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform <tt>MBeanServer</tt>}.
  *
  * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
  * the class loading system within an <tt>MBeanServer</tt> is:
@@ -44,6 +44,10 @@
  *        <tt>java.lang:type=ClassLoading</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -52,7 +56,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface ClassLoadingMXBean {
+public interface ClassLoadingMXBean extends PlatformManagedObject {
 
     /**
      * Returns the total number of classes that have been loaded since
--- a/jdk/src/share/classes/java/lang/management/CompilationMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/CompilationMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -44,6 +44,10 @@
  *         <tt>java.lang:type=Compilation</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -52,7 +56,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface CompilationMXBean {
+public interface CompilationMXBean extends PlatformManagedObject {
     /**
      * Returns the name of the Just-in-time (JIT) compiler.
      *
--- a/jdk/src/share/classes/java/lang/management/GarbageCollectorMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/GarbageCollectorMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -48,9 +48,13 @@
  *    <tt>java.lang:type=GarbageCollector</tt>}<tt>,name=</tt><i>collector's name</i>
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * A platform usually includes additional platform-dependent information
  * specific to a garbage collection algorithm for monitoring.
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see MemoryMXBean
  *
  * @see <a href="../../../javax/management/package-summary.html">
--- a/jdk/src/share/classes/java/lang/management/ManagementFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/ManagementFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -24,17 +24,31 @@
  */
 
 package java.lang.management;
+import javax.management.DynamicMBean;
 import javax.management.MBeanServer;
 import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerFactory;
 import javax.management.MBeanServerPermission;
+import javax.management.NotificationEmitter;
+import javax.management.ObjectInstance;
 import javax.management.ObjectName;
+import javax.management.InstanceAlreadyExistsException;
 import javax.management.InstanceNotFoundException;
 import javax.management.MalformedObjectNameException;
+import javax.management.MBeanRegistrationException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.StandardEmitterMBean;
+import javax.management.StandardMBean;
+import java.util.Collections;
+import java.util.ArrayList;
 import java.util.List;
 import java.security.AccessController;
 import java.security.Permission;
 import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import javax.management.JMX;
+import sun.management.ManagementFactoryHelper;
 
 /**
  * The <tt>ManagementFactory</tt> class is a factory class for getting
@@ -49,13 +63,16 @@
  * <ul>
  * <li><i>Direct access to an MXBean interface</i>
  *     <ol type="a">
- *     <li>Get the MXBean instance through the static factory method
+ *     <li>Get the MXBean instance through the static factory method,
+ *         or the {@link #getPlatformMXBeans(Class)} method
  *         and access the MXBean locally of the running
  *         virtual machine.
  *         </li>
  *     <li>Construct an MXBean proxy instance that forwards the
  *         method calls to a given {@link MBeanServer MBeanServer} by calling
- *         {@link #newPlatformMXBeanProxy newPlatfromMXBeanProxy}.
+ *         the {@link #newPlatformMXBeanProxy newPlatformMXBeanProxy} method
+ *         or the {@link #getPlatformMXBeans(MBeanServerConnection, Class)}
+ *         method.
  *         A proxy is typically constructed to remotely access
  *         an MXBean of another running virtual machine.
  *         </li>
@@ -83,6 +100,10 @@
  * a set of basic data types described below.
  * See <a href="../../../javax/management/MXBean.html#MXBean-spec">
  * the specification of MXBeans</a> for details.
+ * All platform MXBean interfaces extend {@link PlatformManagedObject}s
+ * and new methods may be added in these interfaces
+ * in future Java SE releases.
+ * <p>
  * A JMX management application and the platform <tt>MBeanServer</tt>
  * can interoperate without requiring classes for MXBean specific
  * data types.
@@ -191,7 +212,10 @@
  * <h4><a name="MXBeanNames">MXBean Names</a></h4>
  * Each platform MXBean for a Java virtual machine has a unique
  * {@link javax.management.ObjectName ObjectName} for
- * registration in the platform <tt>MBeanServer</tt>.
+ * registration in the platform <tt>MBeanServer</tt> that can
+ * be obtained by calling the {@link PlatformManagedObject#getObjectName}
+ * method.
+ *
  * A Java virtual machine has a single instance of the following management
  * interfaces:
  *
@@ -275,7 +299,7 @@
  * </blockquote>
  *
  * @see <a href="../../../javax/management/package-summary.html">
- *      JMX Specification.</a>
+ *      JMX Specification</a>
  * @see <a href="package-summary.html#examples">
  *      Ways to Access Management Metrics</a>
  * @see java.util.logging.LoggingMXBean
@@ -368,7 +392,7 @@
      * the Java virtual machine.
      */
     public static ClassLoadingMXBean getClassLoadingMXBean() {
-        return sun.management.ManagementFactory.getClassLoadingMXBean();
+        return ManagementFactoryHelper.getClassLoadingMXBean();
     }
 
     /**
@@ -378,7 +402,7 @@
      * @return a {@link MemoryMXBean} object for the Java virtual machine.
      */
     public static MemoryMXBean getMemoryMXBean() {
-        return sun.management.ManagementFactory.getMemoryMXBean();
+        return ManagementFactoryHelper.getMemoryMXBean();
     }
 
     /**
@@ -388,7 +412,7 @@
      * @return a {@link ThreadMXBean} object for the Java virtual machine.
      */
     public static ThreadMXBean getThreadMXBean() {
-        return sun.management.ManagementFactory.getThreadMXBean();
+        return ManagementFactoryHelper.getThreadMXBean();
     }
 
     /**
@@ -399,7 +423,7 @@
 
      */
     public static RuntimeMXBean getRuntimeMXBean() {
-        return sun.management.ManagementFactory.getRuntimeMXBean();
+        return ManagementFactoryHelper.getRuntimeMXBean();
     }
 
     /**
@@ -412,7 +436,7 @@
      *   no compilation system.
      */
     public static CompilationMXBean getCompilationMXBean() {
-        return sun.management.ManagementFactory.getCompilationMXBean();
+        return ManagementFactoryHelper.getCompilationMXBean();
     }
 
     /**
@@ -423,7 +447,7 @@
      * the Java virtual machine.
      */
     public static OperatingSystemMXBean getOperatingSystemMXBean() {
-        return sun.management.ManagementFactory.getOperatingSystemMXBean();
+        return ManagementFactoryHelper.getOperatingSystemMXBean();
     }
 
     /**
@@ -436,7 +460,7 @@
      *
      */
     public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
-        return sun.management.ManagementFactory.getMemoryPoolMXBeans();
+        return ManagementFactoryHelper.getMemoryPoolMXBeans();
     }
 
     /**
@@ -449,7 +473,7 @@
      *
      */
     public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
-        return sun.management.ManagementFactory.getMemoryManagerMXBeans();
+        return ManagementFactoryHelper.getMemoryManagerMXBeans();
     }
 
 
@@ -465,7 +489,7 @@
      *
      */
     public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
-        return sun.management.ManagementFactory.getGarbageCollectorMXBeans();
+        return ManagementFactoryHelper.getGarbageCollectorMXBeans();
     }
 
     private static MBeanServer platformMBeanServer;
@@ -518,8 +542,25 @@
         }
 
         if (platformMBeanServer == null) {
-            platformMBeanServer =
-                sun.management.ManagementFactory.createPlatformMBeanServer();
+            platformMBeanServer = MBeanServerFactory.createMBeanServer();
+            for (PlatformComponent pc : PlatformComponent.values()) {
+                List<? extends PlatformManagedObject> list =
+                    pc.getMXBeans(pc.getMXBeanInterface());
+                for (PlatformManagedObject o : list) {
+                    // Each PlatformComponent represents one management
+                    // interface. Some MXBean may extend another one.
+                    // The MXBean instances for one platform component
+                    // (returned by pc.getMXBeans()) might be also
+                    // the MXBean instances for another platform component.
+                    // e.g. com.sun.management.GarbageCollectorMXBean
+                    //
+                    // So need to check if an MXBean instance is registered
+                    // before registering into the platform MBeanServer
+                    if (!platformMBeanServer.isRegistered(o.getObjectName())) {
+                        addMXBean(platformMBeanServer, o);
+                    }
+                }
+            }
         }
         return platformMBeanServer;
     }
@@ -657,6 +698,136 @@
         }
     }
 
+    /**
+     * Returns the list of platform MXBeans that implement
+     * the given {@code mxbeanInterface} in the running Java
+     * virtual machine.
+     * The returned list may contain zero, one, or more instances.
+     * The number of instances in the returned list is defined
+     * in the specification of the given management interface.
+     *
+     * @param mxbeanInterface a management interface for a platform
+     *                        MXBean
+     *
+     * @return the list of platform MXBeans that implements
+     * {@code mxbeanInterface}.
+     *
+     * @throws IllegalArgumentException if {@code mxbeanInterface}
+     * is not a management interface for the platform.
+     *
+     * @since 1.7
+     */
+    public static <T extends PlatformManagedObject> List<T>
+            getPlatformMXBeans(Class<T> mxbeanInterface) {
+        String className = mxbeanInterface.getName();
+        for (PlatformComponent component: PlatformComponent.values()) {
+            // comparing the class name first instead of the Class instance
+            // to avoid causing unnecessary class loading of
+            // the other MXBean interfaces
+            if (className.equals(component.getMXBeanInterfaceName())) {
+                if (component.getMXBeanInterface() == mxbeanInterface) {
+                    return component.getMXBeans(mxbeanInterface);
+                }
+            }
+        }
+        throw new IllegalArgumentException(mxbeanInterface.getName() +
+            " is not implemented by any of the platform MXBeans.");
+    }
+
+    /**
+     * Returns the list of the platform MXBean proxies for
+     * forwarding the method calls of the {@code mxbeanInterface}
+     * through the given {@code MBeanServerConnection}.
+     * The returned list may contain zero, one, or more instances.
+     * The number of instances in the returned list is defined
+     * in the specification of the given management interface.
+     *
+     * @param connection the {@code MBeanServerConnection} to forward to.
+     * @param mxbeanInterface a management interface for a platform
+     *                        MXBean
+     *
+     * @return the list of platform MXBean proxies for
+     * forwarding the method calls of the {@code mxbeanInterface}
+     * through the given {@code MBeanServerConnection}.
+     *
+     * @throws IllegalArgumentException if {@code mxbeanInterface}
+     * is not a management interface for the platform.
+     *
+     * @throws java.io.IOException if a communication problem
+     * occurred when accessing the {@code MBeanServerConnection}.
+     *
+     * @since 1.7
+     */
+    public static <T extends PlatformManagedObject>
+        List<T> getPlatformMXBeans(MBeanServerConnection connection,
+                                   Class<T> mxbeanInterface)
+        throws java.io.IOException
+    {
+        String className = mxbeanInterface.getName();
+        for (PlatformComponent component: PlatformComponent.values()) {
+            // comparing the class name first instead of the Class instance
+            // to avoid causing unnecessary class loading of
+            // the other MXBean interfaces
+            if (className.equals(component.getMXBeanInterfaceName())) {
+                if (component.getMXBeanInterface() == mxbeanInterface) {
+                    return component.getMXBeans(connection,
+                                                mxbeanInterface);
+                }
+            }
+        }
+        throw new IllegalArgumentException(mxbeanInterface.getName() +
+            " is not implemented by any of the platform MXBeans.");
+    }
+
+    /**
+     * Returns a list of {@code Class} objects, subinterface of
+     * {@link PlatformManagedObject}, representing
+     * all management interfaces for
+     * monitoring and managing the Java platform.
+     *
+     * @return a list of {@code Class} objects, subinterface of
+     * {@link PlatformManagedObject} representing
+     * the management interfaces for
+     * monitoring and managing the Java platform.
+     *
+     * @since 1.7
+     */
+    public static List<Class<? extends PlatformManagedObject>> getAllPlatformMXBeanInterfaces() {
+        List<Class<? extends PlatformManagedObject>> result =
+            new ArrayList<Class<? extends PlatformManagedObject>>();
+        for (PlatformComponent component: PlatformComponent.values()) {
+            result.add(component.getMXBeanInterface());
+        }
+        return result;
+    }
+
     private static final String NOTIF_EMITTER =
         "javax.management.NotificationEmitter";
+
+    /**
+     * Registers an MXBean.
+     */
+    private static void addMXBean(final MBeanServer mbs, final PlatformManagedObject pmo) {
+        // Make DynamicMBean out of MXBean by wrapping it with a StandardMBean
+        final DynamicMBean dmbean;
+        if (pmo instanceof NotificationEmitter) {
+            dmbean = new StandardEmitterMBean(pmo, null, true, (NotificationEmitter) pmo);
+        } else {
+            dmbean = new StandardMBean(pmo, null, true);
+        }
+
+        try {
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+                public Void run() throws InstanceAlreadyExistsException,
+                                         MBeanRegistrationException,
+                                         NotCompliantMBeanException {
+                    mbs.registerMBean(dmbean, pmo.getObjectName());
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw new RuntimeException(e.getException());
+        }
+    }
+
 }
--- a/jdk/src/share/classes/java/lang/management/MemoryMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/MemoryMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -46,6 +46,9 @@
  *           <tt>java.lang:type=Memory</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * <h4> Memory </h4>
  * The memory system of the Java virtual machine manages
  * the following kinds of memory:
@@ -190,6 +193,7 @@
  * emitter.addNotificationListener(listener, null, null);
  * </pre></blockquote>
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -198,7 +202,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface MemoryMXBean {
+public interface MemoryMXBean extends PlatformManagedObject {
     /**
      * Returns the approximate number of objects for which
      * finalization is pending.
--- a/jdk/src/share/classes/java/lang/management/MemoryManagerMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/MemoryManagerMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -45,6 +45,10 @@
  *    <tt>java.lang:type=MemoryManager</tt>}<tt>,name=</tt><i>manager's name</i>
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see MemoryMXBean
  *
  * @see <a href="../../../javax/management/package-summary.html">
@@ -55,7 +59,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface MemoryManagerMXBean {
+public interface MemoryManagerMXBean extends PlatformManagedObject {
     /**
      * Returns the name representing this memory manager.
      *
--- a/jdk/src/share/classes/java/lang/management/MemoryPoolMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/MemoryPoolMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -46,6 +46,9 @@
  *    <tt>java.lang:type=MemoryPool</tt>}<tt>,name=</tt><i>pool's name</i>
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * <h4>Memory Type</h4>
  * <p>The Java virtual machine has a heap for object allocation and also
  * maintains non-heap memory for the method area and the Java virtual
@@ -349,6 +352,7 @@
  * described above for the <a href="#UsageThreshold">usage threshold</a>
  * in a similar fashion.
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -357,7 +361,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface MemoryPoolMXBean {
+public interface MemoryPoolMXBean extends PlatformManagedObject {
     /**
      * Returns the name representing this memory pool.
      *
--- a/jdk/src/share/classes/java/lang/management/OperatingSystemMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/OperatingSystemMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -44,10 +44,14 @@
  *      <tt>java.lang:type=OperatingSystem</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * <p> This interface defines several convenient methods for accessing
  * system properties about the operating system on which the Java
  * virtual machine is running.
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -56,7 +60,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface OperatingSystemMXBean {
+public interface OperatingSystemMXBean extends PlatformManagedObject {
     /**
      * Returns the operating system name.
      * This method is equivalent to <tt>System.getProperty("os.name")</tt>.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/lang/management/PlatformComponent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,382 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang.management;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.LoggingMXBean;
+import java.util.logging.LogManager;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import com.sun.management.HotSpotDiagnosticMXBean;
+import com.sun.management.UnixOperatingSystemMXBean;
+
+import sun.management.ManagementFactoryHelper;
+
+/**
+ * This enum class defines the list of platform components
+ * that provides monitoring and management support.
+ * Each enum represents one MXBean interface. A MXBean
+ * instance could implement one or more MXBean interfaces.
+ *
+ * For example, com.sun.management.GarbageCollectorMXBean
+ * extends java.lang.management.GarbageCollectorMXBean
+ * and there is one set of garbage collection MXBean instances,
+ * each of which implements both c.s.m. and j.l.m. interfaces.
+ * There are two separate enums GARBAGE_COLLECTOR
+ * and SUN_GARBAGE_COLLECTOR so that ManagementFactory.getPlatformMXBeans(Class)
+ * will return the list of MXBeans of the specified type.
+ *
+ * To add a new MXBean interface for the Java platform,
+ * add a new enum constant and implement the MXBeanFetcher.
+ */
+enum PlatformComponent {
+
+    /**
+     * Class loading system of the Java virtual machine.
+     */
+    CLASS_LOADING(
+        "java.lang.management.ClassLoadingMXBean",
+        "java.lang", "ClassLoading", defaultKeyProperties(),
+        new MXBeanFetcher<ClassLoadingMXBean>() {
+            public List<ClassLoadingMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getClassLoadingMXBean());
+            }
+        }),
+
+    /**
+     * Compilation system of the Java virtual machine.
+     */
+    COMPILATION(
+        "java.lang.management.CompilationMXBean",
+        "java.lang", "Compilation", defaultKeyProperties(),
+        new MXBeanFetcher<CompilationMXBean>() {
+            public List<CompilationMXBean> getMXBeans() {
+                CompilationMXBean m = ManagementFactoryHelper.getCompilationMXBean();
+                if (m == null) {
+                   return Collections.emptyList();
+                } else {
+                   return Collections.singletonList(m);
+                }
+            }
+        }),
+
+    /**
+     * Memory system of the Java virtual machine.
+     */
+    MEMORY(
+        "java.lang.management.MemoryMXBean",
+        "java.lang", "Memory", defaultKeyProperties(),
+        new MXBeanFetcher<MemoryMXBean>() {
+            public List<MemoryMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getMemoryMXBean());
+            }
+        }),
+
+    /**
+     * Garbage Collector in the Java virtual machine.
+     */
+    GARBAGE_COLLECTOR(
+        "java.lang.management.GarbageCollectorMXBean",
+        "java.lang", "GarbageCollector", keyProperties("name"),
+        new MXBeanFetcher<GarbageCollectorMXBean>() {
+            public List<GarbageCollectorMXBean> getMXBeans() {
+                return ManagementFactoryHelper.
+                           getGarbageCollectorMXBeans();
+            }
+        }),
+
+    /**
+     * Memory manager in the Java virtual machine.
+     */
+    MEMORY_MANAGER(
+        "java.lang.management.MemoryManagerMXBean",
+        "java.lang", "MemoryManager", keyProperties("name"),
+        new MXBeanFetcher<MemoryManagerMXBean>() {
+            public List<MemoryManagerMXBean> getMXBeans() {
+                return ManagementFactoryHelper.getMemoryManagerMXBeans();
+            }
+        },
+        GARBAGE_COLLECTOR),
+
+    /**
+     * Memory pool in the Java virtual machine.
+     */
+    MEMORY_POOL(
+        "java.lang.management.MemoryPoolMXBean",
+        "java.lang", "MemoryPool", keyProperties("name"),
+        new MXBeanFetcher<MemoryPoolMXBean>() {
+            public List<MemoryPoolMXBean> getMXBeans() {
+                return ManagementFactoryHelper.getMemoryPoolMXBeans();
+            }
+        }),
+
+    /**
+     * Operating system on which the Java virtual machine is running
+     */
+    OPERATING_SYSTEM(
+        "java.lang.management.OperatingSystemMXBean",
+        "java.lang", "OperatingSystem", defaultKeyProperties(),
+        new MXBeanFetcher<OperatingSystemMXBean>() {
+            public List<OperatingSystemMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getOperatingSystemMXBean());
+            }
+        }),
+
+    /**
+     * Runtime system of the Java virtual machine.
+     */
+    RUNTIME(
+        "java.lang.management.RuntimeMXBean",
+        "java.lang", "Runtime", defaultKeyProperties(),
+        new MXBeanFetcher<RuntimeMXBean>() {
+            public List<RuntimeMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getRuntimeMXBean());
+            }
+        }),
+
+    /**
+     * Threading system of the Java virtual machine.
+     */
+    THREADING(
+        "java.lang.management.ThreadMXBean",
+        "java.lang", "Threading", defaultKeyProperties(),
+        new MXBeanFetcher<ThreadMXBean>() {
+            public List<ThreadMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getThreadMXBean());
+            }
+        }),
+
+
+    /**
+     * Logging facility.
+     */
+    LOGGING(
+        "java.util.logging.LoggingMXBean",
+        "java.util.logging", "Logging", defaultKeyProperties(),
+        new MXBeanFetcher<LoggingMXBean>() {
+            public List<LoggingMXBean> getMXBeans() {
+                return Collections.singletonList(LogManager.getLoggingMXBean());
+            }
+        }),
+
+    // Sun Platform Extension
+
+    /**
+     * Sun extension garbage collector that performs collections in cycles.
+     */
+    SUN_GARBAGE_COLLECTOR(
+        "com.sun.management.GarbageCollectorMXBean",
+        "java.lang", "GarbageCollector", keyProperties("name"),
+        new MXBeanFetcher<com.sun.management.GarbageCollectorMXBean>() {
+            public List<com.sun.management.GarbageCollectorMXBean> getMXBeans() {
+                return getGcMXBeanList(com.sun.management.GarbageCollectorMXBean.class);
+            }
+        }),
+
+    /**
+     * Sun extension operating system on which the Java virtual machine
+     * is running.
+     */
+    SUN_OPERATING_SYSTEM(
+        "com.sun.management.OperatingSystemMXBean",
+        "java.lang", "OperatingSystem", defaultKeyProperties(),
+        new MXBeanFetcher<com.sun.management.OperatingSystemMXBean>() {
+            public List<com.sun.management.OperatingSystemMXBean> getMXBeans() {
+                return getOSMXBeanList(com.sun.management.OperatingSystemMXBean.class);
+            }
+        }),
+
+    /**
+     * Unix operating system.
+     */
+    SUN_UNIX_OPERATING_SYSTEM(
+        "com.sun.management.UnixOperatingSystemMXBean",
+        "java.lang", "OperatingSystem", defaultKeyProperties(),
+        new MXBeanFetcher<UnixOperatingSystemMXBean>() {
+            public List<UnixOperatingSystemMXBean> getMXBeans() {
+                return getOSMXBeanList(com.sun.management.UnixOperatingSystemMXBean.class);
+            }
+        }),
+
+    /**
+     * Diagnostic support for the HotSpot Virtual Machine.
+     */
+    HOTSPOT_DIAGNOSTIC(
+        "com.sun.management.HotSpotDiagnosticMXBean",
+        "com.sun.management", "HotSpotDiagnostic", defaultKeyProperties(),
+        new MXBeanFetcher<HotSpotDiagnosticMXBean>() {
+            public List<HotSpotDiagnosticMXBean> getMXBeans() {
+                return Collections.singletonList(ManagementFactoryHelper.getDiagnosticMXBean());
+            }
+        });
+
+
+    /**
+     * A task that returns the MXBeans for a component.
+     */
+    interface MXBeanFetcher<T extends PlatformManagedObject> {
+        public List<T> getMXBeans();
+    }
+
+    /*
+     * Returns a list of the GC MXBeans of the given type.
+     */
+    private static <T extends GarbageCollectorMXBean>
+            List<T> getGcMXBeanList(Class<T> gcMXBeanIntf) {
+        List<GarbageCollectorMXBean> list =
+            ManagementFactoryHelper.getGarbageCollectorMXBeans();
+        List<T> result = new ArrayList<T>(list.size());
+        for (GarbageCollectorMXBean m : list) {
+            if (gcMXBeanIntf.isInstance(m)) {
+                result.add(gcMXBeanIntf.cast(m));
+            }
+        }
+        return result;
+    }
+
+    /*
+     * Returns the OS mxbean instance of the given type.
+     */
+    private static <T extends OperatingSystemMXBean>
+            List<T> getOSMXBeanList(Class<T> osMXBeanIntf) {
+        OperatingSystemMXBean m =
+            ManagementFactoryHelper.getOperatingSystemMXBean();
+        if (osMXBeanIntf.isInstance(m)) {
+            return Collections.singletonList(osMXBeanIntf.cast(m));
+        } else {
+            return Collections.emptyList();
+        }
+    }
+
+    private final String mxbeanInterfaceName;
+    private final String domain;
+    private final String type;
+    private final Set<String> keyProperties;
+    private final MXBeanFetcher fetcher;
+    private final PlatformComponent[] subComponents;
+
+    private PlatformComponent(String intfName,
+                              String domain, String type,
+                              Set<String> keyProperties,
+                              MXBeanFetcher fetcher) {
+        this.mxbeanInterfaceName = intfName;
+        this.domain = domain;
+        this.type = type;
+        this.keyProperties = keyProperties;
+        this.fetcher = fetcher;
+        this.subComponents = new PlatformComponent[0];
+    }
+    private PlatformComponent(String intfName,
+                              String domain, String type,
+                              Set<String> keyProperties,
+                              MXBeanFetcher fetcher,
+                              PlatformComponent... subComponents) {
+        this.mxbeanInterfaceName = intfName;
+        this.domain = domain;
+        this.type = type;
+        this.keyProperties = keyProperties;
+        this.fetcher = fetcher;
+        this.subComponents = subComponents;
+    }
+
+    private static Set<String> defaultKeyProps;
+    private static Set<String> defaultKeyProperties() {
+        if (defaultKeyProps == null) {
+            defaultKeyProps = Collections.singleton("type");
+        }
+        return defaultKeyProps;
+    }
+
+    private static Set<String> keyProperties(String... keyNames) {
+        Set<String> set = new HashSet<String>();
+        set.add("type");
+        for (String s : keyNames) {
+            set.add(s);
+        }
+        return set;
+    }
+
+    String getMXBeanInterfaceName() {
+        return mxbeanInterfaceName;
+    }
+
+    @SuppressWarnings("unchecked")
+    Class<? extends PlatformManagedObject> getMXBeanInterface() {
+        try {
+            // Lazy loading the MXBean interface only when it is needed
+            return (Class<? extends PlatformManagedObject>)
+                       Class.forName(mxbeanInterfaceName, false, null);
+        } catch (ClassNotFoundException x) {
+            throw new AssertionError(x);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    <T extends PlatformManagedObject>
+        List<T> getMXBeans(Class<T> mxbeanInterface)
+    {
+        return fetcher.getMXBeans();
+    }
+
+    <T extends PlatformManagedObject>
+        List<T> getMXBeans(MBeanServerConnection mbs, Class<T> mxbeanInterface)
+        throws java.io.IOException
+    {
+        List<T> result = new ArrayList<T>();
+        for (ObjectName on : getObjectNames(mbs)) {
+            result.add(ManagementFactory.
+                newPlatformMXBeanProxy(mbs,
+                                       on.getCanonicalName(),
+                                       mxbeanInterface)
+            );
+        }
+        return result;
+    }
+
+    private Set<ObjectName> getObjectNames(MBeanServerConnection mbs)
+        throws java.io.IOException
+    {
+        String domainAndType = domain + ":type=" + type;
+        if (keyProperties.size() > 1) {
+            // if there are more than 1 key properties (i.e. other than "type")
+            domainAndType += ",*";
+        }
+        ObjectName on = com.sun.jmx.mbeanserver.Util.newObjectName(domainAndType);
+        Set<ObjectName> set =  mbs.queryNames(on, null);
+        for (PlatformComponent pc : subComponents) {
+            set.addAll(pc.getObjectNames(mbs));
+        }
+        return set;
+    }
+
+    private static final long serialVersionUID = 6992337162326171013L;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/lang/management/PlatformManagedObject.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang.management;
+
+import javax.management.ObjectName;
+
+/**
+ * A platform managed object is a {@linkplain javax.management.MXBean JMX MXBean}
+ * for monitoring and managing a component in the Java platform.
+ * Each platform managed object has a unique
+ * <a href="ManagementFactory.html#MXBean">object name</a>
+ * for the {@linkplain ManagementFactory.getPlatformMBeanServer
+ * platform MBeanServer} access.
+ * All platform MXBeans will implement this interface.
+ *
+ * <p>
+ * Note:
+ * The platform MXBean interfaces (i.e. all subinterfaces
+ * of {@code PlatformManagedObject}) are implemented
+ * by the Java platform only.  New methods may be added in these interfaces
+ * in future Java SE releases.
+ * In addition, this {@code PlatformManagedObject} interface is only
+ * intended for the management interfaces for the platform to extend but
+ * not for applications.
+ *
+ * @see <a href="ManagementFactory.html#MXBean">Platform MXBeans</a>
+ * @since 1.7
+ */
+public interface PlatformManagedObject {
+    /**
+     * Returns an {@link ObjectName ObjectName} instance representing
+     * the object name of this platform managed object.
+     *
+     * @return an {@link ObjectName ObjectName} instance representing
+     * the object name of this platform managed object.
+     */
+    public ObjectName getObjectName();
+}
--- a/jdk/src/share/classes/java/lang/management/RuntimeMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/RuntimeMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -44,9 +44,13 @@
  *           <tt>java.lang:type=Runtime</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * <p> This interface defines several convenient methods for accessing
  * system properties about the Java virtual machine.
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -55,7 +59,7 @@
  * @author  Mandy Chung
  * @since   1.5
  */
-public interface RuntimeMXBean {
+public interface RuntimeMXBean extends PlatformManagedObject {
     /**
      * Returns the name representing the running Java virtual machine.
      * The returned name string can be any arbitrary string and
--- a/jdk/src/share/classes/java/lang/management/ThreadInfo.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/ThreadInfo.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,7 @@
 package java.lang.management;
 
 import javax.management.openmbean.CompositeData;
+import sun.management.ManagementFactoryHelper;
 import sun.management.ThreadInfoCompositeData;
 import static java.lang.Thread.State.*;
 
@@ -220,12 +221,9 @@
                             LockInfo[] lockedSynchronizers) {
         this.threadId = t.getId();
         this.threadName = t.getName();
-        this.threadState =
-            sun.management.ManagementFactory.toThreadState(state);
-        this.suspended =
-            sun.management.ManagementFactory.isThreadSuspended(state);
-        this.inNative =
-            sun.management.ManagementFactory.isThreadRunningNative(state);
+        this.threadState = ManagementFactoryHelper.toThreadState(state);
+        this.suspended = ManagementFactoryHelper.isThreadSuspended(state);
+        this.inNative = ManagementFactoryHelper.isThreadRunningNative(state);
         this.blockedCount = blockedCount;
         this.blockedTime = blockedTime;
         this.waitedCount = waitedCount;
--- a/jdk/src/share/classes/java/lang/management/ThreadMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/lang/management/ThreadMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -46,6 +46,9 @@
  *           <tt>java.lang:type=Threading</tt>}
  * </blockquote>
  *
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
  * <h4>Thread ID</h4>
  * Thread ID is a positive long value returned by calling the
  * {@link java.lang.Thread#getId} method for a thread.
@@ -108,6 +111,7 @@
  * {@link #findDeadlockedThreads} methods to find deadlocks in
  * the running application.
  *
+ * @see ManagementFactory#getPlatformMXBeans(Class)
  * @see <a href="../../../javax/management/package-summary.html">
  *      JMX Specification.</a>
  * @see <a href="package-summary.html#examples">
@@ -117,7 +121,7 @@
  * @since   1.5
  */
 
-public interface ThreadMXBean {
+public interface ThreadMXBean extends PlatformManagedObject {
     /**
      * Returns the current number of live threads including both
      * daemon and non-daemon threads.
--- a/jdk/src/share/classes/java/util/logging/Logging.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/util/logging/Logging.java	Sun May 04 07:05:42 2008 -0700
@@ -29,6 +29,8 @@
 import java.util.List;
 import java.util.ArrayList;
 
+import javax.management.ObjectName;
+
 /**
  * Logging is the implementation class of LoggingMXBean.
  *
@@ -115,4 +117,7 @@
         }
     }
 
+    public ObjectName getObjectName() {
+        return com.sun.jmx.mbeanserver.Util.newObjectName(LogManager.LOGGING_MXBEAN_NAME);
+    }
 }
--- a/jdk/src/share/classes/java/util/logging/LoggingMXBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/util/logging/LoggingMXBean.java	Sun May 04 07:05:42 2008 -0700
@@ -25,6 +25,8 @@
 
 package java.util.logging;
 
+import java.lang.management.PlatformManagedObject;
+
 /**
  * The management interface for the logging facility.
  *
@@ -43,14 +45,17 @@
  *           <tt>java.util.logging:type=Logging</tt>}
  * </blockquote>
  *
- * @see java.lang.management.ManagementFactory
+ * It can be obtained by calling the
+ * {@link PlatformManagedObject#getObjectName} method.
+ *
+ * @see java.lang.management.ManagementFactory#getPlatformMXBeans(Class)
  *
  * @author  Ron Mann
  * @author  Mandy Chung
  * @since   1.5
  *
  */
-public interface LoggingMXBean {
+public interface LoggingMXBean extends PlatformManagedObject {
 
     /**
      * Returns the list of currently registered loggers. This method
--- a/jdk/src/share/classes/java/util/regex/Pattern.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/java/util/regex/Pattern.java	Sun May 04 07:05:42 2008 -0700
@@ -2844,7 +2844,15 @@
     /**
      *  Utility method for parsing unicode escape sequences.
      */
-    private int u() {
+    private int cursor() {
+        return cursor;
+    }
+
+    private void setcursor(int pos) {
+        cursor = pos;
+    }
+
+    private int uxxxx() {
         int n = 0;
         for (int i = 0; i < 4; i++) {
             int ch = read();
@@ -2856,6 +2864,20 @@
         return n;
     }
 
+    private int u() {
+        int n = uxxxx();
+        if (Character.isHighSurrogate((char)n)) {
+            int cur = cursor();
+            if (read() == '\\' && read() == 'u') {
+                int n2 = uxxxx();
+                if (Character.isLowSurrogate((char)n2))
+                    return Character.toCodePoint((char)n, (char)n2);
+            }
+            setcursor(cur);
+        }
+        return n;
+    }
+
     //
     // Utility methods for code point support
     //
--- a/jdk/src/share/classes/javax/management/MBeanServer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/javax/management/MBeanServer.java	Sun May 04 07:05:42 2008 -0700
@@ -50,7 +50,7 @@
  * server.  A Java object cannot be registered in the MBean server
  * unless it is a JMX compliant MBean.</p>
  *
- * <p>When an MBean is registered or unregistered in the MBean server
+ * <p id="notif">When an MBean is registered or unregistered in the MBean server
  * a {@link javax.management.MBeanServerNotification
  * MBeanServerNotification} Notification is emitted. To register an
  * object as listener to MBeanServerNotifications you should call the
@@ -258,27 +258,43 @@
  */
 public interface MBeanServer extends MBeanServerConnection {
 
-    // doc comment inherited from MBeanServerConnection
+    /**
+     * {@inheritDoc}
+     * <p>If this method successfully creates an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
+     */
     public ObjectInstance createMBean(String className, ObjectName name)
             throws ReflectionException, InstanceAlreadyExistsException,
                    MBeanRegistrationException, MBeanException,
                    NotCompliantMBeanException;
 
-    // doc comment inherited from MBeanServerConnection
+    /**
+     * {@inheritDoc}
+     * <p>If this method successfully creates an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
+     */
     public ObjectInstance createMBean(String className, ObjectName name,
                                       ObjectName loaderName)
             throws ReflectionException, InstanceAlreadyExistsException,
                    MBeanRegistrationException, MBeanException,
                    NotCompliantMBeanException, InstanceNotFoundException;
 
-    // doc comment inherited from MBeanServerConnection
+    /**
+     * {@inheritDoc}
+     * <p>If this method successfully creates an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
+     */
     public ObjectInstance createMBean(String className, ObjectName name,
                                       Object params[], String signature[])
             throws ReflectionException, InstanceAlreadyExistsException,
                    MBeanRegistrationException, MBeanException,
                    NotCompliantMBeanException;
 
-    // doc comment inherited from MBeanServerConnection
+    /**
+     * {@inheritDoc}
+     * <p>If this method successfully creates an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
+     */
     public ObjectInstance createMBean(String className, ObjectName name,
                                       ObjectName loaderName, Object params[],
                                       String signature[])
@@ -287,12 +303,15 @@
                    NotCompliantMBeanException, InstanceNotFoundException;
 
     /**
-     * Registers a pre-existing object as an MBean with the MBean
+     * <p>Registers a pre-existing object as an MBean with the MBean
      * server. If the object name given is null, the MBean must
      * provide its own name by implementing the {@link
      * javax.management.MBeanRegistration MBeanRegistration} interface
      * and returning the name from the {@link
-     * MBeanRegistration#preRegister preRegister} method.
+     * MBeanRegistration#preRegister preRegister} method.</p>
+     *
+     * <p>If this method successfully registers an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
      *
      * @param object The  MBean to be registered as an MBean.
      * @param name The object name of the MBean. May be null.
@@ -319,7 +338,12 @@
             throws InstanceAlreadyExistsException, MBeanRegistrationException,
                    NotCompliantMBeanException;
 
-    // doc comment inherited from MBeanServerConnection
+    /**
+     * {@inheritDoc}
+     *
+     * <p>If this method successfully unregisters an MBean, a notification
+     * is sent as described <a href="#notif">above</a>.</p>
+     */
     public void unregisterMBean(ObjectName name)
             throws InstanceNotFoundException, MBeanRegistrationException;
 
--- a/jdk/src/share/classes/javax/management/ObjectName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/javax/management/ObjectName.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,7 @@
 package javax.management;
 
 import com.sun.jmx.mbeanserver.GetPropertyAction;
+import com.sun.jmx.mbeanserver.Util;
 import java.io.IOException;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
@@ -1386,12 +1387,7 @@
             throws NullPointerException {
         if (name.getClass().equals(ObjectName.class))
             return name;
-        try {
-            return new ObjectName(name.getSerializedNameString());
-        } catch (MalformedObjectNameException e) {
-            throw new IllegalArgumentException("Unexpected: " + e);
-            // can't happen
-        }
+        return Util.newObjectName(name.getSerializedNameString());
     }
 
     /**
@@ -1950,14 +1946,7 @@
      *
      * @since 1.6
      */
-    public static final ObjectName WILDCARD;
-    static {
-        try {
-            WILDCARD = new ObjectName("*:*");
-        } catch (MalformedObjectNameException e) {
-            throw new Error("Can't initialize wildcard name", e);
-        }
-    }
+    public static final ObjectName WILDCARD = Util.newObjectName("*:*");
 
     // Category : Utilities <===================================
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/javax/management/QueryNotificationFilter.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,417 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.management;
+
+import com.sun.jmx.mbeanserver.NotificationMBeanSupport;
+import com.sun.jmx.mbeanserver.Util;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Collections;
+import java.util.Set;
+
+/**
+ * <p>General-purpose notification filter.  This filter can be used to
+ * filter notifications from a possibly-remote MBean.  Most filtering
+ * decisions can be coded using this filter, which avoids having to
+ * write a custom implementation of the {@link NotificationFilter}
+ * class.  Writing a custom implementation requires you to deploy it
+ * on both the client and the server in the remote case, so using this class
+ * instead is recommended where possible.</p>
+ *
+ * <!-- <p>Because this class was introduced in version 2.0 of the JMX API,
+ * it may not be present on a remote JMX agent that is running an earlier
+ * version.  The method {@link JMX#addListenerWithFilter JMX.addListenerWithFilter}
+ * can be used when you cannot be sure whether this class is present in the
+ * agent you are connecting to.</p> -->
+ *
+ * <p>This class uses the {@linkplain Query Query API} to specify the
+ * filtering logic.  For example, to select only notifications where the
+ * {@linkplain Notification#getType() type} is {@code "com.example.mytype"},
+ * you could use</p>
+ *
+ * <pre>
+ * NotificationFilter filter =
+ *     new QueryNotificationFilter("Type = 'com.example.mytype'");
+ * </pre>
+ *
+ * <p>or equivalently</p>
+ *
+ * <pre>
+ * NotificationFilter filter =
+ *     new QueryNotificationFilter(
+ *             Query.eq(Query.attr("Type"), Query.value("com.example.mytype")));
+ * </pre>
+ *
+ * <p>(This particular example could also use
+ * {@link NotificationFilterSupport}.)</p>
+ *
+ * <p>Here are some other examples of filters you can specify with this class.</p>
+ *
+ * <dl>
+ *
+ * <dt>{@code QueryNotificationFilter("Type = 'com.example.type1' or
+ * Type = 'com.example.type2'")}
+ * <dd>Notifications where the type is either of the given strings.
+ *
+ * <dt>{@code QueryNotificationFilter("Type in ('com.example.type1',
+ * 'com.example.type2')")}
+ * <dd>Another way to write the previous example.
+ *
+ * <dt>{@code QueryNotificationFilter("SequenceNumber > 1000")}
+ * <dd>Notifications where the {@linkplain Notification#getSequenceNumber()
+ * sequence number} is greater than 1000.
+ *
+ * <dt>{@code QueryNotificationFilter(AttributeChangeNotification.class, null)}
+ * <dd>Notifications where the notification class is
+ * {@link AttributeChangeNotification} or a subclass of it.
+ *
+ * <dt>{@code QueryNotificationFilter(AttributeChangeNotification.class,
+ * "AttributeName = 'Size'")}
+ * <dd>Notifications where the notification class is
+ * {@link AttributeChangeNotification} or a subclass, and where the
+ * {@linkplain AttributeChangeNotification#getAttributeName() name of the
+ * changed attribute} is {@code Size}.
+ *
+ * <dt>{@code QueryNotificationFilter(AttributeChangeNotification.class,
+ * "AttributeName = 'Size' and NewValue - OldValue > 100")}
+ * <dd>As above, but the difference between the
+ * {@linkplain AttributeChangeNotification#getNewValue() new value} and the
+ * {@linkplain AttributeChangeNotification#getOldValue() old value} must be
+ * greater than 100.
+ *
+ * <dt>{@code QueryNotificationFilter("like 'com.example.mydomain:*'")}
+ * <dd>Notifications where the {@linkplain Notification#getSource() source}
+ * is an ObjectName that matches the pattern.
+ *
+ * <dt>{@code QueryNotificationFilter("Source.canonicalName like
+ * 'com.example.mydomain:%'")}
+ * <dd>Another way to write the previous example.
+ *
+ * <dt>{@code QueryNotificationFilter(MBeanServerNotification.class,
+ * "Type = 'JMX.mbean.registered' and MBeanName.canonicalName like
+ * 'com.example.mydomain:%'")}
+ * <dd>Notifications of class {@link MBeanServerNotification} representing
+ * an object registered in the domain {@code com.example.mydomain}.
+ *
+ * </dl>
+ *
+ * <h4>How it works</h4>
+ *
+ * <p>Although the examples above are clear, looking closely at the
+ * Query API reveals a subtlety.  A {@link QueryExp} is evaluated on
+ * an {@link ObjectName}, not a {@code Notification}.</p>
+ *
+ * <p>Every time a {@code Notification} is to be filtered by a
+ * {@code QueryNotificationFilter}, a special {@link MBeanServer} is created.
+ * This {@code MBeanServer} contains exactly one MBean, which represents the
+ * {@code Notification}.  If the {@linkplain Notification#getSource()
+ * source} of the notification is an {@code ObjectName}, which is
+ * recommended practice, then the name of the MBean representing the
+ * {@code Notification} will be this {@code ObjectName}.  Otherwise the
+ * name is unspecified.</p>
+ *
+ * <p>The query specified in the {@code QueryNotificationFilter} constructor
+ * is evaluated against this {@code MBeanServer} and {@code ObjectName},
+ * and the filter returns true if and only if the query does.  If the
+ * query throws an exception, then the filter will return false.</p>
+ *
+ * <p>The MBean representing the {@code Notification} has one attribute for
+ * every property of the {@code Notification}. Specifically, for every public
+ * method {@code T getX()} in the {@code NotificationClass}, the MBean will
+ * have an attribute called {@code X} of type {@code T}. For example, if the
+ * {@code Notification} is an {@code AttributeChangeNotification}, then the
+ * MBean will have an attribute called {@code AttributeName} of type
+ * {@code "java.lang.String"}, corresponding to the method {@link
+ * AttributeChangeNotification#getAttributeName}.</p>
+ *
+ * <p>Query evaluation usually involves calls to the methods of {@code
+ * MBeanServer}.  The methods have the following behavior:</p>
+ *
+ * <ul>
+ * <li>The {@link MBeanServer#getAttribute getAttribute} method returns the
+ * value of the corresponding property.
+ * <li>The {@link MBeanServer#getObjectInstance getObjectInstance}
+ * method returns an {@link ObjectInstance} where the {@link
+ * ObjectInstance#getObjectName ObjectName} is the name of the MBean and the
+ * {@link ObjectInstance#getClassName ClassName} is the class name of the
+ * {@code Notification}.
+ * <li>The {@link MBeanServer#isInstanceOf isInstanceOf} method returns true
+ * if and only if the {@code Notification}'s {@code ClassLoader} can load the
+ * named class, and the {@code Notification} is an {@linkplain Class#isInstance
+ * instance} of that class.
+ * </ul>
+ *
+ * <p>These are the only {@code MBeanServer} methods that are needed to
+ * evaluate standard queries. The behavior of the other {@code MBeanServer}
+ * methods is unspecified.</p>
+ *
+ * @since 1.7
+ */
+public class QueryNotificationFilter implements NotificationFilter {
+    private static final long serialVersionUID = -8408613922660635231L;
+
+    private static final ObjectName DEFAULT_NAME =
+            Util.newObjectName(":type=Notification");
+    private static final QueryExp trueQuery;
+    static {
+        ValueExp zero = Query.value(0);
+        trueQuery = Query.eq(zero, zero);
+    }
+
+    private final QueryExp query;
+
+    /**
+     * Construct a {@code QueryNotificationFilter} that evaluates the given
+     * {@code QueryExp} to determine whether to accept a notification.
+     *
+     * @param query the {@code QueryExp} to evaluate.  Can be null,
+     * in which case all notifications are accepted.
+     */
+    public QueryNotificationFilter(QueryExp query) {
+        if (query == null)
+            this.query = trueQuery;
+        else
+            this.query = query;
+    }
+
+    /**
+     * Construct a {@code QueryNotificationFilter} that evaluates the query
+     * in the given string to determine whether to accept a notification.
+     * The string is converted into a {@code QueryExp} using
+     * {@link Query#fromString Query.fromString}.
+     *
+     * @param query the string specifying the query to evaluate.  Can be null,
+     * in which case all notifications are accepted.
+     *
+      * @throws IllegalArgumentException if the string is not a valid
+      * query string.
+     */
+    public QueryNotificationFilter(String query) {
+        this(Query.fromString(query));
+    }
+
+    /**
+     * <p>Construct a {@code QueryNotificationFilter} that evaluates the query
+     * in the given string to determine whether to accept a notification,
+     * and where the notification must also be an instance of the given class.
+     * The string is converted into a {@code QueryExp} using
+     * {@link Query#fromString Query.fromString}.</p>
+     *
+     * @param notifClass the class that the notification must be an instance of.
+     * Cannot be null.
+     *
+     * @param query the string specifying the query to evaluate.  Can be null,
+     * in which case all notifications are accepted.
+     *
+     * @throws IllegalArgumentException if the string is not a valid
+     * query string, or if {@code notifClass} is null.
+     */
+    public QueryNotificationFilter(
+            Class<? extends Notification> notifClass, String query) {
+        this(Query.and(Query.isInstanceOf(Query.value(notNull(notifClass).getName())),
+                       Query.fromString(query)));
+    }
+
+    private static <T> T notNull(T x) {
+        if (x == null)
+            throw new IllegalArgumentException("Null argument");
+        return x;
+    }
+
+    /**
+     * Retrieve the query that this notification filter will evaluate for
+     * each notification.
+     *
+     * @return the query.
+     */
+    public QueryExp getQuery() {
+        return query;
+    }
+
+    public boolean isNotificationEnabled(Notification notification) {
+        ObjectName name;
+
+        Object source = notification.getSource();
+        if (source instanceof ObjectName)
+            name = (ObjectName) source;
+        else
+            name = DEFAULT_NAME;
+
+        MBS mbsImpl = new MBS(notification, name);
+        MBeanServer mbs = (MBeanServer) Proxy.newProxyInstance(
+                MBeanServer.class.getClassLoader(),
+                new Class<?>[] {MBeanServer.class},
+                new ForwardIH(mbsImpl));
+        return evalQuery(query, mbs, name);
+    }
+
+    private static boolean evalQuery(
+            QueryExp query, MBeanServer mbs, ObjectName name) {
+        MBeanServer oldMBS = QueryEval.getMBeanServer();
+        try {
+            if (mbs != null)
+                query.setMBeanServer(mbs);
+            return query.apply(name);
+        } catch (Exception e) {
+            return false;
+        } finally {
+            query.setMBeanServer(oldMBS);
+        }
+    }
+
+    private static class ForwardIH implements InvocationHandler {
+        private final MBS mbs;
+
+        ForwardIH(MBS mbs) {
+            this.mbs = mbs;
+        }
+
+        public Object invoke(Object proxy, Method method, Object[] args)
+                throws Throwable {
+            Method forward;
+            try {
+                forward = MBS.class.getMethod(
+                        method.getName(), method.getParameterTypes());
+            } catch (NoSuchMethodException e) {
+                throw new UnsupportedOperationException(method.getName());
+            }
+            try {
+                return forward.invoke(mbs, args);
+            } catch (InvocationTargetException e) {
+                throw e.getCause();
+            }
+        }
+    }
+
+    private static class MBS {
+        private final Notification notification;
+        private final ObjectName objectName;
+        private final ObjectInstance objectInstance;
+        private volatile DynamicMBean mbean;
+
+        MBS(Notification n, ObjectName name) {
+            this.notification = n;
+            this.objectName = name;
+            this.objectInstance = new ObjectInstance(name, n.getClass().getName());
+        }
+
+        private void checkName(ObjectName name) throws InstanceNotFoundException {
+            if (!objectName.equals(name))
+                throw new InstanceNotFoundException(String.valueOf(name));
+        }
+
+        private DynamicMBean mbean(ObjectName name)
+                throws InstanceNotFoundException, ReflectionException {
+            if (mbean == null) {
+                try {
+                    mbean = new NotificationMBeanSupport(notification);
+                } catch (NotCompliantMBeanException e) {
+                    throw new ReflectionException(e);
+                }
+            }
+            return mbean;
+        }
+
+        public ObjectInstance getObjectInstance(ObjectName name)
+                throws InstanceNotFoundException {
+            checkName(name);
+            return objectInstance;
+        }
+
+        public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query) {
+            Set<ObjectName> names = queryNames(name, query);
+            switch (names.size()) {
+            case 0:
+                return Collections.emptySet();
+            case 1:
+                return Collections.singleton(objectInstance);
+            default:
+                throw new UnsupportedOperationException("Internal error");
+            }
+        }
+
+        public Set<ObjectName> queryNames(ObjectName name, QueryExp query) {
+            if ((name != null && !name.apply(objectName)) ||
+                    (query != null && !evalQuery(query, null, name)))
+                return Collections.emptySet();
+            return Collections.singleton(objectName);
+        }
+
+        public boolean isRegistered(ObjectName name) {
+            return objectName.equals(name);
+        }
+
+        public Integer getMBeanCount() {
+            return 1;
+        }
+
+        public Object getAttribute(ObjectName name, String attribute)
+                throws MBeanException, AttributeNotFoundException,
+                       InstanceNotFoundException, ReflectionException {
+            return mbean(name).getAttribute(attribute);
+        }
+
+        public AttributeList getAttributes(ObjectName name, String[] attributes)
+                throws InstanceNotFoundException, ReflectionException {
+            return mbean(name).getAttributes(attributes);
+        }
+
+        public String getDefaultDomain() {
+            return objectName.getDomain();
+        }
+
+        public String[] getDomains() {
+            return new String[] {objectName.getDomain()};
+        }
+
+        public MBeanInfo getMBeanInfo(ObjectName name)
+                throws InstanceNotFoundException, ReflectionException {
+            return mbean(name).getMBeanInfo();
+        }
+
+        public boolean isInstanceOf(ObjectName name, String className)
+                throws InstanceNotFoundException {
+            try {
+                mbean(name);
+                ClassLoader loader = notification.getClass().getClassLoader();
+                Class<?> c = Class.forName(className, false, loader);
+                return c.isInstance(notification);
+            } catch (ReflectionException e) {
+                return false;
+            } catch (ClassNotFoundException e) {
+                return false;
+            }
+        }
+
+        public ClassLoader getClassLoaderFor(ObjectName mbeanName)
+                throws InstanceNotFoundException {
+            checkName(mbeanName);
+            return notification.getClass().getClassLoader();
+        }
+    }
+}
--- a/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Sun May 04 07:05:42 2008 -0700
@@ -48,6 +48,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import java.util.Vector;
 import javax.management.Attribute;
 import javax.management.AttributeChangeNotification;
 import javax.management.AttributeChangeNotificationFilter;
@@ -132,8 +133,6 @@
      * and operations will be executed */
     private Object managedResource = null;
 
-    private static final String currClass = "RequiredModelMBean";
-
     /* records the registering in MBeanServer */
     private boolean registered = false;
     private transient MBeanServer server = null;
@@ -2488,10 +2487,13 @@
         }
 
         if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
+            Vector<String> enabledAttrs = currFilter.getEnabledAttributes();
+            String s = (enabledAttrs.size() > 1) ?
+                        "[" + enabledAttrs.firstElement() + ", ...]" :
+                        enabledAttrs.toString();
             MODELMBEAN_LOGGER.logp(Level.FINER,
                     RequiredModelMBean.class.getName(), mth,
-                "Set attribute change filter to " +
-                currFilter.getEnabledAttributes().firstElement());
+                "Set attribute change filter to " + s);
         }
 
         attributeBroadcaster.addNotificationListener(inlistener,currFilter,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/doc-files/synth.dtd	Sun May 04 07:05:42 2008 -0700
@@ -73,7 +73,7 @@
           type        (idref|boolean|dimension|insets|integer|string) "idref"
           value       CDATA                                           #REQUIRED
 >
-
+
 <!ELEMENT defaultsProperty EMPTY>
 <!ATTLIST defaultsProperty
           key         CDATA                                           #REQUIRED
--- a/jdk/src/share/classes/javax/swing/plaf/synth/package.html	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/package.html	Sun May 04 07:05:42 2008 -0700
@@ -1,6 +1,6 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
 <!--
 Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,151 +27,151 @@
 
 
 -->
-</head>
-<body bgcolor="white">
-    <p>
-      Synth is a skinnable look and feel in which all painting is
-      delegated. Synth does not provide a default look. In
-      order to use Synth you need to specify a
-      <a href="doc-files/synthFileFormat.html">file</a>, or 
-      provide a {@link
-      javax.swing.plaf.synth.SynthStyleFactory}. Both 
-      configuration options require an 
-      understanding of the synth architecture, which is described
-      below, as well as an understanding of Swing's architecture.
-    </p>
-    <p>
-      Unless otherwise specified null is not a legal value to any of
-      the methods defined in the synth package and if passed in will
-      result in a <code>NullPointerException</code>.
-      
-
-    <h2>Synth</h2>
-    <p>
-      Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates
-      itself with one {@link
-      javax.swing.plaf.synth.SynthStyle} per {@link
-      javax.swing.plaf.synth.Region}, most
-      <code>Components</code> only have one <code>Region</code> and
-      therefor only one <code>SynthStyle</code>.
-      <code>SynthStyle</code>
-      is used to access all style related properties: fonts, colors
-      and other <code>Component</code> properties. In addition
-      <code>SynthStyle</code>s are used to obtain 
-      {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border,
-      focus and other portions of a <code>Component</code>. The <code>ComponentUI</code>s obtain
-      <code>SynthStyle</code>s from a
-      {@link javax.swing.plaf.synth.SynthStyleFactory}.
-      A <code>SynthStyleFactory</code>
-      can be provided directly by way of 
-      {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)},
-      or indirectly by way of
-      {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The
-      following example uses the <code>SynthLookAndFeel.load()</code>
-      method to configure a <code>SynthLookAndFeel</code> and sets it
-      as the current look and feel:
-    </p>
-    <div class="example">
-      <pre>
-  SynthLookAndFeel laf = new SynthLookAndFeel();
+</head>
+<body bgcolor="white">
+    <p>
+      Synth is a skinnable look and feel in which all painting is
+      delegated. Synth does not provide a default look. In
+      order to use Synth you need to specify a
+      <a href="doc-files/synthFileFormat.html">file</a>, or 
+      provide a {@link
+      javax.swing.plaf.synth.SynthStyleFactory}. Both 
+      configuration options require an 
+      understanding of the synth architecture, which is described
+      below, as well as an understanding of Swing's architecture.
+    </p>
+    <p>
+      Unless otherwise specified null is not a legal value to any of
+      the methods defined in the synth package and if passed in will
+      result in a <code>NullPointerException</code>.
+      
+
+    <h2>Synth</h2>
+    <p>
+      Each {@link javax.swing.plaf.ComponentUI} implementation in Synth associates
+      itself with one {@link
+      javax.swing.plaf.synth.SynthStyle} per {@link
+      javax.swing.plaf.synth.Region}, most
+      <code>Components</code> only have one <code>Region</code> and
+      therefor only one <code>SynthStyle</code>.
+      <code>SynthStyle</code>
+      is used to access all style related properties: fonts, colors
+      and other <code>Component</code> properties. In addition
+      <code>SynthStyle</code>s are used to obtain 
+      {@link javax.swing.plaf.synth.SynthPainter}s for painting the background, border,
+      focus and other portions of a <code>Component</code>. The <code>ComponentUI</code>s obtain
+      <code>SynthStyle</code>s from a
+      {@link javax.swing.plaf.synth.SynthStyleFactory}.
+      A <code>SynthStyleFactory</code>
+      can be provided directly by way of 
+      {@link javax.swing.plaf.synth.SynthLookAndFeel#setStyleFactory(javax.swing.plaf.synth.SynthStyleFactory)},
+      or indirectly by way of
+      {@link javax.swing.plaf.synth.SynthLookAndFeel#load}. The
+      following example uses the <code>SynthLookAndFeel.load()</code>
+      method to configure a <code>SynthLookAndFeel</code> and sets it
+      as the current look and feel:
+    </p>
+    <div class="example">
+      <pre>
+  SynthLookAndFeel laf = new SynthLookAndFeel();
   laf.load(MyClass.class.getResourceAsStream("laf.xml"), MyClass.class);
-  UIManager.setLookAndFeel(laf);
-      </pre>
-    </div>
-    <p>
-      Many <code>JComponent</code>s are broken down into smaller
-      pieces and identified by the type safe enumeration in
-      {@link javax.swing.plaf.synth.Region}. For example, a <code>JTabbedPane</code>
-      consists of a <code>Region</code> for the
-      <code>JTabbedPane</code> ({@link
-      javax.swing.plaf.synth.Region#TABBED_PANE}), the content
-      area ({@link
-      javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the
-      area behind the tabs ({@link
-      javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the
-      tabs ({@link
-      javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each
-      <code>Region</code> of each
-      <code>JComponent</code> will have a
-      <code>SynthStyle</code>. This allows 
-      you to customize individual pieces of each region of each
-      <code>JComponent</code>.
-    <p>
-      Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This 
-      is used to provide information about the current
-      <code>Component</code> and includes: the
-      {@link javax.swing.plaf.synth.SynthStyle} associated with the current
-      {@link javax.swing.plaf.synth.Region}, the state of the <code>Component</code>
-      as a bitmask (refer to {@link
-      javax.swing.plaf.synth.SynthConstants} for the valid
-      states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of 
-      the <code>Component</code> being painted.
-    <p>
-      All text rendering by non-<code>JTextComponent</code>s is
-      delegated to a {@link
-      javax.swing.plaf.synth.SynthGraphicsUtils}, which is
-      obtained using the {@link javax.swing.plaf.synth.SynthStyle} method
-      {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can
-      customize text rendering 
-      by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}.
-
-    </p>
-
-    <h2>Notes on specific components</h2>
-
-    <h3>JTree</h3>
-    <p>
-      Synth provides a region for the cells of a tree:
-      <code>Region.TREE_CELL</code>.  To specify the colors of the
-      renderer you'll want to provide a style for the
-      <code>TREE_CELL</code> region.  The following illustrates this:
-<pre>
-  &lt;style id="treeCellStyle">
-    &lt;opaque value="TRUE"/>
-    &lt;state>
-      &lt;color value="WHITE" type="TEXT_FOREGROUND"/>
-      &lt;color value="RED" type="TEXT_BACKGROUND"/>
-    &lt;/state>
-    &lt;state value="SELECTED">
-      &lt;color value="RED" type="TEXT_FOREGROUND"/>
-      &lt;color value="WHITE" type="BACKGROUND"/>
-    &lt;/state>
-  &lt;/style>
-  &lt;bind style="treeCellStyle" type="region" key="TreeCell"/>
-</pre>
-    <p>
-      This specifies a color combination of red on white, when
-      selected, and white on red when not selected.  To see the
-      background you need to specify that labels are not opaque.  The
-      following XML fragment does that:
-<pre>
-  &lt;style id="labelStyle">
-    &lt;opaque value="FALSE"/>
-  &lt;/style>
-  &lt;bind style="labelStyle" type="region" key="Label"/>
-</pre>
-      
-    <h3>JList and JTable</h3>
-    <p>
-      The colors that the renderers for JList and JTable use are
-      specified by way of the list and table Regions.  The following
-      XML fragment illustrates how to specify red on white, when
-      selected, and white on red when not selected:
-<pre>
-  &lt;style id="style">
-    &lt;opaque value="TRUE"/>
-    &lt;state>
-      &lt;color value="WHITE" type="TEXT_FOREGROUND"/>
-      &lt;color value="RED" type="TEXT_BACKGROUND"/>
-      &lt;color value="RED" type="BACKGROUND"/>
-    &lt;/state>
-    &lt;state value="SELECTED">
-      &lt;color value="RED" type="TEXT_FOREGROUND"/>
-      &lt;color value="WHITE" type="TEXT_BACKGROUND"/>
-    &lt;/state>
-  &lt;/style>
-  &lt;bind style="style" type="region" key="Table"/>
-  &lt;bind style="style" type="region" key="List"/>
-</pre>
-  </body>
-</html>
+  UIManager.setLookAndFeel(laf);
+      </pre>
+    </div>
+    <p>
+      Many <code>JComponent</code>s are broken down into smaller
+      pieces and identified by the type safe enumeration in
+      {@link javax.swing.plaf.synth.Region}. For example, a <code>JTabbedPane</code>
+      consists of a <code>Region</code> for the
+      <code>JTabbedPane</code> ({@link
+      javax.swing.plaf.synth.Region#TABBED_PANE}), the content
+      area ({@link
+      javax.swing.plaf.synth.Region#TABBED_PANE_CONTENT}), the
+      area behind the tabs ({@link
+      javax.swing.plaf.synth.Region#TABBED_PANE_TAB_AREA}), and the
+      tabs ({@link
+      javax.swing.plaf.synth.Region#TABBED_PANE_TAB}). Each
+      <code>Region</code> of each
+      <code>JComponent</code> will have a
+      <code>SynthStyle</code>. This allows 
+      you to customize individual pieces of each region of each
+      <code>JComponent</code>.
+    <p>
+      Many of the Synth methods take a {@link javax.swing.plaf.synth.SynthContext}. This 
+      is used to provide information about the current
+      <code>Component</code> and includes: the
+      {@link javax.swing.plaf.synth.SynthStyle} associated with the current
+      {@link javax.swing.plaf.synth.Region}, the state of the <code>Component</code>
+      as a bitmask (refer to {@link
+      javax.swing.plaf.synth.SynthConstants} for the valid
+      states), and a {@link javax.swing.plaf.synth.Region} identifying the portion of 
+      the <code>Component</code> being painted.
+    <p>
+      All text rendering by non-<code>JTextComponent</code>s is
+      delegated to a {@link
+      javax.swing.plaf.synth.SynthGraphicsUtils}, which is
+      obtained using the {@link javax.swing.plaf.synth.SynthStyle} method
+      {@link javax.swing.plaf.synth.SynthStyle#getGraphicsUtils}. You can
+      customize text rendering 
+      by supplying your own {@link javax.swing.plaf.synth.SynthGraphicsUtils}.
+
+    </p>
+
+    <h2>Notes on specific components</h2>
+
+    <h3>JTree</h3>
+    <p>
+      Synth provides a region for the cells of a tree:
+      <code>Region.TREE_CELL</code>.  To specify the colors of the
+      renderer you'll want to provide a style for the
+      <code>TREE_CELL</code> region.  The following illustrates this:
+<pre>
+  &lt;style id="treeCellStyle">
+    &lt;opaque value="TRUE"/>
+    &lt;state>
+      &lt;color value="WHITE" type="TEXT_FOREGROUND"/>
+      &lt;color value="RED" type="TEXT_BACKGROUND"/>
+    &lt;/state>
+    &lt;state value="SELECTED">
+      &lt;color value="RED" type="TEXT_FOREGROUND"/>
+      &lt;color value="WHITE" type="BACKGROUND"/>
+    &lt;/state>
+  &lt;/style>
+  &lt;bind style="treeCellStyle" type="region" key="TreeCell"/>
+</pre>
+    <p>
+      This specifies a color combination of red on white, when
+      selected, and white on red when not selected.  To see the
+      background you need to specify that labels are not opaque.  The
+      following XML fragment does that:
+<pre>
+  &lt;style id="labelStyle">
+    &lt;opaque value="FALSE"/>
+  &lt;/style>
+  &lt;bind style="labelStyle" type="region" key="Label"/>
+</pre>
+      
+    <h3>JList and JTable</h3>
+    <p>
+      The colors that the renderers for JList and JTable use are
+      specified by way of the list and table Regions.  The following
+      XML fragment illustrates how to specify red on white, when
+      selected, and white on red when not selected:
+<pre>
+  &lt;style id="style">
+    &lt;opaque value="TRUE"/>
+    &lt;state>
+      &lt;color value="WHITE" type="TEXT_FOREGROUND"/>
+      &lt;color value="RED" type="TEXT_BACKGROUND"/>
+      &lt;color value="RED" type="BACKGROUND"/>
+    &lt;/state>
+    &lt;state value="SELECTED">
+      &lt;color value="RED" type="TEXT_FOREGROUND"/>
+      &lt;color value="WHITE" type="TEXT_BACKGROUND"/>
+    &lt;/state>
+  &lt;/style>
+  &lt;bind style="style" type="region" key="Table"/>
+  &lt;bind style="style" type="region" key="List"/>
+</pre>
+  </body>
+</html>
--- a/jdk/src/share/classes/sun/instrument/InstrumentationImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/instrument/InstrumentationImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -303,39 +303,78 @@
         NoSuchMethodException firstExc = null;
         boolean twoArgAgent = false;
 
-        // The agent class has a premain or agentmain method that has 1 or 2
-        // arguments. We first check for a signature of (String, Instrumentation),
-        // and if not found we check for (String). If neither is found then we
-        // throw the NoSuchMethodException from the first attempt so that the
-        // exception text indicates the lookup failed for the 2-arg method
-        // (same as JDK5.0).
+        // The agent class must have a premain or agentmain method that
+        // has 1 or 2 arguments. We check in the following order:
+        //
+        // 1) declared with a signature of (String, Instrumentation)
+        // 2) declared with a signature of (String)
+        // 3) inherited with a signature of (String, Instrumentation)
+        // 4) inherited with a signature of (String)
+        //
+        // So the declared version of either 1-arg or 2-arg always takes
+        // primary precedence over an inherited version. After that, the
+        // 2-arg version takes precedence over the 1-arg version.
+        //
+        // If no method is found then we throw the NoSuchMethodException
+        // from the first attempt so that the exception text indicates
+        // the lookup failed for the 2-arg method (same as JDK5.0).
 
         try {
-            m = javaAgentClass.getMethod( methodname,
-                                          new Class[] {
-                                              String.class,
-                                              java.lang.instrument.Instrumentation.class
-                                          }
-                                        );
+            m = javaAgentClass.getDeclaredMethod( methodname,
+                                 new Class[] {
+                                     String.class,
+                                     java.lang.instrument.Instrumentation.class
+                                 }
+                               );
             twoArgAgent = true;
         } catch (NoSuchMethodException x) {
             // remember the NoSuchMethodException
             firstExc = x;
         }
 
-        // check for the 1-arg method
         if (m == null) {
+            // now try the declared 1-arg method
+            try {
+                m = javaAgentClass.getDeclaredMethod(methodname,
+                                                 new Class[] { String.class });
+            } catch (NoSuchMethodException x) {
+                // ignore this exception because we'll try
+                // two arg inheritance next
+            }
+        }
+
+        if (m == null) {
+            // now try the inherited 2-arg method
             try {
-                m = javaAgentClass.getMethod(methodname, new Class[] { String.class });
+                m = javaAgentClass.getMethod( methodname,
+                                 new Class[] {
+                                     String.class,
+                                     java.lang.instrument.Instrumentation.class
+                                 }
+                               );
+                twoArgAgent = true;
             } catch (NoSuchMethodException x) {
-                // Neither method exists so we throw the first NoSuchMethodException
-                // as per 5.0
+                // ignore this exception because we'll try
+                // one arg inheritance next
+            }
+        }
+
+        if (m == null) {
+            // finally try the inherited 1-arg method
+            try {
+                m = javaAgentClass.getMethod(methodname,
+                                             new Class[] { String.class });
+            } catch (NoSuchMethodException x) {
+                // none of the methods exists so we throw the
+                // first NoSuchMethodException as per 5.0
                 throw firstExc;
             }
         }
 
         // the premain method should not be required to be public,
         // make it accessible so we can call it
+        // Note: The spec says the following:
+        //     The agent class must implement a public static premain method...
         setAccessible(m, true);
 
         // invoke the 1 or 2-arg method
--- a/jdk/src/share/classes/sun/management/ClassLoadingImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/ClassLoadingImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,8 @@
 package sun.management;
 
 import java.lang.management.ClassLoadingMXBean;
+import java.lang.management.ManagementFactory;
+import javax.management.ObjectName;
 
 /**
  * Implementation class for the class loading subsystem.
@@ -62,9 +64,13 @@
     }
 
     public void setVerbose(boolean value) {
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         setVerboseClass(value);
     }
     native static void setVerboseClass(boolean value);
+
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.CLASS_LOADING_MXBEAN_NAME);
+    }
 }
--- a/jdk/src/share/classes/sun/management/CompilationImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/CompilationImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,8 @@
 package sun.management;
 
 import java.lang.management.CompilationMXBean;
+import java.lang.management.ManagementFactory;
+import javax.management.ObjectName;
 
 /**
  * Implementation class for the compilation subsystem.
@@ -46,7 +48,7 @@
         this.jvm = vm;
         this.name = jvm.getCompilerName();
         if (name == null) {
-            throw new InternalError("Null compiler name");
+            throw new AssertionError("Null compiler name");
         }
     }
 
@@ -67,4 +69,9 @@
         return jvm.getTotalCompileTime();
     }
 
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.COMPILATION_MXBEAN_NAME);
+    }
+
+
 }
--- a/jdk/src/share/classes/sun/management/Flag.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/Flag.java	Sun May 04 07:05:42 2008 -0700
@@ -64,7 +64,8 @@
     }
 
     VMOption getVMOption() {
-        return new VMOption(name, value.toString(), writeable, origin);
+        String val = value == null ? "" : value.toString();
+        return new VMOption(name, val, writeable, origin);
     }
 
     static Flag getFlag(String name) {
--- a/jdk/src/share/classes/sun/management/GarbageCollectorImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/GarbageCollectorImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -34,6 +34,7 @@
 import javax.management.openmbean.CompositeData;
 import javax.management.MBeanInfo;
 import javax.management.MBeanAttributeInfo;
+import javax.management.ObjectName;
 
 import java.util.List;
 import java.util.ListIterator;
@@ -88,4 +89,8 @@
         return info;
     }
 
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE, getName());
+    }
+
 }
--- a/jdk/src/share/classes/sun/management/GcInfoBuilder.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/GcInfoBuilder.java	Sun May 04 07:05:42 2008 -0700
@@ -145,7 +145,7 @@
                         allItemTypes[i] = SimpleType.DOUBLE;
                         break;
                     default:
-                        throw new InternalError(
+                        throw new AssertionError(
                             "Unsupported type [" + gcExtItemTypes[i] + "]");
                 }
             }
--- a/jdk/src/share/classes/sun/management/GcInfoCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/GcInfoCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -80,19 +80,19 @@
             };
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
 
         // Get the item values for the extension attributes
         final int gcExtItemCount = builder.getGcExtItemCount();
         if (gcExtItemCount == 0 &&
             gcExtItemValues != null && gcExtItemValues.length != 0) {
-            throw new InternalError("Unexpected Gc Extension Item Values");
+            throw new AssertionError("Unexpected Gc Extension Item Values");
         }
 
         if (gcExtItemCount > 0 && (gcExtItemValues == null ||
              gcExtItemCount != gcExtItemValues.length)) {
-            throw new InternalError("Unmatched Gc Extension Item Values");
+            throw new AssertionError("Unmatched Gc Extension Item Values");
         }
 
         Object[] values = new Object[baseGcInfoItemValues.length +
@@ -111,7 +111,7 @@
                                             values);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -141,10 +141,10 @@
                 MappedMXBeanType.getMappedType(m.getGenericReturnType());
         } catch (NoSuchMethodException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -186,10 +186,10 @@
             return cast(memoryUsageMapType.toJavaTypeData(td));
         } catch (InvalidObjectException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -205,10 +205,10 @@
             return cast(memoryUsageMapType.toJavaTypeData(td));
         } catch (InvalidObjectException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java	Sun May 04 07:05:42 2008 -0700
@@ -28,6 +28,8 @@
 import java.util.*;
 import java.io.IOException;
 import java.lang.reflect.Method;
+import javax.management.ObjectName;
+
 import com.sun.management.HotSpotDiagnosticMXBean;
 import com.sun.management.VMOption;
 
@@ -72,7 +74,7 @@
             throw new NullPointerException("value cannot be null");
         }
 
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
         Flag flag = Flag.getFlag(name);
         if (flag == null) {
             throw new IllegalArgumentException("VM option \"" +
@@ -113,4 +115,8 @@
                 v.getClass().getName());
         }
     }
+
+    public ObjectName getObjectName() {
+        return Util.newObjectName("com.sun.management:type=HotSpotDiagnostic");
+    }
 }
--- a/jdk/src/share/classes/sun/management/HotspotCompilation.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/HotspotCompilation.java	Sun May 04 07:05:42 2008 -0700
@@ -131,7 +131,7 @@
         }
 
         // FIXME: should tolerate if counter doesn't exist
-        throw new InternalError("Counter " + name + " does not exist");
+        throw new AssertionError("Counter " + name + " does not exist");
     }
 
     private void initCompilerCounters() {
--- a/jdk/src/share/classes/sun/management/HotspotInternal.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/HotspotInternal.java	Sun May 04 07:05:42 2008 -0700
@@ -39,6 +39,9 @@
 public class HotspotInternal
     implements HotspotInternalMBean, MBeanRegistration {
 
+    private final static String HOTSPOT_INTERNAL_MBEAN_NAME =
+        "sun.management:type=HotspotInternal";
+    private static ObjectName objName = Util.newObjectName(HOTSPOT_INTERNAL_MBEAN_NAME);
     private MBeanServer server = null;
 
     /**
@@ -52,16 +55,16 @@
                                   ObjectName name) throws java.lang.Exception {
         // register all internal MBeans when this MBean is instantiated
         // and to be registered in a MBeanServer.
-        ManagementFactory.registerInternalMBeans(server);
+        ManagementFactoryHelper.registerInternalMBeans(server);
         this.server = server;
-        return ManagementFactory.getHotspotInternalObjectName();
+        return objName;
     }
 
     public void postRegister(Boolean registrationDone) {};
 
     public void preDeregister() throws java.lang.Exception {
         // unregister all internal MBeans when this MBean is unregistered.
-        ManagementFactory.unregisterInternalMBeans(server);
+        ManagementFactoryHelper.unregisterInternalMBeans(server);
     }
 
     public void postDeregister() {};
--- a/jdk/src/share/classes/sun/management/LockDataConverter.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/LockDataConverter.java	Sun May 04 07:05:42 2008 -0700
@@ -73,7 +73,7 @@
         try {
             return (CompositeData) getAttribute("LockInfo");
         } catch (Exception e) {
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -81,7 +81,7 @@
         try {
             return (CompositeData[]) getAttribute("LockedSynchronizers");
         } catch (Exception e) {
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -89,7 +89,7 @@
         try {
             setAttribute(new Attribute("LockInfo", cd));
         } catch (Exception e) {
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
         return getLockInfo();
     }
@@ -98,7 +98,7 @@
         try {
             setAttribute(new Attribute("LockedSynchronizers", cd));
         } catch (Exception e) {
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
         return getLockedSynchronizers();
     }
--- a/jdk/src/share/classes/sun/management/ManagementFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/ManagementFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  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,445 +25,17 @@
 
 package sun.management;
 
-import java.lang.management.*;
-import java.util.logging.LogManager;
-
-import javax.management.DynamicMBean;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.MBeanInfo;
-import javax.management.NotificationEmitter;
-import javax.management.ObjectName;
-import javax.management.ObjectInstance;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanRegistrationException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.MalformedObjectNameException;
-import javax.management.RuntimeOperationsException;
-import javax.management.StandardEmitterMBean;
-import javax.management.StandardMBean;
-import java.security.AccessController;
-import java.security.Permission;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import sun.security.action.LoadLibraryAction;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-import java.util.ListIterator;
-import com.sun.management.OSMBeanFactory;
-import com.sun.management.HotSpotDiagnosticMXBean;
-
-import static java.lang.management.ManagementFactory.*;
+import java.lang.management.MemoryManagerMXBean;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.GarbageCollectorMXBean;
 
 /**
- * ManagementFactory provides static factory methods to create
- * instances of the management interface.
+ * ManagementFactory class provides the methods that the HotSpot VM
+ * will invoke. So the class and method names cannot be renamed.
  */
-public class ManagementFactory {
+class ManagementFactory {
     private ManagementFactory() {};
 
-    private static VMManagement jvm;
-
-    private static boolean mbeansCreated = false;
-    private static ClassLoadingImpl    classMBean = null;
-    private static MemoryImpl          memoryMBean = null;
-    private static ThreadImpl          threadMBean = null;
-    private static RuntimeImpl         runtimeMBean = null;
-    private static CompilationImpl     compileMBean = null;
-    private static OperatingSystemImpl osMBean = null;
-
-    public static synchronized ClassLoadingMXBean getClassLoadingMXBean() {
-        if (classMBean == null) {
-            classMBean = new ClassLoadingImpl(jvm);
-        }
-        return classMBean;
-    }
-
-    public static synchronized MemoryMXBean getMemoryMXBean() {
-        if (memoryMBean == null) {
-            memoryMBean = new MemoryImpl(jvm);
-        }
-        return memoryMBean;
-    }
-
-    public static synchronized ThreadMXBean getThreadMXBean() {
-        if (threadMBean == null) {
-            threadMBean = new ThreadImpl(jvm);
-        }
-        return threadMBean;
-    }
-
-    public static synchronized RuntimeMXBean getRuntimeMXBean() {
-        if (runtimeMBean == null) {
-            runtimeMBean = new RuntimeImpl(jvm);
-        }
-        return runtimeMBean;
-    }
-
-    public static synchronized CompilationMXBean getCompilationMXBean() {
-        if (compileMBean == null && jvm.getCompilerName() != null) {
-            compileMBean = new CompilationImpl(jvm);
-        }
-        return compileMBean;
-    }
-
-    public static synchronized OperatingSystemMXBean getOperatingSystemMXBean() {
-        if (osMBean == null) {
-            osMBean = (OperatingSystemImpl)
-                          OSMBeanFactory.getOperatingSystemMXBean(jvm);
-        }
-        return osMBean;
-    }
-
-    public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
-        MemoryPoolMXBean[] pools = MemoryImpl.getMemoryPools();
-        List<MemoryPoolMXBean> list = new ArrayList<MemoryPoolMXBean>(pools.length);
-        for (int i = 0; i < pools.length; i++) {
-            MemoryPoolMXBean p = pools[i];
-            list.add(p);
-        }
-        return list;
-    }
-
-    public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
-        MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
-        List<MemoryManagerMXBean> result = new ArrayList<MemoryManagerMXBean>(mgrs.length);
-        for (int i = 0; i < mgrs.length; i++) {
-            MemoryManagerMXBean m = mgrs[i];
-            result.add(m);
-        }
-        return result;
-    }
-
-    public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
-        MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
-        List<GarbageCollectorMXBean> result = new ArrayList<GarbageCollectorMXBean>(mgrs.length);
-        for (int i = 0; i < mgrs.length; i++) {
-            if (mgrs[i] instanceof GarbageCollectorMXBean) {
-                GarbageCollectorMXBean gc = (GarbageCollectorMXBean) mgrs[i];
-                result.add(gc);
-            }
-        }
-        return result;
-    }
-
-    private static HotSpotDiagnostic hsDiagMBean = null;
-    private static HotspotRuntime hsRuntimeMBean = null;
-    private static HotspotClassLoading hsClassMBean = null;
-    private static HotspotThread hsThreadMBean = null;
-    private static HotspotCompilation hsCompileMBean = null;
-    private static HotspotMemory hsMemoryMBean = null;
-
-    public static synchronized HotSpotDiagnosticMXBean getDiagnosticMXBean() {
-        if (hsDiagMBean == null) {
-            hsDiagMBean = new HotSpotDiagnostic();
-        }
-        return hsDiagMBean;
-    }
-
-    /**
-
-    /**
-     * This method is for testing only.
-     */
-    public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean() {
-        if (hsRuntimeMBean == null) {
-            hsRuntimeMBean = new HotspotRuntime(jvm);
-        }
-        return hsRuntimeMBean;
-    }
-
-    /**
-     * This method is for testing only.
-     */
-    public static synchronized HotspotClassLoadingMBean getHotspotClassLoadingMBean() {
-        if (hsClassMBean == null) {
-            hsClassMBean = new HotspotClassLoading(jvm);
-        }
-        return hsClassMBean;
-    }
-
-    /**
-     * This method is for testing only.
-     */
-    public static synchronized HotspotThreadMBean getHotspotThreadMBean() {
-        if (hsThreadMBean == null) {
-            hsThreadMBean = new HotspotThread(jvm);
-        }
-        return hsThreadMBean;
-    }
-
-    /**
-     * This method is for testing only.
-     */
-    public static synchronized HotspotMemoryMBean getHotspotMemoryMBean() {
-        if (hsMemoryMBean == null) {
-            hsMemoryMBean = new HotspotMemory(jvm);
-        }
-        return hsMemoryMBean;
-    }
-
-    /**
-     * This method is for testing only.
-     */
-    public static synchronized HotspotCompilationMBean getHotspotCompilationMBean() {
-        if (hsCompileMBean == null) {
-            hsCompileMBean = new HotspotCompilation(jvm);
-        }
-        return hsCompileMBean;
-    }
-
-    private static Permission monitorPermission =
-        new ManagementPermission("monitor");
-    private static Permission controlPermission =
-        new ManagementPermission("control");
-
-    /**
-     * Check that the current context is trusted to perform monitoring
-     * or management.
-     * <p>
-     * If the check fails we throw a SecurityException, otherwise
-     * we return normally.
-     *
-     * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have ManagementPermission("control").
-     */
-    static void checkAccess(Permission p)
-         throws SecurityException {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            sm.checkPermission(p);
-        }
-    }
-
-    static void checkMonitorAccess() throws SecurityException {
-        checkAccess(monitorPermission);
-    }
-    static void checkControlAccess() throws SecurityException {
-        checkAccess(controlPermission);
-    }
-
-    /**
-     * Registers an MXBean and throws exception if an instance with the same
-     * name exists.
-     *
-     * This method makes a DynamicMBean out of an MXBean by wrapping it with a
-     * StandardMBean (StandardEmitterMBean if the supplied emitter is not null),
-     * so it can be registered in an MBeanServer which does not have support for
-     * MXBeans.
-     */
-    private static void addMXBean(MBeanServer mbs, Object mbean,
-                                  String mbeanName, NotificationEmitter emitter) {
-        // Make DynamicMBean out of MXBean by wrapping it with a StandardMBean
-        //
-        final DynamicMBean dmbean;
-        if (emitter == null) {
-            dmbean = new StandardMBean(mbean, null, true);
-        } else {
-            dmbean = new StandardEmitterMBean(mbean, null, true, emitter);
-        }
-        addMBean(mbs, dmbean, mbeanName, false);
-    }
-
-    /**
-     * Registers a Standard MBean or a Dynamic MBean and throws
-     * exception if an instance with the same name exists.
-     */
-    private static void addMBean(MBeanServer mbs, Object mbean, String mbeanName) {
-        addMBean(mbs, mbean, mbeanName, false);
-    }
-
-    private static void addMBean(MBeanServer mbs, Object mbean,
-                                 String mbeanName, boolean ignoreConflicts) {
-        try {
-            final ObjectName objName = new ObjectName(mbeanName);
-
-            // inner class requires these fields to be final
-            final MBeanServer mbs0 = mbs;
-            final Object mbean0 = mbean;
-            final boolean ignore = ignoreConflicts;
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
-                public Object run() throws InstanceAlreadyExistsException,
-                                           MBeanRegistrationException,
-                                           NotCompliantMBeanException {
-                    try {
-                        ObjectInstance o = mbs0.registerMBean(mbean0,
-                                                              objName);
-                        return null;
-                    } catch (InstanceAlreadyExistsException e) {
-                        // if an instance with the object name exists in
-                        // the MBeanServer ignore the exception
-                        // if ignoreConflicts is true;
-                        // otherwise, throws exception.
-                        if (!ignore) {
-                             throw e;
-                        }
-                    }
-                    return null;
-                }
-            });
-        } catch (PrivilegedActionException e) {
-            throw Util.newException(e.getException());
-        } catch (MalformedObjectNameException e) {
-            // should not reach here
-            throw Util.newException(e);
-        }
-    }
-
-    public static MBeanServer createPlatformMBeanServer() {
-        MBeanServer mbs = MBeanServerFactory.createMBeanServer();
-        // Register all the platform MBeans to this MBeanServer
-        addMXBean(mbs, getClassLoadingMXBean(),
-                  CLASS_LOADING_MXBEAN_NAME, null);
-        addMXBean(mbs, getMemoryMXBean(),
-                  MEMORY_MXBEAN_NAME, (NotificationEmitter) getMemoryMXBean());
-        addMXBean(mbs, getOperatingSystemMXBean(),
-                  OPERATING_SYSTEM_MXBEAN_NAME, null);
-        addMXBean(mbs, getRuntimeMXBean(),
-                  RUNTIME_MXBEAN_NAME, null);
-        addMXBean(mbs, getThreadMXBean(),
-                  THREAD_MXBEAN_NAME, null);
-        addMXBean(mbs, getDiagnosticMXBean(),
-                  HOTSPOT_DIAGNOSTIC_MXBEAN_NAME, null);
-
-        // CompilationMBean may not exist
-        if (getCompilationMXBean() != null) {
-            addMXBean(mbs, getCompilationMXBean(),
-                      COMPILATION_MXBEAN_NAME, null);
-        }
-
-        // Register MBeans for memory pools and memory managers
-        addMemoryManagers(mbs);
-        addMemoryPools(mbs);
-
-        // Register platform extension
-        addMXBean(mbs, LogManager.getLoggingMXBean(),
-                  LogManager.LOGGING_MXBEAN_NAME, null);
-
-        return mbs;
-    }
-
-    private final static String HOTSPOT_DIAGNOSTIC_MXBEAN_NAME =
-        "com.sun.management:type=HotSpotDiagnostic";
-
-    private final static String HOTSPOT_CLASS_LOADING_MBEAN_NAME =
-        "sun.management:type=HotspotClassLoading";
-
-    private final static String HOTSPOT_COMPILATION_MBEAN_NAME =
-        "sun.management:type=HotspotCompilation";
-
-    private final static String HOTSPOT_MEMORY_MBEAN_NAME =
-        "sun.management:type=HotspotMemory";
-
-    private static final String HOTSPOT_RUNTIME_MBEAN_NAME =
-        "sun.management:type=HotspotRuntime";
-
-    private final static String HOTSPOT_THREAD_MBEAN_NAME =
-        "sun.management:type=HotspotThreading";
-
-    private final static String HOTSPOT_INTERNAL_MBEAN_NAME =
-        "sun.management:type=HotspotInternal";
-
-    private static ObjectName hsInternalObjName = null;
-    static synchronized ObjectName getHotspotInternalObjectName() {
-        if (hsInternalObjName == null) {
-            try {
-                hsInternalObjName = new ObjectName(HOTSPOT_INTERNAL_MBEAN_NAME);
-            } catch (MalformedObjectNameException e) {
-                // should not reach here
-                throw Util.newException(e);
-            }
-        }
-        return hsInternalObjName;
-    }
-
-    static void registerInternalMBeans(MBeanServer mbs) {
-        // register all internal MBeans if not registered
-        // No exception is thrown if a MBean with that object name
-        // already registered (i.e. ignore if name conflicts).
-        addMBean(mbs, getHotspotClassLoadingMBean(),
-            HOTSPOT_CLASS_LOADING_MBEAN_NAME, true);
-        addMBean(mbs, getHotspotMemoryMBean(),
-            HOTSPOT_MEMORY_MBEAN_NAME, true);
-        addMBean(mbs, getHotspotRuntimeMBean(),
-            HOTSPOT_RUNTIME_MBEAN_NAME, true);
-        addMBean(mbs, getHotspotThreadMBean(),
-            HOTSPOT_THREAD_MBEAN_NAME, true);
-
-        // CompilationMBean may not exist
-        if (getCompilationMXBean() != null) {
-            addMBean(mbs, getHotspotCompilationMBean(),
-                HOTSPOT_COMPILATION_MBEAN_NAME, true);
-        }
-    }
-
-    private static void unregisterMBean(MBeanServer mbs, String mbeanName) {
-        try {
-            final ObjectName objName = new ObjectName(mbeanName);
-
-            // inner class requires these fields to be final
-            final MBeanServer mbs0 = mbs;
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
-                public Object run() throws MBeanRegistrationException,
-                                           RuntimeOperationsException  {
-                    try {
-                        mbs0.unregisterMBean(objName);
-                    } catch (InstanceNotFoundException e) {
-                        // ignore exception if not found
-                    }
-                    return null;
-                }
-            });
-        } catch (PrivilegedActionException e) {
-            throw Util.newException(e.getException());
-        } catch (MalformedObjectNameException e) {
-            // should not reach here
-            throw Util.newException(e);
-        }
-    }
-
-    static void unregisterInternalMBeans(MBeanServer mbs) {
-        // unregister all internal MBeans
-        unregisterMBean(mbs, HOTSPOT_CLASS_LOADING_MBEAN_NAME);
-        unregisterMBean(mbs, HOTSPOT_MEMORY_MBEAN_NAME);
-        unregisterMBean(mbs, HOTSPOT_RUNTIME_MBEAN_NAME);
-        unregisterMBean(mbs, HOTSPOT_THREAD_MBEAN_NAME);
-
-        // CompilationMBean may not exist
-        if (getCompilationMXBean() != null) {
-            unregisterMBean(mbs, HOTSPOT_COMPILATION_MBEAN_NAME);
-        }
-    }
-
-    private static synchronized void addMemoryPools(MBeanServer mbs) {
-
-        // Get a list of memory pools
-        MemoryPoolMXBean[] newPools = MemoryImpl.getMemoryPools();
-
-        for (int i = 0; i < newPools.length; i++) {
-            String poolObjNameString = Util.getMBeanObjectName(newPools[i]);
-            addMXBean(mbs, newPools[i], poolObjNameString, null);
-        }
-    }
-
-    // Register all memory managers with the MBeanServer;
-    private static synchronized void addMemoryManagers(MBeanServer mbs) {
-
-        // Get a list of memory managers
-        MemoryManagerMXBean[] newMgrs = MemoryImpl.getMemoryManagers();
-
-        for (int i = 0; i < newMgrs.length; i++) {
-            String mgrObjNameString = Util.getMBeanObjectName(newMgrs[i]);
-            addMXBean(mbs, newMgrs[i], mgrObjNameString, null);
-        }
-    }
-
     // Invoked by the VM
     private static MemoryPoolMXBean createMemoryPool
         (String name, boolean isHeap, long uThreshold, long gcThreshold) {
@@ -480,29 +52,4 @@
         // ignore type parameter which is for future extension
         return new GarbageCollectorImpl(name);
     }
-
-    static {
-        AccessController.doPrivileged(new LoadLibraryAction("management"));
-        jvm = new VMManagementImpl();
-    }
-
-    public static boolean isThreadSuspended(int state) {
-        return ((state & JMM_THREAD_STATE_FLAG_SUSPENDED) != 0);
-    }
-
-    public static boolean isThreadRunningNative(int state) {
-        return ((state & JMM_THREAD_STATE_FLAG_NATIVE) != 0);
-    }
-
-    public static Thread.State toThreadState(int state) {
-        // suspended and native bits may be set in state
-        int threadStatus = state & ~JMM_THREAD_STATE_FLAG_MASK;
-        return sun.misc.VM.toThreadState(threadStatus);
-    }
-
-    // These values are defined in jmm.h
-    private static final int JMM_THREAD_STATE_FLAG_MASK = 0xFFF00000;
-    private static final int JMM_THREAD_STATE_FLAG_SUSPENDED = 0x00100000;
-    private static final int JMM_THREAD_STATE_FLAG_NATIVE = 0x00400000;
-
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2003-2006 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.management;
+
+import java.lang.management.*;
+import java.util.logging.LogManager;
+
+import javax.management.DynamicMBean;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.MBeanInfo;
+import javax.management.NotificationEmitter;
+import javax.management.ObjectName;
+import javax.management.ObjectInstance;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanRegistrationException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.RuntimeOperationsException;
+import javax.management.StandardEmitterMBean;
+import javax.management.StandardMBean;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import sun.security.action.LoadLibraryAction;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.ListIterator;
+import com.sun.management.OSMBeanFactory;
+import com.sun.management.HotSpotDiagnosticMXBean;
+
+import static java.lang.management.ManagementFactory.*;
+
+/**
+ * ManagementFactoryHelper provides static factory methods to create
+ * instances of the management interface.
+ */
+public class ManagementFactoryHelper {
+    private ManagementFactoryHelper() {};
+
+    private static VMManagement jvm;
+
+    private static boolean mbeansCreated = false;
+    private static ClassLoadingImpl    classMBean = null;
+    private static MemoryImpl          memoryMBean = null;
+    private static ThreadImpl          threadMBean = null;
+    private static RuntimeImpl         runtimeMBean = null;
+    private static CompilationImpl     compileMBean = null;
+    private static OperatingSystemImpl osMBean = null;
+
+    public static synchronized ClassLoadingMXBean getClassLoadingMXBean() {
+        if (classMBean == null) {
+            classMBean = new ClassLoadingImpl(jvm);
+        }
+        return classMBean;
+    }
+
+    public static synchronized MemoryMXBean getMemoryMXBean() {
+        if (memoryMBean == null) {
+            memoryMBean = new MemoryImpl(jvm);
+        }
+        return memoryMBean;
+    }
+
+    public static synchronized ThreadMXBean getThreadMXBean() {
+        if (threadMBean == null) {
+            threadMBean = new ThreadImpl(jvm);
+        }
+        return threadMBean;
+    }
+
+    public static synchronized RuntimeMXBean getRuntimeMXBean() {
+        if (runtimeMBean == null) {
+            runtimeMBean = new RuntimeImpl(jvm);
+        }
+        return runtimeMBean;
+    }
+
+    public static synchronized CompilationMXBean getCompilationMXBean() {
+        if (compileMBean == null && jvm.getCompilerName() != null) {
+            compileMBean = new CompilationImpl(jvm);
+        }
+        return compileMBean;
+    }
+
+    public static synchronized OperatingSystemMXBean getOperatingSystemMXBean() {
+        if (osMBean == null) {
+            osMBean = (OperatingSystemImpl)
+                          OSMBeanFactory.getOperatingSystemMXBean(jvm);
+        }
+        return osMBean;
+    }
+
+    public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
+        MemoryPoolMXBean[] pools = MemoryImpl.getMemoryPools();
+        List<MemoryPoolMXBean> list = new ArrayList<MemoryPoolMXBean>(pools.length);
+        for (MemoryPoolMXBean p : pools) {
+            list.add(p);
+        }
+        return list;
+    }
+
+    public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
+        MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
+        List<MemoryManagerMXBean> result = new ArrayList<MemoryManagerMXBean>(mgrs.length);
+        for (MemoryManagerMXBean m : mgrs) {
+            result.add(m);
+        }
+        return result;
+    }
+
+    public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
+        MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
+        List<GarbageCollectorMXBean> result = new ArrayList<GarbageCollectorMXBean>(mgrs.length);
+        for (MemoryManagerMXBean m : mgrs) {
+            if (GarbageCollectorMXBean.class.isInstance(m)) {
+                 result.add(GarbageCollectorMXBean.class.cast(m));
+            }
+        }
+        return result;
+    }
+
+    private static HotSpotDiagnostic hsDiagMBean = null;
+    private static HotspotRuntime hsRuntimeMBean = null;
+    private static HotspotClassLoading hsClassMBean = null;
+    private static HotspotThread hsThreadMBean = null;
+    private static HotspotCompilation hsCompileMBean = null;
+    private static HotspotMemory hsMemoryMBean = null;
+
+    public static synchronized HotSpotDiagnosticMXBean getDiagnosticMXBean() {
+        if (hsDiagMBean == null) {
+            hsDiagMBean = new HotSpotDiagnostic();
+        }
+        return hsDiagMBean;
+    }
+
+    /**
+
+    /**
+     * This method is for testing only.
+     */
+    public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean() {
+        if (hsRuntimeMBean == null) {
+            hsRuntimeMBean = new HotspotRuntime(jvm);
+        }
+        return hsRuntimeMBean;
+    }
+
+    /**
+     * This method is for testing only.
+     */
+    public static synchronized HotspotClassLoadingMBean getHotspotClassLoadingMBean() {
+        if (hsClassMBean == null) {
+            hsClassMBean = new HotspotClassLoading(jvm);
+        }
+        return hsClassMBean;
+    }
+
+    /**
+     * This method is for testing only.
+     */
+    public static synchronized HotspotThreadMBean getHotspotThreadMBean() {
+        if (hsThreadMBean == null) {
+            hsThreadMBean = new HotspotThread(jvm);
+        }
+        return hsThreadMBean;
+    }
+
+    /**
+     * This method is for testing only.
+     */
+    public static synchronized HotspotMemoryMBean getHotspotMemoryMBean() {
+        if (hsMemoryMBean == null) {
+            hsMemoryMBean = new HotspotMemory(jvm);
+        }
+        return hsMemoryMBean;
+    }
+
+    /**
+     * This method is for testing only.
+     */
+    public static synchronized HotspotCompilationMBean getHotspotCompilationMBean() {
+        if (hsCompileMBean == null) {
+            hsCompileMBean = new HotspotCompilation(jvm);
+        }
+        return hsCompileMBean;
+    }
+
+    /**
+     * Registers a given MBean if not registered in the MBeanServer;
+     * otherwise, just return.
+     */
+    private static void addMBean(MBeanServer mbs, Object mbean, String mbeanName) {
+        try {
+            final ObjectName objName = Util.newObjectName(mbeanName);
+
+            // inner class requires these fields to be final
+            final MBeanServer mbs0 = mbs;
+            final Object mbean0 = mbean;
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+                public Void run() throws MBeanRegistrationException,
+                                         NotCompliantMBeanException {
+                    try {
+                        mbs0.registerMBean(mbean0, objName);
+                        return null;
+                    } catch (InstanceAlreadyExistsException e) {
+                        // if an instance with the object name exists in
+                        // the MBeanServer ignore the exception
+                    }
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw Util.newException(e.getException());
+        }
+    }
+
+    private final static String HOTSPOT_CLASS_LOADING_MBEAN_NAME =
+        "sun.management:type=HotspotClassLoading";
+
+    private final static String HOTSPOT_COMPILATION_MBEAN_NAME =
+        "sun.management:type=HotspotCompilation";
+
+    private final static String HOTSPOT_MEMORY_MBEAN_NAME =
+        "sun.management:type=HotspotMemory";
+
+    private static final String HOTSPOT_RUNTIME_MBEAN_NAME =
+        "sun.management:type=HotspotRuntime";
+
+    private final static String HOTSPOT_THREAD_MBEAN_NAME =
+        "sun.management:type=HotspotThreading";
+
+    static void registerInternalMBeans(MBeanServer mbs) {
+        // register all internal MBeans if not registered
+        // No exception is thrown if a MBean with that object name
+        // already registered
+        addMBean(mbs, getHotspotClassLoadingMBean(),
+            HOTSPOT_CLASS_LOADING_MBEAN_NAME);
+        addMBean(mbs, getHotspotMemoryMBean(),
+            HOTSPOT_MEMORY_MBEAN_NAME);
+        addMBean(mbs, getHotspotRuntimeMBean(),
+            HOTSPOT_RUNTIME_MBEAN_NAME);
+        addMBean(mbs, getHotspotThreadMBean(),
+            HOTSPOT_THREAD_MBEAN_NAME);
+
+        // CompilationMBean may not exist
+        if (getCompilationMXBean() != null) {
+            addMBean(mbs, getHotspotCompilationMBean(),
+                HOTSPOT_COMPILATION_MBEAN_NAME);
+        }
+    }
+
+    private static void unregisterMBean(MBeanServer mbs, String mbeanName) {
+        try {
+            final ObjectName objName = Util.newObjectName(mbeanName);
+
+            // inner class requires these fields to be final
+            final MBeanServer mbs0 = mbs;
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+                public Void run() throws MBeanRegistrationException,
+                                           RuntimeOperationsException  {
+                    try {
+                        mbs0.unregisterMBean(objName);
+                    } catch (InstanceNotFoundException e) {
+                        // ignore exception if not found
+                    }
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException e) {
+            throw Util.newException(e.getException());
+        }
+    }
+
+    static void unregisterInternalMBeans(MBeanServer mbs) {
+        // unregister all internal MBeans
+        unregisterMBean(mbs, HOTSPOT_CLASS_LOADING_MBEAN_NAME);
+        unregisterMBean(mbs, HOTSPOT_MEMORY_MBEAN_NAME);
+        unregisterMBean(mbs, HOTSPOT_RUNTIME_MBEAN_NAME);
+        unregisterMBean(mbs, HOTSPOT_THREAD_MBEAN_NAME);
+
+        // CompilationMBean may not exist
+        if (getCompilationMXBean() != null) {
+            unregisterMBean(mbs, HOTSPOT_COMPILATION_MBEAN_NAME);
+        }
+    }
+
+    static {
+        AccessController.doPrivileged(new LoadLibraryAction("management"));
+        jvm = new VMManagementImpl();
+    }
+
+    public static boolean isThreadSuspended(int state) {
+        return ((state & JMM_THREAD_STATE_FLAG_SUSPENDED) != 0);
+    }
+
+    public static boolean isThreadRunningNative(int state) {
+        return ((state & JMM_THREAD_STATE_FLAG_NATIVE) != 0);
+    }
+
+    public static Thread.State toThreadState(int state) {
+        // suspended and native bits may be set in state
+        int threadStatus = state & ~JMM_THREAD_STATE_FLAG_MASK;
+        return sun.misc.VM.toThreadState(threadStatus);
+    }
+
+    // These values are defined in jmm.h
+    private static final int JMM_THREAD_STATE_FLAG_MASK = 0xFFF00000;
+    private static final int JMM_THREAD_STATE_FLAG_SUSPENDED = 0x00100000;
+    private static final int JMM_THREAD_STATE_FLAG_NATIVE = 0x00400000;
+
+}
--- a/jdk/src/share/classes/sun/management/MappedMXBeanType.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MappedMXBeanType.java	Sun May 04 07:05:42 2008 -0700
@@ -735,14 +735,14 @@
             throws OpenDataException, InvalidObjectException {
 
             if (fromMethod == null) {
-                throw new InternalError("Does not support data conversion");
+                throw new AssertionError("Does not support data conversion");
             }
 
             try {
                 return fromMethod.invoke(null, data);
             } catch (IllegalAccessException e) {
                 // should never reach here
-                throw Util.newAssertionError(e);
+                throw new AssertionError(e);
             } catch (InvocationTargetException e) {
                 final OpenDataException ode =
                     new OpenDataException("Failed to invoke " +
@@ -785,7 +785,7 @@
             t = new InProgress();
         } catch (OpenDataException e) {
             // Should not reach here
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
         inProgress = t;
     }
@@ -807,9 +807,9 @@
                 } catch (ClassNotFoundException e) {
                     // the classes that these predefined types declare
                     // must exist!
-                    throw Util.newAssertionError(e);
+                    throw new AssertionError(e);
                 } catch (OpenDataException e) {
-                    throw Util.newAssertionError(e);
+                    throw new AssertionError(e);
                 }
 
                 if (c.getName().startsWith("java.lang.")) {
@@ -821,12 +821,12 @@
                         // OK: must not be a primitive wrapper
                     } catch (IllegalAccessException e) {
                         // Should not reach here
-                       throw Util.newAssertionError(e);
+                       throw new AssertionError(e);
                     }
                 }
             }
         } catch (OpenDataException e) {
-            throw Util.newAssertionError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/MemoryImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MemoryImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -25,13 +25,13 @@
 
 package sun.management;
 
+import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryMXBean;
 import java.lang.management.MemoryUsage;
 import java.lang.management.MemoryNotificationInfo;
 import java.lang.management.MemoryManagerMXBean;
 import java.lang.management.MemoryPoolMXBean;
 import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
 import javax.management.MBeanNotificationInfo;
 import javax.management.Notification;
 import javax.management.NotificationEmitter;
@@ -88,7 +88,7 @@
     }
 
     public void setVerbose(boolean value) {
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         setVerboseGC(value);
     }
@@ -150,19 +150,6 @@
         return ++seqNumber;
     }
 
-    private static ObjectName objname = null;
-    private static synchronized ObjectName getObjectName() {
-        if (objname != null) return objname;
-
-        try {
-            objname = new ObjectName(java.lang.management.ManagementFactory.MEMORY_MXBEAN_NAME);
-        } catch (MalformedObjectNameException e) {
-            // should never reach here
-            throw Util.newInternalError(e);
-        }
-        return objname;
-    }
-
     static void createNotification(String notifType,
                                    String poolName,
                                    MemoryUsage usage,
@@ -175,7 +162,7 @@
         long timestamp = System.currentTimeMillis();
         String msg = getNotifMsg(notifType);
         Notification notif = new Notification(notifType,
-                                              getObjectName(),
+                                              mbean.getObjectName(),
                                               getNextSeqNumber(),
                                               timestamp,
                                               msg);
@@ -189,4 +176,8 @@
         mbean.sendNotification(notif);
     }
 
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.MEMORY_MXBEAN_NAME);
+    }
+
 }
--- a/jdk/src/share/classes/sun/management/MemoryManagerImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MemoryManagerImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -25,9 +25,12 @@
 
 package sun.management;
 
+import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryManagerMXBean;
 import java.lang.management.MemoryPoolMXBean;
 
+import javax.management.ObjectName;
+
 /**
  * Implementation class for a memory manager.
  * Standard and committed hotspot-specific metrics if any.
@@ -73,4 +76,8 @@
     }
     private native MemoryPoolMXBean[] getMemoryPools0();
 
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE, getName());
+    }
+
 }
--- a/jdk/src/share/classes/sun/management/MemoryNotifInfoCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MemoryNotifInfoCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -69,7 +69,7 @@
                                             memoryNotifInfoItemValues);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -80,7 +80,7 @@
                 MappedMXBeanType.toOpenType(MemoryNotificationInfo.class);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/MemoryPoolImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MemoryPoolImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -25,12 +25,13 @@
 
 package sun.management;
 
+import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryPoolMXBean;
-
 import java.lang.management.MemoryUsage;
 import java.lang.management.MemoryType;
 import java.lang.management.MemoryManagerMXBean;
 import javax.management.openmbean.CompositeData;
+import javax.management.ObjectName;
 
 import static java.lang.management.MemoryNotificationInfo.*;
 
@@ -114,7 +115,7 @@
                 "Usage threshold is not supported");
         }
 
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         MemoryUsage usage = getUsage0();
         if (newThreshold < 0) {
@@ -159,7 +160,7 @@
     }
 
     public void resetPeakUsage() {
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         synchronized (this) {
             // synchronized since getPeakUsage may be called concurrently
@@ -211,7 +212,7 @@
                 "CollectionUsage threshold is not supported");
         }
 
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         MemoryUsage usage = getUsage0();
         if (newThreshold < 0) {
@@ -304,7 +305,7 @@
         }
         void triggerAction() {
             // Should not reach here
-            throw new InternalError();
+            throw new AssertionError("Should not reach here");
         }
         void clearAction() {
             // do nothing
@@ -332,10 +333,15 @@
         }
         void triggerAction() {
             // Should not reach here
-            throw new InternalError();
+            throw new AssertionError("Should not reach here");
         }
         void clearAction() {
             // do nothing
         }
     }
+
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.MEMORY_POOL_MXBEAN_DOMAIN_TYPE, getName());
+    }
+
 }
--- a/jdk/src/share/classes/sun/management/MemoryUsageCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MemoryUsageCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -68,7 +68,7 @@
                                             memoryUsageItemValues);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -79,7 +79,7 @@
                 MappedMXBeanType.toOpenType(MemoryUsage.class);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/MonitorInfoCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/MonitorInfoCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -81,7 +81,7 @@
                                             values);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -95,7 +95,7 @@
             monitorInfoItemNames = (String[]) s.toArray(new String[0]);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/NotificationEmitterSupport.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/NotificationEmitterSupport.java	Sun May 04 07:05:42 2008 -0700
@@ -156,7 +156,7 @@
                     li.listener.handleNotification(notification, li.handback);
                 } catch (Exception e) {
                     e.printStackTrace();
-                    throw new InternalError("Error in invoking listener");
+                    throw new AssertionError("Error in invoking listener");
                 }
             }
         }
--- a/jdk/src/share/classes/sun/management/OperatingSystemImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/OperatingSystemImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,8 @@
 package sun.management;
 
 import java.lang.management.OperatingSystemMXBean;
+import java.lang.management.ManagementFactory;
+import javax.management.ObjectName;
 import sun.misc.Unsafe;
 
 /**
@@ -71,4 +73,9 @@
              return -1.0;
         }
     }
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME);
+    }
+
 }
+
--- a/jdk/src/share/classes/sun/management/RuntimeImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/RuntimeImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,7 @@
 package sun.management;
 
 import java.lang.management.RuntimeMXBean;
+import java.lang.management.ManagementFactory;
 
 import java.util.List;
 import java.util.HashMap;
@@ -38,6 +39,7 @@
 import javax.management.openmbean.OpenType;
 import javax.management.openmbean.SimpleType;
 import javax.management.openmbean.OpenDataException;
+import javax.management.ObjectName;
 
 /**
  * Implementation class for the runtime subsystem.
@@ -104,12 +106,12 @@
             throw new UnsupportedOperationException(
                 "Boot class path mechanism is not supported");
         }
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
         return jvm.getBootClassPath();
     }
 
     public List<String> getInputArguments() {
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
         return jvm.getVmArguments();
     }
 
@@ -145,4 +147,9 @@
 
         return map;
     }
+
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME);
+    }
+
 }
--- a/jdk/src/share/classes/sun/management/StackTraceElementCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/StackTraceElementCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -76,7 +76,7 @@
                                             stackTraceElementItemValues);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -87,7 +87,7 @@
                 MappedMXBeanType.toOpenType(StackTraceElement.class);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/management/ThreadImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/ThreadImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -26,6 +26,7 @@
 package sun.management;
 
 import java.lang.management.ThreadMXBean;
+import java.lang.management.ManagementFactory;
 
 import java.lang.management.ThreadInfo;
 import java.lang.management.LockInfo;
@@ -33,6 +34,8 @@
 import java.util.Map;
 import java.util.HashMap;
 
+import javax.management.ObjectName;
+
 /**
  * Implementation class for the thread subsystem.
  * Standard and committed hotspot-specific metrics if any.
@@ -102,7 +105,7 @@
     }
 
     public long[] getAllThreadIds() {
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
 
         Thread[] threads = getThreads();
         int length = threads.length;
@@ -156,7 +159,7 @@
                 "Invalid maxDepth parameter: " + maxDepth);
         }
 
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
 
         ThreadInfo[] infos = new ThreadInfo[ids.length];
         if (maxDepth == Integer.MAX_VALUE) {
@@ -175,7 +178,7 @@
                 "Thread contention monitoring is not supported");
         }
 
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
 
         synchronized (this) {
             if (contentionMonitoringEnabled != enable) {
@@ -297,7 +300,7 @@
                 "Thread CPU time measurement is not supported");
         }
 
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
         synchronized (this) {
             if (cpuTimeEnabled != enable) {
                 // update VM of the state change
@@ -308,7 +311,7 @@
     }
 
     public long[] findMonitorDeadlockedThreads() {
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
 
         Thread[] threads = findMonitorDeadlockedThreads0();
         if (threads == null) {
@@ -329,7 +332,7 @@
                 "Monitoring of Synchronizer Usage is not supported.");
         }
 
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
 
         Thread[] threads = findDeadlockedThreads0();
         if (threads == null) {
@@ -345,7 +348,7 @@
     }
 
     public void resetPeakThreadCount() {
-        ManagementFactory.checkControlAccess();
+        Util.checkControlAccess();
         resetPeakThreadCount0();
     }
 
@@ -373,7 +376,7 @@
                 "Monitoring of Synchronizer Usage is not supported.");
         }
 
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
         return dumpThreads0(ids, lockedMonitors, lockedSynchronizers);
     }
 
@@ -388,7 +391,7 @@
                 "Monitoring of Synchronizer Usage is not supported.");
         }
 
-        ManagementFactory.checkMonitorAccess();
+        Util.checkMonitorAccess();
         return dumpThreads0(null, lockedMonitors, lockedSynchronizers);
     }
 
@@ -410,4 +413,10 @@
 
     // tid == 0 to reset contention times for all threads
     private static native void resetContentionTimes0(long tid);
+
+    public ObjectName getObjectName() {
+        return Util.newObjectName(ManagementFactory.THREAD_MXBEAN_NAME);
+    }
+
 }
+
--- a/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -126,7 +126,7 @@
                                             threadInfoItemValues);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -209,7 +209,7 @@
                                   v5ItemTypes);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
 
         // Each CompositeData object has its CompositeType associated
--- a/jdk/src/share/classes/sun/management/Util.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/Util.java	Sun May 04 07:05:42 2008 -0700
@@ -26,48 +26,58 @@
 package sun.management;
 
 import java.lang.management.*;
+import java.util.List;
+import java.security.Permission;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
+
 import static java.lang.management.ManagementFactory.*;
-import java.util.List;
 
 class Util {
-    static String getMBeanObjectName(MemoryPoolMXBean pool) {
-        return MEMORY_POOL_MXBEAN_DOMAIN_TYPE +
-            ",name=" + pool.getName();
+    static RuntimeException newException(Exception e) {
+        throw new RuntimeException(e);
+    }
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];
+    static String[] toStringArray(List<String> list) {
+        return (String[]) list.toArray(EMPTY_STRING_ARRAY);
+    }
+
+    static ObjectName newObjectName(String name) {
+        return com.sun.jmx.mbeanserver.Util.newObjectName(name);
+    }
+
+    public static ObjectName newObjectName(String domainAndType, String name) {
+        return newObjectName(domainAndType + ",name=" + name);
     }
 
-    static String getMBeanObjectName(MemoryManagerMXBean mgr) {
-        if (mgr instanceof GarbageCollectorMXBean) {
-            return getMBeanObjectName((GarbageCollectorMXBean) mgr);
-        } else {
-            return MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE +
-                ",name=" + mgr.getName();
+    private static ManagementPermission monitorPermission =
+        new ManagementPermission("monitor");
+    private static ManagementPermission controlPermission =
+        new ManagementPermission("control");
+
+    /**
+     * Check that the current context is trusted to perform monitoring
+     * or management.
+     * <p>
+     * If the check fails we throw a SecurityException, otherwise
+     * we return normally.
+     *
+     * @exception  SecurityException  if a security manager exists and if
+     *             the caller does not have ManagementPermission("control").
+     */
+    static void checkAccess(ManagementPermission p)
+         throws SecurityException {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(p);
         }
     }
 
-    static String getMBeanObjectName(GarbageCollectorMXBean gc) {
-        return GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE +
-            ",name=" + gc.getName();
-    }
-
-    static RuntimeException newException(Exception e) {
-        RuntimeException e1 = new RuntimeException(e.getMessage());
-        e1.initCause(e);
-        return e1;
+    static void checkMonitorAccess() throws SecurityException {
+        checkAccess(monitorPermission);
     }
-
-    static InternalError newInternalError(Exception e) {
-        InternalError e1 = new InternalError(e.getMessage());
-        e1.initCause(e);
-        return e1;
-    }
-    static AssertionError newAssertionError(Exception e) {
-        AssertionError e1 = new AssertionError(e.getMessage());
-        e1.initCause(e);
-        return e1;
-    }
-
-    private static String[] EMPTY_STRING_ARRAY = new String[0];
-    static String[] toStringArray(List<String> list) {
-        return (String[]) list.toArray(EMPTY_STRING_ARRAY);
+    static void checkControlAccess() throws SecurityException {
+        checkAccess(controlPermission);
     }
 }
--- a/jdk/src/share/classes/sun/management/VMManagementImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/VMManagementImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -59,7 +59,7 @@
     static {
         version = getVersion0();
         if (version == null) {
-            throw new InternalError("Invalid Management Version");
+            throw new AssertionError("Invalid Management Version");
         }
         initOptionalSupportFields();
     }
@@ -244,7 +244,7 @@
             // was set
             noPerfData = true;
         } catch (IOException e) {
-            throw new InternalError(e.getMessage());
+            throw new AssertionError(e);
         }
         return perfInstr;
     }
--- a/jdk/src/share/classes/sun/management/VMOptionCompositeData.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/management/VMOptionCompositeData.java	Sun May 04 07:05:42 2008 -0700
@@ -69,7 +69,7 @@
                                             vmOptionItemValues);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
@@ -80,7 +80,7 @@
                 MappedMXBeanType.toOpenType(VMOption.class);
         } catch (OpenDataException e) {
             // Should never reach here
-            throw Util.newInternalError(e);
+            throw new AssertionError(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/net/www/protocol/http/NegotiatorImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/NegotiatorImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -91,9 +91,10 @@
         GSSManagerImpl manager = new GSSManagerImpl(
                 GSSUtil.CALLER_HTTP_NEGOTIATE);
 
-        String peerName = "HTTP/" + hostname;
+        String peerName = "HTTP@" + hostname;
 
-        GSSName serverName = manager.createName(peerName, null);
+        GSSName serverName = manager.createName(peerName,
+                GSSName.NT_HOSTBASED_SERVICE);
         context = manager.createContext(serverName,
                                         oid,
                                         null,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/nio/cs/CharsetMapping.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,351 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.nio.cs;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.*;
+import java.security.*;
+
+public class CharsetMapping {
+    public final static char UNMAPPABLE_DECODING = '\uFFFD';
+    public final static int  UNMAPPABLE_ENCODING = -1;
+
+    char[] b2cSB;                //singlebyte b->c
+    char[] b2cDB1;               //dobulebyte b->c /db1
+    char[] b2cDB2;               //dobulebyte b->c /db2
+
+    int    b2Min, b2Max;         //min/max(start/end) value of 2nd byte
+    int    b1MinDB1, b1MaxDB1;   //min/Max(start/end) value of 1st byte/db1
+    int    b1MinDB2, b1MaxDB2;   //min/Max(start/end) value of 1st byte/db2
+    int    dbSegSize;
+
+    char[] c2b;
+    char[] c2bIndex;
+
+    // Supplementary
+    char[] b2cSupp;
+    char[] c2bSupp;
+
+    // Composite
+    Entry[] b2cComp;
+    Entry[] c2bComp;
+
+    public char decodeSingle(int b) {
+        return b2cSB[b];
+    }
+
+    public char decodeDouble(int b1, int b2) {
+        if (b2 >= b2Min && b2 < b2Max) {
+            b2 -= b2Min;
+            if (b1 >= b1MinDB1 && b1 <= b1MaxDB1) {
+                b1 -= b1MinDB1;
+                return b2cDB1[b1 * dbSegSize + b2];
+            }
+            if (b1 >= b1MinDB2 && b1 <= b1MaxDB2) {
+                b1 -= b1MinDB2;
+                return b2cDB2[b1 * dbSegSize + b2];
+            }
+        }
+        return UNMAPPABLE_DECODING;
+    }
+
+    // for jis0213 all supplementary characters are in 0x2xxxx range,
+    // so only the xxxx part is now stored, should actually store the
+    // codepoint value instead.
+    public char[] decodeSurrogate(int db, char[] cc) {
+        int end = b2cSupp.length / 2;
+        int i = Arrays.binarySearch(b2cSupp, 0, end, (char)db);
+        if (i >= 0) {
+            Character.toChars(b2cSupp[end + i] + 0x20000, cc, 0);
+            return cc;
+        }
+        return null;
+    }
+
+    public char[] decodeComposite(Entry comp, char[] cc) {
+        int i = findBytes(b2cComp, comp);
+        if (i >= 0) {
+            cc[0] = (char)b2cComp[i].cp;
+            cc[1] = (char)b2cComp[i].cp2;
+            return cc;
+        }
+        return null;
+    }
+
+    public int encodeChar(char ch) {
+        int index = c2bIndex[ch >> 8];
+        if (index == 0xffff)
+            return UNMAPPABLE_ENCODING;
+        return c2b[index + (ch & 0xff)];
+    }
+
+    public int encodeSurrogate(char hi, char lo) {
+        char c = (char)Character.toCodePoint(hi, lo);
+        int end = c2bSupp.length / 2;
+        int i = Arrays.binarySearch(c2bSupp, 0, end, c);
+        if (i >= 0)
+            return c2bSupp[end + i];
+        return UNMAPPABLE_ENCODING;
+    }
+
+    public boolean isCompositeBase(Entry comp) {
+        if (comp.cp <= 0x31f7 && comp.cp >= 0xe6) {
+            return (findCP(c2bComp, comp) >= 0);
+        }
+        return false;
+    }
+
+    public int encodeComposite(Entry comp) {
+        int i = findComp(c2bComp, comp);
+        if (i >= 0)
+            return c2bComp[i].bs;
+        return UNMAPPABLE_ENCODING;
+    }
+
+    // init the CharsetMapping object from the .dat binary file
+    public static CharsetMapping get(final InputStream is) {
+        return AccessController.doPrivileged(new PrivilegedAction<CharsetMapping>() {
+            public CharsetMapping run() {
+                return new CharsetMapping().load(is);
+            }
+        });
+    }
+
+    public static class Entry {
+        public int bs;   //byte sequence reps
+        public int cp;   //Unicode codepoint
+        public int cp2;  //CC of composite
+    }
+
+    static Comparator<Entry> comparatorBytes =
+        new Comparator<Entry>() {
+            public int compare(Entry m1, Entry m2) {
+                return m1.bs - m2.bs;
+            }
+            public boolean equals(Object obj) {
+                return this == obj;
+            }
+    };
+
+    static Comparator<Entry> comparatorCP =
+        new Comparator<Entry>() {
+            public int compare(Entry m1, Entry m2) {
+                return m1.cp - m2.cp;
+            }
+            public boolean equals(Object obj) {
+                return this == obj;
+            }
+    };
+
+    static Comparator<Entry> comparatorComp =
+        new Comparator<Entry>() {
+            public int compare(Entry m1, Entry m2) {
+                 int v = m1.cp - m2.cp;
+                 if (v == 0)
+                   v = m1.cp2 - m2.cp2;
+                 return v;
+            }
+            public boolean equals(Object obj) {
+                return this == obj;
+            }
+    };
+
+    static int findBytes(Entry[] a, Entry k) {
+        return Arrays.binarySearch(a, 0, a.length, k, comparatorBytes);
+    }
+
+    static int findCP(Entry[] a, Entry k) {
+        return Arrays.binarySearch(a, 0, a.length, k, comparatorCP);
+    }
+
+    static int findComp(Entry[] a, Entry k) {
+        return Arrays.binarySearch(a, 0, a.length, k, comparatorComp);
+    }
+
+    /*****************************************************************************/
+    // tags of different charset mapping tables
+    private final static int MAP_SINGLEBYTE      = 0x1; // 0..256  : c
+    private final static int MAP_DOUBLEBYTE1     = 0x2; // min..max: c
+    private final static int MAP_DOUBLEBYTE2     = 0x3; // min..max: c [DB2]
+    private final static int MAP_SUPPLEMENT      = 0x5; //           db,c
+    private final static int MAP_SUPPLEMENT_C2B  = 0x6; //           c,db
+    private final static int MAP_COMPOSITE       = 0x7; //           db,base,cc
+    private final static int MAP_INDEXC2B        = 0x8; // index table of c->bb
+
+    private static final boolean readNBytes(InputStream in, byte[] bb, int N)
+        throws IOException
+    {
+        int off = 0;
+        while (N > 0) {
+            int n = in.read(bb, off, N);
+            if (n == -1)
+                return false;
+            N = N - n;
+            off += n;
+        }
+        return true;
+    }
+
+    int off = 0;
+    byte[] bb;
+    private char[] readCharArray() {
+        // first 2 bytes are the number of "chars" stored in this table
+        int size  = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        char [] cc = new char[size];
+        for (int i = 0; i < size; i++) {
+            cc[i] = (char)(((bb[off++]&0xff)<<8) | (bb[off++]&0xff));
+        }
+        return cc;
+    }
+
+    void readSINGLEBYTE() {
+        char[] map = readCharArray();
+        for (int i = 0; i < map.length; i++) {
+            char c = map[i];
+            if (c != UNMAPPABLE_DECODING) {
+                c2b[c2bIndex[c >> 8] + (c&0xff)] = (char)i;
+            }
+        }
+        b2cSB = map;
+    }
+
+    void readINDEXC2B() {
+        char[] map = readCharArray();
+        for (int i = map.length - 1; i >= 0; i--) {
+            if (c2b == null && map[i] != -1) {
+                c2b = new char[map[i] + 256];
+                Arrays.fill(c2b, (char)UNMAPPABLE_ENCODING);
+                break;
+            }
+        }
+        c2bIndex = map;
+    }
+
+    char[] readDB(int b1Min, int b2Min, int segSize) {
+        char[] map = readCharArray();
+        for (int i = 0; i < map.length; i++) {
+            char c = map[i];
+            if (c != UNMAPPABLE_DECODING) {
+                int b1 = i / segSize;
+                int b2 = i % segSize;
+                int b = (b1 + b1Min)* 256 + (b2 + b2Min);
+                //System.out.printf("    DB %x\t%x%n", b, c & 0xffff);
+                c2b[c2bIndex[c >> 8] + (c&0xff)] = (char)(b);
+            }
+        }
+        return map;
+    }
+
+    void readDOUBLEBYTE1() {
+        b1MinDB1 = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b1MaxDB1 = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b2Min =    ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b2Max =    ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        dbSegSize = b2Max - b2Min + 1;
+        b2cDB1 = readDB(b1MinDB1, b2Min, dbSegSize);
+    }
+
+    void readDOUBLEBYTE2() {
+        b1MinDB2 = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b1MaxDB2 = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b2Min =    ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        b2Max =    ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+        dbSegSize = b2Max - b2Min + 1;
+        b2cDB2 = readDB(b1MinDB2, b2Min, dbSegSize);
+    }
+
+    void readCOMPOSITE() {
+        char[] map = readCharArray();
+        int mLen = map.length/3;
+        b2cComp = new Entry[mLen];
+        c2bComp = new Entry[mLen];
+        for (int i = 0, j= 0; i < mLen; i++) {
+            Entry m = new Entry();
+            m.bs = map[j++];
+            m.cp = map[j++];
+            m.cp2 = map[j++];
+            b2cComp[i] = m;
+            c2bComp[i] = m;
+        }
+        Arrays.sort(c2bComp, 0, c2bComp.length, comparatorComp);
+    }
+
+    CharsetMapping load(InputStream in) {
+        try {
+            // The first 4 bytes are the size of the total data followed in
+            // this .dat file.
+            int len = ((in.read()&0xff) << 24) | ((in.read()&0xff) << 16) |
+                      ((in.read()&0xff) << 8) | (in.read()&0xff);
+            bb = new byte[len];
+            off = 0;
+            //System.out.printf("In : Total=%d%n", len);
+            // Read in all bytes
+            if (!readNBytes(in, bb, len))
+                throw new RuntimeException("Corrupted data file");
+            in.close();
+
+            while (off < len) {
+                int type = ((bb[off++]&0xff)<<8) | (bb[off++]&0xff);
+                switch(type) {
+                case MAP_INDEXC2B:
+                    readINDEXC2B();
+                    break;
+                case MAP_SINGLEBYTE:
+                    readSINGLEBYTE();
+                    break;
+                case MAP_DOUBLEBYTE1:
+                    readDOUBLEBYTE1();
+                    break;
+                case MAP_DOUBLEBYTE2:
+                    readDOUBLEBYTE2();
+                    break;
+                case MAP_SUPPLEMENT:
+                    b2cSupp = readCharArray();
+                    break;
+                case MAP_SUPPLEMENT_C2B:
+                    c2bSupp = readCharArray();
+                    break;
+                case MAP_COMPOSITE:
+                    readCOMPOSITE();
+                    break;
+                default:
+                    throw new RuntimeException("Corrupted data file");
+                }
+            }
+            bb = null;
+            return this;
+        } catch (IOException x) {
+            x.printStackTrace();
+            return null;
+        }
+    }
+}
--- a/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java	Sun May 04 07:05:42 2008 -0700
@@ -23,9 +23,6 @@
  * have any questions.
  */
 
-/*
- */
-
 package sun.nio.cs.ext;
 
 import java.lang.ref.SoftReference;
@@ -183,6 +180,25 @@
                     "csISO159JISX02121990"
                 });
 
+        charset("x-SJIS_0213", "SJIS_0213",
+                new String[] {
+                    "sjis-0213",
+                    "sjis_0213",
+                    "sjis:2004",
+                    "sjis_0213:2004",
+                    "shift_jis_0213:2004",
+                    "shift_jis:2004"
+                });
+
+        charset("x-MS932_0213", "MS932_0213",
+                new String[] {
+                    "MS932-0213",
+                    "MS932_0213",
+                    "MS932:2004",
+                    "windows-932-0213",
+                    "windows-932:2004"
+                });
+
         charset("EUC-JP", "EUC_JP",
                 new String[] {
                     "euc_jp", // JDK historical
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/nio/cs/ext/MS932_0213.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.nio.cs.ext;
+
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.nio.charset.CharsetDecoder;
+
+public class MS932_0213 extends Charset {
+    public MS932_0213() {
+        super("x-MS932_0213", ExtendedCharsets.aliasesFor("MS932_0213"));
+    }
+
+    public boolean contains(Charset cs) {
+        return ((cs.name().equals("US-ASCII"))
+                || (cs instanceof MS932)
+                || (cs instanceof MS932_0213));
+    }
+
+    public CharsetDecoder newDecoder() {
+        return new Decoder(this);
+    }
+
+    public CharsetEncoder newEncoder() {
+        return new Encoder(this);
+    }
+
+    protected static class Decoder extends SJIS_0213.Decoder {
+        MS932DB.Decoder decMS932;
+        protected Decoder(Charset cs) {
+            super(cs);
+            decMS932 = new MS932DB.Decoder(cs);
+        }
+
+        protected char decodeDouble(int b1, int b2) {
+            char c = decMS932.decodeDouble(b1, b2);
+            if (c == DoubleByteDecoder.REPLACE_CHAR)
+                return super.decodeDouble(b1, b2);
+            return c;
+        }
+    }
+
+    protected static class Encoder extends SJIS_0213.Encoder {
+        MS932DB.Encoder encMS932;
+        protected Encoder(Charset cs) {
+            super(cs);
+            encMS932 = new MS932DB.Encoder(cs);
+        }
+
+        protected int encodeChar(char ch) {
+            int db = encMS932.encodeDouble(ch);
+            if (db == 0)
+                return super.encodeChar(ch);
+            return db;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/nio/cs/ext/SJIS_0213.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,398 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.nio.cs.ext;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+import java.util.Arrays;
+import sun.nio.cs.CharsetMapping;
+
+/*
+ *  5 types of entry in SJIS_X_0213/Unicode mapping table
+ *
+ *  (1)Single-Byte
+ *     JIS_X_0213 does not define single-byte character itself, the
+ *     JIS_X_0201 entries are added in for sjis implementation.
+ *
+ *  (2)Double-Byte SJIS <-> BMP Unicode
+ *     ex: 0x8140 U+3000    # IDEOGRAPHIC SPACE
+ *
+ *  (3)Double-Byte SJIS <-> Supplementary
+ *     ex: 0xFCF0 U+2A61A   # <cjk> [2000] [Unicode3.1]
+ *
+ *  (4)Double-Byte SJIS <-> Composite
+ *   ex: 0x83F6 U+31F7+309A # [2000]
+ *
+ *  (5)"Windows-only" special mapping entries
+ *     are handled by MS932_0213.
+ */
+
+public class SJIS_0213 extends Charset {
+    public SJIS_0213() {
+        super("x-SJIS_0213", ExtendedCharsets.aliasesFor("SJIS_0213"));
+    }
+
+    public boolean contains(Charset cs) {
+        return ((cs.name().equals("US-ASCII"))
+                || (cs instanceof SJIS)
+                || (cs instanceof SJIS_0213));
+    }
+
+    public CharsetDecoder newDecoder() {
+        return new Decoder(this);
+    }
+
+    public CharsetEncoder newEncoder() {
+        return new Encoder(this);
+    }
+
+    static CharsetMapping mapping =
+        CharsetMapping.get(SJIS_0213.class.getResourceAsStream("sjis0213.dat"));
+
+    protected static class Decoder extends CharsetDecoder {
+        protected static final char UNMAPPABLE = CharsetMapping.UNMAPPABLE_DECODING;
+
+        protected Decoder(Charset cs) {
+            super(cs, 0.5f, 1.0f);
+        }
+
+        private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {
+            byte[] sa = src.array();
+            int sp = src.arrayOffset() + src.position();
+            int sl = src.arrayOffset() + src.limit();
+
+            char[] da = dst.array();
+            int dp = dst.arrayOffset() + dst.position();
+            int dl = dst.arrayOffset() + dst.limit();
+
+            try {
+                while (sp < sl) {
+                    int b1 = sa[sp] & 0xff;
+                    char c = decodeSingle(b1);
+                    int inSize = 1, outSize = 1;
+                    char[] cc = null;
+                    if (c == UNMAPPABLE) {
+                        if (sl - sp < 2)
+                            return CoderResult.UNDERFLOW;
+                        int b2 = sa[sp + 1] & 0xff;
+                        c = decodeDouble(b1, b2);
+                        inSize++;
+                        if (c == UNMAPPABLE) {
+                            cc = decodeDoubleEx(b1, b2);
+                            if (cc == null) {
+                                if (decodeSingle(b2) == UNMAPPABLE)
+                                    return CoderResult.unmappableForLength(2);
+                                else
+                                    return CoderResult.unmappableForLength(1);
+                            }
+                            outSize++;
+                        }
+                    }
+                    if (dl - dp < outSize)
+                        return CoderResult.OVERFLOW;
+                    if (outSize == 2) {
+                        da[dp++] = cc[0];
+                        da[dp++] = cc[1];
+                    } else {
+                        da[dp++] = c;
+                    }
+                    sp += inSize;
+                }
+                return CoderResult.UNDERFLOW;
+            } finally {
+                src.position(sp - src.arrayOffset());
+                dst.position(dp - dst.arrayOffset());
+            }
+        }
+
+        private CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst) {
+            int mark = src.position();
+            try {
+                while (src.hasRemaining()) {
+                    char[] cc = null;
+                    int b1 = src.get() & 0xff;
+                    char c = decodeSingle(b1);
+                    int inSize = 1, outSize = 1;
+                    if (c == UNMAPPABLE) {
+                        if (src.remaining() < 1)
+                            return CoderResult.UNDERFLOW;
+                        int b2 = src.get() & 0xff;
+                        inSize++;
+                        c = decodeDouble(b1, b2);
+                        if (c == UNMAPPABLE) {
+                            cc = decodeDoubleEx(b1, b2);
+                            if (cc == null) {
+                                if (decodeSingle(b2) == UNMAPPABLE)
+                                    return CoderResult.unmappableForLength(2);
+                                else
+                                    return CoderResult.unmappableForLength(1);
+                            }
+                            outSize++;
+                        }
+                    }
+                    if (dst.remaining() < outSize)
+                        return CoderResult.OVERFLOW;
+                    if (outSize == 2) {
+                        dst.put(cc[0]);
+                        dst.put(cc[1]);
+                    } else {
+                        dst.put(c);
+                    }
+                    mark += inSize;
+                }
+                return CoderResult.UNDERFLOW;
+            } finally {
+                src.position(mark);
+            }
+        }
+
+        protected CoderResult decodeLoop(ByteBuffer src, CharBuffer dst) {
+            if (src.hasArray() && dst.hasArray())
+                return decodeArrayLoop(src, dst);
+            else
+                return decodeBufferLoop(src, dst);
+        }
+
+        protected char decodeSingle(int b) {
+            return mapping.decodeSingle(b);
+        }
+
+        protected char decodeDouble(int b1, int b2) {
+            return mapping.decodeDouble(b1, b2);
+        }
+
+        private char[] cc = new char[2];
+        private CharsetMapping.Entry comp = new CharsetMapping.Entry();
+        protected char[] decodeDoubleEx(int b1, int b2) {
+            int db = (b1 << 8) | b2;
+            if (mapping.decodeSurrogate(db, cc) != null)
+                return cc;
+            comp.bs = db;
+            if (mapping.decodeComposite(comp, cc) != null)
+                return cc;
+            return null;
+        }
+    }
+
+    protected static class Encoder extends CharsetEncoder {
+        protected static final int UNMAPPABLE = CharsetMapping.UNMAPPABLE_ENCODING;
+        protected static final int MAX_SINGLEBYTE = 0xff;
+
+        protected Encoder(Charset cs) {
+            super(cs, 2.0f, 2.0f);
+        }
+
+        public boolean canEncode(char c) {
+            return (encodeChar(c) != UNMAPPABLE);
+        }
+
+        protected int encodeChar(char ch) {
+            return mapping.encodeChar(ch);
+        }
+
+        protected int encodeSurrogate(char hi, char lo) {
+            return mapping.encodeSurrogate(hi, lo);
+        }
+
+        private CharsetMapping.Entry comp = new CharsetMapping.Entry();
+        protected int encodeComposite(char base, char cc) {
+            comp.cp = base;
+            comp.cp2 = cc;
+            return mapping.encodeComposite(comp);
+        }
+
+        protected boolean isCompositeBase(char ch) {
+            comp.cp = ch;
+            return mapping.isCompositeBase(comp);
+        }
+
+        // Unlike surrogate pair, the base character of a base+cc composite
+        // itself is a legal codepoint in 0213, if we simply return UNDERFLOW
+        // when a base candidate is the last input char in the CharBuffer, like
+        // what we do for the surrogte pair, encoding will fail if this base
+        // character is indeed the last character of the input char sequence.
+        // Keep this base candidate in "leftoverBase" so we can flush it out
+        // at the end of the encoding circle.
+        char leftoverBase = 0;
+        protected CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) {
+            char[] sa = src.array();
+            int sp = src.arrayOffset() + src.position();
+            int sl = src.arrayOffset() + src.limit();
+            byte[] da = dst.array();
+            int dp = dst.arrayOffset() + dst.position();
+            int dl = dst.arrayOffset() + dst.limit();
+
+            try {
+                while (sp < sl) {
+                    int db;
+                    char c = sa[sp];
+                    if (leftoverBase != 0) {
+                        boolean isComp = false;
+                        db = encodeComposite(leftoverBase, c);
+                        if (db == UNMAPPABLE)
+                            db = encodeChar(leftoverBase);
+                        else
+                            isComp = true;
+                        if (dl - dp < 2)
+                            return CoderResult.OVERFLOW;
+                        da[dp++] = (byte)(db >> 8);
+                        da[dp++] = (byte)db;
+                        leftoverBase = 0;
+                        if (isComp) {
+                            sp++;
+                            continue;
+                        }
+                    }
+                    if (isCompositeBase(c)) {
+                        leftoverBase = c;
+                    } else {
+                        db = encodeChar(c);
+                        if (db > MAX_SINGLEBYTE) {      // DoubleByte
+                            if (dl - dp < 2)
+                                return CoderResult.OVERFLOW;
+                            da[dp++] = (byte)(db >> 8);
+                            da[dp++] = (byte)db;
+                        } else if (db != UNMAPPABLE) {  // SingleByte
+                            if (dl <= dp)
+                                return CoderResult.OVERFLOW;
+                            da[dp++] = (byte)db;
+                        } else if (Character.isHighSurrogate(c)) {
+                            if ((sp + 1) == sl)
+                                return CoderResult.UNDERFLOW;
+                            char c2 = sa[sp + 1];
+                            if (!Character.isLowSurrogate(c2))
+                                return CoderResult.malformedForLength(1);
+                            db = encodeSurrogate(c, c2);
+                            if (db == UNMAPPABLE)
+                                return CoderResult.unmappableForLength(2);
+                            if (dl - dp < 2)
+                                return CoderResult.OVERFLOW;
+                            da[dp++] = (byte)(db >> 8);
+                            da[dp++] = (byte)db;
+                            sp++;
+                        } else {
+                            return CoderResult.unmappableForLength(1);
+                        }
+                    }
+                    sp++;
+                }
+                return CoderResult.UNDERFLOW;
+            } finally {
+                src.position(sp - src.arrayOffset());
+                dst.position(dp - dst.arrayOffset());
+            }
+        }
+
+        protected CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) {
+            int mark = src.position();
+            try {
+                while (src.hasRemaining()) {
+                    int db;
+                    char c = src.get();
+                    if (leftoverBase != 0) {
+                        boolean isComp = false;
+                        db = encodeComposite(leftoverBase, c);
+                        if (db == UNMAPPABLE)
+                            db = encodeChar(leftoverBase);
+                        else
+                            isComp = true;
+                        if (dst.remaining() < 2)
+                            return CoderResult.OVERFLOW;
+                        dst.put((byte)(db >> 8));
+                        dst.put((byte)(db));
+                        leftoverBase = 0;
+                        if (isComp) {
+                            mark++;
+                            continue;
+                        }
+                    }
+                    if (isCompositeBase(c)) {
+                        leftoverBase = c;
+                    } else {
+                        db = encodeChar(c);
+                        if (db > MAX_SINGLEBYTE) {        // DoubleByte
+                            if (dst.remaining() < 2)
+                                return CoderResult.OVERFLOW;
+                            dst.put((byte)(db >> 8));
+                            dst.put((byte)(db));
+                        } else if (db != UNMAPPABLE) {    // Single-byte
+                            if (dst.remaining() < 1)
+                                return CoderResult.OVERFLOW;
+                            dst.put((byte)db);
+                        } else if (Character.isHighSurrogate(c)) {
+                            if (!src.hasRemaining())     // Surrogates
+                                return CoderResult.UNDERFLOW;
+                            char c2 = src.get();
+                            if (!Character.isLowSurrogate(c2))
+                                return CoderResult.malformedForLength(1);
+                            db = encodeSurrogate(c, c2);
+                            if (db == UNMAPPABLE)
+                                return CoderResult.unmappableForLength(2);
+                            if (dst.remaining() < 2)
+                                return CoderResult.OVERFLOW;
+                            dst.put((byte)(db >> 8));
+                            dst.put((byte)(db));
+                            mark++;
+                        } else {
+                            return CoderResult.unmappableForLength(1);
+                        }
+                    }
+                    mark++;
+                }
+                return CoderResult.UNDERFLOW;
+            } finally {
+                src.position(mark);
+            }
+        }
+
+        protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
+            if (src.hasArray() && dst.hasArray())
+                return encodeArrayLoop(src, dst);
+            else
+                return encodeBufferLoop(src, dst);
+        }
+
+        protected CoderResult implFlush(ByteBuffer dst) {
+            if (leftoverBase > 0) {
+                if (dst.remaining() < 2)
+                    return CoderResult.OVERFLOW;
+                int db = encodeChar(leftoverBase);
+                dst.put((byte)(db >> 8));
+                dst.put((byte)(db));
+                leftoverBase = 0;
+            }
+            return CoderResult.UNDERFLOW;
+        }
+
+        protected void implReset() {
+            leftoverBase = 0;
+        }
+    }
+}
--- a/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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,10 +22,10 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
-
 package sun.security.pkcs11;
 
 import java.nio.ByteBuffer;
+import java.util.Arrays;
 
 import java.security.*;
 import java.security.spec.*;
@@ -34,7 +34,6 @@
 import javax.crypto.spec.*;
 
 import sun.nio.ch.DirectBuffer;
-
 import sun.security.pkcs11.wrapper.*;
 import static sun.security.pkcs11.wrapper.PKCS11Constants.*;
 
@@ -43,8 +42,8 @@
  * DES, DESede, AES, ARCFOUR, and Blowfish.
  *
  * This class is designed to support ECB and CBC with NoPadding and
- * PKCS5Padding for both. However, currently only CBC/NoPadding (and
- * ECB/NoPadding for stream ciphers) is functional.
+ * PKCS5Padding for both. It will use its own padding impl if the
+ * native mechanism does not support padding.
  *
  * Note that PKCS#11 current only supports ECB and CBC. There are no
  * provisions for other modes such as CFB, OFB, PCBC, or CTR mode.
@@ -62,10 +61,59 @@
     private final static int MODE_CBC = 4;
 
     // padding constant for NoPadding
-    private final static int PAD_NONE  = 5;
+    private final static int PAD_NONE = 5;
     // padding constant for PKCS5Padding
     private final static int PAD_PKCS5 = 6;
 
+    private static interface Padding {
+        // ENC: format the specified buffer with padding bytes and return the
+        // actual padding length
+        int setPaddingBytes(byte[] paddingBuffer, int padLen);
+
+        // DEC: return the length of trailing padding bytes given the specified
+        // padded data
+        int unpad(byte[] paddedData, int len)
+                throws BadPaddingException;
+    }
+
+    private static class PKCS5Padding implements Padding {
+
+        private final int blockSize;
+
+        PKCS5Padding(int blockSize)
+                throws NoSuchPaddingException {
+            if (blockSize == 0) {
+                throw new NoSuchPaddingException
+                        ("PKCS#5 padding not supported with stream ciphers");
+            }
+            this.blockSize = blockSize;
+        }
+
+        public int setPaddingBytes(byte[] paddingBuffer, int padLen) {
+            Arrays.fill(paddingBuffer, 0, padLen, (byte) (padLen & 0x007f));
+            return padLen;
+        }
+
+        public int unpad(byte[] paddedData, int len)
+                throws BadPaddingException {
+            if (len < 1 || len > paddedData.length) {
+                throw new BadPaddingException("Invalid pad array length!");
+            }
+            byte padValue = paddedData[len - 1];
+            if (padValue < 1 || padValue > blockSize) {
+                throw new BadPaddingException("Invalid pad value!");
+            }
+            // sanity check padding bytes
+            int padStartIndex = len - padValue;
+            for (int i = padStartIndex; i < len; i++) {
+                if (paddedData[i] != padValue) {
+                    throw new BadPaddingException("Invalid pad bytes!");
+                }
+            }
+            return padValue;
+        }
+    }
+
     // token instance
     private final Token token;
 
@@ -99,65 +147,93 @@
     // padding type, on of PAD_* above (PAD_NONE for stream ciphers)
     private int paddingType;
 
+    // when the padding is requested but unsupported by the native mechanism,
+    // we use the following to do padding and necessary data buffering.
+    // padding object which generate padding and unpad the decrypted data
+    private Padding paddingObj;
+    // buffer for holding back the block which contains padding bytes
+    private byte[] padBuffer;
+    private int padBufferLen;
+
     // original IV, if in MODE_CBC
     private byte[] iv;
 
-    // total number of bytes processed
-    private int bytesProcessed;
+    // number of bytes buffered internally by the native mechanism and padBuffer
+    // if we do the padding
+    private int bytesBuffered;
 
     P11Cipher(Token token, String algorithm, long mechanism)
-            throws PKCS11Exception {
+            throws PKCS11Exception, NoSuchAlgorithmException {
         super();
         this.token = token;
         this.algorithm = algorithm;
         this.mechanism = mechanism;
-        keyAlgorithm = algorithm.split("/")[0];
+
+        String algoParts[] = algorithm.split("/");
+        keyAlgorithm = algoParts[0];
+
         if (keyAlgorithm.equals("AES")) {
             blockSize = 16;
-            blockMode = MODE_CBC;
-            // XXX change default to PKCS5Padding
-            paddingType = PAD_NONE;
-        } else if (keyAlgorithm.equals("RC4") || keyAlgorithm.equals("ARCFOUR")) {
+        } else if (keyAlgorithm.equals("RC4") ||
+                keyAlgorithm.equals("ARCFOUR")) {
             blockSize = 0;
-            blockMode = MODE_ECB;
-            paddingType = PAD_NONE;
         } else { // DES, DESede, Blowfish
             blockSize = 8;
-            blockMode = MODE_CBC;
-            // XXX change default to PKCS5Padding
-            paddingType = PAD_NONE;
+        }
+        this.blockMode =
+                (algoParts.length > 1 ? parseMode(algoParts[1]) : MODE_ECB);
+
+        String defPadding = (blockSize == 0 ? "NoPadding" : "PKCS5Padding");
+        String paddingStr =
+                (algoParts.length > 2 ? algoParts[2] : defPadding);
+        try {
+            engineSetPadding(paddingStr);
+        } catch (NoSuchPaddingException nspe) {
+            // should not happen
+            throw new ProviderException(nspe);
         }
         session = token.getOpSession();
     }
 
     protected void engineSetMode(String mode) throws NoSuchAlgorithmException {
+        // Disallow change of mode for now since currently it's explicitly
+        // defined in transformation strings
+        throw new NoSuchAlgorithmException("Unsupported mode " + mode);
+    }
+
+    private int parseMode(String mode) throws NoSuchAlgorithmException {
         mode = mode.toUpperCase();
+        int result;
         if (mode.equals("ECB")) {
-            this.blockMode = MODE_ECB;
+            result = MODE_ECB;
         } else if (mode.equals("CBC")) {
             if (blockSize == 0) {
                 throw new NoSuchAlgorithmException
                         ("CBC mode not supported with stream ciphers");
             }
-            this.blockMode = MODE_CBC;
+            result = MODE_CBC;
         } else {
             throw new NoSuchAlgorithmException("Unsupported mode " + mode);
         }
+        return result;
     }
 
     // see JCE spec
     protected void engineSetPadding(String padding)
             throws NoSuchPaddingException {
-        if (padding.equalsIgnoreCase("NoPadding")) {
+        paddingObj = null;
+        padBuffer = null;
+        padding = padding.toUpperCase();
+        if (padding.equals("NOPADDING")) {
             paddingType = PAD_NONE;
-        } else if (padding.equalsIgnoreCase("PKCS5Padding")) {
-            if (blockSize == 0) {
-                throw new NoSuchPaddingException
-                        ("PKCS#5 padding not supported with stream ciphers");
+        } else if (padding.equals("PKCS5PADDING")) {
+            paddingType = PAD_PKCS5;
+            if (mechanism != CKM_DES_CBC_PAD && mechanism != CKM_DES3_CBC_PAD &&
+                    mechanism != CKM_AES_CBC_PAD) {
+                // no native padding support; use our own padding impl
+                paddingObj = new PKCS5Padding(blockSize);
+                padBuffer = new byte[blockSize];
             }
-            paddingType = PAD_PKCS5;
-            // XXX PKCS#5 not yet implemented
-            throw new NoSuchPaddingException("pkcs5");
         } else {
             throw new NoSuchPaddingException("Unsupported padding " + padding);
         }
@@ -175,7 +251,7 @@
 
     // see JCE spec
     protected byte[] engineGetIV() {
-        return (iv == null) ? null : (byte[])iv.clone();
+        return (iv == null) ? null : (byte[]) iv.clone();
     }
 
     // see JCE spec
@@ -185,8 +261,9 @@
         }
         IvParameterSpec ivSpec = new IvParameterSpec(iv);
         try {
-            AlgorithmParameters params = AlgorithmParameters.getInstance
-                (keyAlgorithm, P11Util.getSunJceProvider());
+            AlgorithmParameters params =
+                    AlgorithmParameters.getInstance(keyAlgorithm,
+                    P11Util.getSunJceProvider());
             params.init(ivSpec);
             return params;
         } catch (GeneralSecurityException e) {
@@ -210,38 +287,38 @@
     protected void engineInit(int opmode, Key key,
             AlgorithmParameterSpec params, SecureRandom random)
             throws InvalidKeyException, InvalidAlgorithmParameterException {
-        byte[] iv;
+        byte[] ivValue;
         if (params != null) {
             if (params instanceof IvParameterSpec == false) {
                 throw new InvalidAlgorithmParameterException
                         ("Only IvParameterSpec supported");
             }
-            IvParameterSpec ivSpec = (IvParameterSpec)params;
-            iv = ivSpec.getIV();
+            IvParameterSpec ivSpec = (IvParameterSpec) params;
+            ivValue = ivSpec.getIV();
         } else {
-            iv = null;
+            ivValue = null;
         }
-        implInit(opmode, key, iv, random);
+        implInit(opmode, key, ivValue, random);
     }
 
     // see JCE spec
     protected void engineInit(int opmode, Key key, AlgorithmParameters params,
             SecureRandom random)
             throws InvalidKeyException, InvalidAlgorithmParameterException {
-        byte[] iv;
+        byte[] ivValue;
         if (params != null) {
             try {
                 IvParameterSpec ivSpec = (IvParameterSpec)
                         params.getParameterSpec(IvParameterSpec.class);
-                iv = ivSpec.getIV();
+                ivValue = ivSpec.getIV();
             } catch (InvalidParameterSpecException e) {
                 throw new InvalidAlgorithmParameterException
                         ("Could not decode IV", e);
             }
         } else {
-            iv = null;
+            ivValue = null;
         }
-        implInit(opmode, key, iv, random);
+        implInit(opmode, key, ivValue, random);
     }
 
     // actual init() implementation
@@ -250,31 +327,31 @@
             throws InvalidKeyException, InvalidAlgorithmParameterException {
         cancelOperation();
         switch (opmode) {
-        case Cipher.ENCRYPT_MODE:
-            encrypt = true;
-            break;
-        case Cipher.DECRYPT_MODE:
-            encrypt = false;
-            break;
-        default:
-            throw new InvalidAlgorithmParameterException
-                ("Unsupported mode: " + opmode);
+            case Cipher.ENCRYPT_MODE:
+                encrypt = true;
+                break;
+            case Cipher.DECRYPT_MODE:
+                encrypt = false;
+                break;
+            default:
+                throw new InvalidAlgorithmParameterException
+                        ("Unsupported mode: " + opmode);
         }
         if (blockMode == MODE_ECB) { // ECB or stream cipher
             if (iv != null) {
                 if (blockSize == 0) {
                     throw new InvalidAlgorithmParameterException
-                        ("IV not used with stream ciphers");
+                            ("IV not used with stream ciphers");
                 } else {
                     throw new InvalidAlgorithmParameterException
-                        ("IV not used in ECB mode");
+                            ("IV not used in ECB mode");
                 }
             }
         } else { // MODE_CBC
             if (iv == null) {
                 if (encrypt == false) {
                     throw new InvalidAlgorithmParameterException
-                        ("IV must be specified for decryption in CBC mode");
+                            ("IV must be specified for decryption in CBC mode");
                 }
                 // generate random IV
                 if (random == null) {
@@ -285,7 +362,7 @@
             } else {
                 if (iv.length != blockSize) {
                     throw new InvalidAlgorithmParameterException
-                        ("IV length must match block size");
+                            ("IV length must match block size");
                 }
             }
         }
@@ -331,63 +408,43 @@
             session = token.getOpSession();
         }
         if (encrypt) {
-            token.p11.C_EncryptInit
-                (session.id(), new CK_MECHANISM(mechanism, iv), p11Key.keyID);
+            token.p11.C_EncryptInit(session.id(),
+                    new CK_MECHANISM(mechanism, iv), p11Key.keyID);
         } else {
-            token.p11.C_DecryptInit
-                (session.id(), new CK_MECHANISM(mechanism, iv), p11Key.keyID);
+            token.p11.C_DecryptInit(session.id(),
+                    new CK_MECHANISM(mechanism, iv), p11Key.keyID);
         }
-        bytesProcessed = 0;
+        bytesBuffered = 0;
+        padBufferLen = 0;
         initialized = true;
     }
 
-    // XXX the calculations below assume the PKCS#11 implementation is smart.
-    // conceivably, not all implementations are and we may need to estimate
-    // more conservatively
-
-    private int bytesBuffered(int totalLen) {
-        if (paddingType == PAD_NONE) {
-            // with NoPadding, buffer only the current unfinished block
-            return totalLen & (blockSize - 1);
-        } else { // PKCS5
-            // with PKCS5Padding in decrypt mode, the buffer must never
-            // be empty. Buffer a full block instead of nothing.
-            int buffered = totalLen & (blockSize - 1);
-            if ((buffered == 0) && (encrypt == false)) {
-                buffered = blockSize;
-            }
-            return buffered;
-        }
-    }
-
     // if update(inLen) is called, how big does the output buffer have to be?
     private int updateLength(int inLen) {
         if (inLen <= 0) {
             return 0;
         }
-        if (blockSize == 0) {
-            return inLen;
-        } else {
-            // bytes that need to be buffered now
-            int buffered = bytesBuffered(bytesProcessed);
-            // bytes that need to be buffered after this update
-            int newBuffered = bytesBuffered(bytesProcessed + inLen);
-            return inLen + buffered - newBuffered;
+
+        int result = inLen + bytesBuffered;
+        if (blockSize != 0) {
+            // minus the number of bytes in the last incomplete block.
+            result -= (result & (blockSize - 1));
         }
+        return result;
     }
 
     // if doFinal(inLen) is called, how big does the output buffer have to be?
     private int doFinalLength(int inLen) {
-        if (paddingType == PAD_NONE) {
-            return updateLength(inLen);
-        }
         if (inLen < 0) {
             return 0;
         }
-        int buffered = bytesBuffered(bytesProcessed);
-        int newProcessed = bytesProcessed + inLen;
-        int paddedProcessed = (newProcessed + blockSize) & ~(blockSize - 1);
-        return paddedProcessed - bytesProcessed + buffered;
+
+        int result = inLen + bytesBuffered;
+        if (blockSize != 0 && encrypt && paddingType != PAD_NONE) {
+            // add the number of bytes to make the last block complete.
+            result += (blockSize - (result & (blockSize - 1)));
+        }
+        return result;
     }
 
     // see JCE spec
@@ -397,6 +454,7 @@
             int n = engineUpdate(in, inOfs, inLen, out, 0);
             return P11Util.convert(out, 0, n);
         } catch (ShortBufferException e) {
+            // convert since the output length is calculated by updateLength()
             throw new ProviderException(e);
         }
     }
@@ -409,6 +467,7 @@
     }
 
     // see JCE spec
+    @Override
     protected int engineUpdate(ByteBuffer inBuffer, ByteBuffer outBuffer)
             throws ShortBufferException {
         return implUpdate(inBuffer, outBuffer);
@@ -422,14 +481,15 @@
             int n = engineDoFinal(in, inOfs, inLen, out, 0);
             return P11Util.convert(out, 0, n);
         } catch (ShortBufferException e) {
+            // convert since the output length is calculated by doFinalLength()
             throw new ProviderException(e);
         }
     }
 
     // see JCE spec
     protected int engineDoFinal(byte[] in, int inOfs, int inLen, byte[] out,
-            int outOfs) throws ShortBufferException, IllegalBlockSizeException {
-            // BadPaddingException {
+            int outOfs) throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
         int n = 0;
         if ((inLen != 0) && (in != null)) {
             n = engineUpdate(in, inOfs, inLen, out, outOfs);
@@ -440,8 +500,10 @@
     }
 
     // see JCE spec
+    @Override
     protected int engineDoFinal(ByteBuffer inBuffer, ByteBuffer outBuffer)
-    throws ShortBufferException, IllegalBlockSizeException, BadPaddingException {
+            throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
         int n = engineUpdate(inBuffer, outBuffer);
         n += implDoFinal(outBuffer);
         return n;
@@ -454,18 +516,55 @@
         }
         try {
             ensureInitialized();
-            int k;
+            int k = 0;
             if (encrypt) {
-                k = token.p11.C_EncryptUpdate
-                (session.id(), 0, in, inOfs, inLen, 0, out, outOfs, outLen);
+                k = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, inLen,
+                        0, out, outOfs, outLen);
             } else {
-                k = token.p11.C_DecryptUpdate
-                (session.id(), 0, in, inOfs, inLen, 0, out, outOfs, outLen);
+                int newPadBufferLen = 0;
+                if (paddingObj != null) {
+                    if (padBufferLen != 0) {
+                        // NSS throws up when called with data not in multiple
+                        // of blocks. Try to work around this by holding the
+                        // extra data in padBuffer.
+                        if (padBufferLen != padBuffer.length) {
+                            int bufCapacity = padBuffer.length - padBufferLen;
+                            if (inLen > bufCapacity) {
+                                bufferInputBytes(in, inOfs, bufCapacity);
+                                inOfs += bufCapacity;
+                                inLen -= bufCapacity;
+                            } else {
+                                bufferInputBytes(in, inOfs, inLen);
+                                return 0;
+                            }
+                        }
+                        k = token.p11.C_DecryptUpdate(session.id(),
+                                0, padBuffer, 0, padBufferLen,
+                                0, out, outOfs, outLen);
+                        padBufferLen = 0;
+                    }
+                    newPadBufferLen = inLen & (blockSize - 1);
+                    if (newPadBufferLen == 0) {
+                        newPadBufferLen = padBuffer.length;
+                    }
+                    inLen -= newPadBufferLen;
+                }
+                if (inLen > 0) {
+                    k += token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs,
+                            inLen, 0, out, (outOfs + k), (outLen - k));
+                }
+                // update 'padBuffer' if using our own padding impl.
+                if (paddingObj != null) {
+                    bufferInputBytes(in, inOfs + inLen, newPadBufferLen);
+                }
             }
-            bytesProcessed += inLen;
+            bytesBuffered += (inLen - k);
             return k;
         } catch (PKCS11Exception e) {
-            // XXX throw correct exception
+            if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) {
+                throw (ShortBufferException)
+                        (new ShortBufferException().initCause(e));
+            }
             throw new ProviderException("update() failed", e);
         }
     }
@@ -481,101 +580,167 @@
         if (outLen < updateLength(inLen)) {
             throw new ShortBufferException();
         }
-        boolean inPosChanged = false;
+        int origPos = inBuffer.position();
         try {
             ensureInitialized();
 
             long inAddr = 0;
-            int inOfs = inBuffer.position();
+            int inOfs = 0;
             byte[] inArray = null;
+
             if (inBuffer instanceof DirectBuffer) {
-                inAddr = ((DirectBuffer)inBuffer).address();
-            } else {
-                if (inBuffer.hasArray()) {
-                    inArray = inBuffer.array();
-                    inOfs += inBuffer.arrayOffset();
-                } else {
-                    inArray = new byte[inLen];
-                    inBuffer.get(inArray);
-                    inOfs = 0;
-                    inPosChanged = true;
-                }
+                inAddr = ((DirectBuffer) inBuffer).address();
+                inOfs = origPos;
+            } else if (inBuffer.hasArray()) {
+                inArray = inBuffer.array();
+                inOfs = (origPos + inBuffer.arrayOffset());
             }
 
             long outAddr = 0;
-            int outOfs = outBuffer.position();
+            int outOfs = 0;
             byte[] outArray = null;
             if (outBuffer instanceof DirectBuffer) {
-                outAddr = ((DirectBuffer)outBuffer).address();
+                outAddr = ((DirectBuffer) outBuffer).address();
+                outOfs = outBuffer.position();
             } else {
                 if (outBuffer.hasArray()) {
                     outArray = outBuffer.array();
-                    outOfs += outBuffer.arrayOffset();
+                    outOfs = (outBuffer.position() + outBuffer.arrayOffset());
                 } else {
                     outArray = new byte[outLen];
-                    outOfs = 0;
                 }
             }
 
-            int k;
+            int k = 0;
             if (encrypt) {
-                k = token.p11.C_EncryptUpdate
-                    (session.id(), inAddr, inArray, inOfs, inLen,
-                     outAddr, outArray, outOfs, outLen);
+                if (inAddr == 0 && inArray == null) {
+                    inArray = new byte[inLen];
+                    inBuffer.get(inArray);
+                } else {
+                    inBuffer.position(origPos + inLen);
+                }
+                k = token.p11.C_EncryptUpdate(session.id(),
+                        inAddr, inArray, inOfs, inLen,
+                        outAddr, outArray, outOfs, outLen);
             } else {
-                k = token.p11.C_DecryptUpdate
-                    (session.id(), inAddr, inArray, inOfs, inLen,
-                     outAddr, outArray, outOfs, outLen);
+                int newPadBufferLen = 0;
+                if (paddingObj != null) {
+                    if (padBufferLen != 0) {
+                        // NSS throws up when called with data not in multiple
+                        // of blocks. Try to work around this by holding the
+                        // extra data in padBuffer.
+                        if (padBufferLen != padBuffer.length) {
+                            int bufCapacity = padBuffer.length - padBufferLen;
+                            if (inLen > bufCapacity) {
+                                bufferInputBytes(inBuffer, bufCapacity);
+                                inOfs += bufCapacity;
+                                inLen -= bufCapacity;
+                            } else {
+                                bufferInputBytes(inBuffer, inLen);
+                                return 0;
+                            }
+                        }
+                        k = token.p11.C_DecryptUpdate(session.id(), 0,
+                                padBuffer, 0, padBufferLen, outAddr, outArray,
+                                outOfs, outLen);
+                        padBufferLen = 0;
+                    }
+                    newPadBufferLen = inLen & (blockSize - 1);
+                    if (newPadBufferLen == 0) {
+                        newPadBufferLen = padBuffer.length;
+                    }
+                    inLen -= newPadBufferLen;
+                }
+                if (inLen > 0) {
+                    if (inAddr == 0 && inArray == null) {
+                        inArray = new byte[inLen];
+                        inBuffer.get(inArray);
+                    } else {
+                        inBuffer.position(inBuffer.position() + inLen);
+                    }
+                    k += token.p11.C_DecryptUpdate(session.id(), inAddr,
+                            inArray, inOfs, inLen, outAddr, outArray,
+                            (outOfs + k), (outLen - k));
+                }
+                // update 'padBuffer' if using our own padding impl.
+                if (paddingObj != null && newPadBufferLen != 0) {
+                    bufferInputBytes(inBuffer, newPadBufferLen);
+                }
             }
-            bytesProcessed += inLen;
-            if (!inPosChanged) {
-                inBuffer.position(inBuffer.position() + inLen);
-            }
+            bytesBuffered += (inLen - k);
             if (!(outBuffer instanceof DirectBuffer) &&
-                !outBuffer.hasArray()) {
+                    !outBuffer.hasArray()) {
                 outBuffer.put(outArray, outOfs, k);
             } else {
                 outBuffer.position(outBuffer.position() + k);
             }
             return k;
         } catch (PKCS11Exception e) {
-            // Un-read the bytes back to input buffer
-            if (inPosChanged) {
-                inBuffer.position(inBuffer.position() - inLen);
+            // Reset input buffer to its original position for
+            inBuffer.position(origPos);
+            if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) {
+                throw (ShortBufferException)
+                        (new ShortBufferException().initCause(e));
             }
-            // XXX throw correct exception
             throw new ProviderException("update() failed", e);
         }
     }
 
     private int implDoFinal(byte[] out, int outOfs, int outLen)
-            throws ShortBufferException, IllegalBlockSizeException {
-        if (outLen < doFinalLength(0)) {
+            throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
+        int requiredOutLen = doFinalLength(0);
+        if (outLen < requiredOutLen) {
             throw new ShortBufferException();
         }
         try {
             ensureInitialized();
+            int k = 0;
             if (encrypt) {
-                return token.p11.C_EncryptFinal
-                                (session.id(), 0, out, outOfs, outLen);
+                if (paddingObj != null) {
+                    int actualPadLen = paddingObj.setPaddingBytes(padBuffer,
+                            requiredOutLen - bytesBuffered);
+                    k = token.p11.C_EncryptUpdate(session.id(),
+                            0, padBuffer, 0, actualPadLen,
+                            0, out, outOfs, outLen);
+                }
+                k += token.p11.C_EncryptFinal(session.id(),
+                        0, out, (outOfs + k), (outLen - k));
             } else {
-                return token.p11.C_DecryptFinal
-                                (session.id(), 0, out, outOfs, outLen);
+                if (paddingObj != null) {
+                    if (padBufferLen != 0) {
+                        k = token.p11.C_DecryptUpdate(session.id(), 0,
+                                padBuffer, 0, padBufferLen, 0, padBuffer, 0,
+                                padBuffer.length);
+                    }
+                    k += token.p11.C_DecryptFinal(session.id(), 0, padBuffer, k,
+                            padBuffer.length - k);
+                    int actualPadLen = paddingObj.unpad(padBuffer, k);
+                    k -= actualPadLen;
+                    System.arraycopy(padBuffer, 0, out, outOfs, k);
+                } else {
+                    k = token.p11.C_DecryptFinal(session.id(), 0, out, outOfs,
+                            outLen);
+                }
             }
+            return k;
         } catch (PKCS11Exception e) {
             handleException(e);
             throw new ProviderException("doFinal() failed", e);
         } finally {
             initialized = false;
-            bytesProcessed = 0;
+            bytesBuffered = 0;
+            padBufferLen = 0;
             session = token.releaseSession(session);
         }
     }
 
     private int implDoFinal(ByteBuffer outBuffer)
-            throws ShortBufferException, IllegalBlockSizeException {
+            throws ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException {
         int outLen = outBuffer.remaining();
-        if (outLen < doFinalLength(0)) {
+        int requiredOutLen = doFinalLength(0);
+        if (outLen < requiredOutLen) {
             throw new ShortBufferException();
         }
 
@@ -583,30 +748,54 @@
             ensureInitialized();
 
             long outAddr = 0;
-            int outOfs = outBuffer.position();
             byte[] outArray = null;
+            int outOfs = 0;
             if (outBuffer instanceof DirectBuffer) {
-                outAddr = ((DirectBuffer)outBuffer).address();
+                outAddr = ((DirectBuffer) outBuffer).address();
+                outOfs = outBuffer.position();
             } else {
                 if (outBuffer.hasArray()) {
                     outArray = outBuffer.array();
-                    outOfs += outBuffer.arrayOffset();
+                    outOfs = outBuffer.position() + outBuffer.arrayOffset();
                 } else {
                     outArray = new byte[outLen];
-                    outOfs = 0;
                 }
             }
 
-            int k;
+            int k = 0;
+
             if (encrypt) {
-                k = token.p11.C_EncryptFinal
-                    (session.id(), outAddr, outArray, outOfs, outLen);
+                if (paddingObj != null) {
+                    int actualPadLen = paddingObj.setPaddingBytes(padBuffer,
+                            requiredOutLen - bytesBuffered);
+                    k = token.p11.C_EncryptUpdate(session.id(),
+                            0, padBuffer, 0, actualPadLen,
+                            outAddr, outArray, outOfs, outLen);
+                }
+                k += token.p11.C_EncryptFinal(session.id(),
+                        outAddr, outArray, (outOfs + k), (outLen - k));
             } else {
-                k = token.p11.C_DecryptFinal
-                    (session.id(), outAddr, outArray, outOfs, outLen);
+                if (paddingObj != null) {
+                    if (padBufferLen != 0) {
+                        k = token.p11.C_DecryptUpdate(session.id(),
+                                0, padBuffer, 0, padBufferLen,
+                                0, padBuffer, 0, padBuffer.length);
+                        padBufferLen = 0;
+                    }
+                    k += token.p11.C_DecryptFinal(session.id(),
+                            0, padBuffer, k, padBuffer.length - k);
+                    int actualPadLen = paddingObj.unpad(padBuffer, k);
+                    k -= actualPadLen;
+                    outArray = padBuffer;
+                    outOfs = 0;
+                } else {
+                    k = token.p11.C_DecryptFinal(session.id(),
+                            outAddr, outArray, outOfs, outLen);
+                }
             }
-            if (!(outBuffer instanceof DirectBuffer) &&
-                !outBuffer.hasArray()) {
+            if ((!encrypt && paddingObj != null) ||
+                    (!(outBuffer instanceof DirectBuffer) &&
+                    !outBuffer.hasArray())) {
                 outBuffer.put(outArray, outOfs, k);
             } else {
                 outBuffer.position(outBuffer.position() + k);
@@ -617,20 +806,22 @@
             throw new ProviderException("doFinal() failed", e);
         } finally {
             initialized = false;
-            bytesProcessed = 0;
+            bytesBuffered = 0;
             session = token.releaseSession(session);
         }
     }
 
     private void handleException(PKCS11Exception e)
-            throws IllegalBlockSizeException {
+            throws ShortBufferException, IllegalBlockSizeException {
         long errorCode = e.getErrorCode();
-        // XXX better check
-        if (errorCode == CKR_DATA_LEN_RANGE) {
-            throw (IllegalBlockSizeException)new
-                IllegalBlockSizeException(e.toString()).initCause(e);
+        if (errorCode == CKR_BUFFER_TOO_SMALL) {
+            throw (ShortBufferException)
+                    (new ShortBufferException().initCause(e));
+        } else if (errorCode == CKR_DATA_LEN_RANGE ||
+                   errorCode == CKR_ENCRYPTED_DATA_LEN_RANGE) {
+            throw (IllegalBlockSizeException)
+                    (new IllegalBlockSizeException(e.toString()).initCause(e));
         }
-
     }
 
     // see JCE spec
@@ -649,12 +840,14 @@
     }
 
     // see JCE spec
+    @Override
     protected int engineGetKeySize(Key key) throws InvalidKeyException {
         int n = P11SecretKeyFactory.convertKey
-                                (token, key, keyAlgorithm).keyLength();
+                (token, key, keyAlgorithm).keyLength();
         return n;
     }
 
+    @Override
     protected void finalize() throws Throwable {
         try {
             if ((session != null) && token.isValid()) {
@@ -666,4 +859,15 @@
         }
     }
 
+    private final void bufferInputBytes(byte[] in, int inOfs, int len) {
+        System.arraycopy(in, inOfs, padBuffer, padBufferLen, len);
+        padBufferLen += len;
+        bytesBuffered += len;
+    }
+
+    private final void bufferInputBytes(ByteBuffer inBuffer, int len) {
+        inBuffer.get(padBuffer, padBufferLen, len);
+        padBufferLen += len;
+        bytesBuffered += len;
+    }
 }
--- a/jdk/src/share/classes/sun/security/pkcs11/P11KeyGenerator.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11KeyGenerator.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -65,10 +65,86 @@
     // are supported.
     private boolean supportBothKeySizes;
 
-    // min and max key sizes (in bits) for variable-key-length
-    // algorithms, e.g. RC4 and Blowfish
-    private int minKeySize;
-    private int maxKeySize;
+    /**
+     * Utility method for checking if the specified key size is valid
+     * and within the supported range. Return the significant key size
+     * upon successful validation.
+     * @param keyGenMech the PKCS#11 key generation mechanism.
+     * @param keySize the to-be-checked key size for this mechanism.
+     * @param token token which provides this mechanism.
+     * @return the significant key size (in bits) corresponding to the
+     * specified key size.
+     * @throws InvalidParameterException if the specified key size is invalid.
+     * @throws ProviderException if this mechanism isn't supported by SunPKCS11
+     * or underlying native impl.
+     */
+    static int checkKeySize(long keyGenMech, int keySize, Token token)
+        throws InvalidAlgorithmParameterException, ProviderException {
+        int sigKeySize;
+        switch ((int)keyGenMech) {
+            case (int)CKM_DES_KEY_GEN:
+                if ((keySize != 64) && (keySize != 56)) {
+                    throw new InvalidAlgorithmParameterException
+                            ("DES key length must be 56 bits");
+                }
+                sigKeySize = 56;
+                break;
+            case (int)CKM_DES2_KEY_GEN:
+            case (int)CKM_DES3_KEY_GEN:
+                if ((keySize == 112) || (keySize == 128)) {
+                    sigKeySize = 112;
+                } else if ((keySize == 168) || (keySize == 192)) {
+                    sigKeySize = 168;
+                } else {
+                    throw new InvalidAlgorithmParameterException
+                            ("DESede key length must be 112, or 168 bits");
+                }
+                break;
+            default:
+                // Handle all variable-key-length algorithms here
+                CK_MECHANISM_INFO info = null;
+                try {
+                    info = token.getMechanismInfo(keyGenMech);
+                } catch (PKCS11Exception p11e) {
+                    // Should never happen
+                    throw new ProviderException
+                            ("Cannot retrieve mechanism info", p11e);
+                }
+                if (info == null) {
+                    // XXX Unable to retrieve the supported key length from
+                    // the underlying native impl. Skip the checking for now.
+                    return keySize;
+                }
+                // PKCS#11 defines these to be in number of bytes except for
+                // RC4 which is in bits. However, some PKCS#11 impls still use
+                // bytes for all mechs, e.g. NSS. We try to detect this
+                // inconsistency if the minKeySize seems unreasonably small.
+                int minKeySize = (int)info.ulMinKeySize;
+                int maxKeySize = (int)info.ulMaxKeySize;
+                if (keyGenMech != CKM_RC4_KEY_GEN || minKeySize < 8) {
+                    minKeySize = (int)info.ulMinKeySize << 3;
+                    maxKeySize = (int)info.ulMaxKeySize << 3;
+                }
+                // Explicitly disallow keys shorter than 40-bits for security
+                if (minKeySize < 40) minKeySize = 40;
+                if (keySize < minKeySize || keySize > maxKeySize) {
+                    throw new InvalidAlgorithmParameterException
+                            ("Key length must be between " + minKeySize +
+                            " and " + maxKeySize + " bits");
+                }
+                if (keyGenMech == CKM_AES_KEY_GEN) {
+                    if ((keySize != 128) && (keySize != 192) &&
+                        (keySize != 256)) {
+                        throw new InvalidAlgorithmParameterException
+                                ("AES key length must be " + minKeySize +
+                                (maxKeySize >= 192? ", 192":"") +
+                                (maxKeySize >= 256? ", or 256":"") + " bits");
+                    }
+                }
+                sigKeySize = keySize;
+        }
+        return sigKeySize;
+    }
 
     P11KeyGenerator(Token token, String algorithm, long mechanism)
             throws PKCS11Exception {
@@ -85,72 +161,44 @@
             supportBothKeySizes =
                 (token.provider.config.isEnabled(CKM_DES2_KEY_GEN) &&
                  (token.getMechanismInfo(CKM_DES2_KEY_GEN) != null));
-        } else if (this.mechanism == CKM_RC4_KEY_GEN) {
-            CK_MECHANISM_INFO info = token.getMechanismInfo(mechanism);
-            // Although PKCS#11 spec documented that these are in bits,
-            // NSS, for one, uses bytes. Multiple by 8 if the number seems
-            // unreasonably small.
-            if (info.ulMinKeySize < 8) {
-                minKeySize = (int)info.ulMinKeySize << 3;
-                maxKeySize = (int)info.ulMaxKeySize << 3;
-            } else {
-                minKeySize = (int)info.ulMinKeySize;
-                maxKeySize = (int)info.ulMaxKeySize;
-            }
-            // Explicitly disallow keys shorter than 40-bits for security
-            if (minKeySize < 40) minKeySize = 40;
-        } else if (this.mechanism == CKM_BLOWFISH_KEY_GEN) {
-            CK_MECHANISM_INFO info = token.getMechanismInfo(mechanism);
-            maxKeySize = (int)info.ulMaxKeySize << 3;
-            minKeySize = (int)info.ulMinKeySize << 3;
-            // Explicitly disallow keys shorter than 40-bits for security
-            if (minKeySize < 40) minKeySize = 40;
         }
-
         setDefaultKeySize();
     }
 
     // set default keysize and also initialize keyType
     private void setDefaultKeySize() {
-        // whether to check default key size against the min and max value
-        boolean validateKeySize = false;
         switch ((int)mechanism) {
         case (int)CKM_DES_KEY_GEN:
             keySize = 64;
-            significantKeySize = 56;
             keyType = CKK_DES;
             break;
         case (int)CKM_DES2_KEY_GEN:
             keySize = 128;
-            significantKeySize = 112;
             keyType = CKK_DES2;
             break;
         case (int)CKM_DES3_KEY_GEN:
             keySize = 192;
-            significantKeySize = 168;
             keyType = CKK_DES3;
             break;
         case (int)CKM_AES_KEY_GEN:
+            keySize = 128;
             keyType = CKK_AES;
-            keySize = 128;
-            significantKeySize = 128;
             break;
         case (int)CKM_RC4_KEY_GEN:
+            keySize = 128;
             keyType = CKK_RC4;
-            keySize = 128;
-            validateKeySize = true;
             break;
         case (int)CKM_BLOWFISH_KEY_GEN:
+            keySize = 128;
             keyType = CKK_BLOWFISH;
-            keySize = 128;
-            validateKeySize = true;
             break;
         default:
             throw new ProviderException("Unknown mechanism " + mechanism);
         }
-        if (validateKeySize &&
-            ((keySize > maxKeySize) || (keySize < minKeySize))) {
-            throw new ProviderException("Unsupported key size");
+        try {
+            significantKeySize = checkKeySize(mechanism, keySize, token);
+        } catch (InvalidAlgorithmParameterException iape) {
+            throw new ProviderException("Unsupported default key size", iape);
         }
     }
 
@@ -170,57 +218,32 @@
     // see JCE spec
     protected void engineInit(int keySize, SecureRandom random) {
         token.ensureValid();
-        switch ((int)mechanism) {
-        case (int)CKM_DES_KEY_GEN:
-            if ((keySize != this.keySize) &&
-                (keySize != this.significantKeySize)) {
-                throw new InvalidParameterException
-                        ("DES key length must be 56 bits");
-            }
-            break;
-        case (int)CKM_DES2_KEY_GEN:
-        case (int)CKM_DES3_KEY_GEN:
-            long newMechanism;
-            if ((keySize == 112) || (keySize == 128)) {
-                newMechanism = CKM_DES2_KEY_GEN;
-            } else if ((keySize == 168) || (keySize == 192)) {
-                newMechanism = CKM_DES3_KEY_GEN;
-            } else {
-                throw new InvalidParameterException
-                    ("DESede key length must be 112, or 168 bits");
-            }
+        int newSignificantKeySize;
+        try {
+            newSignificantKeySize = checkKeySize(mechanism, keySize, token);
+        } catch (InvalidAlgorithmParameterException iape) {
+            throw (InvalidParameterException)
+                    (new InvalidParameterException().initCause(iape));
+        }
+        if ((mechanism == CKM_DES2_KEY_GEN) ||
+            (mechanism == CKM_DES3_KEY_GEN))  {
+            long newMechanism = (newSignificantKeySize == 112 ?
+                CKM_DES2_KEY_GEN : CKM_DES3_KEY_GEN);
             if (mechanism != newMechanism) {
                 if (supportBothKeySizes) {
                     mechanism = newMechanism;
-                    setDefaultKeySize();
+                    // Adjust keyType to reflect the mechanism change
+                    keyType = (mechanism == CKM_DES2_KEY_GEN ?
+                        CKK_DES2 : CKK_DES3);
                 } else {
                     throw new InvalidParameterException
-                        ("Only " + significantKeySize +
-                         "-bit DESede key length is supported");
+                            ("Only " + significantKeySize +
+                             "-bit DESede is supported");
                 }
             }
-            break;
-        case (int)CKM_AES_KEY_GEN:
-            if ((keySize != 128) && (keySize != 192) && (keySize != 256)) {
-                throw new InvalidParameterException
-                        ("AES key length must be 128, 192, or 256 bits");
-            }
-            this.keySize = keySize;
-            significantKeySize = keySize;
-            break;
-        case (int)CKM_RC4_KEY_GEN:
-        case (int)CKM_BLOWFISH_KEY_GEN:
-            if ((keySize < minKeySize) || (keySize > maxKeySize)) {
-                throw new InvalidParameterException
-                    (algorithm + " key length must be between " +
-                     minKeySize + " and " + maxKeySize + " bits");
-            }
-            this.keySize = keySize;
-            this.significantKeySize = keySize;
-            break;
-        default:
-            throw new ProviderException("Unknown mechanism " + mechanism);
         }
+        this.keySize = keySize;
+        this.significantKeySize = newSignificantKeySize;
     }
 
     // see JCE spec
--- a/jdk/src/share/classes/sun/security/pkcs11/P11KeyStore.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11KeyStore.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -156,10 +156,10 @@
         // CKA_CLASS - entry type
         private CK_ATTRIBUTE type = null;
 
-        // CKA_LABEL of cert
+        // CKA_LABEL of cert and secret key
         private String label = null;
 
-        // CKA_ID - of private key/cert
+        // CKA_ID of the private key/cert pair
         private byte[] id = null;
 
         // CKA_TRUSTED - true if cert is trusted
@@ -871,10 +871,8 @@
         if ((token.tokenInfo.flags & CKF_PROTECTED_AUTHENTICATION_PATH) == 0) {
             token.provider.login(null, handler);
         } else {
-
             // token supports protected authentication path
             // (external pin-pad, for example)
-
             if (handler != null &&
                 !token.config.getKeyStoreCompatibilityMode()) {
                 throw new LoginException("can not specify password if token " +
@@ -1130,19 +1128,14 @@
                 SecretKey skey = ske.getSecretKey();
 
                 try {
-                    // first see if the key already exists.
-                    // if so, update the CKA_LABEL
-                    if (!updateSkey(alias)) {
+                    // first check if the key already exists
+                    AliasInfo aliasInfo = aliasMap.get(alias);
 
-                        // key entry does not exist.
-                        // delete existing entry for alias and
-                        // create new secret key entry
-                        // (new entry might be a secret key
-                        // session object converted into a token object)
+                    if (aliasInfo != null) {
+                        engineDeleteEntry(alias);
+                    }
+                    storeSkey(alias, ske);
 
-                        engineDeleteEntry(alias);
-                        storeSkey(alias, ske);
-                    }
                 } catch (PKCS11Exception pe) {
                     throw new KeyStoreException(pe);
                 }
@@ -1396,41 +1389,6 @@
         }
     }
 
-    /**
-     * return true if update occurred
-     */
-    private boolean updateSkey(String alias)
-                throws KeyStoreException, PKCS11Exception {
-
-        Session session = null;
-        try {
-            session = token.getOpSession();
-
-            // first update existing secret key CKA_LABEL
-
-            THandle h = getTokenObject(session, ATTR_CLASS_SKEY, null, alias);
-            if (h.type != ATTR_CLASS_SKEY) {
-                if (debug != null) {
-                    debug.println("did not find secret key " +
-                        "with CKA_LABEL [" + alias + "]");
-                }
-                return false;
-            }
-            CK_ATTRIBUTE[] attrs = new CK_ATTRIBUTE[] {
-                                new CK_ATTRIBUTE(CKA_LABEL, alias) };
-            token.p11.C_SetAttributeValue(session.id(), h.handle, attrs);
-
-            if (debug != null) {
-                debug.println("updateSkey set new alias [" +
-                                alias +
-                                "] for secret key entry");
-            }
-
-            return true;
-        } finally {
-            token.releaseSession(session);
-        }
-    }
 
     /**
      * XXX  On ibutton, when you C_SetAttribute(CKA_ID) for a private key
@@ -1532,30 +1490,6 @@
         }
     }
 
-    private void updateP11Skey(String alias, P11Key key)
-                throws PKCS11Exception {
-
-        Session session = null;
-        try {
-            session = token.getOpSession();
-
-            // session key - convert to token key and set CKA_LABEL
-
-            CK_ATTRIBUTE[] attrs = new CK_ATTRIBUTE[] {
-                                ATTR_TOKEN_TRUE,
-                                new CK_ATTRIBUTE(CKA_LABEL, alias) };
-            token.p11.C_CopyObject(session.id(), key.keyID, attrs);
-            if (debug != null) {
-                    debug.println("updateP11Skey copied secret session key " +
-                                "for [" +
-                                alias +
-                                "] to token entry");
-            }
-        } finally {
-            token.releaseSession(session);
-        }
-    }
-
     private void updateP11Pkey(String alias, CK_ATTRIBUTE attribute, P11Key key)
                 throws PKCS11Exception {
 
@@ -1689,48 +1623,26 @@
                 throws PKCS11Exception, KeyStoreException {
 
         SecretKey skey = ske.getSecretKey();
-        long keyType = CKK_GENERIC_SECRET;
-
-        if (skey instanceof P11Key && this.token == ((P11Key)skey).token) {
-            updateP11Skey(alias, (P11Key)skey);
-            return;
-        }
-
-        if ("AES".equalsIgnoreCase(skey.getAlgorithm())) {
-            keyType = CKK_AES;
-        } else if ("Blowfish".equalsIgnoreCase(skey.getAlgorithm())) {
-            keyType = CKK_BLOWFISH;
-        } else if ("DES".equalsIgnoreCase(skey.getAlgorithm())) {
-            keyType = CKK_DES;
-        } else if ("DESede".equalsIgnoreCase(skey.getAlgorithm())) {
-            keyType = CKK_DES3;
-        } else if ("RC4".equalsIgnoreCase(skey.getAlgorithm()) ||
-                    "ARCFOUR".equalsIgnoreCase(skey.getAlgorithm())) {
-            keyType = CKK_RC4;
+        // No need to specify CKA_CLASS, CKA_KEY_TYPE, CKA_VALUE since
+        // they are handled in P11SecretKeyFactory.createKey() method.
+        CK_ATTRIBUTE[] attrs = new CK_ATTRIBUTE[] {
+            ATTR_SKEY_TOKEN_TRUE,
+            ATTR_PRIVATE_TRUE,
+            new CK_ATTRIBUTE(CKA_LABEL, alias),
+        };
+        try {
+            P11SecretKeyFactory.convertKey(token, skey, null, attrs);
+        } catch (InvalidKeyException ike) {
+            // re-throw KeyStoreException to match javadoc
+            throw new KeyStoreException("Cannot convert to PKCS11 keys", ike);
         }
 
-        CK_ATTRIBUTE[] attrs = new CK_ATTRIBUTE[] {
-                ATTR_SKEY_TOKEN_TRUE,
-                ATTR_CLASS_SKEY,
-                ATTR_PRIVATE_TRUE,
-                new CK_ATTRIBUTE(CKA_KEY_TYPE, keyType),
-                new CK_ATTRIBUTE(CKA_LABEL, alias),
-                new CK_ATTRIBUTE(CKA_VALUE, skey.getEncoded()) };
-        attrs = token.getAttributes
-                (TemplateManager.O_IMPORT, CKO_SECRET_KEY, keyType, attrs);
+        // update global alias map
+        aliasMap.put(alias, new AliasInfo(alias));
 
-        // create the new entry
-        Session session = null;
-        try {
-            session = token.getOpSession();
-            token.p11.C_CreateObject(session.id(), attrs);
-            if (debug != null) {
-                debug.println("storeSkey created token secret key for [" +
-                                alias +
-                                "]");
-            }
-        } finally {
-            token.releaseSession(session);
+        if (debug != null) {
+            debug.println("storeSkey created token secret key for [" +
+                          alias + "]");
         }
     }
 
@@ -2492,7 +2404,8 @@
             // if there are duplicates (either between secret keys,
             // or between a secret key and another object),
             // throw an exception
-            HashSet<String> sKeySet = new HashSet<String>();
+            HashMap<String, AliasInfo> sKeyMap =
+                    new HashMap<String, AliasInfo>();
 
             attrs = new CK_ATTRIBUTE[] {
                 ATTR_SKEY_TOKEN_TRUE,
@@ -2507,8 +2420,8 @@
 
                     // there is a CKA_LABEL
                     String cka_label = new String(attrs[0].getCharArray());
-                    if (!sKeySet.contains(cka_label)) {
-                        sKeySet.add(cka_label);
+                    if (sKeyMap.get(cka_label) == null) {
+                        sKeyMap.put(cka_label, new AliasInfo(cka_label));
                     } else {
                         throw new KeyStoreException("invalid KeyStore state: " +
                                 "found multiple secret keys sharing same " +
@@ -2523,7 +2436,7 @@
             ArrayList<AliasInfo> matchedCerts =
                                 mapPrivateKeys(pkeyIDs, certMap);
             boolean sharedLabel = mapCerts(matchedCerts, certMap);
-            mapSecretKeys(sKeySet);
+            mapSecretKeys(sKeyMap);
 
             return sharedLabel;
 
@@ -2547,7 +2460,7 @@
                         HashMap<String, HashSet<AliasInfo>> certMap)
                 throws PKCS11Exception, CertificateException {
 
-        // global alias map
+        // reset global alias map
         aliasMap = new HashMap<String, AliasInfo>();
 
         // list of matched certs that we will return
@@ -2722,18 +2635,17 @@
      * If the secret key shares a CKA_LABEL with another entry,
      * throw an exception
      */
-    private void mapSecretKeys(HashSet<String> sKeySet)
+    private void mapSecretKeys(HashMap<String, AliasInfo> sKeyMap)
                 throws KeyStoreException {
-        for (String label : sKeySet) {
-            if (!aliasMap.containsKey(label)) {
-                aliasMap.put(label, new AliasInfo(label));
-            } else {
+        for (String label : sKeyMap.keySet()) {
+            if (aliasMap.containsKey(label)) {
                 throw new KeyStoreException("invalid KeyStore state: " +
                         "found secret key sharing CKA_LABEL [" +
                         label +
                         "] with another token object");
             }
         }
+        aliasMap.putAll(sKeyMap);
     }
 
     private void dumpTokenMap() {
--- a/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -98,7 +98,6 @@
         this.token = token;
         this.algorithm = "RSA";
         this.mechanism = mechanism;
-        session = token.getOpSession();
     }
 
     // modes do not make sense for RSA, but allow ECB
@@ -184,7 +183,8 @@
                 throw new InvalidKeyException
                                 ("Wrap has to be used with public keys");
             }
-            // No further setup needed for C_Wrap(). We remain uninitialized.
+            // No further setup needed for C_Wrap(). We'll initialize later if
+            // we can't use C_Wrap().
             return;
         } else if (opmode == Cipher.UNWRAP_MODE) {
             if (p11Key.isPrivate() == false) {
@@ -383,7 +383,8 @@
         return implDoFinal(out, outOfs, out.length - outOfs);
     }
 
-    private byte[] doFinal() throws BadPaddingException, IllegalBlockSizeException {
+    private byte[] doFinal() throws BadPaddingException,
+            IllegalBlockSizeException {
         byte[] t = new byte[2048];
         int n = implDoFinal(t, 0, t.length);
         byte[] out = new byte[n];
@@ -394,20 +395,37 @@
     // see JCE spec
     protected byte[] engineWrap(Key key) throws InvalidKeyException,
             IllegalBlockSizeException {
-        // XXX Note that if we cannot convert key to a key on this token,
-        // we will fail. For example, trying a wrap an AES key on a token that
-        // does not support AES.
-        // We could implement a fallback that just encrypts the encoding
-        // (assuming the key is not sensitive). For now, we are operating under
-        // the assumption that this is not necessary.
         String keyAlg = key.getAlgorithm();
-        P11Key secretKey = P11SecretKeyFactory.convertKey(token, key, keyAlg);
+        P11Key sKey = null;
+        try {
+            // The conversion may fail, e.g. trying to wrap an AES key on
+            // a token that does not support AES, or when the key size is
+            // not within the range supported by the token.
+            sKey = P11SecretKeyFactory.convertKey(token, key, keyAlg);
+        } catch (InvalidKeyException ike) {
+            byte[] toBeWrappedKey = key.getEncoded();
+            if (toBeWrappedKey == null) {
+                throw new InvalidKeyException
+                        ("wrap() failed, no encoding available", ike);
+            }
+            // Directly encrypt the key encoding when key conversion failed
+            implInit(Cipher.ENCRYPT_MODE, p11Key);
+            implUpdate(toBeWrappedKey, 0, toBeWrappedKey.length);
+            try {
+                return doFinal();
+            } catch (BadPaddingException bpe) {
+                // should not occur
+                throw new InvalidKeyException("wrap() failed", bpe);
+            } finally {
+                // Restore original mode
+                implInit(Cipher.WRAP_MODE, p11Key);
+            }
+        }
         Session s = null;
         try {
             s = token.getOpSession();
-            byte[] b = token.p11.C_WrapKey(s.id(), new CK_MECHANISM(mechanism),
-                p11Key.keyID, secretKey.keyID);
-            return b;
+            return token.p11.C_WrapKey(s.id(), new CK_MECHANISM(mechanism),
+                p11Key.keyID, sKey.keyID);
         } catch (PKCS11Exception e) {
             throw new InvalidKeyException("wrap() failed", e);
         } finally {
@@ -431,11 +449,13 @@
                 };
                 attributes = token.getAttributes
                     (O_IMPORT, CKO_SECRET_KEY, keyType, attributes);
-                long keyID = token.p11.C_UnwrapKey(s.id(), new CK_MECHANISM(mechanism),
-                    p11Key.keyID, wrappedKey, attributes);
-                return P11Key.secretKey(session, keyID, algorithm, 48 << 3, attributes);
+                long keyID = token.p11.C_UnwrapKey(s.id(),
+                        new CK_MECHANISM(mechanism), p11Key.keyID, wrappedKey,
+                        attributes);
+                return P11Key.secretKey(session, keyID, algorithm, 48 << 3,
+                        attributes);
             } catch (PKCS11Exception e) {
-                throw new InvalidKeyException("wrap() failed", e);
+                throw new InvalidKeyException("unwrap() failed", e);
             } finally {
                 token.releaseSession(s);
             }
--- a/jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -104,9 +104,20 @@
 
     /**
      * Convert an arbitrary key of algorithm into a P11Key of provider.
-     * Used engineTranslateKey(), P11Cipher.init(), and P11Mac.init().
+     * Used in engineTranslateKey(), P11Cipher.init(), and P11Mac.init().
      */
-    static P11Key convertKey(Token token, Key key, String algorithm)
+    static P11Key convertKey(Token token, Key key, String algo)
+            throws InvalidKeyException {
+        return convertKey(token, key, algo, null);
+    }
+
+    /**
+     * Convert an arbitrary key of algorithm w/ custom attributes into a
+     * P11Key of provider.
+     * Used in P11KeyStore.storeSkey.
+     */
+    static P11Key convertKey(Token token, Key key, String algo,
+            CK_ATTRIBUTE[] extraAttrs)
             throws InvalidKeyException {
         token.ensureValid();
         if (key == null) {
@@ -115,25 +126,41 @@
         if (key instanceof SecretKey == false) {
             throw new InvalidKeyException("Key must be a SecretKey");
         }
-        long algorithmType;
-        if (algorithm == null) {
-            algorithm = key.getAlgorithm();
-            algorithmType = getKeyType(algorithm);
+        long algoType;
+        if (algo == null) {
+            algo = key.getAlgorithm();
+            algoType = getKeyType(algo);
         } else {
-            algorithmType = getKeyType(algorithm);
+            algoType = getKeyType(algo);
             long keyAlgorithmType = getKeyType(key.getAlgorithm());
-            if (algorithmType != keyAlgorithmType) {
-                if ((algorithmType == PCKK_HMAC) || (algorithmType == PCKK_SSLMAC)) {
+            if (algoType != keyAlgorithmType) {
+                if ((algoType == PCKK_HMAC) || (algoType == PCKK_SSLMAC)) {
                     // ignore key algorithm for MACs
                 } else {
                     throw new InvalidKeyException
-                                ("Key algorithm must be " + algorithm);
+                            ("Key algorithm must be " + algo);
                 }
             }
         }
         if (key instanceof P11Key) {
             P11Key p11Key = (P11Key)key;
             if (p11Key.token == token) {
+                if (extraAttrs != null) {
+                    Session session = null;
+                    try {
+                        session = token.getObjSession();
+                        long newKeyID = token.p11.C_CopyObject(session.id(),
+                                p11Key.keyID, extraAttrs);
+                        p11Key = (P11Key) (P11Key.secretKey(p11Key.session,
+                                newKeyID, p11Key.algorithm, p11Key.keyLength,
+                                extraAttrs));
+                    } catch (PKCS11Exception p11e) {
+                        throw new InvalidKeyException
+                                ("Cannot duplicate the PKCS11 key", p11e);
+                    } finally {
+                        token.releaseSession(session);
+                    }
+                }
                 return p11Key;
             }
         }
@@ -141,11 +168,11 @@
         if (p11Key != null) {
             return p11Key;
         }
-        if ("RAW".equals(key.getFormat()) == false) {
+        if ("RAW".equalsIgnoreCase(key.getFormat()) == false) {
             throw new InvalidKeyException("Encoded format must be RAW");
         }
         byte[] encoded = key.getEncoded();
-        p11Key = createKey(token, encoded, algorithm, algorithmType);
+        p11Key = createKey(token, encoded, algo, algoType, extraAttrs);
         token.secretCache.put(key, p11Key);
         return p11Key;
     }
@@ -159,79 +186,79 @@
     }
 
     private static P11Key createKey(Token token, byte[] encoded,
-            String algorithm, long keyType) throws InvalidKeyException {
-        int n = encoded.length;
-        int keyLength;
-        switch ((int)keyType) {
-        case (int)CKK_RC4:
-            if ((n < 5) || (n > 128)) {
-                throw new InvalidKeyException
-                        ("ARCFOUR key length must be between 5 and 128 bytes");
-            }
-            keyLength = n << 3;
-            break;
-        case (int)CKK_DES:
-            if (n != 8) {
-                throw new InvalidKeyException
-                        ("DES key length must be 8 bytes");
-            }
-            keyLength = 56;
-            fixDESParity(encoded, 0);
-            break;
-        case (int)CKK_DES3:
-            if (n == 16) {
-                keyType = CKK_DES2;
-            } else if (n == 24) {
-                keyType = CKK_DES3;
-                fixDESParity(encoded, 16);
-            } else {
-                throw new InvalidKeyException
-                        ("DESede key length must be 16 or 24 bytes");
+            String algorithm, long keyType, CK_ATTRIBUTE[] extraAttrs)
+            throws InvalidKeyException {
+        int n = encoded.length << 3;
+        int keyLength = n;
+        try {
+            switch ((int)keyType) {
+                case (int)CKK_DES:
+                    keyLength =
+                        P11KeyGenerator.checkKeySize(CKM_DES_KEY_GEN, n, token);
+                    fixDESParity(encoded, 0);
+                    break;
+                case (int)CKK_DES3:
+                    keyLength =
+                        P11KeyGenerator.checkKeySize(CKM_DES3_KEY_GEN, n, token);
+                    fixDESParity(encoded, 0);
+                    fixDESParity(encoded, 8);
+                    if (keyLength == 112) {
+                        keyType = CKK_DES2;
+                    } else {
+                        keyType = CKK_DES3;
+                        fixDESParity(encoded, 16);
+                    }
+                    break;
+                case (int)CKK_AES:
+                    keyLength =
+                        P11KeyGenerator.checkKeySize(CKM_AES_KEY_GEN, n, token);
+                    break;
+                case (int)CKK_RC4:
+                    keyLength =
+                        P11KeyGenerator.checkKeySize(CKM_RC4_KEY_GEN, n, token);
+                    break;
+                case (int)CKK_BLOWFISH:
+                    keyLength =
+                        P11KeyGenerator.checkKeySize(CKM_BLOWFISH_KEY_GEN, n,
+                        token);
+                    break;
+                case (int)CKK_GENERIC_SECRET:
+                case (int)PCKK_TLSPREMASTER:
+                case (int)PCKK_TLSRSAPREMASTER:
+                case (int)PCKK_TLSMASTER:
+                    keyType = CKK_GENERIC_SECRET;
+                    break;
+                case (int)PCKK_SSLMAC:
+                case (int)PCKK_HMAC:
+                    if (n == 0) {
+                        throw new InvalidKeyException
+                                ("MAC keys must not be empty");
+                    }
+                    keyType = CKK_GENERIC_SECRET;
+                    break;
+                default:
+                    throw new InvalidKeyException("Unknown algorithm " +
+                            algorithm);
             }
-            fixDESParity(encoded, 0);
-            fixDESParity(encoded, 8);
-            keyLength = n * 7;
-            break;
-        case (int)CKK_AES:
-            if ((n != 16) && (n != 24) && (n != 32)) {
-                throw new InvalidKeyException
-                        ("AES key length must be 16, 24, or 32 bytes");
-            }
-            keyLength = n << 3;
-            break;
-        case (int)CKK_BLOWFISH:
-            if ((n < 5) || (n > 56)) {
-                throw new InvalidKeyException
-                        ("Blowfish key length must be between 5 and 56 bytes");
-            }
-            keyLength = n << 3;
-            break;
-        case (int)CKK_GENERIC_SECRET:
-        case (int)PCKK_TLSPREMASTER:
-        case (int)PCKK_TLSRSAPREMASTER:
-        case (int)PCKK_TLSMASTER:
-            keyType = CKK_GENERIC_SECRET;
-            keyLength = n << 3;
-            break;
-        case (int)PCKK_SSLMAC:
-        case (int)PCKK_HMAC:
-            if (n == 0) {
-                throw new InvalidKeyException
-                        ("MAC keys must not be empty");
-            }
-            keyType = CKK_GENERIC_SECRET;
-            keyLength = n << 3;
-            break;
-        default:
-            throw new InvalidKeyException("Unknown algorithm " + algorithm);
+        } catch (InvalidAlgorithmParameterException iape) {
+            throw new InvalidKeyException("Invalid key for " + algorithm,
+                    iape);
+        } catch (ProviderException pe) {
+            throw new InvalidKeyException("Could not create key", pe);
         }
         Session session = null;
         try {
-            CK_ATTRIBUTE[] attributes = new CK_ATTRIBUTE[] {
-                new CK_ATTRIBUTE(CKA_CLASS, CKO_SECRET_KEY),
-                new CK_ATTRIBUTE(CKA_KEY_TYPE, keyType),
-                new CK_ATTRIBUTE(CKA_VALUE, encoded),
-            };
+            CK_ATTRIBUTE[] attributes;
+            if (extraAttrs != null) {
+                attributes = new CK_ATTRIBUTE[3 + extraAttrs.length];
+                System.arraycopy(extraAttrs, 0, attributes, 3,
+                        extraAttrs.length);
+            } else {
+                attributes = new CK_ATTRIBUTE[3];
+            }
+            attributes[0] = new CK_ATTRIBUTE(CKA_CLASS, CKO_SECRET_KEY);
+            attributes[1] = new CK_ATTRIBUTE(CKA_KEY_TYPE, keyType);
+            attributes[2] = new CK_ATTRIBUTE(CKA_VALUE, encoded);
             attributes = token.getAttributes
                 (O_IMPORT, CKO_SECRET_KEY, keyType, attributes);
             session = token.getObjSession();
@@ -280,7 +307,7 @@
     private byte[] getKeyBytes(SecretKey key) throws InvalidKeySpecException {
         try {
             key = engineTranslateKey(key);
-            if ("RAW".equals(key.getFormat()) == false) {
+            if ("RAW".equalsIgnoreCase(key.getFormat()) == false) {
                 throw new InvalidKeySpecException
                     ("Could not obtain key bytes");
             }
--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -601,14 +601,26 @@
         // XXX attributes for Ciphers (supported modes, padding)
         d(CIP, "ARCFOUR",                       P11Cipher,      s("RC4"),
                 m(CKM_RC4));
-        // XXX only CBC/NoPadding for block ciphers
         d(CIP, "DES/CBC/NoPadding",             P11Cipher,
                 m(CKM_DES_CBC));
+        d(CIP, "DES/CBC/PKCS5Padding",          P11Cipher,
+                m(CKM_DES_CBC_PAD, CKM_DES_CBC));
+        d(CIP, "DES/ECB",                       P11Cipher,      s("DES"),
+                m(CKM_DES_ECB));
+
         d(CIP, "DESede/CBC/NoPadding",          P11Cipher,
                 m(CKM_DES3_CBC));
+        d(CIP, "DESede/CBC/PKCS5Padding",       P11Cipher,
+                m(CKM_DES3_CBC_PAD, CKM_DES3_CBC));
+        d(CIP, "DESede/ECB",                    P11Cipher,      s("DESede"),
+                m(CKM_DES3_ECB));
         d(CIP, "AES/CBC/NoPadding",             P11Cipher,
                 m(CKM_AES_CBC));
-        d(CIP, "Blowfish/CBC/NoPadding",        P11Cipher,
+        d(CIP, "AES/CBC/PKCS5Padding",          P11Cipher,
+                m(CKM_AES_CBC_PAD, CKM_AES_CBC));
+        d(CIP, "AES/ECB",                       P11Cipher,      s("AES"),
+                m(CKM_AES_ECB));
+        d(CIP, "Blowfish/CBC",                  P11Cipher,
                 m(CKM_BLOWFISH_CBC));
 
         // XXX RSA_X_509, RSA_OAEP not yet supported
--- a/jdk/src/share/classes/sun/security/validator/EndEntityChecker.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/classes/sun/security/validator/EndEntityChecker.java	Sun May 04 07:05:42 2008 -0700
@@ -87,6 +87,9 @@
     // the Microsoft Server-Gated-Cryptography EKU extension OID
     private final static String OID_EKU_MS_SGC = "1.3.6.1.4.1.311.10.3.3";
 
+    // the recognized extension OIDs
+    private final static String OID_SUBJECT_ALT_NAME = "2.5.29.17";
+
     private final static String NSCT_SSL_CLIENT =
                                 NetscapeCertTypeExtension.SSL_CLIENT;
 
@@ -171,6 +174,13 @@
             throws CertificateException {
         // basic constraints irrelevant in EE certs
         exts.remove(SimpleValidator.OID_BASIC_CONSTRAINTS);
+
+        // If the subject field contains an empty sequence, the subjectAltName
+        // extension MUST be marked critical.
+        // We do not check the validity of the critical extension, just mark
+        // it recognizable here.
+        exts.remove(OID_SUBJECT_ALT_NAME);
+
         if (!exts.isEmpty()) {
             throw new CertificateException("Certificate contains unsupported "
                 + "critical extensions: " + exts);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/MultiplexProviderFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import com.sun.tracing.ProviderFactory;
+import com.sun.tracing.Provider;
+import com.sun.tracing.Probe;
+
+/**
+ * Factory class to create tracing Providers.
+ *
+ * This factory creates a "multiplex provider", which is a provider that
+ * encapsulates a list of providers and whose probes trigger a corresponding
+ * trigger in each of the encapsulated providers' probes.
+ *
+ * This is used when there are multiple tracing frameworks activated at once.
+ * A user-defined provider gets implementation for each of the activated
+ * frameworks and this multiplex framework is what is ultimately passed
+ * back to the user.  All probe triggers are multiplexed to each
+ * active framework.
+ *
+ * @since 1.7
+ */
+public class MultiplexProviderFactory extends ProviderFactory {
+
+    private Set<ProviderFactory> factories;
+
+    public MultiplexProviderFactory(Set<ProviderFactory> factories) {
+        this.factories = factories;
+    }
+
+    public <T extends Provider> T createProvider(Class<T> cls) {
+        HashSet<Provider> providers = new HashSet<Provider>();
+        for (ProviderFactory factory : factories) {
+            providers.add(factory.createProvider(cls));
+        }
+        MultiplexProvider provider = new MultiplexProvider(cls, providers);
+        try {
+            provider.init();
+        } catch (Exception e) {
+            // Probably a permission problem (can't get declared members)
+            Logger.getAnonymousLogger().warning(
+                "Could not initialize tracing provider: " + e.getMessage());
+        }
+        return provider.newProxyInstance();
+    }
+}
+
+class MultiplexProvider extends ProviderSkeleton {
+
+    private Set<Provider> providers;
+
+    protected ProbeSkeleton createProbe(Method m) {
+        return new MultiplexProbe(m, providers);
+    }
+
+    MultiplexProvider(Class<? extends Provider> type, Set<Provider> providers) {
+        super(type);
+        this.providers = providers;
+    }
+
+    public void dispose() {
+        for (Provider p : providers) {
+            p.dispose();
+        }
+        super.dispose();
+    }
+}
+
+class MultiplexProbe extends ProbeSkeleton {
+
+    private Set<Probe> probes;
+
+    MultiplexProbe(Method m, Set<Provider> providers) {
+        super(m.getParameterTypes());
+        probes = new HashSet<Probe>();
+        for (Provider p : providers) {
+            Probe probe = p.getProbe(m);
+            if (probe != null) {
+                probes.add(probe);
+            }
+        }
+    }
+
+    public boolean isEnabled() {
+        for (Probe p : probes) {
+            if (p.isEnabled()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public void uncheckedTrigger(Object[] args) {
+        for (Probe p : probes) {
+            try {
+                // try the fast path
+                ProbeSkeleton ps = (ProbeSkeleton)p;
+                ps.uncheckedTrigger(args);
+            } catch (ClassCastException e) {
+                // Probe.trigger takes an "Object ..." varargs parameter,
+                // so we can't call it directly.
+                try {
+                    Method m = Probe.class.getMethod(
+                        "trigger", Class.forName("[java.lang.Object"));
+                    m.invoke(p, args);
+                } catch (Exception e1) {
+                    assert false; // This shouldn't happen
+                }
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/NullProviderFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing;
+
+import java.lang.reflect.Method;
+import java.util.logging.Logger;
+
+import com.sun.tracing.ProviderFactory;
+import com.sun.tracing.Provider;
+
+/**
+ * Factory class to create tracing Providers.
+ *
+ * This factory will create tracing instances that do nothing.
+ * It is used when no tracing is desired, but Provider instances still
+ * must be generated so that tracing calls in the application continue to
+ * run.
+ *
+ * @since 1.7
+ */
+public class NullProviderFactory extends ProviderFactory {
+
+    /**
+     * Creates and returns a Null provider.
+     *
+     * See comments at {@code ProviderSkeleton.createProvider()} for more
+     * details.
+     *
+     * @return a provider whose probe trigger are no-ops.
+     */
+    public <T extends Provider> T createProvider(Class<T> cls) {
+        NullProvider provider = new NullProvider(cls);
+        try {
+            provider.init();
+        } catch (Exception e) {
+            // Probably a permission problem (can't get declared members)
+            Logger.getAnonymousLogger().warning(
+                "Could not initialize tracing provider: " + e.getMessage());
+        }
+        return provider.newProxyInstance();
+    }
+}
+
+class NullProvider extends ProviderSkeleton {
+
+    NullProvider(Class<? extends Provider> type) {
+        super(type);
+    }
+
+    protected ProbeSkeleton createProbe(Method m) {
+        return new NullProbe(m.getParameterTypes());
+    }
+}
+
+class NullProbe extends ProbeSkeleton {
+
+    public NullProbe(Class<?>[] parameters) {
+        super(parameters);
+    }
+
+    public boolean isEnabled() {
+        return false;
+    }
+
+    public void uncheckedTrigger(Object[] args) {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/PrintStreamProviderFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing;
+
+import java.lang.reflect.Method;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.logging.Logger;
+
+import com.sun.tracing.ProviderFactory;
+import com.sun.tracing.Provider;
+import com.sun.tracing.ProviderName;
+import com.sun.tracing.Probe;
+import com.sun.tracing.ProbeName;
+
+/**
+ * Factory class to create tracing Providers.
+ *
+ * This factory will create tracing instances that print to a PrintStream
+ * when activated.
+ *
+ * @since 1.7
+ */
+public class PrintStreamProviderFactory extends ProviderFactory {
+
+    private PrintStream stream;
+
+    public PrintStreamProviderFactory(PrintStream stream) {
+        this.stream = stream;
+    }
+
+    public <T extends Provider> T createProvider(Class<T> cls) {
+        PrintStreamProvider provider = new PrintStreamProvider(cls, stream);
+        try {
+            provider.init();
+        } catch (Exception e) {
+            // Probably a permission problem (can't get declared members)
+            Logger.getAnonymousLogger().warning(
+                "Could not initialize tracing provider: " + e.getMessage());
+        }
+        return provider.newProxyInstance();
+    }
+}
+
+class PrintStreamProvider extends ProviderSkeleton {
+
+    private PrintStream stream;
+    private String providerName;
+
+    protected ProbeSkeleton createProbe(Method m) {
+        String probeName = getAnnotationString(m, ProbeName.class, m.getName());
+        return new PrintStreamProbe(this, probeName, m.getParameterTypes());
+    }
+
+    PrintStreamProvider(Class<? extends Provider> type, PrintStream stream) {
+        super(type);
+        this.stream = stream;
+        this.providerName = getProviderName();
+    }
+
+    PrintStream getStream() {
+        return stream;
+    }
+
+    String getName() {
+        return providerName;
+    }
+}
+
+class PrintStreamProbe extends ProbeSkeleton {
+
+    private PrintStreamProvider provider;
+    private String name;
+
+    PrintStreamProbe(PrintStreamProvider p, String name, Class<?>[] params) {
+        super(params);
+        this.provider = p;
+        this.name = name;
+    }
+
+    public boolean isEnabled() {
+        return true;
+    }
+
+    public void uncheckedTrigger(Object[] args) {
+        StringBuffer sb = new StringBuffer();
+        sb.append(provider.getName());
+        sb.append(".");
+        sb.append(name);
+        sb.append("(");
+        boolean first = true;
+        for (Object o : args) {
+            if (first == false) {
+                sb.append(",");
+            } else {
+                first = false;
+            }
+            sb.append(o.toString());
+        }
+        sb.append(")");
+        provider.getStream().println(sb.toString());
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/ProbeSkeleton.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Field;
+import com.sun.tracing.Probe;
+
+/**
+ * Provides common code for implementation of {@code Probe} classes.
+ *
+ * @since 1.7
+ */
+public abstract class ProbeSkeleton implements Probe {
+
+    protected Class<?>[] parameters;
+
+    protected ProbeSkeleton(Class<?>[] parameters) {
+        this.parameters = parameters;
+    }
+
+    public abstract boolean isEnabled();  // framework-dependent
+
+    /**
+     * Triggers the probe with verified arguments.
+     *
+     * The caller of this method must have already determined that the
+     * arity and types of the arguments match what the probe was
+     * declared with.
+     */
+    public abstract void uncheckedTrigger(Object[] args); // framework-dependent
+
+    private static boolean isAssignable(Object o, Class<?> formal) {
+        if (o != null) {
+            if ( !formal.isInstance(o) ) {
+                if ( formal.isPrimitive() ) { // o might be a boxed primitive
+                    try {
+                        // Yuck.  There must be a better way of doing this
+                        Field f = o.getClass().getField("TYPE");
+                        return formal.isAssignableFrom((Class<?>)f.get(null));
+                    } catch (Exception e) {
+                        /* fall-through. */
+                    }
+                }
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Performs a type-check of the parameters before triggering the probe.
+     */
+    public void trigger(Object ... args) {
+        if (args.length != parameters.length) {
+            throw new IllegalArgumentException("Wrong number of arguments");
+        } else {
+            for (int i = 0; i < parameters.length; ++i) {
+                if ( !isAssignable(args[i], parameters[i]) ) {
+                    throw new IllegalArgumentException(
+                            "Wrong type of argument at position " + i);
+                }
+            }
+            uncheckedTrigger(args);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+
+import com.sun.tracing.Provider;
+import com.sun.tracing.Probe;
+import com.sun.tracing.ProviderName;
+
+/**
+ * Provides a common code for implementation of {@code Provider} classes.
+ *
+ * Each tracing subsystem needs to provide three classes, a factory
+ * (derived from {@code ProviderFactory}, a provider (a subclass of
+ * {@code Provider}, and a probe type (subclass of {@code ProbeSkeleton}).
+ *
+ * The factory object takes a user-defined interface and provides an
+ * implementation of it whose method calls will trigger probes in the
+ * tracing framework.
+ *
+ * The framework's provider class, and its instances, are not seen by the
+ * user at all -- they usually sit in the background and receive and dispatch
+ * the calls to the user's provider interface.  The {@code ProviderSkeleton}
+ * class provides almost all of the implementation needed by a framework
+ * provider.  Framework providers must only provide a constructor and
+ * disposal method, and implement the {@code createProbe} method to create
+ * an appropriate {@code ProbeSkeleton} subclass.
+ *
+ * The framework's probe class provides the implementation of the two
+ * probe methods, {@code isEnabled()} and {@code uncheckedTrigger()}.  Both are
+ * framework-dependent implementations.
+ *
+ * @since 1.7
+ */
+
+public abstract class ProviderSkeleton implements InvocationHandler, Provider {
+
+    protected boolean active; // set to false after dispose() is called
+    protected Class<? extends Provider> providerType; // user's interface
+    protected HashMap<Method, ProbeSkeleton> probes; // methods to probes
+
+
+    /**
+     * Creates a framework-specific probe subtype.
+     *
+     * This method is implemented by the framework's provider and returns
+     * framework-specific probes for a method.
+     *
+     * @param method A method in the user's interface
+     * @return a subclass of ProbeSkeleton for the particular framework.
+     */
+    protected abstract ProbeSkeleton createProbe(Method method);
+
+    /**
+     * Initializes the provider.
+     *
+     * @param type the user's interface
+     */
+    protected ProviderSkeleton(Class<? extends Provider> type) {
+        this.active = false; // in case of some error during initialization
+        this.providerType = type;
+        this.probes = new HashMap<Method,ProbeSkeleton>();
+    }
+
+    /**
+     * Post-constructor initialization routine.
+     *
+     * Subclass instances must be initialized before they can create probes.
+     * It is up to the factory implementations to call this after construction.
+     */
+    public void init() {
+        for (Method m : providerType.getDeclaredMethods()) {
+            if ( m.getReturnType() != Void.TYPE ) {
+                throw new IllegalArgumentException(
+                   "Return value of method is not void");
+            } else {
+                probes.put(m, createProbe(m));
+            }
+        }
+        this.active = true;
+    }
+
+    /**
+     * Magic routine which creates an implementation of the user's interface.
+     *
+     * This method creates the instance of the user's interface which is
+     * passed back to the user.  Every call upon that interface will be
+     * redirected to the {@code invoke()} method of this class (until
+     * overridden by the VM).
+     *
+     * @return an implementation of the user's interface
+     */
+    @SuppressWarnings("unchecked")
+    public <T extends Provider> T newProxyInstance() {
+        return (T)Proxy.newProxyInstance(providerType.getClassLoader(),
+               new Class<?>[] { providerType }, this);
+    }
+
+    /**
+     * Triggers a framework probe when a user interface method is called.
+     *
+     * This method dispatches a user interface method call to the appropriate
+     * probe associated with this framework.
+     *
+     * If the invoked method is not a user-defined member of the interface,
+     * then it is a member of {@code Provider} or {@code Object} and we
+     * invoke the method directly.
+     *
+     * @param proxy the instance whose method was invoked
+     * @param method the method that was called
+     * @param args the arguments passed in the call.
+     * @return always null, if the method is a user-defined probe
+     */
+    public Object invoke(Object proxy, Method method, Object[] args) {
+        if (method.getDeclaringClass() != providerType) {
+            try {
+                return method.invoke(this, args);
+            } catch (IllegalAccessException e) {
+                assert false;
+            } catch (InvocationTargetException e) {
+                assert false;
+            }
+        } else if (active) {
+            ProbeSkeleton p = probes.get(method);
+            if (p != null) {
+                // Skips argument check -- already done by javac
+                p.uncheckedTrigger(args);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Direct accessor for {@code Probe} objects.
+     *
+     * @param m the method corresponding to a probe
+     * @return the method associated probe object, or null
+     */
+    public Probe getProbe(Method m) {
+        return active ? probes.get(m) : null;
+    }
+
+    /**
+     * Default provider disposal method.
+     *
+     * This is overridden in subclasses as needed.
+     */
+    public void dispose() {
+        active = false;
+        probes.clear();
+    }
+
+    /**
+     * Gets the user-specified provider name for the user's interface.
+     *
+     * If the user's interface has a {@ProviderName} annotation, that value
+     * is used.  Otherwise we use the simple name of the user interface's class.
+     * @return the provider name
+     */
+    protected String getProviderName() {
+        return getAnnotationString(
+                providerType, ProviderName.class, providerType.getSimpleName());
+    }
+
+    /**
+     * Utility method for getting a string value from an annotation.
+     *
+     * Used for getting a string value from an annotation with a 'value' method.
+     *
+     * @param element the element that was annotated, either a class or method
+     * @param annotation the class of the annotation we're interested in
+     * @param defaultValue the value to return if the annotation doesn't
+     * exist, doesn't have a "value", or the value is empty.
+     */
+    protected static String getAnnotationString(
+            AnnotatedElement element, Class<? extends Annotation> annotation,
+            String defaultValue) {
+        String ret = (String)getAnnotationValue(
+                element, annotation, "value", defaultValue);
+        return ret.isEmpty() ? defaultValue : ret;
+    }
+
+    /**
+     * Utility method for calling an arbitrary method in an annotation.
+     *
+     * @param element the element that was annotated, either a class or method
+     * @param annotation the class of the annotation we're interested in
+     * @param methodName the name of the method in the annotation we wish
+     * to call.
+     * @param defaultValue the value to return if the annotation doesn't
+     * exist, or we couldn't invoke the method for some reason.
+     * @return the result of calling the annotation method, or the default.
+     */
+    protected static Object getAnnotationValue(
+            AnnotatedElement element, Class<? extends Annotation> annotation,
+            String methodName, Object defaultValue) {
+        Object ret = defaultValue;
+        try {
+            Method m = annotation.getMethod(methodName);
+            Annotation a = element.getAnnotation(annotation);
+            ret = m.invoke(a);
+        } catch (NoSuchMethodException e) {
+            assert false;
+        } catch (IllegalAccessException e) {
+            assert false;
+        } catch (InvocationTargetException e) {
+            assert false;
+        } catch (NullPointerException e) {
+            assert false;
+        }
+        return ret;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/dtrace/Activation.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing.dtrace;
+
+import java.lang.ref.WeakReference;
+import java.lang.ref.ReferenceQueue;
+import java.security.Permission;
+import java.util.HashSet;
+
+class Activation {
+    private SystemResource resource;
+    private int referenceCount;
+
+    Activation(String moduleName, DTraceProvider[] providers) {
+        SecurityManager security = System.getSecurityManager();
+        if (security != null) {
+            Permission perm =
+                new RuntimePermission("com.sun.tracing.dtrace.createProvider");
+            security.checkPermission(perm);
+        }
+        referenceCount = providers.length;
+        for (DTraceProvider p : providers) {
+            p.setActivation(this);
+        }
+        resource = new SystemResource(
+            this, JVM.activate(moduleName, providers));
+    }
+
+    void disposeProvider(DTraceProvider p) {
+        if (--referenceCount == 0) {
+            resource.dispose();
+        }
+    }
+}
+
+/**
+ * The native resource part of an Activation.
+ *
+ * This holds the native handle.
+ *
+ * If the user loses a reference to a set of Providers without disposing them,
+ * and GC determines the Activation is unreachable, then the next
+ * activation or flush call will automatically dispose the unreachable objects
+ *
+ * The SystemResource instances are creating during activation, and
+ * unattached during disposal.  When created, they always have a
+ * strong reference to them via the {@code resources} static member.  Explicit
+ * {@code dispose} calls will unregister the native resource and remove
+ * references to the SystemResource object.  Absent an explicit dispose,
+ * when their associated Activation object becomes garbage, the SystemResource
+ * object will be enqueued on the reference queue and disposed at the
+ * next call to {@code flush}.
+ */
+class SystemResource extends WeakReference<Activation> {
+
+    private long handle;
+
+    private static ReferenceQueue<Activation> referenceQueue =
+        referenceQueue = new ReferenceQueue<Activation>();
+    static HashSet<SystemResource> resources = new HashSet<SystemResource>();
+
+    SystemResource(Activation activation, long handle) {
+        super(activation, referenceQueue);
+        this.handle = handle;
+        flush();
+        resources.add(this);
+    }
+
+    void dispose() {
+        JVM.dispose(handle);
+        resources.remove(this);
+        handle = 0;
+    }
+
+    static void flush() {
+        SystemResource resource = null;
+        while ((resource = (SystemResource)referenceQueue.poll()) != null) {
+            if (resource.handle != 0) {
+                resource.dispose();
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/dtrace/DTraceProbe.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing.dtrace;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+import sun.tracing.ProbeSkeleton;
+
+class DTraceProbe extends ProbeSkeleton {
+    private Object proxy;
+    private Method declared_method;
+    private Method implementing_method;
+
+    DTraceProbe(Object proxy, Method m) {
+        super(m.getParameterTypes());
+        this.proxy = proxy;
+        this.declared_method = m;
+        try {
+            // The JVM will override the proxy method's implementation with
+            // a version that will invoke the probe.
+            this.implementing_method =  proxy.getClass().getMethod(
+                m.getName(), m.getParameterTypes());
+        } catch (NoSuchMethodException e) {
+            throw new RuntimeException("Internal error, wrong proxy class");
+        }
+    }
+
+    public boolean isEnabled() {
+        return JVM.isEnabled(implementing_method);
+    }
+
+    public void uncheckedTrigger(Object[] args) {
+        try {
+            implementing_method.invoke(proxy, args);
+        } catch (IllegalAccessException e) {
+            assert false;
+        } catch (InvocationTargetException e) {
+            assert false;
+        }
+    }
+
+    String getProbeName() {
+        return DTraceProvider.getProbeName(declared_method);
+    }
+
+    String getFunctionName() {
+        return DTraceProvider.getFunctionName(declared_method);
+    }
+
+    Method getMethod() {
+        return implementing_method;
+    }
+
+    Class<?>[] getParameterTypes() {
+        return this.parameters;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/dtrace/DTraceProvider.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing.dtrace;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+
+import sun.tracing.ProviderSkeleton;
+import sun.tracing.ProbeSkeleton;
+import com.sun.tracing.Provider;
+import com.sun.tracing.ProviderName;
+import com.sun.tracing.ProbeName;
+import com.sun.tracing.dtrace.Attributes;
+import com.sun.tracing.dtrace.ModuleName;
+import com.sun.tracing.dtrace.FunctionName;
+import com.sun.tracing.dtrace.StabilityLevel;
+import com.sun.tracing.dtrace.DependencyClass;
+
+import sun.misc.ProxyGenerator;
+
+class DTraceProvider extends ProviderSkeleton {
+
+    private Activation activation;
+    private Object proxy;
+
+    // For proxy generation
+    private final static Class[] constructorParams = { InvocationHandler.class };
+    private final String proxyClassNamePrefix = "$DTraceTracingProxy";
+
+    static final String DEFAULT_MODULE = "java_tracing";
+    static final String DEFAULT_FUNCTION = "unspecified";
+
+    private static long nextUniqueNumber = 0;
+    private static synchronized long getUniqueNumber() {
+        return nextUniqueNumber++;
+    }
+
+    protected ProbeSkeleton createProbe(Method m) {
+        return new DTraceProbe(proxy, m);
+    }
+
+    DTraceProvider(Class<? extends Provider> type) {
+        super(type);
+    }
+
+    void setProxy(Object p) {
+        proxy = p;
+    }
+
+    void setActivation(Activation a) {
+        this.activation = a;
+    }
+
+    public void dispose() {
+        if (activation != null) {
+            activation.disposeProvider(this);
+            activation = null;
+        }
+        super.dispose();
+    }
+
+    /**
+     * Magic routine which creates an implementation of the user's interface.
+     *
+     * This method uses the ProxyGenerator directly to bypass the
+     * java.lang.reflect.proxy cache so that we get a unique class each
+     * time it's called and can't accidently reuse a $Proxy class.
+     *
+     * @return an implementation of the user's interface
+     */
+    @SuppressWarnings("unchecked")
+    public <T extends Provider> T newProxyInstance() {
+        /*
+         * Choose a name for the proxy class to generate.
+         */
+        long num = getUniqueNumber();
+
+        String proxyPkg = "";
+        if (!Modifier.isPublic(providerType.getModifiers())) {
+            String name = providerType.getName();
+            int n = name.lastIndexOf('.');
+            proxyPkg = ((n == -1) ? "" : name.substring(0, n + 1));
+        }
+
+        String proxyName = proxyPkg + proxyClassNamePrefix + num;
+
+        /*
+         * Generate the specified proxy class.
+         */
+        Class<?> proxyClass = null;
+        byte[] proxyClassFile = ProxyGenerator.generateProxyClass(
+                proxyName, new Class<?>[] { providerType });
+        try {
+            proxyClass = JVM.defineClass(
+                providerType.getClassLoader(), proxyName,
+                proxyClassFile, 0, proxyClassFile.length);
+        } catch (ClassFormatError e) {
+            /*
+             * A ClassFormatError here means that (barring bugs in the
+             * proxy class generation code) there was some other
+             * invalid aspect of the arguments supplied to the proxy
+             * class creation (such as virtual machine limitations
+             * exceeded).
+             */
+            throw new IllegalArgumentException(e.toString());
+        }
+
+        /*
+         * Invoke its constructor with the designated invocation handler.
+         */
+        try {
+            Constructor cons = proxyClass.getConstructor(constructorParams);
+            return (T)cons.newInstance(new Object[] { this });
+        } catch (NoSuchMethodException e) {
+            throw new InternalError(e.toString());
+        } catch (IllegalAccessException e) {
+            throw new InternalError(e.toString());
+        } catch (InstantiationException e) {
+            throw new InternalError(e.toString());
+        } catch (InvocationTargetException e) {
+            throw new InternalError(e.toString());
+        }
+    }
+
+    // In the normal case, the proxy object's method implementations will call
+    // this method (it usually calls the ProviderSkeleton's version).  That
+    // method uses the passed 'method' object to lookup the associated
+    // 'ProbeSkeleton' and calls uncheckedTrigger() on that probe to cause the
+    // probe to fire.  DTrace probes are different in that the proxy class's
+    // methods are immediately overridden with native code to fire the probe
+    // directly.  So this method should never get invoked.  We also wire up the
+    // DTraceProbe.uncheckedTrigger() method to call the proxy method instead
+    // of doing the work itself.
+    public Object invoke(Object proxy, Method method, Object[] args) {
+        if (method.getDeclaringClass() != providerType) {
+            try {
+                return method.invoke(this, args);
+            } catch (IllegalAccessException e) {
+                assert false;
+            } catch (InvocationTargetException e) {
+                assert false;
+            }
+        } else if (active) {
+            assert false : "This method should have been overridden by the JVM";
+        }
+        return null;
+    }
+
+    public String getProviderName() {
+        return super.getProviderName();
+    }
+
+    String getModuleName() {
+        return getAnnotationString(
+            providerType, ModuleName.class, DEFAULT_MODULE);
+    }
+
+    static String getProbeName(Method method) {
+        return getAnnotationString(
+            method, ProbeName.class, method.getName());
+    }
+
+    static String getFunctionName(Method method) {
+        return getAnnotationString(
+            method, FunctionName.class, DEFAULT_FUNCTION);
+    }
+
+    DTraceProbe[] getProbes() {
+        return probes.values().toArray(new DTraceProbe[0]);
+    }
+
+    StabilityLevel getNameStabilityFor(Class<? extends Annotation> type) {
+        Attributes attrs = (Attributes)getAnnotationValue(
+            providerType, type, "value", null);
+        if (attrs == null) {
+            return StabilityLevel.PRIVATE;
+        } else {
+            return attrs.name();
+        }
+    }
+
+    StabilityLevel getDataStabilityFor(Class<? extends Annotation> type) {
+        Attributes attrs = (Attributes)getAnnotationValue(
+            providerType, type, "value", null);
+        if (attrs == null) {
+            return StabilityLevel.PRIVATE;
+        } else {
+            return attrs.data();
+        }
+    }
+
+    DependencyClass getDependencyClassFor(Class<? extends Annotation> type) {
+        Attributes attrs = (Attributes)getAnnotationValue(
+            providerType, type, "value", null);
+        if (attrs == null) {
+            return DependencyClass.UNKNOWN;
+        } else {
+            return attrs.dependency();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/dtrace/DTraceProviderFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing.dtrace;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.logging.Logger;
+import java.security.Permission;
+
+import com.sun.tracing.ProviderFactory;
+import com.sun.tracing.Provider;
+
+/**
+ * Factory class to create JSDT Providers.
+ *
+ * This class contains methods to create an instance of a Provider
+ * interface which can be used to place tracepoints in an application.
+ * Method calls upon that instance trigger DTrace probes that
+ * are visible from DTrace scripts.   Such calls have no other
+ * side effects in the application.
+ * <p>
+ * The DTrace script mechanisms for listing and matching probes will not see
+ * nor match any probes until the provider they reside in is created by a
+ * call to {@code createProvider()} (or {@code createProviders()}).
+ * <p>
+ * Providers that are created should be disposed of when they are no longer
+ * needed to free up system resources, at which point the associated
+ * DTrace probes will no longer be available to DTrace.  One disposes a
+ * provider by calling
+ * {@link com.sun.tracing.Provider#dispose Provider.dispose()} on a
+ * created provider instance.
+ *
+ * @since 1.7
+ */
+public final class DTraceProviderFactory extends ProviderFactory {
+    /**
+     * Creates an instance of a provider which can then be used to trigger
+     * DTrace probes.
+     *
+     * The provider specification, provided as an argument, should only
+     * contain methods which have a 'void' return type and String or
+     * integer-based typed arguments (long, int, short, char, byte, or boolean).
+     *
+     * @param cls A user-defined interface which extends {@code Provider}.
+     * @return An instance of the interface which is used to trigger
+     * the DTrace probes.
+     * @throws java.lang.SecurityException if a security manager has been
+     * installed and it denies
+     * RuntimePermission("com.sun.dtrace.jsdt.createProvider")
+     * @throws java.lang.IllegalArgumentException if the interface contains
+     * methods that do not return null, or that contain arguments that are
+     * not String or integer types.
+     */
+    public <T extends Provider> T createProvider(Class<T> cls) {
+        DTraceProvider jsdt = new DTraceProvider(cls);
+        T proxy = jsdt.newProxyInstance();
+        jsdt.setProxy(proxy);
+        try {
+            jsdt.init();
+            new Activation(jsdt.getModuleName(), new DTraceProvider[] { jsdt });
+        } catch (Exception e) {
+            // Probably a permission problem (can't get declared members)
+            Logger.getAnonymousLogger().warning(
+                "Could not initialize tracing provider: " + e.getMessage());
+            jsdt.dispose();
+        }
+        return proxy;
+    }
+
+    /**
+     * Creates multiple providers at once.
+     *
+     * This method batches together a number of provider instantiations.
+     * It works similarly
+     * to {@code createProvider}, but operates on a set of providers instead
+     * of one at a time.  This method is in place since some DTrace
+     * implementations limit the number of times that providers can be
+     * created.  When numerous providers can be created at once with this
+     * method, it will count only as a single creation point to DTrace, thus
+     * it uses less system resources.
+     * <p>
+     * All of the probes in the providers will be visible to DTrace after
+     * this call and all will remain visible until all of the providers
+     * are disposed.
+     * <p>
+     * The {@code moduleName} parameter will override any {@code ModuleName}
+     * annotation associated with any of the providers in the set.
+     * All of the probes created by this call will share the same
+     * module name.
+     * <p>
+     * @param providers a set of provider specification interfaces
+     * @param moduleName the module name to associate with all probes
+     * @return A map which maps the provider interface specification to an
+     * implementing instance.
+     * @throws java.lang.SecurityException if a security manager has been
+     * installed and it denies
+     * RuntimePermission("com.sun.dtrace.jsdt.createProvider")
+     * @throws java.lang.IllegalArgumentException if any of the interface
+     * contains methods that do not return null, or that contain arguments
+     * that are not String or integer types.
+     */
+    public Map<Class<? extends Provider>,Provider> createProviders(
+            Set<Class<? extends Provider>> providers, String moduleName) {
+        HashMap<Class<? extends Provider>,Provider> map =
+            new HashMap<Class<? extends Provider>,Provider>();
+        HashSet<DTraceProvider> jsdts = new HashSet<DTraceProvider>();
+        for (Class<? extends Provider> cls : providers) {
+            DTraceProvider jsdt = new DTraceProvider(cls);
+            jsdts.add(jsdt);
+            map.put(cls, jsdt.newProxyInstance());
+        }
+        new Activation(moduleName, jsdts.toArray(new DTraceProvider[0]));
+        return map;
+    }
+
+    /**
+     * Used to check the status of DTrace support in the underlying JVM and
+     * operating system.
+     *
+     * This is an informative method only - the Java-level effects of
+     * creating providers and triggering probes will not change whether or
+     * not DTrace is supported by the underlying systems.
+     *
+     * @return true if DTrace is supported
+     */
+    public static boolean isSupported() {
+        try {
+            SecurityManager security = System.getSecurityManager();
+            if (security != null) {
+                Permission perm = new RuntimePermission(
+                        "com.sun.tracing.dtrace.createProvider");
+                security.checkPermission(perm);
+            }
+            return JVM.isSupported();
+        } catch (SecurityException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/dtrace/JVM.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+package sun.tracing.dtrace;
+
+import java.lang.reflect.Method;
+
+/**
+ * Container class for JVM interface native methods
+ *
+ * @since 1.7
+ */
+class JVM {
+
+    static {
+      java.security.AccessController.doPrivileged(
+              new sun.security.action.LoadLibraryAction("jsdt"));
+    }
+
+    static long activate(String moduleName, DTraceProvider[] providers) {
+        return activate0(moduleName, providers);
+    }
+
+    static void dispose(long handle) {
+        dispose0(handle);
+    }
+
+    static boolean isEnabled(Method m) {
+        return isEnabled0(m);
+    }
+
+    static boolean isSupported() {
+        return isSupported0();
+    }
+
+    static Class<?> defineClass(
+            ClassLoader loader, String name, byte[] b, int off, int len) {
+        return defineClass0(loader, name, b, off, len);
+    }
+
+    private static native long activate0(
+        String moduleName, DTraceProvider[] providers);
+    private static native void dispose0(long activation_handle);
+    private static native boolean isEnabled0(Method m);
+    private static native boolean isSupported0();
+    private static native Class<?> defineClass0(
+        ClassLoader loader, String name, byte[] b, int off, int len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/tracing/package-info.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+/**
+ * This package contains internal common code for implementing tracing
+ * frameworks, and defined a number of existing frameworks.
+ * <p>
+ * There are four tracing frameworks currently defined.  The "Null" and
+ * "Multiplex" frameworks are used internally as part of the implementation.
+ * The "DTrace" framework is the prime consumer framework at the moment,
+ * while the "PrintStream" framework is a functional, but hidden, framework
+ * which can be used to track probe firings.  All but the "DTrace" framework
+ * are defined in this package.  The "DTrace" framework is implemented in the
+ * {@code sun.tracing.dtrace} package.
+ * <p>
+ * This package also contains the {@code ProviderSkeleton} class, which
+ * holds most of the common code needed for implementing frameworks.
+ * <p>
+ * The "Null" framework is used when there are no other active frameworks.
+ * It accomplishes absolutely nothing and is merely a placeholder so that
+ * the application can call the tracing routines without error.
+ * <p>
+ * The "Multiplex" framework is used when there are multiple active frameworks.
+ * It is initialized with the framework factories and create providers and
+ * probes that dispatch to each active framework in turn.
+ * <p>
+ * The "PrintStream" framework is currently a debugging framework which
+ * dispatches trace calls to a user-defined PrintStream class, defined by
+ * a property.  It may some day be opened up to general use.
+ * <p>
+ * See the {@code sun.tracing.dtrace} and {@code com.sun.tracing.dtrace}
+ * packages for information on the "DTrace" framework.
+ */
+
+package sun.tracing;
--- a/jdk/src/share/demo/jfc/Notepad/resources/Notepad.properties	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/demo/jfc/Notepad/resources/Notepad.properties	Sun May 04 07:05:42 2008 -0700
@@ -1,76 +1,76 @@
-#
-# Resource strings for Notepad example
-
-Title=Notepad
-ElementTreeFrameTitle=Elements
-ViewportBackingStore=false
-
-# menubar definition
-#
-# Each of the strings that follow form a key to be 
-# used to the actual menu definition.
-menubar=file edit debug
-
-# file Menu definition
-#
-# Each of the strings that follow form a key to be
-# used as the basis of a menu item definition.
-#
-# open ->  Notepad.openAction
-# new  ->  Notepad.newAction
-# save ->  Notepad.saveAction
-# exit ->  Notepad.exitAction
-file=new open save - exit
-fileLabel=File
-openLabel=Open
-openImage=resources/open.gif
-newLabel=New
-newImage=resources/new.gif
-saveLabel=Save
-saveImage=resources/save.gif
-exitLabel=Exit
-
-#
-# edit Menu definition
-#
-# cut   -> JTextComponent.cutAction
-# copy  -> JTextComponent.copyAction
-# paste -> JTextComponent.pasteAction
-edit=cut copy paste - undo redo
-editLabel=Edit
-cutLabel=Cut
-cutAction=cut-to-clipboard
-cutImage=resources/cut.gif
-copyLabel=Copy
-copyAction=copy-to-clipboard
-copyImage=resources/copy.gif
-pasteLabel=Paste
-pasteAction=paste-from-clipboard
-pasteImage=resources/paste.gif
-undoLabel=Undo
-undoAction=Undo
-redoLabel=Redo
-redoAction=Redo
-
-#
-# debug Menu definition
-#
-debug=dump showElementTree
-debugLabel=Debug
-dumpLabel=Dump model to System.err
-dumpAction=dump-model
-showElementTreeLabel=Show Elements
-
-# toolbar definition
-#
-# Each of the strings that follow form a key to be
-# used as the basis of the tool definition.  Actions
-# are of course sharable, and in this case are shared
-# with the menu items.
-toolbar=new open save - cut copy paste
-newTooltip=Create a new file
-openTooltip=Open a file
-saveTooltip=Save to a file
-cutTooltip=Move selection to clipboard
-copyTooltip=Copy selection to clipboard
-pasteTooltip=Paste clipboard to selection
+#
+# Resource strings for Notepad example
+
+Title=Notepad
+ElementTreeFrameTitle=Elements
+ViewportBackingStore=false
+
+# menubar definition
+#
+# Each of the strings that follow form a key to be 
+# used to the actual menu definition.
+menubar=file edit debug
+
+# file Menu definition
+#
+# Each of the strings that follow form a key to be
+# used as the basis of a menu item definition.
+#
+# open ->  Notepad.openAction
+# new  ->  Notepad.newAction
+# save ->  Notepad.saveAction
+# exit ->  Notepad.exitAction
+file=new open save - exit
+fileLabel=File
+openLabel=Open
+openImage=resources/open.gif
+newLabel=New
+newImage=resources/new.gif
+saveLabel=Save
+saveImage=resources/save.gif
+exitLabel=Exit
+
+#
+# edit Menu definition
+#
+# cut   -> JTextComponent.cutAction
+# copy  -> JTextComponent.copyAction
+# paste -> JTextComponent.pasteAction
+edit=cut copy paste - undo redo
+editLabel=Edit
+cutLabel=Cut
+cutAction=cut-to-clipboard
+cutImage=resources/cut.gif
+copyLabel=Copy
+copyAction=copy-to-clipboard
+copyImage=resources/copy.gif
+pasteLabel=Paste
+pasteAction=paste-from-clipboard
+pasteImage=resources/paste.gif
+undoLabel=Undo
+undoAction=Undo
+redoLabel=Redo
+redoAction=Redo
+
+#
+# debug Menu definition
+#
+debug=dump showElementTree
+debugLabel=Debug
+dumpLabel=Dump model to System.err
+dumpAction=dump-model
+showElementTreeLabel=Show Elements
+
+# toolbar definition
+#
+# Each of the strings that follow form a key to be
+# used as the basis of the tool definition.  Actions
+# are of course sharable, and in this case are shared
+# with the menu items.
+toolbar=new open save - cut copy paste
+newTooltip=Create a new file
+openTooltip=Open a file
+saveTooltip=Save to a file
+cutTooltip=Move selection to clipboard
+copyTooltip=Copy selection to clipboard
+pasteTooltip=Paste clipboard to selection
--- a/jdk/src/share/instrument/InvocationAdapter.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/InvocationAdapter.c	Sun May 04 07:05:42 2008 -0700
@@ -626,6 +626,7 @@
     jvmtiError jvmtierr;
 
     jvmtierr = (*jvmtienv)->AddToSystemClassLoaderSearch(jvmtienv, jarfile);
+    check_phase_ret_1(jvmtierr);
 
     if (jvmtierr == JVMTI_ERROR_NONE) {
         return 0;
@@ -634,6 +635,7 @@
         jvmtiError err;
 
         err = (*jvmtienv)->GetPhase(jvmtienv, &phase);
+        /* can be called from any phase */
         jplis_assert(err == JVMTI_ERROR_NONE);
 
         if (phase == JVMTI_PHASE_LIVE) {
@@ -805,6 +807,8 @@
 
         /* print warning if boot class path not updated */
         if (jvmtierr != JVMTI_ERROR_NONE) {
+            check_phase_blob_ret(jvmtierr, free(path));
+
             fprintf(stderr, "WARNING: %s not added to bootstrap class loader search: ", path);
             switch (jvmtierr) {
                 case JVMTI_ERROR_ILLEGAL_ARGUMENT :
--- a/jdk/src/share/instrument/JPLISAgent.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/JPLISAgent.c	Sun May 04 07:05:42 2008 -0700
@@ -179,6 +179,7 @@
     jvmtierror = (*jvmtienv)->GetEnvironmentLocalStorage(
                                             jvmtienv,
                                             (void**)&environment);
+    /* can be called from any phase */
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 
     if (jvmtierror == JVMTI_ERROR_NONE) {
@@ -230,6 +231,7 @@
         /* don't leak envs */
         if ( initerror != JPLIS_INIT_ERROR_NONE ) {
             jvmtiError jvmtierror = (*jvmtienv)->DisposeEnvironment(jvmtienv);
+            /* can be called from any phase */
             jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
         }
     }
@@ -259,7 +261,7 @@
     agent->mNormalEnvironment.mIsRetransformer       = JNI_FALSE;
     agent->mRetransformEnvironment.mJVMTIEnv         = NULL;        /* NULL until needed */
     agent->mRetransformEnvironment.mAgent            = agent;
-    agent->mRetransformEnvironment.mIsRetransformer  = JNI_TRUE;
+    agent->mRetransformEnvironment.mIsRetransformer  = JNI_FALSE;   /* JNI_FALSE until mJVMTIEnv is set */
     agent->mAgentmainCaller                          = NULL;
     agent->mInstrumentationImpl                      = NULL;
     agent->mPremainCaller                            = NULL;
@@ -277,18 +279,25 @@
     jvmtierror = (*jvmtienv)->SetEnvironmentLocalStorage(
                                             jvmtienv,
                                             &(agent->mNormalEnvironment));
+    /* can be called from any phase */
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 
     /* check what capabilities are available */
     checkCapabilities(agent);
 
     /* check phase - if live phase then we don't need the VMInit event */
-    jvmtierror == (*jvmtienv)->GetPhase(jvmtienv, &phase);
+    jvmtierror = (*jvmtienv)->GetPhase(jvmtienv, &phase);
+    /* can be called from any phase */
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     if (phase == JVMTI_PHASE_LIVE) {
         return JPLIS_INIT_ERROR_NONE;
     }
 
+    if (phase != JVMTI_PHASE_ONLOAD) {
+        /* called too early or called too late; either way bail out */
+        return JPLIS_INIT_ERROR_FAILURE;
+    }
+
     /* now turn on the VMInit event */
     if ( jvmtierror == JVMTI_ERROR_NONE ) {
         jvmtiEventCallbacks callbacks;
@@ -298,6 +307,7 @@
         jvmtierror = (*jvmtienv)->SetEventCallbacks( jvmtienv,
                                                      &callbacks,
                                                      sizeof(callbacks));
+        check_phase_ret_blob(jvmtierror, JPLIS_INIT_ERROR_FAILURE);
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     }
 
@@ -307,6 +317,7 @@
                                                 JVMTI_ENABLE,
                                                 JVMTI_EVENT_VM_INIT,
                                                 NULL /* all threads */);
+        check_phase_ret_blob(jvmtierror, JPLIS_INIT_ERROR_FAILURE);
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     }
 
@@ -622,6 +633,7 @@
     jvmtierror = (*jvmtienv)->SetEventCallbacks( jvmtienv,
                                                  &callbacks,
                                                  sizeof(callbacks));
+    check_phase_ret_false(jvmtierror);
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 
 
@@ -632,6 +644,7 @@
                                                     JVMTI_DISABLE,
                                                     JVMTI_EVENT_VM_INIT,
                                                     NULL /* all threads */);
+        check_phase_ret_false(jvmtierror);
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     }
 
@@ -642,6 +655,7 @@
                                                     JVMTI_ENABLE,
                                                     JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
                                                     NULL /* all threads */);
+        check_phase_ret_false(jvmtierror);
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     }
 
@@ -660,6 +674,7 @@
     memset(&potentialCapabilities, 0, sizeof(potentialCapabilities));
 
     jvmtierror = (*jvmtienv)->GetPotentialCapabilities(jvmtienv, &potentialCapabilities);
+    check_phase_ret(jvmtierror);
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 
     if ( jvmtierror == JVMTI_ERROR_NONE ) {
@@ -681,9 +696,11 @@
     jvmtiError          jvmtierror;
 
         jvmtierror = (*jvmtienv)->GetCapabilities(jvmtienv, &desiredCapabilities);
+        /* can be called from any phase */
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
         desiredCapabilities.can_set_native_method_prefix = 1;
         jvmtierror = (*jvmtienv)->AddCapabilities(jvmtienv, &desiredCapabilities);
+        check_phase_ret(jvmtierror);
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 }
 
@@ -715,9 +732,11 @@
     jvmtiError          jvmtierror;
 
     jvmtierror = (*jvmtienv)->GetCapabilities(jvmtienv, &desiredCapabilities);
+    /* can be called from any phase */
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     desiredCapabilities.can_maintain_original_method_order = 1;
     jvmtierror = (*jvmtienv)->AddCapabilities(jvmtienv, &desiredCapabilities);
+    check_phase_ret(jvmtierror);
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 }
 
@@ -732,9 +751,11 @@
 
     if (agent->mRedefineAvailable && !agent->mRedefineAdded) {
         jvmtierror = (*jvmtienv)->GetCapabilities(jvmtienv, &desiredCapabilities);
+        /* can be called from any phase */
         jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
         desiredCapabilities.can_redefine_classes = 1;
         jvmtierror = (*jvmtienv)->AddCapabilities(jvmtienv, &desiredCapabilities);
+        check_phase_ret(jvmtierror);
 
         /*
          * With mixed premain/agentmain agents then it's possible that the
@@ -998,6 +1019,7 @@
     if (jvmtierror == JVMTI_ERROR_NONE) {
         // install the retransforming environment
         agent->mRetransformEnvironment.mJVMTIEnv = retransformerEnv;
+        agent->mRetransformEnvironment.mIsRetransformer = JNI_TRUE;
 
         // Make it for ClassFileLoadHook handling
         jvmtierror = (*retransformerEnv)->SetEnvironmentLocalStorage(
@@ -1025,6 +1047,7 @@
     jvmtierror = (*jvmtienv)->IsModifiableClass( jvmtienv,
                                                  clazz,
                                                  &is_modifiable);
+    check_phase_ret_false(jvmtierror);
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
 
     return is_modifiable;
@@ -1032,7 +1055,7 @@
 
 jboolean
 isRetransformClassesSupported(JNIEnv * jnienv, JPLISAgent * agent) {
-    return retransformableEnvironment(agent) != NULL;
+    return agent->mRetransformEnvironment.mIsRetransformer;
 }
 
 void
@@ -1075,6 +1098,12 @@
         numClasses = (*jnienv)->GetArrayLength(jnienv, classes);
         errorOccurred = checkForThrowable(jnienv);
         jplis_assert(!errorOccurred);
+
+        if (!errorOccurred && numClasses == 0) {
+            jplis_assert(numClasses != 0);
+            errorOccurred = JNI_TRUE;
+            errorCode = JVMTI_ERROR_NULL_POINTER;
+        }
     }
 
     if (!errorOccurred) {
@@ -1096,6 +1125,13 @@
             if (errorOccurred) {
                 break;
             }
+
+            if (classArray[index] == NULL) {
+                jplis_assert(classArray[index] != NULL);
+                errorOccurred = JNI_TRUE;
+                errorCode = JVMTI_ERROR_NULL_POINTER;
+                break;
+            }
         }
     }
 
@@ -1217,6 +1253,7 @@
             if (!errorOccurred) {
                 jvmtiError  errorCode = JVMTI_ERROR_NONE;
                 errorCode = (*jvmtienv)->RedefineClasses(jvmtienv, numDefs, classDefs);
+                check_phase_blob_ret(errorCode, deallocate(jvmtienv, (void*)classDefs));
                 errorOccurred = (errorCode != JVMTI_ERROR_NONE);
                 if ( errorOccurred ) {
                     createAndThrowThrowableFromJVMTIErrorCode(jnienv, errorCode);
@@ -1250,6 +1287,7 @@
                         classLoader,
                         &classCount,
                         &classes);
+    check_phase_ret_blob(jvmtierror, localArray);
     errorOccurred = (jvmtierror != JVMTI_ERROR_NONE);
     jplis_assert(!errorOccurred);
 
@@ -1311,6 +1349,7 @@
     jvmtiError  jvmtierror  = JVMTI_ERROR_NONE;
 
     jvmtierror = (*jvmtienv)->GetObjectSize(jvmtienv, objectToSize, &objectSize);
+    check_phase_ret_0(jvmtierror);
     jplis_assert(jvmtierror == JVMTI_ERROR_NONE);
     if ( jvmtierror != JVMTI_ERROR_NONE ) {
         createAndThrowThrowableFromJVMTIErrorCode(jnienv, jvmtierror);
@@ -1360,6 +1399,7 @@
                 } else {
                     jvmtierror = (*jvmtienv)->AddToSystemClassLoaderSearch(jvmtienv, platformChars);
                 }
+                check_phase_ret(jvmtierror);
 
                 if ( jvmtierror != JVMTI_ERROR_NONE ) {
                     createAndThrowThrowableFromJVMTIErrorCode(jnienv, jvmtierror);
@@ -1450,6 +1490,7 @@
             }
 
             err = (*jvmtienv)->SetNativeMethodPrefixes(jvmtienv, inx, (char**)prefixes);
+            /* can be called from any phase */
             jplis_assert(err == JVMTI_ERROR_NONE);
 
             for (i = 0; i < inx; i++) {
--- a/jdk/src/share/instrument/JPLISAgent.h	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/JPLISAgent.h	Sun May 04 07:05:42 2008 -0700
@@ -266,6 +266,48 @@
 
 #define jvmti(a) a->mNormalEnvironment.mJVMTIEnv
 
+/*
+ * A set of macros for insulating the JLI method callers from
+ * JVMTI_ERROR_WRONG_PHASE return codes.
+ */
+
+/* for a JLI method where "blob" is executed before simply returning */
+#define check_phase_blob_ret(ret, blob)      \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        blob;                                \
+        return;                              \
+    }
+
+/* for a JLI method where simply returning is benign */
+#define check_phase_ret(ret)                 \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        return;                              \
+    }
+
+/* for a JLI method where returning zero (0) is benign */
+#define check_phase_ret_0(ret)               \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        return 0;                            \
+    }
+
+/* for a JLI method where returning one (1) is benign */
+#define check_phase_ret_1(ret)               \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        return 1;                            \
+    }
+
+/* for a case where a specific "blob" must be returned */
+#define check_phase_ret_blob(ret, blob)      \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        return (blob);                       \
+    }
+
+/* for a JLI method where returning false is benign */
+#define check_phase_ret_false(ret)           \
+    if ((ret) == JVMTI_ERROR_WRONG_PHASE) {  \
+        return (jboolean) 0;                 \
+    }
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* __cplusplus */
--- a/jdk/src/share/instrument/JarFacade.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/JarFacade.c	Sun May 04 07:05:42 2008 -0700
@@ -23,6 +23,14 @@
  * have any questions.
  */
 
+#ifdef _WIN32
+/*
+ * Win* needs this include. However, Linux and Solaris do not.
+ * Having this include on Solaris SPARC breaks having non US-ASCII
+ * characters in the value of the Premain-Class attribute.
+ */
+#include <ctype.h>
+#endif /* _WIN32 */
 #include <string.h>
 #include <stdlib.h>
 
@@ -45,11 +53,37 @@
         if (attribute->name == NULL) {
             free(attribute);
         } else {
-            attribute->value = strdup(value);
+            char *begin = (char *)value;
+            char *end;
+            size_t value_len;
+
+            /* skip any leading white space */
+            while (isspace(*begin)) {
+                begin++;
+            }
+
+            /* skip any trailing white space */
+            end = &begin[strlen(begin)];
+            while (end > begin && isspace(end[-1])) {
+                end--;
+            }
+
+            if (begin == end) {
+                /* no value so skip this attribute */
+                free(attribute->name);
+                free(attribute);
+                return;
+            }
+
+            value_len = (size_t)(end - begin);
+            attribute->value = malloc(value_len + 1);
             if (attribute->value == NULL) {
                 free(attribute->name);
                 free(attribute);
             } else {
+                /* save the value without leading or trailing whitespace */
+                strncpy(attribute->value, begin, value_len);
+                attribute->value[value_len] = '\0';
                 attribute->next = NULL;
                 if (context->head == NULL) {
                     context->head = attribute;
--- a/jdk/src/share/instrument/Reentrancy.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/Reentrancy.c	Sun May 04 07:05:42 2008 -0700
@@ -74,6 +74,7 @@
                                     jvmtienv,
                                     thread,
                                     newValue);
+    check_phase_ret_blob(error, error);
 
 #if JPLISASSERT_ENABLEASSERTIONS
     assertTLSValue( jvmtienv,
@@ -96,6 +97,7 @@
                                 jvmtienv,
                                 thread,
                                 &test);
+    check_phase_ret(error);
     jplis_assert(error == JVMTI_ERROR_NONE);
     jplis_assert(test == expected);
 }
@@ -111,6 +113,7 @@
                                 jvmtienv,
                                 thread,
                                 &storedValue);
+    check_phase_ret_false(error);
     jplis_assert(error == JVMTI_ERROR_NONE);
     if ( error == JVMTI_ERROR_NONE ) {
         /* if this thread is already inside, just return false and short-circuit */
--- a/jdk/src/share/instrument/Utilities.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/instrument/Utilities.c	Sun May 04 07:05:42 2008 -0700
@@ -46,6 +46,7 @@
     error = (*jvmtienv)->Allocate(jvmtienv,
                                   bytecount,
                                   (unsigned char**) &resultBuffer);
+    /* may be called from any phase */
     jplis_assert(error == JVMTI_ERROR_NONE);
     if ( error != JVMTI_ERROR_NONE ) {
         resultBuffer = NULL;
@@ -66,6 +67,7 @@
 
     error = (*jvmtienv)->Deallocate(jvmtienv,
                                     (unsigned char*)buffer);
+    /* may be called from any phase */
     jplis_assert_msg(error == JVMTI_ERROR_NONE, "Can't deallocate memory");
     return;
 }
--- a/jdk/src/share/javavm/export/jvm.h	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/javavm/export/jvm.h	Sun May 04 07:05:42 2008 -0700
@@ -591,6 +591,80 @@
 JNIEXPORT jboolean JNICALL
 JVM_SupportsCX8(void);
 
+/*
+ * com.sun.dtrace.jsdt support
+ */
+
+#define JVM_TRACING_DTRACE_VERSION 1
+
+/*
+ * Structure to pass one probe description to JVM
+ */
+typedef struct {
+    jmethodID method;
+    jstring   function;
+    jstring   name;
+    void*            reserved[4];     // for future use
+} JVM_DTraceProbe;
+
+/**
+ * Encapsulates the stability ratings for a DTrace provider field
+ */
+typedef struct {
+    jint nameStability;
+    jint dataStability;
+    jint dependencyClass;
+} JVM_DTraceInterfaceAttributes;
+
+/*
+ * Structure to pass one provider description to JVM
+ */
+typedef struct {
+    jstring                       name;
+    JVM_DTraceProbe*              probes;
+    jint                          probe_count;
+    JVM_DTraceInterfaceAttributes providerAttributes;
+    JVM_DTraceInterfaceAttributes moduleAttributes;
+    JVM_DTraceInterfaceAttributes functionAttributes;
+    JVM_DTraceInterfaceAttributes nameAttributes;
+    JVM_DTraceInterfaceAttributes argsAttributes;
+    void*                         reserved[4]; // for future use
+} JVM_DTraceProvider;
+
+/*
+ * Get the version number the JVM was built with
+ */
+JNIEXPORT jint JNICALL
+JVM_DTraceGetVersion(JNIEnv* env);
+
+/*
+ * Register new probe with given signature, return global handle
+ *
+ * The version passed in is the version that the library code was
+ * built with.
+ */
+JNIEXPORT jlong JNICALL
+JVM_DTraceActivate(JNIEnv* env, jint version, jstring module_name,
+  jint providers_count, JVM_DTraceProvider* providers);
+
+/*
+ * Check JSDT probe
+ */
+JNIEXPORT jboolean JNICALL
+JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method);
+
+/*
+ * Destroy custom DOF
+ */
+JNIEXPORT void JNICALL
+JVM_DTraceDispose(JNIEnv* env, jlong activation_handle);
+
+/*
+ * Check to see if DTrace is supported by OS
+ */
+JNIEXPORT jboolean JNICALL
+JVM_DTraceIsSupported(JNIEnv* env);
+
 /*************************************************************************
  PART 2: Support for the Verifier and Class File Format Checker
  ************************************************************************/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/native/sun/tracing/dtrace/JVM.c	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,304 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+#include <stdlib.h>
+
+#include "jvm.h"
+#include "jni.h"
+#include "jni_util.h"
+
+#include "jvm_symbols.h"
+#include "sun_tracing_dtrace_JVM.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static JvmSymbols* jvm_symbols = NULL;
+
+static void initialize() {
+    static int initialized = 0;
+    if (initialized == 0) {
+        jvm_symbols = lookupJvmSymbols();
+        initialized = 1;
+    }
+}
+
+/*
+ * Class:     sun_tracing_dtrace_JVM
+ * Method:    isSupported0
+ * Signature: ()I
+ */
+JNIEXPORT jboolean JNICALL Java_sun_tracing_dtrace_JVM_isSupported0(
+        JNIEnv* env, jclass cls) {
+    initialize();
+    if (jvm_symbols != NULL) {
+        return jvm_symbols->IsSupported(env) ? JNI_TRUE : JNI_FALSE;
+    } else {
+        return JNI_FALSE;
+    }
+}
+
+// Macros that cause an immediate return if we detect an exception
+#define CHECK if ((*env)->ExceptionOccurred(env)) { return; }
+#define CHECK_(x) if ((*env)->ExceptionOccurred(env)) { return x; }
+
+static void readProbeData (
+        JNIEnv* env, jobject probe, JVM_DTraceProbe* jvm_probe) {
+    jclass clazz;
+    jmethodID mid;
+    jobject method;
+
+    if (jvm_probe == NULL) {
+        return; // just in case
+    }
+
+    clazz = (*env)->GetObjectClass(env, probe); CHECK
+
+    mid = (*env)->GetMethodID(
+        env, clazz, "getFunctionName", "()Ljava/lang/String;"); CHECK
+    jvm_probe->function = (jstring)(*env)->CallObjectMethod(
+        env, probe, mid); CHECK
+
+    mid = (*env)->GetMethodID(
+        env, clazz, "getProbeName", "()Ljava/lang/String;"); CHECK
+    jvm_probe->name = (jstring)(*env)->CallObjectMethod(env, probe, mid); CHECK
+
+    mid = (*env)->GetMethodID(
+        env, clazz, "getMethod", "()Ljava/lang/reflect/Method;"); CHECK
+    method = (*env)->CallObjectMethod(env, probe, mid); CHECK
+    jvm_probe->method = (*env)->FromReflectedMethod(env, method); CHECK
+}
+
+static void readFieldInterfaceAttributes(
+        char* annotationName, JNIEnv* env, jobject provider,
+        JVM_DTraceInterfaceAttributes* attrs) {
+    jobject result;
+    jobject result_clazz;
+    jclass provider_clazz;
+    jclass annotation_clazz;
+    jmethodID get;
+    jmethodID enc;
+
+    provider_clazz = (*env)->GetObjectClass(env, provider); CHECK
+    annotation_clazz = (*env)->FindClass(env, annotationName); CHECK
+
+    get = (*env)->GetMethodID(env, provider_clazz, "getNameStabilityFor",
+        "(Ljava/lang/Class;)Lcom/sun/tracing/dtrace/StabilityLevel;"); CHECK
+    result = (*env)->CallObjectMethod(
+        env, provider, get, annotation_clazz); CHECK
+    result_clazz = (*env)->GetObjectClass(env, result); CHECK
+    enc = (*env)->GetMethodID(env, result_clazz, "getEncoding", "()I"); CHECK
+    attrs->nameStability = (*env)->CallIntMethod(env, result, enc); CHECK
+
+    get = (*env)->GetMethodID(env, provider_clazz, "getDataStabilityFor",
+        "(Ljava/lang/Class;)Lcom/sun/tracing/dtrace/StabilityLevel;"); CHECK
+    result = (*env)->CallObjectMethod(
+        env, provider, get, annotation_clazz); CHECK
+    result_clazz = (*env)->GetObjectClass(env, result); CHECK
+    enc = (*env)->GetMethodID(env, result_clazz, "getEncoding", "()I"); CHECK
+    attrs->dataStability = (*env)->CallIntMethod(env, result, enc); CHECK
+
+    get = (*env)->GetMethodID(env, provider_clazz, "getDependencyClassFor",
+        "(Ljava/lang/Class;)Lcom/sun/tracing/dtrace/DependencyClass;"); CHECK
+    result = (*env)->CallObjectMethod(
+        env, provider, get, annotation_clazz); CHECK
+    result_clazz = (*env)->GetObjectClass(env, result); CHECK
+    enc = (*env)->GetMethodID(env, result_clazz, "getEncoding", "()I"); CHECK
+    attrs->dependencyClass = (*env)->CallIntMethod(env, result, enc); CHECK
+}
+
+static void readInterfaceAttributes(
+        JNIEnv* env, jobject provider, JVM_DTraceProvider* jvm_provider) {
+    readFieldInterfaceAttributes("com/sun/tracing/dtrace/ProviderAttributes",
+        env, provider, &(jvm_provider->providerAttributes));
+    readFieldInterfaceAttributes("com/sun/tracing/dtrace/ModuleAttributes",
+        env, provider, &(jvm_provider->moduleAttributes));
+    readFieldInterfaceAttributes("com/sun/tracing/dtrace/FunctionAttributes",
+        env, provider, &(jvm_provider->functionAttributes));
+    readFieldInterfaceAttributes("com/sun/tracing/dtrace/NameAttributes",
+        env, provider, &(jvm_provider->nameAttributes));
+    readFieldInterfaceAttributes("com/sun/tracing/dtrace/ArgsAttributes",
+        env, provider, &(jvm_provider->argsAttributes));
+}
+
+static void readProviderData(
+        JNIEnv* env, jobject provider, JVM_DTraceProvider* jvm_provider) {
+    jmethodID mid;
+    jobjectArray probes;
+    jsize i;
+    jclass clazz = (*env)->GetObjectClass(env, provider); CHECK
+    mid = (*env)->GetMethodID(
+        env, clazz, "getProbes", "()[Lsun/tracing/dtrace/DTraceProbe;"); CHECK
+    probes = (jobjectArray)(*env)->CallObjectMethod(
+        env, provider, mid); CHECK
+
+    // Fill JVM structure, describing provider
+    jvm_provider->probe_count = (*env)->GetArrayLength(env, probes); CHECK
+    jvm_provider->probes = (JVM_DTraceProbe*)calloc(
+        jvm_provider->probe_count, sizeof(*jvm_provider->probes));
+    mid = (*env)->GetMethodID(
+        env, clazz, "getProviderName", "()Ljava/lang/String;"); CHECK
+    jvm_provider->name = (jstring)(*env)->CallObjectMethod(
+        env, provider, mid); CHECK
+
+    readInterfaceAttributes(env, provider, jvm_provider); CHECK
+
+    for (i = 0; i < jvm_provider->probe_count; ++i) {
+        jobject probe = (*env)->GetObjectArrayElement(env, probes, i); CHECK
+        readProbeData(env, probe, &jvm_provider->probes[i]); CHECK
+    }
+}
+
+/*
+ * Class:     sun_tracing_dtrace_JVM
+ * Method:    activate0
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_sun_tracing_dtrace_JVM_activate0(
+        JNIEnv* env, jclass cls, jstring moduleName, jobjectArray providers) {
+    jlong handle = 0;
+    jsize num_providers;
+    jsize i;
+    JVM_DTraceProvider* jvm_providers;
+
+    initialize();
+
+    if (jvm_symbols == NULL) {
+      return 0;
+    }
+
+    num_providers = (*env)->GetArrayLength(env, providers); CHECK_(0L)
+
+    jvm_providers = (JVM_DTraceProvider*)calloc(
+        num_providers, sizeof(*jvm_providers));
+
+    for (i = 0; i < num_providers; ++i) {
+        JVM_DTraceProvider* p = &(jvm_providers[i]);
+        jobject provider = (*env)->GetObjectArrayElement(
+            env, providers, i);
+        readProviderData(env, provider, p);
+    }
+
+    handle = jvm_symbols->Activate(
+        env, JVM_TRACING_DTRACE_VERSION, moduleName,
+        num_providers, jvm_providers);
+
+    for (i = 0; i < num_providers; ++i) {
+        JVM_DTraceProvider* p = &(jvm_providers[i]);
+        free(p->probes);
+    }
+    free(jvm_providers);
+
+    return handle;
+}
+
+/*
+ * Class:     sun_tracing_dtrace_JVM
+ * Method:    dispose0
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_sun_tracing_dtrace_JVM_dispose0(
+        JNIEnv* env, jclass cls, jlong handle) {
+    if (jvm_symbols != NULL && handle != 0) {
+        jvm_symbols->Dispose(env, handle);
+    }
+}
+
+/*
+ * Class:     sun_tracing_dtrace_JVM
+ * Method:    isEnabled0
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_sun_tracing_dtrace_JVM_isEnabled0(
+        JNIEnv* env, jclass cls, jobject method) {
+    jmethodID mid;
+    if (jvm_symbols != NULL && method != NULL) {
+        mid = (*env)->FromReflectedMethod(env, method);
+        return jvm_symbols->IsProbeEnabled(env, mid);
+    }
+    return JNI_FALSE;
+}
+
+/*
+ * Class:     sun_tracing_dtrace_JVM
+ * Method:    defineClass0
+ * Signature: (Ljava/lang/ClassLoader;Ljava/lang/String;[BII)Ljava/lang/Class;
+ *
+ * The implementation of this native static method is a copy of that of
+ * the native instance method Java_java_lang_ClassLoader_defineClass0()
+ * with the implicit "this" parameter becoming the "loader" parameter.
+ *
+ * This code was cloned and modified from java_lang_reflect_Proxy
+ */
+JNIEXPORT jclass JNICALL
+Java_sun_tracing_dtrace_JVM_defineClass0(
+        JNIEnv *env, jclass ignore, jobject loader, jstring name, jbyteArray data,
+        jint offset, jint length)
+{
+    jbyte *body;
+    char *utfName;
+    jclass result = 0;
+    char buf[128];
+
+    if (data == NULL) {
+        return 0;
+    }
+
+    /* Work around 4153825. malloc crashes on Solaris when passed a
+     * negative size.
+     */
+    if (length < 0) {
+        return 0;
+    }
+
+    body = (jbyte *)malloc(length);
+
+    if (body == 0) {
+        return 0;
+    }
+
+    (*env)->GetByteArrayRegion(env, data, offset, length, body);
+
+    if ((*env)->ExceptionOccurred(env))
+        goto free_body;
+
+    if (name != NULL) {
+        int i;
+        int len = (*env)->GetStringUTFLength(env, name);
+        int unicode_len = (*env)->GetStringLength(env, name);
+        if (len >= sizeof(buf)) {
+            utfName = malloc(len + 1);
+            if (utfName == NULL) {
+                goto free_body;
+            }
+        } else {
+            utfName = buf;
+        }
+        (*env)->GetStringUTFRegion(env, name, 0, unicode_len, utfName);
+
+        // Convert '.' to '/' in the package name
+        for (i = 0; i < unicode_len; ++i) {
+            if (utfName[i] == '.') {
+                utfName[i] = '/';
+            }
+        }
+    } else {
+        utfName = NULL;
+    }
+
+    result = (*env)->DefineClass(env, utfName, loader, body, length);
+
+    if (utfName && utfName != buf)
+        free(utfName);
+
+ free_body:
+    free(body);
+    return result;
+}
+
+#ifdef __cplusplus
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/native/sun/tracing/dtrace/jvm_symbols.h	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+#ifndef _JVM_SYMBOLS_H
+#define _JVM_SYMBOLS_H
+
+#include "jvm.h"
+
+typedef jint (JNICALL* GetVersion_t)(JNIEnv*);
+typedef jboolean (JNICALL *IsSupported_t)(JNIEnv*);
+typedef jlong (JNICALL* Activate_t)(
+    JNIEnv*, jint, jstring, jint, JVM_DTraceProvider*);
+typedef void (JNICALL *Dispose_t)(JNIEnv*, jlong);
+typedef jboolean (JNICALL *IsProbeEnabled_t)(JNIEnv*, jmethodID);
+
+typedef struct {
+    GetVersion_t     GetVersion;
+    IsSupported_t    IsSupported;
+    Activate_t       Activate;
+    Dispose_t        Dispose;
+    IsProbeEnabled_t IsProbeEnabled;
+} JvmSymbols;
+
+// Platform-dependent implementation.
+// Returns NULL if the symbols are not found
+extern JvmSymbols* lookupJvmSymbols();
+
+#endif // def _JVM_SYMBOLS_H
--- a/jdk/src/share/sample/vm/clr-jvm/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/sample/vm/clr-jvm/Makefile	Sun May 04 07:05:42 2008 -0700
@@ -29,16 +29,16 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-all: jinvoker.dll invoked.class invoker.exe
-
-jinvoker.dll: jinvoker.obj Makefile
-	cl /LD /o jinvoker.dll jinvoker.obj
-
-jinvoker.obj: jinvoker.cpp jinvokerExp.h Makefile
-	cl /Fojinvoker.obj /DJINVOKEREEXPORT /c jinvoker.cpp
-
-invoked.class: invoked.java Makefile
-	javac invoked.java
-
-invoker.exe: invoker.cs Makefile
-	csc /unsafe invoker.cs
+all: jinvoker.dll invoked.class invoker.exe
+
+jinvoker.dll: jinvoker.obj Makefile
+	cl /LD /o jinvoker.dll jinvoker.obj
+
+jinvoker.obj: jinvoker.cpp jinvokerExp.h Makefile
+	cl /Fojinvoker.obj /DJINVOKEREEXPORT /c jinvoker.cpp
+
+invoked.class: invoked.java Makefile
+	javac invoked.java
+
+invoker.exe: invoker.cs Makefile
+	csc /unsafe invoker.cs
--- a/jdk/src/share/sample/vm/clr-jvm/README.txt	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/sample/vm/clr-jvm/README.txt	Sun May 04 07:05:42 2008 -0700
@@ -1,54 +1,54 @@
-This sample provides Java "Hello World" program that is invoked
-from C# application in the same process.
-
-The problem of direct call of the JVM API from CLR applications
-by PInvoke interface is the JVM API functions do not have static
-adresses, they need to be got by JNI_CreateJavaVM() call.
-The sample contains C++ libraty that wraps JVM API calls by the
-static functions that are called from the C# application by
-PInvoke interface.
-
-The sample contains the following files:
-
-Makefile      - make file
-README.txt    - this readme
-invoked.java  - the invoked HelloWorld Java program
-invoker.cs    - C# invoker application
-jinvoker.cpp  - C++ wrapper
-jinvokerExp.h - wrapper library exports
-
-After the success making the following files are produced:
-
-invoked.class - the compiled HelloWorld class
-invoker.exe   - the executable .NET program that invokes Java
-jinvoker.dll  - the wrapper library
-
-The following environment needs to be set for the correct sample
-build and execution:
-
-INCLUDE must contain the paths to:
-  1. MS Visual C++ standard include
-  2. .NET SDK include
-  3. Java includes
-  Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32
-
-LIB must contain the paths to:
-  1. MS Visual C++ standard libraries
-  2. .NET SDK libraries
-  3. jvm.dll
-  Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client
-
-PATH must contain the paths to:
-  1. MS Visual C++ standard bin
-  2. MS Dev common bin
-  3. .NET SDK libraries
-  4. Java bin
-  5. jvm.dll
-  Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH%
-
-To run the sample please do:
-
-  invoker.exe invoked
-
-
---Dmitry Ryashchentsev
+This sample provides Java "Hello World" program that is invoked
+from C# application in the same process.
+
+The problem of direct call of the JVM API from CLR applications
+by PInvoke interface is the JVM API functions do not have static
+adresses, they need to be got by JNI_CreateJavaVM() call.
+The sample contains C++ libraty that wraps JVM API calls by the
+static functions that are called from the C# application by
+PInvoke interface.
+
+The sample contains the following files:
+
+Makefile      - make file
+README.txt    - this readme
+invoked.java  - the invoked HelloWorld Java program
+invoker.cs    - C# invoker application
+jinvoker.cpp  - C++ wrapper
+jinvokerExp.h - wrapper library exports
+
+After the success making the following files are produced:
+
+invoked.class - the compiled HelloWorld class
+invoker.exe   - the executable .NET program that invokes Java
+jinvoker.dll  - the wrapper library
+
+The following environment needs to be set for the correct sample
+build and execution:
+
+INCLUDE must contain the paths to:
+  1. MS Visual C++ standard include
+  2. .NET SDK include
+  3. Java includes
+  Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32
+
+LIB must contain the paths to:
+  1. MS Visual C++ standard libraries
+  2. .NET SDK libraries
+  3. jvm.dll
+  Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client
+
+PATH must contain the paths to:
+  1. MS Visual C++ standard bin
+  2. MS Dev common bin
+  3. .NET SDK libraries
+  4. Java bin
+  5. jvm.dll
+  Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH%
+
+To run the sample please do:
+
+  invoker.exe invoked
+
+
+--Dmitry Ryashchentsev
--- a/jdk/src/share/sample/vm/clr-jvm/invoker.cs	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/sample/vm/clr-jvm/invoker.cs	Sun May 04 07:05:42 2008 -0700
@@ -29,30 +29,30 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
-*/
-
+/*
+*/
+
 using System;
 using System.Runtime.InteropServices;
 
 class jinvoker{
 
     public static int Main(string[] aArgs){
-        
-        // Print Hello to show we are in CLR
-        Console.WriteLine("Hello from C#");
-        if(aArgs.Length > 0)
-            // invoke JVM
-            return InvokeMain(aArgs[0]);
-        else
-            return -1;
+        
+        // Print Hello to show we are in CLR
+        Console.WriteLine("Hello from C#");
+        if(aArgs.Length > 0)
+            // invoke JVM
+            return InvokeMain(aArgs[0]);
+        else
+            return -1;
     }
 
     // Link the JVM API functions and the wrappers
 
     [DllImport("jvm.dll")]      public unsafe static extern int  JNI_CreateJavaVM(void** ppVm, void** ppEnv, void* pArgs);
     [DllImport("jinvoker.dll")] public unsafe static extern int  MakeJavaVMInitArgs( void** ppArgs );
-    [DllImport("jinvoker.dll")] public unsafe static extern void FreeJavaVMInitArgs( void* pArgs );
+    [DllImport("jinvoker.dll")] public unsafe static extern void FreeJavaVMInitArgs( void* pArgs );
     [DllImport("jinvoker.dll")] public unsafe static extern int  FindClass( void* pEnv, String sClass, void** ppClass );
     [DllImport("jinvoker.dll")] public unsafe static extern int  GetStaticMethodID( void*  pEnv,
                                                                                     void*  pClass, 
@@ -73,7 +73,7 @@
     [DllImport("jinvoker.dll")] public unsafe static extern int DestroyJavaVM( void* pJVM );
 
 	public unsafe static int InvokeMain( String sClass ){
-	    
+	    
         void*  pJVM;    // JVM struct
         void*  pEnv;    // JVM environment
         void*  pVMArgs; // VM args
@@ -81,23 +81,23 @@
         void*  pMethod; // The executed method struct
         void*  pArgs;   // The executed method arguments struct
 
-        // Fill the pVMArgs structs
+        // Fill the pVMArgs structs
         MakeJavaVMInitArgs( &pVMArgs );
 
-        // Create JVM
+        // Create JVM
         int nRes = JNI_CreateJavaVM( &pJVM, &pEnv, pVMArgs );
         if( nRes == 0 ){
-			
-            // Find the executed method class 
+			
+            // Find the executed method class 
             if(FindClass( pEnv, sClass, &pClass) == 0 )
-				
-                // Find the executed method
+				
+                // Find the executed method
                 if( GetStaticMethodID( pEnv, pClass, "main", "([Ljava/lang/String;)V", &pMethod ) == 0 )
-					
-                    // Create empty String[] array to pass to the main()
+					
+                    // Create empty String[] array to pass to the main()
                     if( NewObjectArray( pEnv, 0, "java/lang/String", &pArgs ) == 0 ){
-
-                        // Call main()
+
+                        // Call main()
                         nRes = CallStaticVoidMethod( pEnv, pClass, pMethod, pArgs );
                         if( nRes != -1 )
                             Console.WriteLine("Result:"+nRes);
@@ -116,16 +116,16 @@
                 Console.WriteLine("can not find class:"+sClass);
                 nRes = -102;
             }
-			
-            // Destroy the JVM
+			
+            // Destroy the JVM
             DestroyJavaVM( pJVM );
 
         }else
-            Console.WriteLine("Can not create Java VM");
-
-        // Free the JVM args structs
+            Console.WriteLine("Can not create Java VM");
+
+        // Free the JVM args structs
         FreeJavaVMInitArgs(pVMArgs);
-		
+		
         return nRes;
     }
 }
--- a/jdk/src/share/sample/vm/jvm-clr/README.txt	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/sample/vm/jvm-clr/README.txt	Sun May 04 07:05:42 2008 -0700
@@ -42,10 +42,10 @@
   3. .NET SDK libraries
   4. Java bin
   Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%PATH%
-
-To run the sample please do:
-
-java invoker invoked.exe
-
-
---Dmitry Ryashchentsev
+
+To run the sample please do:
+
+java invoker invoked.exe
+
+
+--Dmitry Ryashchentsev
--- a/jdk/src/share/sample/vm/jvm-clr/invoked.cs	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/share/sample/vm/jvm-clr/invoked.cs	Sun May 04 07:05:42 2008 -0700
@@ -29,17 +29,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
-*/
-
-
+/*
+*/
+
+
 using System;
 
 class App{
 
     public static int Main(){
-
-        // Print Hello to show we are in CLR
+
+        // Print Hello to show we are in CLR
         Console.WriteLine("Hello from C#!!!");
         return 0;
     }
--- a/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c	Sun May 04 07:05:42 2008 -0700
@@ -123,7 +123,10 @@
         C_GetFunctionList = (CK_C_GetFunctionList) dlsym(hModule, getFunctionListStr);
         (*env)->ReleaseStringUTFChars(env, jGetFunctionList, getFunctionListStr);
     }
-    if ((C_GetFunctionList == NULL) || ((systemErrorMessage = dlerror()) != NULL)){
+    if (C_GetFunctionList == NULL) {
+        throwIOException(env, "ERROR: C_GetFunctionList == NULL");
+        return;
+    } else if ( (systemErrorMessage = dlerror()) != NULL ){
         throwIOException(env, systemErrorMessage);
         return;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/native/sun/tracing/dtrace/jvm_symbols_md.c	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+#include <dlfcn.h>
+#include <stdlib.h>
+
+#include <jvm.h>
+
+#include "jvm_symbols.h"
+
+JvmSymbols* lookupJvmSymbols() {
+    JvmSymbols* syms = (JvmSymbols*)malloc(sizeof(JvmSymbols));
+    if (syms != NULL) {
+        syms->GetVersion = (GetVersion_t)
+            dlsym(RTLD_DEFAULT, "JVM_DTraceGetVersion");
+        syms->IsSupported = (IsSupported_t)
+            dlsym(RTLD_DEFAULT, "JVM_DTraceIsSupported");
+        syms->Activate = (Activate_t)
+            dlsym(RTLD_DEFAULT, "JVM_DTraceActivate");
+        syms->Dispose = (Dispose_t)
+            dlsym(RTLD_DEFAULT, "JVM_DTraceDispose");
+        syms->IsProbeEnabled = (IsProbeEnabled_t)
+            dlsym(RTLD_DEFAULT, "JVM_DTraceIsProbeEnabled");
+
+        if ( syms->GetVersion == NULL || syms->Activate == NULL ||
+             syms->IsProbeEnabled == NULL || syms->Dispose == NULL ||
+             syms->IsSupported == NULL) {
+            free(syms);
+            syms = NULL;
+        }
+    }
+    return syms;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/windows/native/sun/tracing/dtrace/jvm_symbols_md.c	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ */
+
+#include <windows.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#include <jvm.h>
+
+#include "jvm_symbols.h"
+
+JvmSymbols* lookupJvmSymbols() {
+    JvmSymbols* syms = (JvmSymbols*)malloc(sizeof(JvmSymbols));
+    if (syms != NULL) {
+        HINSTANCE jvm = LoadLibrary("jvm.dll");
+        if (jvm == NULL) {
+            free(syms);
+            return NULL;
+        }
+        syms->GetVersion = (GetVersion_t)
+            GetProcAddress(jvm, "JVM_DTraceGetVersion");
+        syms->IsSupported = (IsSupported_t)
+            GetProcAddress(jvm, "JVM_DTraceIsSupported");
+        syms->Activate = (Activate_t)
+            GetProcAddress(jvm, "JVM_DTraceActivate");
+        syms->Dispose = (Dispose_t)
+            GetProcAddress(jvm, "JVM_DTraceDispose");
+        syms->IsProbeEnabled = (IsProbeEnabled_t)
+            GetProcAddress(jvm, "JVM_DTraceIsProbeEnabled");
+
+        (void)FreeLibrary(jvm);
+        if ( syms->GetVersion == NULL || syms->IsSupported == NULL ||
+             syms->Activate == NULL || syms->Dispose == NULL ||
+             syms->IsProbeEnabled == NULL) {
+            free(syms);
+            syms = NULL;
+        }
+
+    }
+    return syms;
+}
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java	Sun May 04 07:05:42 2008 -0700
@@ -29,14 +29,14 @@
  */
 
 import java.lang.management.*;
+import java.util.List;
 import javax.management.MBeanServer;
 import com.sun.management.HotSpotDiagnosticMXBean;
 
 public class DumpHeap {
     public static void main(String[] argv) throws Exception {
-         MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-         HotSpotDiagnosticMXBean dm = sun.management.ManagementFactory.getDiagnosticMXBean();
+         List<HotSpotDiagnosticMXBean> list = ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
          System.out.println("Dumping to file: " + argv[0] + " ....");
-         dm.dumpHeap(argv[0], true);
+         list.get(0).dumpHeap(argv[0], true);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6658779
+ * @summary Basic Test for HotSpotDiagnosticMXBean.getDiagnosticOptions()
+ * @author  Daniel Fuchs
+ *
+ * @run main GetDiagnosticOptions
+ */
+
+import com.sun.management.HotSpotDiagnosticMXBean;
+import com.sun.management.VMOption;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+import javax.management.MBeanServer;
+
+public class GetDiagnosticOptions {
+    private static String HOTSPOT_DIAGNOSTIC_MXBEAN_NAME =
+        "com.sun.management:type=HotSpotDiagnostic";
+
+    public static void main(String[] args) throws Exception {
+        List<HotSpotDiagnosticMXBean> list =
+            ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
+        HotSpotDiagnosticMXBean mbean = list.get(0);
+        checkDiagnosticOptions(mbean);
+
+        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+        mbean = ManagementFactory.newPlatformMXBeanProxy(mbs,
+                    HOTSPOT_DIAGNOSTIC_MXBEAN_NAME,
+                    HotSpotDiagnosticMXBean.class);
+        checkDiagnosticOptions(mbean);
+    }
+
+    private static void checkDiagnosticOptions(HotSpotDiagnosticMXBean mbean) {
+        List<VMOption> options = mbean.getDiagnosticOptions();
+        for (VMOption opt : options) {
+            System.out.println("option: "+opt.getName()+"="+opt.getValue());
+        }
+    }
+}
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java	Sun May 04 07:05:42 2008 -0700
@@ -34,6 +34,7 @@
 import com.sun.management.VMOption;
 import com.sun.management.VMOption.Origin;
 import java.lang.management.ManagementFactory;
+import java.util.List;
 import javax.management.MBeanServer;
 
 public class GetVMOption {
@@ -44,8 +45,9 @@
         "com.sun.management:type=HotSpotDiagnostic";
 
     public static void main(String[] args) throws Exception {
-        HotSpotDiagnosticMXBean mbean =
-            sun.management.ManagementFactory.getDiagnosticMXBean();
+        List<HotSpotDiagnosticMXBean> list =
+            ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
+        HotSpotDiagnosticMXBean mbean = list.get(0);
         checkVMOption(mbean);
 
         MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java	Sun May 04 07:05:42 2008 -0700
@@ -31,11 +31,11 @@
  * @run main/othervm -XX:+PrintGCDetails SetVMOption
  */
 
+import java.lang.management.ManagementFactory;
 import java.util.*;
 import com.sun.management.HotSpotDiagnosticMXBean;
 import com.sun.management.VMOption;
 import com.sun.management.VMOption.Origin;
-import sun.management.ManagementFactory;
 import sun.misc.Version;
 
 public class SetVMOption {
@@ -44,10 +44,11 @@
     private static String BAD_VALUE = "yes";
     private static String NEW_VALUE = "false";
     private static String MANAGEMENT_SERVER = "ManagementServer";
-    private static HotSpotDiagnosticMXBean mbean =
-        ManagementFactory.getDiagnosticMXBean();
+    private static HotSpotDiagnosticMXBean mbean;
 
     public static void main(String[] args) throws Exception {
+        List<HotSpotDiagnosticMXBean> list =
+            ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
 
         // The following test is transitional only and should be removed
         // once build 52 is promoted.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/tracing/BasicFunctionality.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6537506
+ * @summary Basic unit test for tracing framework
+ */
+
+import com.sun.tracing.*;
+import java.lang.reflect.Method;
+
+@ProviderName("NamedProvider")
+interface BasicProvider extends Provider {
+    void plainProbe();
+    void probeWithArgs(int a, float f, String s, Long l);
+    @ProbeName("namedProbe") void probeWithName();
+    void overloadedProbe();
+    void overloadedProbe(int i);
+}
+
+interface InvalidProvider extends Provider {
+    int nonVoidProbe();
+}
+
+public class BasicFunctionality {
+
+    public static ProviderFactory factory;
+    public static BasicProvider bp;
+
+    public static void main(String[] args) throws Exception {
+
+        factory = ProviderFactory.getDefaultFactory();
+        if (factory != null) {
+            bp = factory.createProvider(BasicProvider.class);
+        }
+
+        testProviderFactory();
+        testProbe();
+        testProvider();
+    }
+
+    static void fail(String s) throws Exception {
+        throw new Exception(s);
+    }
+
+    static void testProviderFactory() throws Exception {
+        if (factory == null) {
+            fail("ProviderFactory.getDefaultFactory: Did not create factory");
+        }
+        if (bp == null) {
+            fail("ProviderFactory.createProvider: Did not create provider");
+        }
+        try {
+            factory.createProvider(null);
+            fail("ProviderFactory.createProvider: Did not throw NPE for null");
+        } catch (NullPointerException e) {}
+
+       try {
+           factory.createProvider(InvalidProvider.class);
+           fail("Factory.createProvider: Should error with non-void probes");
+       } catch (IllegalArgumentException e) {}
+    }
+
+    public static void testProvider() throws Exception {
+
+       // These just shouldn't throw any exeptions:
+       bp.plainProbe();
+       bp.probeWithArgs(42, (float)3.14, "spam", new Long(2L));
+       bp.probeWithArgs(42, (float)3.14, null, null);
+       bp.probeWithName();
+       bp.overloadedProbe();
+       bp.overloadedProbe(42);
+
+       Method m = BasicProvider.class.getMethod("plainProbe");
+       Probe p = bp.getProbe(m);
+       if (p == null) {
+           fail("Provider.getProbe: Did not return probe");
+       }
+
+       Method m2 = BasicFunctionality.class.getMethod("testProvider");
+       p = bp.getProbe(m2);
+       if (p != null) {
+           fail("Provider.getProbe: Got probe with invalid spec");
+       }
+
+       bp.dispose();
+       // These just shouldn't throw any exeptions:
+       bp.plainProbe();
+       bp.probeWithArgs(42, (float)3.14, "spam", new Long(2L));
+       bp.probeWithArgs(42, (float)3.14, null, null);
+       bp.probeWithName();
+       bp.overloadedProbe();
+       bp.overloadedProbe(42);
+
+       if (bp.getProbe(m) != null) {
+           fail("Provider.getProbe: Should return null after dispose()");
+       }
+
+       bp.dispose(); // just to make sure nothing bad happens
+    }
+
+    static void testProbe() throws Exception {
+       Method m = BasicProvider.class.getMethod("plainProbe");
+       Probe p = bp.getProbe(m);
+       p.isEnabled(); // just make sure it doesn't do anything bad
+       p.trigger();
+
+       try {
+         p.trigger(0);
+         fail("Probe.trigger: too many arguments not caught");
+       } catch (IllegalArgumentException e) {}
+
+       p = bp.getProbe(BasicProvider.class.getMethod(
+           "probeWithArgs", int.class, float.class, String.class, Long.class));
+       try {
+         p.trigger();
+         fail("Probe.trigger: too few arguments not caught");
+       } catch (IllegalArgumentException e) {}
+
+       try {
+         p.trigger((float)3.14, (float)3.14, "", new Long(0L));
+         fail("Probe.trigger: wrong type primitive arguments not caught");
+       } catch (IllegalArgumentException e) {}
+    }
+}
--- a/jdk/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -23,8 +23,10 @@
 
 # @test
 # @bug 5055293
-# @summary Test non US-ASCII characters in the value of the Boot-Class-Path 
+# @summary Test non US-ASCII characters in the value of the Boot-Class-Path
 #          attribute.
+#
+# @run shell/timeout=240 BootClassPathTest.sh
 
 if [ "${TESTJAVA}" = "" ]
 then
@@ -72,7 +74,7 @@
 
 echo "Running test..."
 
-"${JAVA}" -javaagent:"${TESTCLASSES}"/Agent.jar -classpath "${TESTCLASSES}" DummyMain
+"${JAVA}" ${TESTVMOPTS} -javaagent:"${TESTCLASSES}"/Agent.jar -classpath "${TESTCLASSES}" DummyMain
 result=$?
 
 echo "Cleanup..."
--- a/jdk/test/java/lang/instrument/MakeJAR2.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/MakeJAR2.sh	Sun May 04 07:05:42 2008 -0700
@@ -70,9 +70,11 @@
 cp ${TESTSRC}/${AGENT}.java .
 cp ${TESTSRC}/${APP}.java .
 rm -rf ilib
-cp -r ${TESTSRC}/ilib .
-mkdir bootpath
-cp -r ${TESTSRC}/bootreporter bootpath
+mkdir ilib
+cp ${TESTSRC}/ilib/*.java ilib
+rm -rf bootpath
+mkdir -p bootpath/bootreporter
+cp ${TESTSRC}/bootreporter/*.java bootpath/bootreporter
 
 cd bootpath
 ${JAVAC} bootreporter/*.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ManifestTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,483 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6274276
+# @summary JLI JAR manifest processing should ignore leading and trailing white space.
+# @author Daniel D. Daugherty
+#
+# @run build ManifestTestApp
+# @run shell/timeout=900 ManifestTest.sh
+#
+
+make_a_JAR() {
+    # version_line and premain_line are required
+    version_line="Manifest-Version: 1.0"
+    premain_line="Premain-Class: ${AGENT}"
+    boot_cp_line=""
+    expect_boot_cp_line="ExampleForBootClassPath was not loaded."
+    can_redef_line=""
+    expect_redef_line="isRedefineClassesSupported()=false"
+    can_retrans_line=""
+    expect_retrans_line="isRetransformClassesSupported()=false"
+    can_set_nmp_line=""
+    expect_set_nmp_line="isNativeMethodPrefixSupported()=false"
+
+    while [ $# != 0 ] ; do
+        case "$1" in
+        defaults)
+            # just use the defaults for the test
+            ;;
+
+        boot_cp_line1)
+            boot_cp_line="Boot-Class-Path: no_white_space"
+            expect_boot_cp_line="ExampleForBootClassPath was loaded."
+            mkdir -p no_white_space
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class no_white_space
+            ;;
+
+        boot_cp_line2)
+            boot_cp_line="Boot-Class-Path:  has_leading_blank"
+            expect_boot_cp_line="ExampleForBootClassPath was loaded."
+            mkdir -p has_leading_blank " has_leading_blank"
+            # the good class is in the directory without the blank
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class \
+                has_leading_blank
+            # the bad class is in the directory with the blank
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \
+                " has_leading_blank"/ExampleForBootClassPath.class
+            ;;
+
+        boot_cp_line3)
+            boot_cp_line="Boot-Class-Path: has_trailing_blank "
+            expect_boot_cp_line="ExampleForBootClassPath was loaded."
+            mkdir -p has_trailing_blank "has_trailing_blank "
+            # the good class is in the directory without the blank
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class \
+                has_trailing_blank
+            # the bad class is in the directory with the blank
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \
+                "has_trailing_blank "/ExampleForBootClassPath.class
+            ;;
+
+        boot_cp_line4)
+            boot_cp_line="Boot-Class-Path:  has_leading_and_trailing_blank "
+            expect_boot_cp_line="ExampleForBootClassPath was loaded."
+            mkdir -p has_leading_and_trailing_blank \
+                " has_leading_and_trailing_blank "
+            # the good class is in the directory without the blanks
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class \
+                has_leading_and_trailing_blank
+            # the bad class is in the directory with the blanks
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \
+                " has_leading_and_trailing_blank "/ExampleForBootClassPath.class
+            ;;
+
+        boot_cp_line5)
+            boot_cp_line="Boot-Class-Path: has_embedded blank"
+            expect_boot_cp_line="ExampleForBootClassPath was loaded."
+            mkdir -p has_embedded "has_embedded blank"
+            # the good class is in the first blank separated word
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class has_embedded
+            # the bad class is in the directory with the blank
+            cp -p $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad \
+                "has_embedded blank"/ExampleForBootClassPath.class
+            ;;
+
+        can_redef_line1)
+            can_redef_line="Can-Redefine-Classes: true"
+            expect_redef_line="isRedefineClassesSupported()=true"
+            ;;
+
+        can_redef_line2)
+            can_redef_line="Can-Redefine-Classes:  true"
+            expect_redef_line="isRedefineClassesSupported()=true"
+            ;;
+
+        can_redef_line3)
+            can_redef_line="Can-Redefine-Classes: true "
+            expect_redef_line="isRedefineClassesSupported()=true"
+            ;;
+
+        can_redef_line4)
+            can_redef_line="Can-Redefine-Classes:  true "
+            expect_redef_line="isRedefineClassesSupported()=true"
+            ;;
+
+        can_redef_line5)
+            can_redef_line="Can-Redefine-Classes: false"
+            ;;
+
+        can_redef_line6)
+            can_redef_line="Can-Redefine-Classes:  false"
+            ;;
+
+        can_redef_line7)
+            can_redef_line="Can-Redefine-Classes: false "
+            ;;
+
+        can_redef_line8)
+            can_redef_line="Can-Redefine-Classes:  false "
+            ;;
+
+        can_redef_line9)
+            # this line makes the jar command unhappy and that's
+            # not what we're testing so skip this case
+            can_redef_line="Can-Redefine-Classes:"
+            ;;
+
+        can_redef_line10)
+            can_redef_line="Can-Redefine-Classes: "
+            ;;
+
+        can_redef_line11)
+            can_redef_line="Can-Redefine-Classes:  "
+            ;;
+
+        can_retrans_line1)
+            can_retrans_line="Can-Retransform-Classes: true"
+            expect_retrans_line="isRetransformClassesSupported()=true"
+            ;;
+
+        can_retrans_line2)
+            can_retrans_line="Can-Retransform-Classes:  true"
+            expect_retrans_line="isRetransformClassesSupported()=true"
+            ;;
+
+        can_retrans_line3)
+            can_retrans_line="Can-Retransform-Classes: true "
+            expect_retrans_line="isRetransformClassesSupported()=true"
+            ;;
+
+        can_retrans_line4)
+            can_retrans_line="Can-Retransform-Classes:  true "
+            expect_retrans_line="isRetransformClassesSupported()=true"
+            ;;
+
+        can_retrans_line5)
+            can_retrans_line="Can-Retransform-Classes: false"
+            ;;
+
+        can_retrans_line6)
+            can_retrans_line="Can-Retransform-Classes:  false"
+            ;;
+
+        can_retrans_line7)
+            can_retrans_line="Can-Retransform-Classes: false "
+            ;;
+
+        can_retrans_line8)
+            can_retrans_line="Can-Retransform-Classes:  false "
+            ;;
+
+        can_retrans_line9)
+            # this line makes the jar command unhappy and that's
+            # not what we're testing so skip this case
+            can_retrans_line="Can-Retransform-Classes:"
+            ;;
+
+        can_retrans_line10)
+            can_retrans_line="Can-Retransform-Classes: "
+            ;;
+
+        can_retrans_line11)
+            can_retrans_line="Can-Retransform-Classes:  "
+            ;;
+
+        can_set_nmp_line1)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix: true"
+            expect_set_nmp_line="isNativeMethodPrefixSupported()=true"
+            ;;
+
+        can_set_nmp_line2)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:  true"
+            expect_set_nmp_line="isNativeMethodPrefixSupported()=true"
+            ;;
+
+        can_set_nmp_line3)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix: true "
+            expect_set_nmp_line="isNativeMethodPrefixSupported()=true"
+            ;;
+
+        can_set_nmp_line4)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:  true "
+            expect_set_nmp_line="isNativeMethodPrefixSupported()=true"
+            ;;
+
+        can_set_nmp_line5)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix: false"
+            ;;
+
+        can_set_nmp_line6)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:  false"
+            ;;
+
+        can_set_nmp_line7)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix: false "
+            ;;
+
+        can_set_nmp_line8)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:  false "
+            ;;
+
+        can_set_nmp_line9)
+            # this line makes the jar command unhappy and that's
+            # not what we're testing so skip this case
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:"
+            ;;
+
+        can_set_nmp_line10)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix: "
+            ;;
+
+        can_set_nmp_line11)
+            can_set_nmp_line="Can-Set-Native-Method-Prefix:  "
+            ;;
+
+        premain_line1)
+            premain_line="Premain-Class:  ${AGENT}"
+            ;;
+
+        premain_line2)
+            premain_line="Premain-Class: ${AGENT} "
+            ;;
+
+        premain_line3)
+            premain_line="Premain-Class:  ${AGENT} "
+            ;;
+
+        version_line1)
+            version_line="Manifest-Version:  1.0"
+            ;;
+
+        version_line2)
+            version_line="Manifest-Version: 1.0 "
+            ;;
+
+        version_line3)
+            version_line="Manifest-Version:  1.0 "
+            ;;
+
+        *)
+            echo "ERROR: invalid test token"
+            exit 1
+        esac
+        shift
+    done
+
+    echo "${version_line}" >  ${AGENT}.mf
+    echo "${premain_line}" >> ${AGENT}.mf
+
+    if [ -n "$boot_cp_line" ]; then
+        echo "${boot_cp_line}" >> ${AGENT}.mf
+    fi
+
+    if [ -n "$can_redef_line" ]; then
+        echo "${can_redef_line}" >> ${AGENT}.mf
+    fi
+
+    if [ -n "$can_retrans_line" ]; then
+        echo "${can_retrans_line}" >> ${AGENT}.mf
+    fi
+
+    if [ -n "$can_set_nmp_line" ]; then
+        echo "${can_set_nmp_line}" >> ${AGENT}.mf
+    fi
+
+    rm -f ${AGENT}.jar
+    ${JAR} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}.class
+
+    echo "$expect_boot_cp_line" > expect_boot_cp_line
+    echo "$expect_redef_line"   > expect_redef_line
+    echo "$expect_retrans_line" > expect_retrans_line
+    echo "$expect_set_nmp_line" > expect_set_nmp_line
+}
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAR="${TESTJAVA}/bin/jar"
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+# Now that ManifestTestApp.class is built, we move
+# ExampleForBootClassPath.class so that it cannot be found
+# by default
+OUT_OF_THE_WAY=out_of_the_way
+mkdir $OUT_OF_THE_WAY
+mv "${TESTCLASSES}/ExampleForBootClassPath.class" $OUT_OF_THE_WAY
+
+# create a bad version of ExampleForBootClassPath.class
+# so we can tell when the wrong version is run
+sed 's/return 15/return 42/' "${TESTSRC}"/ExampleForBootClassPath.java \
+    > ExampleForBootClassPath.java
+"$JAVAC" ExampleForBootClassPath.java
+mv ExampleForBootClassPath.class \
+    $OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad
+mv ExampleForBootClassPath.java \
+    $OUT_OF_THE_WAY/ExampleForBootClassPath.java.bad
+
+AGENT=ManifestTestAgent
+# We compile the agent in the working directory instead of with
+# a build task because we construct a different agent JAR file
+# for each test case.
+${JAVAC} -d . ${TESTSRC}/${AGENT}.java
+
+FAIL_MARKER=fail_marker
+rm -f $FAIL_MARKER
+
+while read token; do
+    echo
+    echo "===== begin test case: $token ====="
+    make_a_JAR "$token"
+
+    "${JAVA}" ${TESTVMOPTS} -javaagent:${AGENT}.jar \
+        -classpath "${TESTCLASSES}" ManifestTestApp > output.log 2>&1
+    result=$?
+
+    cat output.log
+
+    if [ "$result" = 0 ]; then
+        echo "PASS: ManifestTestApp exited with status of 0."
+    else
+        echo "FAIL: ManifestTestApp exited with status of $result"
+        touch $FAIL_MARKER
+    fi
+
+    MESG="Hello from ${AGENT}!"
+    grep -s "$MESG" output.log > /dev/null
+    result=$?
+    if [ "$result" = 0 ]; then
+        echo "PASS: found '$MESG' in the test output"
+    else
+        echo "FAIL: did NOT find '$MESG' in the test output"
+        touch $FAIL_MARKER
+    fi
+
+    MESG=`cat expect_boot_cp_line`
+    grep -s "$MESG" output.log > /dev/null
+    result=$?
+    if [ "$result" = 0 ]; then
+        echo "PASS: found '$MESG' in the test output"
+    else
+        echo "FAIL: did NOT find '$MESG' in the test output"
+        touch $FAIL_MARKER
+    fi
+
+    MESG=`cat expect_redef_line`
+    grep -s "$MESG" output.log > /dev/null
+    result=$?
+    if [ "$result" = 0 ]; then
+        echo "PASS: found '$MESG' in the test output"
+    else
+        echo "FAIL: did NOT find '$MESG' in the test output"
+        touch $FAIL_MARKER
+    fi
+
+    MESG=`cat expect_retrans_line`
+    grep -s "$MESG" output.log > /dev/null
+    result=$?
+    if [ "$result" = 0 ]; then
+        echo "PASS: found '$MESG' in the test output"
+    else
+        echo "FAIL: did NOT find '$MESG' in the test output"
+        touch $FAIL_MARKER
+    fi
+
+    MESG=`cat expect_set_nmp_line`
+    grep -s "$MESG" output.log > /dev/null
+    result=$?
+    if [ "$result" = 0 ]; then
+        echo "PASS: found '$MESG' in the test output"
+    else
+        echo "FAIL: did NOT find '$MESG' in the test output"
+        touch $FAIL_MARKER
+    fi
+
+    echo "===== end test case: $token ====="
+    echo
+done << EOF
+defaults
+version_line1
+version_line2
+version_line3
+premain_line1
+premain_line2
+premain_line3
+boot_cp_line1
+boot_cp_line2
+boot_cp_line3
+boot_cp_line4
+boot_cp_line5
+can_redef_line1
+can_redef_line2
+can_redef_line3
+can_redef_line4
+can_redef_line5
+can_redef_line6
+can_redef_line7
+can_redef_line8
+can_redef_line10
+can_redef_line11
+can_retrans_line1
+can_retrans_line2
+can_retrans_line3
+can_retrans_line4
+can_retrans_line5
+can_retrans_line6
+can_retrans_line7
+can_retrans_line8
+can_retrans_line10
+can_retrans_line11
+can_set_nmp_line1
+can_set_nmp_line2
+can_set_nmp_line3
+can_set_nmp_line4
+can_set_nmp_line5
+can_set_nmp_line6
+can_set_nmp_line7
+can_set_nmp_line8
+can_set_nmp_line10
+can_set_nmp_line11
+EOF
+
+if [ -f $FAIL_MARKER ]; then
+    exit 1
+else
+    exit 0
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ManifestTestAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.Instrumentation;
+
+public class ManifestTestAgent {
+    private static Instrumentation instrumentation;
+
+    private ManifestTestAgent() {
+    }
+
+    public static void premain(String agentArgs, Instrumentation inst) {
+        System.out.println("Hello from ManifestTestAgent!");
+        System.out.println("isNativeMethodPrefixSupported()=" +
+            inst.isNativeMethodPrefixSupported());
+        System.out.println("isRedefineClassesSupported()=" +
+            inst.isRedefineClassesSupported());
+        System.out.println("isRetransformClassesSupported()=" +
+            inst.isRetransformClassesSupported());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ManifestTestApp.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+public class ManifestTestApp {
+    public static void main(String args[]) {
+        System.out.println("Hello from ManifestTestApp!");
+
+        new ManifestTestApp().doTest();
+        System.exit(0);
+    }
+
+    private void doTest() {
+        try {
+            // load the class only found via the Boot-Class-Path attribute
+            Object instance = loadExampleClass();
+            if (instance.getClass().getClassLoader() == null) {
+                System.out.println("PASS: ExampleForBootClassPath was loaded" +
+                    " by the boot class path loader.");
+            } else {
+                System.out.println("FAIL: ExampleForBootClassPath was loaded" +
+                    " by a non-boot class path loader.");
+                System.exit(1);
+            }
+        } catch (NoClassDefFoundError ncdfe) {
+            // This message just lets ManifestTest.sh know whether or
+            // not ExampleForBootClassPath was loaded. Depending on
+            // the current test case, that will be either a PASSing
+            // condition or a FAILing condition as determined by
+            // ManifestTest.sh.
+            System.out.println("ExampleForBootClassPath was not loaded.");
+        }
+    }
+
+    Object loadExampleClass() {
+        ExampleForBootClassPath instance = new ExampleForBootClassPath();
+        System.out.println("ExampleForBootClassPath was loaded.");
+        if (instance.fifteen() == 15) {
+            System.out.println("PASS: the correct" +
+                " ExampleForBootClassPath was loaded.");
+        } else {
+            System.out.println("FAIL: the wrong ExampleForBootClassPath" +
+                " was loaded.");
+            System.out.println("FAIL: instance.fifteen()=" +
+                instance.fifteen());
+            System.exit(1);
+        }
+        return instance;
+    }
+}
--- a/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -27,7 +27,7 @@
  * @summary test setNativeMethodPrefix
  * @author Robert Field, Sun Microsystems
  *
- * @run shell MakeJAR2.sh NativeMethodPrefixAgent NativeMethodPrefixApp 'Can-Retransform-Classes: true' 'Can-Set-Native-Method-Prefix: true'
+ * @run shell/timeout=240 MakeJAR2.sh NativeMethodPrefixAgent NativeMethodPrefixApp 'Can-Retransform-Classes: true' 'Can-Set-Native-Method-Prefix: true'
  * @run main/othervm -javaagent:NativeMethodPrefixAgent.jar NativeMethodPrefixApp
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ParallelTransformerLoader.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,72 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 5088398
+# @summary Test parallel class loading by parallel transformers.
+# @author Daniel D. Daugherty as modified from the code of Daryl Puryear @ Wily
+#
+# @run shell MakeJAR3.sh ParallelTransformerLoaderAgent
+# @run build ParallelTransformerLoaderApp
+# @run shell/timeout=240 ParallelTransformerLoader.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAR="${TESTJAVA}"/bin/jar
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+"${JAVAC}" -d . \
+    "${TESTSRC}"/TestClass1.java \
+    "${TESTSRC}"/TestClass2.java \
+    "${TESTSRC}"/TestClass3.java
+
+"${JAR}" cvf Test.jar Test*.class
+# Removing the test class files is important. If these
+# .class files are available on the classpath other
+# than via Test.jar, then the deadlock will not reproduce.
+rm -f Test*.class
+
+"${JAVA}" ${TESTVMOPTS} -javaagent:ParallelTransformerLoaderAgent.jar=Test.jar \
+    -classpath "${TESTCLASSES}" ParallelTransformerLoaderApp
+result=$?
+echo "result=$result"
+
+exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ParallelTransformerLoaderAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.*;
+import java.net.*;
+import java.io.*;
+import java.security.*;
+
+/**
+ *      Test Java Agent
+ *
+ *      @author Daryl Puryear
+ *      @copyright 1999-2004 Wily Technology, Inc.  All rights reserved.
+ */
+public class ParallelTransformerLoaderAgent
+{
+        private static URL sURL;
+        private static ClassLoader sClassLoader;
+
+        public static synchronized ClassLoader
+        getClassLoader()
+        {
+                return sClassLoader;
+        }
+
+        public static synchronized void
+        generateNewClassLoader()
+        {
+                sClassLoader = new URLClassLoader(new URL[] {sURL});
+        }
+
+        public static void
+        premain(        String agentArgs,
+                        Instrumentation instrumentation)
+                throws Exception
+        {
+                if (agentArgs == null || agentArgs == "")
+                {
+                        System.err.println("Error: No jar file name provided, test will not run.");
+                        return;
+                }
+
+                sURL = (new File(agentArgs)).toURL();
+                System.out.println("Using jar file: " + sURL);
+                generateNewClassLoader();
+
+                instrumentation.addTransformer(new TestTransformer());
+        }
+
+        private static class TestTransformer
+                implements ClassFileTransformer
+        {
+                public byte[]
+                transform(      ClassLoader loader,
+                                String className,
+                                Class classBeingRedefined,
+                                ProtectionDomain protectionDomain,
+                                byte[] classfileBuffer)
+                        throws IllegalClassFormatException
+                {
+                        String tName = Thread.currentThread().getName();
+                        // In 160_03 and older, transform() is called
+                        // with the "system_loader_lock" held and that
+                        // prevents the bootstrap class loaded from
+                        // running in parallel. If we add a slight sleep
+                        // delay here when the transform() call is not
+                        // main or TestThread, then the deadlock in
+                        // 160_03 and older is much more reproducible.
+                        if (!tName.equals("main") && !tName.equals("TestThread")) {
+                            System.out.println("Thread '" + tName +
+                                "' has called transform()");
+                            try {
+                                Thread.sleep(500);
+                            } catch (InterruptedException ie) {
+                            }
+                        }
+
+                        // load additional classes when called from other threads
+                        if (!tName.equals("main"))
+                        {
+                                loadClasses(3);
+                        }
+                        return null;
+                }
+
+                public static void
+                loadClasses( int index)
+                {
+                        ClassLoader loader = ParallelTransformerLoaderAgent.getClassLoader();
+                        try
+                        {
+                                Class.forName("TestClass" + index, true, loader);
+                        }
+                        catch (Exception e)
+                        {
+                                e.printStackTrace();
+                        }
+                }
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/ParallelTransformerLoaderApp.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ *      Test Java Program
+ *
+ *      @author Daryl Puryear
+ *      @copyright 1999-2004 Wily Technology, Inc.  All rights reserved.
+ */
+public class ParallelTransformerLoaderApp
+{
+        private static final int kNumIterations = 1000;
+
+        public static void
+        main(   String[] args)
+                throws Exception
+        {
+                System.out.println();
+                System.out.print("Starting test with " + kNumIterations + " iterations");
+                for (int i = 0; i < kNumIterations; i++)
+                {
+                        // load some classes from multiple threads (this thread and one other)
+                        Thread testThread = new TestThread(2);
+                        testThread.start();
+                        loadClasses(1);
+
+                        // log that it completed and reset for the next iteration
+                        testThread.join();
+                        System.out.print(".");
+                        ParallelTransformerLoaderAgent.generateNewClassLoader();
+                }
+
+                System.out.println();
+                System.out.println("Test completed successfully");
+        }
+
+        private static class TestThread
+                extends Thread
+        {
+                private final int fIndex;
+
+                public
+                TestThread(     int index)
+                {
+                        super("TestThread");
+
+                        fIndex = index;
+                }
+
+                public void
+                run()
+                {
+                        loadClasses(fIndex);
+                }
+        }
+
+        public static void
+        loadClasses( int index)
+        {
+                ClassLoader loader = ParallelTransformerLoaderAgent.getClassLoader();
+                try
+                {
+                        Class.forName("TestClass" + index, true, loader);
+                }
+                catch (Exception e)
+                {
+                        e.printStackTrace();
+                }
+        }
+}
--- a/jdk/test/java/lang/instrument/PremainClass/DummyMain.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/PremainClass/DummyMain.java	Sun May 04 07:05:42 2008 -0700
@@ -22,11 +22,10 @@
  */
 
 /*
- *
- *
- * Used by PremainClassTest.sh - dummy "main application" which doesn't do anything
+ * dummy "Hello World"ish application for "premain" tests
  */
 public class DummyMain {
     public static void main(String[] args) {
+        System.out.println("Hello from DummyMain!");
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0001.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,0,0,1): declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0001
+ * @run main/othervm -javaagent:InheritAgent0001.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0001 extends InheritAgent0001Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0001!");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent0001Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0010.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,0,1,0): declared 2-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0010
+ * @run main/othervm -javaagent:InheritAgent0010.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0010 extends InheritAgent0010Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent0010!");
+    }
+}
+
+class InheritAgent0010Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0011.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,0,1,1): declared 2-arg and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0011
+ * @run main/othervm -javaagent:InheritAgent0011.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0011 extends InheritAgent0011Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0011!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent0011!");
+    }
+}
+
+class InheritAgent0011Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0100.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,1,0,0): inherited 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0100
+ * @run main/othervm -javaagent:InheritAgent0100.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0100 extends InheritAgent0100Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent0100Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0100Super!");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0101.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,1,0,1): inherited 1-arg and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0101
+ * @run main/othervm -javaagent:InheritAgent0101.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0101 extends InheritAgent0101Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0101!");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent0101Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0101Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0110.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,1,1,0): inherited 1-arg and declared 2-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0110
+ * @run main/othervm -javaagent:InheritAgent0110.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0110 extends InheritAgent0110Super {
+
+    // This agent does NOT have a one argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent0110!");
+    }
+}
+
+class InheritAgent0110Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0110Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0111.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (0,1,1,1): inherited 1-arg, declared 2-arg and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent0111
+ * @run main/othervm -javaagent:InheritAgent0111.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent0111 extends InheritAgent0111Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0111!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent0111!");
+    }
+
+}
+
+class InheritAgent0111Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent0111Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1000.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,0,0,0): inherited 2-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1000
+ * @run main/othervm -javaagent:InheritAgent1000.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1000 extends InheritAgent1000Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent1000Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1000Super!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1001.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,0,0,1): inherited 2-arg, and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1001
+ * @run main/othervm -javaagent:InheritAgent1001.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1001 extends InheritAgent1001Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1001!");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent1001Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1001Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1010.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,0,1,0): inherited 2-arg, and declared 2-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1010
+ * @run main/othervm -javaagent:InheritAgent1010.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1010 extends InheritAgent1010Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1010!");
+    }
+}
+
+class InheritAgent1010Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1010Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1011.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,0,1,1): inherited 2-arg, declared 2-arg and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1011
+ * @run main/othervm -javaagent:InheritAgent1011.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1011 extends InheritAgent1011Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1011!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1011!");
+    }
+}
+
+class InheritAgent1011Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1011Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1100.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,1,0,0): inherited 2-arg and inherited 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1100
+ * @run main/othervm -javaagent:InheritAgent1100.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1100 extends InheritAgent1100Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent1100Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1100Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1100Super!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1101.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,1,0,1): inherited 2-arg, inherited 1-arg, and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1101
+ * @run main/othervm -javaagent:InheritAgent1101.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1101 extends InheritAgent1101Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1101!");
+    }
+
+    // This agent does NOT have a double argument premain() method.
+}
+
+class InheritAgent1101Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1101Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1101Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1110.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,1,1,0): inherited 2-arg, inherited 1-arg, and declared 2-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1110
+ * @run main/othervm -javaagent:InheritAgent1110.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1110 extends InheritAgent1110Super {
+
+    // This agent does NOT have a single argument premain() method.
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1110!");
+    }
+}
+
+class InheritAgent1110Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1110Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1110Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent1111.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6289149
+ * @summary test config (1,1,1,1): inherited 2-arg, inherited 1-arg, declared 2-arg and declared 1-arg in agent class
+ * @author Daniel D. Daugherty, Sun Microsystems
+ *
+ * @run shell ../MakeJAR3.sh InheritAgent1111
+ * @run main/othervm -javaagent:InheritAgent1111.jar DummyMain
+ */
+
+import java.lang.instrument.*;
+
+class InheritAgent1111 extends InheritAgent1111Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1111!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1111!");
+    }
+}
+
+class InheritAgent1111Super {
+
+    //
+    // This agent has a single argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs) {
+        System.out.println("Hello from Single-Arg InheritAgent1111Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+
+    //
+    // This agent has a double argument premain() method which
+    // is NOT the one that should be called.
+    //
+    public static void premain (String agentArgs, Instrumentation instArg) {
+        System.out.println("Hello from Double-Arg InheritAgent1111Super!");
+        throw new Error("ERROR: THIS AGENT SHOULD NOT HAVE BEEN CALLED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/NoPremainAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.*;
+
+class NoPremainAgent {
+
+    // This agent is missing the premain() function.
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/NoPremainAgent.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6289149
+# @summary test when the agent's class is missing the premain() function.
+# @author Daniel D. Daugherty, Sun Microsystems
+#
+# @run build DummyMain
+# @run shell ../MakeJAR3.sh NoPremainAgent
+# @run shell NoPremainAgent.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+"${JAVA}" ${TESTVMOPTS} -javaagent:NoPremainAgent.jar \
+    -classpath "${TESTCLASSES}" DummyMain > output.log 2>&1
+cat output.log
+
+MESG="java.lang.NoSuchMethodException"
+grep "$MESG" output.log
+result=$?
+if [ "$result" = 0 ]; then
+    echo "PASS: found '$MESG' in the test output"
+else
+    echo "FAIL: did NOT find '$MESG' in the test output"
+fi
+
+exit $result
--- a/jdk/test/java/lang/instrument/PremainClass/PremainClassTest.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/PremainClass/PremainClassTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -49,7 +49,7 @@
 
 "$JAVAC" -d "${TESTCLASSES}" "${TESTSRC}"/DummyMain.java
 
-"${JAVA}" -javaagent:"${TESTSRC}"/Agent.jar -classpath "${TESTCLASSES}" DummyMain
+"${JAVA}" ${TESTVMOPTS} -javaagent:"${TESTSRC}"/Agent.jar -classpath "${TESTCLASSES}" DummyMain
 result=$?
 
 exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/ZeroArgPremainAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.*;
+
+class ZeroArgPremainAgent {
+
+    // This agent has a zero arg premain() function.
+    public static void premain () {
+        System.out.println("Hello from ZeroArgInheritAgent!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/PremainClass/ZeroArgPremainAgent.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,68 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6289149
+# @summary test when the agent's class has a zero arg premain() function.
+# @author Daniel D. Daugherty, Sun Microsystems
+#
+# @run build DummyMain
+# @run shell ../MakeJAR3.sh ZeroArgPremainAgent
+# @run shell ZeroArgPremainAgent.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+"${JAVA}" ${TESTVMOPTS} -javaagent:ZeroArgPremainAgent.jar \
+    -classpath "${TESTCLASSES}" DummyMain > output.log 2>&1
+cat output.log
+
+MESG="java.lang.NoSuchMethodException"
+grep "$MESG" output.log
+result=$?
+if [ "$result" = 0 ]; then
+    echo "PASS: found '$MESG' in the test output"
+else
+    echo "FAIL: did NOT find '$MESG' in the test output"
+fi
+
+exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineClassWithNativeMethod.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,81 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 5003341 4917140 6545149
+# @summary Redefine a class with a native method.
+# @author Daniel D. Daugherty as modified from the test submitted by clovis@par.univie.ac.at
+#
+# @run shell MakeJAR3.sh RedefineClassWithNativeMethodAgent 'Can-Redefine-Classes: true'
+# @run build RedefineClassWithNativeMethodApp
+# @run shell RedefineClassWithNativeMethod.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+"${JAVA}" ${TESTVMOPTS} \
+    -javaagent:RedefineClassWithNativeMethodAgent.jar=java/lang/Thread.class \
+    -classpath "${TESTCLASSES}" RedefineClassWithNativeMethodApp \
+    > output.log 2>&1
+result=$?
+
+cat output.log
+
+if [ "$result" = 0 ]; then
+    echo "PASS: RedefineClassWithNativeMethodApp exited with status of 0."
+else
+    echo "FAIL: RedefineClassWithNativeMethodApp exited with status of $result"
+    exit "$result"
+fi
+
+MESG="Exception"
+grep "$MESG" output.log
+result=$?
+if [ "$result" = 0 ]; then
+    echo "FAIL: found '$MESG' in the test output"
+    result=1
+else
+    echo "PASS: did NOT find '$MESG' in the test output"
+    result=0
+fi
+
+exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineClassWithNativeMethodAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.*;
+import java.net.*;
+import java.util.*;
+import java.io.*;
+
+public class RedefineClassWithNativeMethodAgent {
+    static Class clz;
+
+    // just read the original class and redefine it via a Timer
+    public static void premain(String agentArgs, final Instrumentation inst) throws Exception {
+        String s = agentArgs.substring(0, agentArgs.indexOf(".class"));
+        clz = Class.forName(s.replace('/', '.'));
+        ClassLoader loader =
+            RedefineClassWithNativeMethodAgent.class.getClassLoader();
+        URL classURL = loader.getResource(agentArgs);
+        if (classURL == null) {
+            throw new Exception("Cannot find class: " + agentArgs);
+        }
+
+        int         redefineLength;
+        InputStream redefineStream;
+
+        System.out.println("Reading test class from " + classURL);
+        if (classURL.getProtocol().equals("file")) {
+            File f = new File(classURL.getFile());
+            redefineStream = new FileInputStream(f);
+            redefineLength = (int) f.length();
+        } else {
+            URLConnection conn = classURL.openConnection();
+            redefineStream = conn.getInputStream();
+            redefineLength = conn.getContentLength();
+        }
+
+        final byte[] buffer = new byte[redefineLength];
+        new BufferedInputStream(redefineStream).read(buffer);
+        new Timer(true).schedule(new TimerTask() {
+            public void run() {
+                try {
+                    System.out.println("Instrumenting");
+                    ClassDefinition cld = new ClassDefinition(clz, buffer);
+                    inst.redefineClasses(new ClassDefinition[] { cld });
+                }
+                catch (Exception e) { e.printStackTrace(); }
+            }
+        }, 500);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineClassWithNativeMethodApp.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+public class RedefineClassWithNativeMethodApp {
+    public static void main(String[] args) throws Exception {
+        try {
+            // give the agent a chance to redefine the target class
+            Thread.sleep(2000);
+        } catch (InterruptedException ie) {
+        }
+
+        System.out.println("Creating instance of " +
+            RedefineClassWithNativeMethodAgent.clz);
+        RedefineClassWithNativeMethodAgent.clz.newInstance();
+
+        System.exit(0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvoke.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,82 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6667089
+# @summary Reflexive invocation of newly added methods broken.
+# @author Daniel D. Daugherty
+#
+# @run shell MakeJAR3.sh RedefineMethodAddInvokeAgent 'Can-Redefine-Classes: true'
+# @run build RedefineMethodAddInvokeApp
+# @run shell RedefineMethodAddInvoke.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAVAC="${TESTJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+cp "${TESTSRC}"/RedefineMethodAddInvokeTarget_1.java \
+    RedefineMethodAddInvokeTarget.java
+"${JAVAC}" -d . RedefineMethodAddInvokeTarget.java
+mv RedefineMethodAddInvokeTarget.java RedefineMethodAddInvokeTarget_1.java
+mv RedefineMethodAddInvokeTarget.class RedefineMethodAddInvokeTarget_1.class
+
+cp "${TESTSRC}"/RedefineMethodAddInvokeTarget_2.java \
+    RedefineMethodAddInvokeTarget.java
+"${JAVAC}" -d . RedefineMethodAddInvokeTarget.java
+mv RedefineMethodAddInvokeTarget.java RedefineMethodAddInvokeTarget_2.java
+mv RedefineMethodAddInvokeTarget.class RedefineMethodAddInvokeTarget_2.class
+
+"${JAVA}" ${TESTVMOPTS} -javaagent:RedefineMethodAddInvokeAgent.jar \
+    -classpath "${TESTCLASSES}" RedefineMethodAddInvokeApp > output.log 2>&1
+cat output.log
+
+MESG="Exception"
+grep "$MESG" output.log
+result=$?
+if [ "$result" = 0 ]; then
+    echo "FAIL: found '$MESG' in the test output"
+    result=1
+else
+    echo "PASS: did NOT find '$MESG' in the test output"
+    result=0
+fi
+
+exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvokeAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.Instrumentation;
+
+public class RedefineMethodAddInvokeAgent {
+    private static Instrumentation instrumentation;
+
+    private RedefineMethodAddInvokeAgent() {
+    }
+
+    public static void premain(String agentArgs, Instrumentation inst) {
+        System.out.println("Hello from RedefineMethodAddInvokeAgent!");
+        System.out.println("isRedefineClassesSupported()=" +
+            inst.isRedefineClassesSupported());
+
+        instrumentation = inst;
+    }
+
+    public static Instrumentation getInstrumentation() {
+        return instrumentation;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvokeApp.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.io.*;
+import java.lang.instrument.*;
+
+public class RedefineMethodAddInvokeApp {
+    public static void main(String args[]) throws Exception {
+        System.out.println("Hello from RedefineMethodAddInvokeApp!");
+
+        new RedefineMethodAddInvokeApp().doTest();
+
+        System.exit(0);
+    }
+
+    private void doTest() throws Exception {
+        RedefineMethodAddInvokeTarget target =
+            new RedefineMethodAddInvokeTarget();
+
+        System.out.println("RedefineMethodAddInvokeApp: invoking myMethod()");
+        target.test(0);  // invoke the original myMethod()
+
+        // add myMethod1()
+        do_redefine(1);
+
+        System.out.println("RedefineMethodAddInvokeApp: invoking myMethod1()");
+        target.test(1);  // invoke myMethod1()
+
+        // add myMethod2()
+        do_redefine(2);
+
+        System.out.println("RedefineMethodAddInvokeApp: invoking myMethod2()");
+        target.test(2);  // invoke myMethod2()
+    }
+
+    private static void do_redefine(int counter) throws Exception {
+        File f = new File("RedefineMethodAddInvokeTarget_" + counter +
+            ".class");
+        System.out.println("Reading test class from " + f);
+        InputStream redefineStream = new FileInputStream(f);
+
+        byte[] redefineBuffer = NamedBuffer.loadBufferFromStream(redefineStream);
+
+        ClassDefinition redefineParamBlock = new ClassDefinition(
+            RedefineMethodAddInvokeTarget.class, redefineBuffer);
+
+        RedefineMethodAddInvokeAgent.getInstrumentation().redefineClasses(
+            new ClassDefinition[] {redefineParamBlock});
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvokeTarget.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.reflect.Method;
+
+public class RedefineMethodAddInvokeTarget {
+    public void test(int counter) throws Exception {
+        Method method = getClass().getDeclaredMethod("myMethod" +
+            (counter == 0 ? "" : counter));
+        method.setAccessible(true);
+        method.invoke(this);
+    }
+
+    public void myMethod() {
+        System.out.println("Hello from the original myMethod()!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvokeTarget_1.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.reflect.Method;
+
+public class RedefineMethodAddInvokeTarget {
+    public void test(int counter) throws Exception {
+        Method method = getClass().getDeclaredMethod("myMethod" +
+            (counter == 0 ? "" : counter));
+        method.setAccessible(true);
+        method.invoke(this);
+    }
+
+    public void myMethod() {
+        System.out.println("Hello from the non-EMCP myMethod()!");
+    }
+
+    private final void myMethod1() {
+        System.out.println("Hello from myMethod1()!");
+        System.out.println("Calling myMethod() from myMethod1():");
+        myMethod();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/RedefineMethodAddInvokeTarget_2.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.reflect.Method;
+
+public class RedefineMethodAddInvokeTarget {
+    public void test(int counter) throws Exception {
+        Method method = getClass().getDeclaredMethod("myMethod" +
+            (counter == 0 ? "" : counter));
+        method.setAccessible(true);
+        method.invoke(this);
+    }
+
+    public void myMethod() {
+        System.out.println("Hello from the non-EMCP again myMethod()!");
+    }
+
+    private final void myMethod1() {
+        System.out.println("Hello from myMethod1()!");
+        System.out.println("Calling myMethod() from myMethod1():");
+        myMethod();
+    }
+
+    private final void myMethod2() {
+        System.out.println("Hello from myMethod2()!");
+        System.out.println("Calling myMethod1() from myMethod2():");
+        myMethod1();
+    }
+}
--- a/jdk/test/java/lang/instrument/RetransformAgent.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/RetransformAgent.java	Sun May 04 07:05:42 2008 -0700
@@ -27,7 +27,7 @@
  * @summary test retransformClasses
  * @author Robert Field, Sun Microsystems
  *
- * @run shell MakeJAR2.sh RetransformAgent RetransformApp 'Can-Retransform-Classes: true'
+ * @run shell/timeout=240 MakeJAR2.sh RetransformAgent RetransformApp 'Can-Retransform-Classes: true'
  * @run main/othervm -javaagent:RetransformAgent.jar RetransformApp
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/StressGetObjectSizeApp.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.lang.instrument.Instrumentation;
+
+public class StressGetObjectSizeApp
+    extends ASimpleInstrumentationTestCase
+{
+
+    /**
+     * Constructor for StressGetObjectSizeApp.
+     * @param name
+     */
+    public StressGetObjectSizeApp(String name)
+    {
+        super(name);
+    }
+
+    public static void
+    main (String[] args)
+        throws Throwable {
+        ATestCaseScaffold   test = new StressGetObjectSizeApp(args[0]);
+        test.runTest();
+    }
+
+    protected final void
+    doRunTest()
+        throws Throwable {
+        stressGetObjectSize();
+    }
+
+    public void stressGetObjectSize() {
+        System.out.println("main: an object size=" +
+            fInst.getObjectSize(new Object()));
+
+        RoundAndRound[] threads = new RoundAndRound[10];
+        for (int i = 0; i < threads.length; ++i) {
+            threads[i] = new RoundAndRound(fInst);
+            threads[i].start();
+        }
+        try {
+            Thread.sleep(500); // let all threads get going in their loops
+        } catch (InterruptedException ie) {
+        }
+        System.out.println("stressGetObjectSize: returning");
+        return;
+    }
+
+    private static class RoundAndRound extends Thread {
+        private final Instrumentation inst;
+        private final Object anObject;
+
+        public RoundAndRound(Instrumentation inst) {
+            this.inst = inst;
+            this.anObject = new Object();
+            setDaemon(true);
+        }
+
+        public void run() {
+            long sum = 0;
+            while (true) {
+              sum += inst.getObjectSize(anObject);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/StressGetObjectSizeTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,70 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6572160
+# @summary stress getObjectSize() API
+# @author Daniel D. Daugherty as modified from the code of fischman@google.com
+#
+# @run build StressGetObjectSizeApp
+# @run shell MakeJAR.sh basicAgent
+# @run shell StressGetObjectSizeTest.sh
+#
+
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+
+JAVA="${TESTJAVA}"/bin/java
+
+"${JAVA}" ${TESTVMOPTS} -javaagent:basicAgent.jar \
+    -classpath "${TESTCLASSES}" StressGetObjectSizeApp StressGetObjectSizeApp \
+    > output.log 2>&1
+cat output.log
+
+MESG="ASSERTION FAILED"
+grep "$MESG" output.log
+result=$?
+if [ "$result" = 0 ]; then
+    echo "FAIL: found '$MESG' in the test output"
+    result=1
+else
+    echo "PASS: did NOT find '$MESG' in the test output"
+    result=0
+fi
+
+exit $result
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/TestClass1.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ *      Test Java Program
+ *
+ *      @author Daryl Puryear
+ *      @copyright 1999-2004 Wily Technology, Inc.  All rights reserved.
+ */
+public class TestClass1
+{
+        public
+        TestClass1()
+        {
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/TestClass2.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ *      Test Java Program
+ *
+ *      @author Daryl Puryear
+ *      @copyright 1999-2004 Wily Technology, Inc.  All rights reserved.
+ */
+public class TestClass2
+{
+        public
+        TestClass2()
+        {
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/instrument/TestClass3.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ *      Test Java Program
+ *
+ *      @author Daryl Puryear
+ *      @copyright 1999-2004 Wily Technology, Inc.  All rights reserved.
+ */
+public class TestClass3
+{
+        public
+        TestClass3()
+        {
+        }
+}
--- a/jdk/test/java/lang/instrument/TransformerManagementThreadAddTests.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/TransformerManagementThreadAddTests.java	Sun May 04 07:05:42 2008 -0700
@@ -79,6 +79,12 @@
     protected static final int TOTAL_THREADS = MAX_TRANS - MIN_TRANS + 1;
 
     private byte[]          fDummyClassBytes;
+    // fCheckedTransformers is a Vector that is used to verify
+    // that the transform() function is called in the same
+    // order in which the transformers were added to the
+    // TransformerManager. The test currently verifies that all
+    // transformers for a specific worker thread are in
+    // increasing order by index value.
     private Vector              fCheckedTransformers;
     private Instrumentation fInstrumentation;
     private int             fFinished;
@@ -131,9 +137,16 @@
             threads[i].start();
         }
 
-        while (!exec.fDone)
+        // Effective Java - Item 48: Synchronize access to shared mutable data
+        // Don't use a direct field getter.
+        while (!exec.isDone())
         {
-            Thread.currentThread().yield();
+            // Effective Java - Item 51: Don't depend on the thread scheduler
+            // Use sleep() instead of yield().
+            try {
+                Thread.sleep(500);
+            } catch (InterruptedException ie) {
+            }
         }
         assertTrue(finalCheck());
 
@@ -169,13 +182,17 @@
         this.fExec = exec;
     }
 
+    // Effective Java - Item 48: Synchronize access to shared mutable data
+    // Document a synchronized setter.
     protected synchronized void
     threadFinished(Thread t)
     {
         fFinished++;
     }
 
-    protected boolean
+    // Effective Java - Item 48: Synchronize access to shared mutable data
+    // Provide synchronized getter.
+    protected synchronized boolean
     threadsDone()
     {
         return fFinished == TOTAL_THREADS;
@@ -188,7 +205,9 @@
     protected boolean
     testCompleted()
     {
-        return getExecThread().fDone;
+        // Effective Java - Item 48: Synchronize access to shared mutable data
+        // Don't use direct field getter.
+        return getExecThread().isDone();
     }
 
     /**
@@ -264,11 +283,19 @@
     private void
     executeTransform()
     {
-        fCheckedTransformers.clear();
-
         try
         {
             ClassDefinition cd = new ClassDefinition(DummyClass.class, fDummyClassBytes);
+
+            // When the ClassDefinition above is created for the first
+            // time and every time redefineClasses() below is called,
+            // the transform() function is called for each registered
+            // transformer. We only want one complete set of calls to
+            // be logged in the fCheckedTransformers Vector so we clear
+            // any calls logged for ClassDefinition above and just use
+            // the ones logged for redefineClasses() below.
+            fCheckedTransformers.clear();
+
             getInstrumentation().redefineClasses(new ClassDefinition[]{ cd });
         }
         catch (ClassNotFoundException e)
@@ -325,6 +352,18 @@
     {
         private boolean fDone = false;
 
+        // Effective Java - Item 48: Synchronize access to shared mutable data
+        // Provide a synchronized getter.
+        private synchronized boolean isDone() {
+            return fDone;
+        }
+
+        // Effective Java - Item 48: Synchronize access to shared mutable data
+        // Provide a synchronized setter.
+        private synchronized void setIsDone() {
+            fDone = true;
+        }
+
         public void
         run()
         {
@@ -335,7 +374,9 @@
 
             // Do a final check for good measure
             executeTransform();
-            fDone = true;
+            // Effective Java - Item 48: Synchronize access to shared mutable data
+            // Don't use direct field setter.
+            setIsDone();
         }
     }
 
--- a/jdk/test/java/lang/instrument/TransformerManagementThreadRemoveTests.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/TransformerManagementThreadRemoveTests.java	Sun May 04 07:05:42 2008 -0700
@@ -27,10 +27,9 @@
  * @summary multi-thread test to exercise sync and contention for removes to transformer registry
  * @author Gabriel Adauto, Wily Technology
  *
- * @ignore Disabled until race condition which hangs test can be fixed.
  * @run build TransformerManagementThreadRemoveTests
- * @run shell MakeJAR.sh basicAgent
- * @run main/othervm -javaagent:basicAgent.jar TransformerManagementThreadRemoveTests TransformerManagementThreadRemoveTests
+ * @run shell MakeJAR.sh redefineAgent
+ * @run main/othervm -javaagent:redefineAgent.jar TransformerManagementThreadRemoveTests TransformerManagementThreadRemoveTests
  */
 import java.util.*;
 
@@ -87,7 +86,12 @@
 
         while (!testCompleted())
         {
-            Thread.currentThread().yield();
+            // Effective Java - Item 51: Don't depend on the thread scheduler
+            // Use sleep() instead of yield().
+            try {
+                Thread.sleep(500);
+            } catch (InterruptedException ie) {
+            }
         }
         assertTrue(finalCheck());
 
--- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CircularityErrorTest.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CircularityErrorTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -26,14 +26,14 @@
 # @summary Unit tests for appendToBootstrapClassLoaderSearch and
 #   appendToSystemClasLoaderSearch methods.
 #
-# @run shell CircularityErrorTest.sh
+# @run shell/timeout=240 CircularityErrorTest.sh
 
 if [ "${TESTSRC}" = "" ]
 then
   echo "TESTSRC not set.  Test cannot execute.  Failed."
   exit 1
 fi
-                                                                                                        
+
 . ${TESTSRC}/CommonSetup.sh
 
 # Setup to create circularity condition
@@ -71,5 +71,5 @@
   -C "${TESTCLASSES}" CircularityErrorTest.class
 
 # Finally we run the test
-(cd "${TESTCLASSES}"; 
-  $JAVA -javaagent:CircularityErrorTest.jar CircularityErrorTest)
+(cd "${TESTCLASSES}";
+  $JAVA ${TESTVMOPTS} -javaagent:CircularityErrorTest.jar CircularityErrorTest)
--- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/ClassUnloadTest.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/ClassUnloadTest.sh	Sun May 04 07:05:42 2008 -0700
@@ -34,11 +34,11 @@
   echo "TESTSRC not set.  Test cannot execute.  Failed."
   exit 1
 fi
-                                                                                                        
+
 . ${TESTSRC}/CommonSetup.sh
 
 # Create Foo and Bar
-# Foo has a reference to Bar but we deleted Bar so that 
+# Foo has a reference to Bar but we deleted Bar so that
 # a NoClassDefFoundError will be thrown when Foo tries to
 # resolve the reference to Bar
 
@@ -53,11 +53,11 @@
   public class Foo {
       public static boolean doSomething() {
           try {
-	      Bar b = new Bar();
-	      return true;
-	  } catch (NoClassDefFoundError x) {
-	      return false;
-	  }
+              Bar b = new Bar();
+              return true;
+          } catch (NoClassDefFoundError x) {
+              return false;
+          }
       }
   }
 EOF
@@ -79,5 +79,5 @@
 
 # Finally we run the test
 (cd "${TESTCLASSES}"; \
-  $JAVA -Xverify:none -XX:+TraceClassUnloading -javaagent:ClassUnloadTest.jar \
-    ClassUnloadTest "${OTHERDIR}" Bar.jar)
+  $JAVA ${TESTVMOPTS} -Xverify:none -XX:+TraceClassUnloading \
+    -javaagent:ClassUnloadTest.jar ClassUnloadTest "${OTHERDIR}" Bar.jar)
--- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh	Sun May 04 07:05:42 2008 -0700
@@ -24,7 +24,6 @@
 #
 
 
-#%E
 #
 # Common setup for unit tests. Setups up the following variables:
 #
@@ -66,7 +65,7 @@
   echo "TESTSRC not set.  Test cannot execute.  Failed."
   exit 1
 fi
- 
+
 if [ "${TESTCLASSES}" = "" ]
 then
   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
--- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/run_tests.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/run_tests.sh	Sun May 04 07:05:42 2008 -0700
@@ -23,24 +23,24 @@
 # have any questions.
 #
 
-                                                                                                              
+
 # @test
 # @bug 6173575 6388987
-# @summary Unit tests for appendToBootstrapClassLoaderSearch and 
+# @summary Unit tests for appendToBootstrapClassLoaderSearch and
 #   appendToSystemClasLoaderSearch methods.
 #
 # @build Agent AgentSupport BootSupport BasicTest PrematureLoadTest DynamicTest
-# @run shell run_tests.sh
+# @run shell/timeout=240 run_tests.sh
 
 if [ "${TESTSRC}" = "" ]
 then
   echo "TESTSRC not set.  Test cannot execute.  Failed."
   exit 1
 fi
-                                                                                                        
+
 . ${TESTSRC}/CommonSetup.sh
 
-                                                                          
+
 # Simple tests
 
 echo "Creating jar files for simple tests..."
@@ -50,13 +50,13 @@
 "$JAR" -cfm Agent.jar "${TESTSRC}"/manifest.mf Agent.class
 "$JAR" -cf  AgentSupport.jar AgentSupport.class
 "$JAR" -cf  BootSupport.jar BootSupport.class
-"$JAR" -cf  SimpleTests.jar BasicTest.class PrematureLoadTest.class 
+"$JAR" -cf  SimpleTests.jar BasicTest.class PrematureLoadTest.class
 
 failures=0
 
 go() {
     echo ''
-    sh -xc "$JAVA -javaagent:Agent.jar -classpath SimpleTests.jar  $1 $2 $3" 2>&1
+    sh -xc "$JAVA ${TESTVMOPTS} -javaagent:Agent.jar -classpath SimpleTests.jar  $1 $2 $3" 2>&1
     if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 }
 
@@ -75,7 +75,7 @@
 "${JAVAC}" -d tmp "${TESTSRC}"/Tracer.java
 (cd tmp; "${JAR}" cf ../Tracer.jar org/tools/Tracer.class)
 
-# InstrumentedApplication is Application+instrmentation - don't copy as 
+# InstrumentedApplication is Application+instrmentation - don't copy as
 # we don't want the original file permission
 
 cat "${TESTSRC}"/InstrumentedApplication.java > ./Application.java
@@ -85,11 +85,11 @@
 cp "${TESTSRC}"/Application.java .
 "${JAVAC}" -d . Application.java
 
-sh -xc "$JAVA -classpath . -javaagent:Agent.jar DynamicTest" 2>&1
+sh -xc "$JAVA ${TESTVMOPTS} -classpath . -javaagent:Agent.jar DynamicTest" 2>&1
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
 # Repeat test with security manager
-sh -xc "$JAVA -classpath . -javaagent:Agent.jar -Djava.security.manager DynamicTest" 2>&1
+sh -xc "$JAVA ${TESTVMOPTS} -classpath . -javaagent:Agent.jar -Djava.security.manager DynamicTest" 2>&1
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
 #
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/management/ManagementFactory/GetPlatformMXBeans.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6610094
+ * @summary Basic unit test of ManagementFactory.getPlatformMXBeans()
+ *          and also PlatformManagedObject.getObjectName()
+ * @author  Mandy Chung
+ *
+ * @run main GetPlatformMXBeans
+ */
+
+import java.lang.management.*;
+import static java.lang.management.ManagementFactory.*;
+import java.util.*;
+import javax.management.*;
+
+public class GetPlatformMXBeans {
+    private static MBeanServer platformMBeanServer =
+            getPlatformMBeanServer();
+    public static void main(String[] argv) throws Exception {
+        checkPlatformMXBean(getClassLoadingMXBean(),
+                            ClassLoadingMXBean.class,
+                            CLASS_LOADING_MXBEAN_NAME);
+        checkPlatformMXBean(getCompilationMXBean(),
+                            CompilationMXBean.class,
+                            COMPILATION_MXBEAN_NAME);
+        checkPlatformMXBean(getMemoryMXBean(),
+                            MemoryMXBean.class,
+                            MEMORY_MXBEAN_NAME);
+        checkPlatformMXBean(getOperatingSystemMXBean(),
+                            OperatingSystemMXBean.class,
+                            OPERATING_SYSTEM_MXBEAN_NAME);
+        checkPlatformMXBean(getRuntimeMXBean(),
+                            RuntimeMXBean.class,
+                            RUNTIME_MXBEAN_NAME);
+        checkPlatformMXBean(getThreadMXBean(),
+                            ThreadMXBean.class,
+                            THREAD_MXBEAN_NAME);
+        checkGarbageCollectorMXBeans(getGarbageCollectorMXBeans());
+        checkMemoryManagerMXBeans(getMemoryManagerMXBeans());
+        checkMemoryPoolMXBeans(getMemoryPoolMXBeans());
+    }
+
+    private static <T extends PlatformManagedObject>
+        void checkPlatformMXBean(T obj, Class<T> mxbeanInterface,
+                                 String mxbeanName) throws Exception
+    {
+        int numElements = (obj != null ? 1 : 0);
+        // verify local list of platform MXBeans
+        List<? extends PlatformManagedObject> mxbeans =
+            getPlatformMXBeans(mxbeanInterface);
+        if (mxbeans.size() != numElements) {
+            throw new RuntimeException("Unmatched number of platform MXBeans "
+                + mxbeans.size() + ". Expected = " + numElements);
+        }
+
+        if (obj != null) {
+            PlatformManagedObject pmo = mxbeans.get(0);
+            if (obj != pmo) {
+                throw new RuntimeException("The list returned by getPlatformMXBeans"
+                    + " not matched");
+            }
+            ObjectName on = new ObjectName(mxbeanName);
+            if (!on.equals(pmo.getObjectName())) {
+                throw new RuntimeException("Unmatched ObjectName " +
+                    pmo.getObjectName() + " Expected = " + on);
+            }
+        }
+
+        // verify platform MXBeans in the platform MBeanServer
+        mxbeans = getPlatformMXBeans(platformMBeanServer, mxbeanInterface);
+        if (mxbeans.size() != numElements) {
+            throw new RuntimeException("Unmatched number of platform MXBeans "
+                + mxbeans.size() + ". Expected = " + numElements);
+        }
+    }
+
+    private static void checkMemoryManagerMXBeans(List<MemoryManagerMXBean> objs)
+        throws Exception
+    {
+        checkPlatformMXBeans(objs, MemoryManagerMXBean.class);
+        for (MemoryManagerMXBean mxbean : objs) {
+            String domainAndType;
+            if (mxbean instanceof GarbageCollectorMXBean) {
+                domainAndType = GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE;
+            } else {
+                domainAndType = MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE;
+            }
+            ObjectName on = new ObjectName(domainAndType +
+                                           ",name=" + mxbean.getName());
+            if (!on.equals(mxbean.getObjectName())) {
+                throw new RuntimeException("Unmatched ObjectName " +
+                    mxbean.getObjectName() + " Expected = " + on);
+            }
+        }
+    }
+    private static void checkMemoryPoolMXBeans(List<MemoryPoolMXBean> objs)
+        throws Exception
+    {
+        checkPlatformMXBeans(objs, MemoryPoolMXBean.class);
+        for (MemoryPoolMXBean mxbean : objs) {
+            ObjectName on = new ObjectName(MEMORY_POOL_MXBEAN_DOMAIN_TYPE +
+                                           ",name=" + mxbean.getName());
+            if (!on.equals(mxbean.getObjectName())) {
+                throw new RuntimeException("Unmatched ObjectName " +
+                    mxbean.getObjectName() + " Expected = " + on);
+            }
+        }
+    }
+
+    private static void checkGarbageCollectorMXBeans(List<GarbageCollectorMXBean> objs)
+        throws Exception
+    {
+        checkPlatformMXBeans(objs, GarbageCollectorMXBean.class);
+        for (GarbageCollectorMXBean mxbean : objs) {
+            ObjectName on = new ObjectName(GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE +
+                                           ",name=" + mxbean.getName());
+            if (!on.equals(mxbean.getObjectName())) {
+                throw new RuntimeException("Unmatched ObjectName " +
+                    mxbean.getObjectName() + " Expected = " + on);
+            }
+        }
+    }
+
+    private static <T extends PlatformManagedObject>
+        void checkPlatformMXBeans(List<T> objs, Class<T> mxbeanInterface)
+            throws Exception
+    {
+        // verify local list of platform MXBeans
+        List<? extends PlatformManagedObject> mxbeans =
+            getPlatformMXBeans(mxbeanInterface);
+        if (objs.size() != mxbeans.size()) {
+            throw new RuntimeException("Unmatched number of platform MXBeans "
+                + mxbeans.size() + ". Expected = " + objs.size());
+        }
+        List<T> list = new ArrayList<T>(objs);
+        for (PlatformManagedObject pmo : mxbeans) {
+            if (list.contains(pmo)) {
+                list.remove(pmo);
+            } else {
+                throw new RuntimeException(pmo +
+                    " not in the platform MXBean list");
+            }
+        }
+
+        if (!list.isEmpty()) {
+            throw new RuntimeException("The list returned by getPlatformMXBeans"
+                + " not matched");
+        }
+
+        // verify platform MXBeans in the platform MBeanServer
+        mxbeans = getPlatformMXBeans(platformMBeanServer, mxbeanInterface);
+        if (objs.size() != mxbeans.size()) {
+            throw new RuntimeException("Unmatched number of platform MXBeans "
+                + mxbeans.size() + ". Expected = " + objs.size());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/management/OperatingSystemMXBean/PlatformMXBeanTest.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6610094
+ * @summary Test the OperatingSystemMXBean instance returned by
+ *          ManagementFactory.getPlatformMXBeans()
+ * @author  Mandy Chung
+ *
+ * @run main PlatformMXBeanTest
+ */
+
+import java.lang.management.*;
+import java.util.List;
+
+public class PlatformMXBeanTest {
+    public static void main(String[] argv) throws Exception {
+        OperatingSystemMXBean osMBean = getOSPlatformMXBean(OperatingSystemMXBean.class);
+
+        // There should have only one single MXBean for the OS MXBean interfaces:
+        //   java.lang.management.OperatingSystemMXBean
+        //   com.sun.management.OperatingSystemMXBean
+        //   com.sun.management.UnixOperatingSystemMXBean
+        if (osMBean != getOSPlatformMXBean(com.sun.management.OperatingSystemMXBean.class)) {
+            throw new RuntimeException(
+                "Invalid com.sun.management.OperatingSystemMXBean instance");
+        }
+
+        if (!System.getProperty("os.name").startsWith("Windows") &&
+                osMBean != getOSPlatformMXBean(com.sun.management.UnixOperatingSystemMXBean.class)) {
+            throw new RuntimeException(
+                "Invalid com.sun.management.UnixOperatingSystemMXBean instance");
+        }
+    }
+
+    private static <T extends OperatingSystemMXBean>
+            T getOSPlatformMXBean(Class<T> c) {
+        List<T> result = ManagementFactory.getPlatformMXBeans(c);
+        if (result.isEmpty()) {
+            return null;
+        } else if (result.size() == 1) {
+            return result.get(0);
+        } else {
+            throw new RuntimeException(c.getName() + " has " +
+                result.size() + " number of instances");
+        }
+    }
+}
--- a/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/CreatePrivateActivatable.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/Activatable/createPrivateActivable/CreatePrivateActivatable.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -49,116 +49,116 @@
 public class CreatePrivateActivatable
 {
     private static class PrivateActivatable extends Activatable
-	implements ActivateMe, Runnable
+        implements ActivateMe, Runnable
     {
-	private PrivateActivatable(ActivationID id, MarshalledObject obj)
-	    throws ActivationException, RemoteException
-	{
-	    super(id, 0);
-	}
+        private PrivateActivatable(ActivationID id, MarshalledObject obj)
+            throws ActivationException, RemoteException
+        {
+            super(id, 0);
+        }
 
-	public void ping()
-	{}
+        public void ping()
+        {}
 
-	/**
-	 * Spawns a thread to deactivate the object.
-	 */
-	public void shutdown() throws Exception
-	{
-	    (new Thread(this, "CreatePrivateActivatable$PrivateActivatable")).start();
-	}
+        /**
+         * Spawns a thread to deactivate the object.
+         */
+        public void shutdown() throws Exception
+        {
+            (new Thread(this, "CreatePrivateActivatable$PrivateActivatable")).start();
+        }
 
-	/**
-	 * Thread to deactivate object. First attempts to make object
-	 * inactive (via the inactive method).  If that fails (the
-	 * object may still have pending/executing calls), then
-	 * unexport the object forcibly.
-	 */
-	public void run() {
-	    ActivationLibrary.deactivate(this, getID());
-	}
+        /**
+         * Thread to deactivate object. First attempts to make object
+         * inactive (via the inactive method).  If that fails (the
+         * object may still have pending/executing calls), then
+         * unexport the object forcibly.
+         */
+        public void run() {
+            ActivationLibrary.deactivate(this, getID());
+        }
     }
-    
+
     public static void main(String[] args)  {
-	/*
-	 * The following line is required with the JDK 1.2 VM so that the
-	 * VM can exit gracefully when this test completes.  Otherwise, the
-	 * conservative garbage collector will find a handle to the server
-	 * object on the native stack and not clear the weak reference to
-	 * it in the RMI runtime's object table.
-	 */
-	Object dummy = new Object();
-	RMID rmid = null;
-	ActivateMe obj;
+        /*
+         * The following line is required with the JDK 1.2 VM so that the
+         * VM can exit gracefully when this test completes.  Otherwise, the
+         * conservative garbage collector will find a handle to the server
+         * object on the native stack and not clear the weak reference to
+         * it in the RMI runtime's object table.
+         */
+        Object dummy = new Object();
+        RMID rmid = null;
+        ActivateMe obj;
 
-	System.err.println("\nRegression test for bug 4164971\n");
-	System.err.println("java.security.policy = " +
-			   System.getProperty("java.security.policy", "no policy"));
+        System.err.println("\nRegression test for bug 4164971\n");
+        System.err.println("java.security.policy = " +
+                           System.getProperty("java.security.policy", "no policy"));
 
-	CreatePrivateActivatable server;
-	try {
-	    TestLibrary.suggestSecurityManager(TestParams.defaultSecurityManager);
+        CreatePrivateActivatable server;
+        try {
+            TestLibrary.suggestSecurityManager(TestParams.defaultSecurityManager);
+
+            // start an rmid.
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
-	    // start an rmid.
-  	    RMID.removeLog();
-  	    rmid = RMID.createRMID();
-  	    rmid.start();
-	    
-	    /* Cause activation groups to have a security policy that will
-	     * allow security managers to be downloaded and installed
-	     */
-	    Properties p = new Properties();
-	    // this test must always set policies/managers in its
-	    // activation groups
-	    p.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    p.put("java.security.manager", 
-		  TestParams.defaultSecurityManager);
-	    
-	    /*
-	     * Activate an object by registering its object
-	     * descriptor and invoking a method on the
-	     * stub returned from the register call.
-	     */
-	    ActivationGroupDesc groupDesc =
-		new ActivationGroupDesc(p, null);
-	    ActivationSystem system = ActivationGroup.getSystem();
-	    ActivationGroupID groupID = system.registerGroup(groupDesc);
+            /* Cause activation groups to have a security policy that will
+             * allow security managers to be downloaded and installed
+             */
+            Properties p = new Properties();
+            // this test must always set policies/managers in its
+            // activation groups
+            p.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            p.put("java.security.manager",
+                  TestParams.defaultSecurityManager);
+
+            /*
+             * Activate an object by registering its object
+             * descriptor and invoking a method on the
+             * stub returned from the register call.
+             */
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc(p, null);
+            ActivationSystem system = ActivationGroup.getSystem();
+            ActivationGroupID groupID = system.registerGroup(groupDesc);
+
+            System.err.println("Creating descriptor");
+            ActivationDesc desc =
+                new ActivationDesc(groupID,
+                    "CreatePrivateActivatable$PrivateActivatable",
+                     null, null);
 
-	    System.err.println("Creating descriptor");
-	    ActivationDesc desc =
-		new ActivationDesc(groupID,
-		    "CreatePrivateActivatable$PrivateActivatable",
-		     null, null);
-	    
-	    System.err.println("Registering descriptor");
-	    obj = (ActivateMe) Activatable.register(desc);
-	    
-	    /*
-	     * Loop a bunch of times to force activator to
-	     * spawn VMs (groups)
-	     */
-	    System.err.println("Activate object via method call");
-	    obj.ping();
-		
-	    /*
-	     * Clean up object too.
-	     */
-	    System.err.println("Deactivate object via method call");
-	    obj.shutdown();
-	    
-	    System.err.println("\nsuccess: CreatePrivateActivatable test passed ");
-	
-	} catch (Exception e) {
-	    if (e instanceof java.security.PrivilegedActionException) {
-		e = ((java.security.PrivilegedActionException)e).getException();
-	    }
-	    TestLibrary.bomb("\nfailure: unexpected exception " +
-			     e.getClass().getName(), e);
-	    
-	} finally {
-	    ActivationLibrary.rmidCleanup(rmid);
-	    obj = null;
-	}
+            System.err.println("Registering descriptor");
+            obj = (ActivateMe) Activatable.register(desc);
+
+            /*
+             * Loop a bunch of times to force activator to
+             * spawn VMs (groups)
+             */
+            System.err.println("Activate object via method call");
+            obj.ping();
+
+            /*
+             * Clean up object too.
+             */
+            System.err.println("Deactivate object via method call");
+            obj.shutdown();
+
+            System.err.println("\nsuccess: CreatePrivateActivatable test passed ");
+
+        } catch (Exception e) {
+            if (e instanceof java.security.PrivilegedActionException) {
+                e = ((java.security.PrivilegedActionException)e).getException();
+            }
+            TestLibrary.bomb("\nfailure: unexpected exception " +
+                             e.getClass().getName(), e);
+
+        } finally {
+            ActivationLibrary.rmidCleanup(rmid);
+            obj = null;
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,10 +24,10 @@
 /* @test
  * @bug 4097135
  * @summary Need a specific subtype of RemoteException for activation failure.
- * 	    If activation fails to happen during a call to a remote object,
- *	    then the call should end in an ActivateFailedException. In this
- *	    test, the actual "activatable" remote object fails to activate
- *	    since its * "activation" constructor throws an exception.
+ *          If activation fails to happen during a call to a remote object,
+ *          then the call should end in an ActivateFailedException. In this
+ *          test, the actual "activatable" remote object fails to activate
+ *          since its * "activation" constructor throws an exception.
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
@@ -46,128 +46,127 @@
 import java.util.Properties;
 
 public class ActivateFails
-	extends Activatable
-	implements ActivateMe
+        extends Activatable
+        implements ActivateMe
 {
 
     public ActivateFails(ActivationID id, MarshalledObject obj)
-	throws ActivationException, RemoteException
+        throws ActivationException, RemoteException
     {
-	super(id, 0);
+        super(id, 0);
 
-	boolean refuseToActivate = false;
-	try {
-	    refuseToActivate = ((Boolean)obj.get()).booleanValue();
-	} catch (Exception impossible) {
-	}
-	
-	if (refuseToActivate)
-	    throw new RemoteException("object refuses to activate");
+        boolean refuseToActivate = false;
+        try {
+            refuseToActivate = ((Boolean)obj.get()).booleanValue();
+        } catch (Exception impossible) {
+        }
+
+        if (refuseToActivate)
+            throw new RemoteException("object refuses to activate");
     }
 
     public void ping()
     {}
-    
+
     /**
      * Spawns a thread to deactivate the object.
      */
     public ShutdownThread shutdown() throws Exception
     {
-	ShutdownThread shutdownThread = new ShutdownThread(this, getID());
-	shutdownThread.start();
-	return(shutdownThread);
+        ShutdownThread shutdownThread = new ShutdownThread(this, getID());
+        shutdownThread.start();
+        return(shutdownThread);
     }
-    
-    public static void main(String[] args) 
+
+    public static void main(String[] args)
     {
-	RMID rmid = null;
-	ActivateMe obj1, obj2;
-	ShutdownThread shutdownThread;
-	
-	System.err.println("\nRegression test for bug 4097135\n");
-	try {
-	    TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager"); 
+        RMID rmid = null;
+        ActivateMe obj1, obj2;
+        ShutdownThread shutdownThread;
+
+        System.err.println("\nRegression test for bug 4097135\n");
+        try {
+            TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+
+            /*
+             * First run "rmid" and wait for it to start up.
+             */
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
-	    /*
-	     * First run "rmid" and wait for it to start up.
-	     */
-	    RMID.removeLog();
-	    rmid = RMID.createRMID();
-	    rmid.start();
+            /* Cause activation groups to have a security policy that will
+             * allow security managers to be downloaded and installed
+             */
+            Properties p = new Properties();
+            // this test must always set policies/managers in its
+            // activation groups
+            p.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            p.put("java.security.manager",
+                  TestParams.defaultSecurityManager);
 
-	    /* Cause activation groups to have a security policy that will
-	     * allow security managers to be downloaded and installed
-	     */
-	    Properties p = new Properties();
-	    // this test must always set policies/managers in its
-	    // activation groups
-	    p.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    p.put("java.security.manager", 
-		  TestParams.defaultSecurityManager);
+            /*
+             * Create activation descriptor...
+             */
+            System.err.println("creating activation descriptor...");
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc(p, null);
+            ActivationGroupID groupID =
+                ActivationGroup.getSystem().registerGroup(groupDesc);
+
+            ActivationDesc desc1 =
+                new ActivationDesc(groupID, "ActivateFails",
+                                   null,
+                                   new MarshalledObject(new Boolean(true)));
 
-	    /*
-	     * Create activation descriptor...
-	     */
-	    System.err.println("creating activation descriptor...");
-	    ActivationGroupDesc groupDesc =
-		new ActivationGroupDesc(p, null);
-	    ActivationGroupID groupID =
-		ActivationGroup.getSystem().registerGroup(groupDesc);
-	    
-	    ActivationDesc desc1 =
-		new ActivationDesc(groupID, "ActivateFails",
-				   null,
-				   new MarshalledObject(new Boolean(true)));
-	    
-	    ActivationDesc desc2 = 
-		new ActivationDesc(groupID, "ActivateFails",
-				   null,
-				   new MarshalledObject(new Boolean(false)));
-	    /*
-	     * Register activation descriptor and make a call on
-	     * the stub. Activation should fail with an
-	     * ActivateFailedException.  If not, report an
-	     * error as a RuntimeException
-	     */
+            ActivationDesc desc2 =
+                new ActivationDesc(groupID, "ActivateFails",
+                                   null,
+                                   new MarshalledObject(new Boolean(false)));
+            /*
+             * Register activation descriptor and make a call on
+             * the stub. Activation should fail with an
+             * ActivateFailedException.  If not, report an
+             * error as a RuntimeException
+             */
 
-	    System.err.println("registering activation descriptor...");
-	    obj1 = (ActivateMe)Activatable.register(desc1);
-	    obj2 = (ActivateMe)Activatable.register(desc2);
+            System.err.println("registering activation descriptor...");
+            obj1 = (ActivateMe)Activatable.register(desc1);
+            obj2 = (ActivateMe)Activatable.register(desc2);
+
+            System.err.println("invoking method on activatable object...");
+            try {
+                obj1.ping();
+
+            } catch (ActivateFailedException e) {
 
-	    System.err.println("invoking method on activatable object...");
-	    try {
-		obj1.ping();
-	    
-	    } catch (ActivateFailedException e) {
+                /*
+                 * This is what is expected so exit with status 0
+                 */
+                System.err.println("\nsuccess: ActivateFailedException " +
+                                   "generated");
+                e.getMessage();
+            }
 
-		/*
-		 * This is what is expected so exit with status 0
-		 */
-		System.err.println("\nsuccess: ActivateFailedException " +
-				   "generated");
-		e.getMessage();
-	    }
+            obj2.ping();
+            shutdownThread = obj2.shutdown();
 
-	    obj2.ping();
-	    shutdownThread = obj2.shutdown();
+            // wait for shutdown to work
+            Thread.sleep(2000);
 
-	    // wait for shutdown to work 
-	    Thread.sleep(2000);
+            shutdownThread = null;
 
-	    shutdownThread = null;
-	    
-	} catch (Exception e) {
-	    /*
-	     * Test failed; unexpected exception generated.
-	     */
-	    TestLibrary.bomb("\nfailure: unexpected exception " +
-			       e.getClass().getName() + ": " + e.getMessage(), e);
-	    
-	} finally {
-	    obj1 = obj2 = null;
-	    ActivationLibrary.rmidCleanup(rmid);
-	}
+        } catch (Exception e) {
+            /*
+             * Test failed; unexpected exception generated.
+             */
+            TestLibrary.bomb("\nfailure: unexpected exception " +
+                               e.getClass().getName() + ": " + e.getMessage(), e);
+
+        } finally {
+            obj1 = obj2 = null;
+            ActivationLibrary.rmidCleanup(rmid);
+        }
     }
 }
-
--- a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,88 +29,88 @@
     implements ActivateMe, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("void ping()"),
-	new java.rmi.server.Operation("ShutdownThread shutdown()")
+        new java.rmi.server.Operation("void ping()"),
+        new java.rmi.server.Operation("ShutdownThread shutdown()")
     };
-    
+
     private static final long interfaceHash = -6632667923281093978L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_ping_0;
     private static java.lang.reflect.Method $method_shutdown_1;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_ping_0 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {});
-	    $method_shutdown_1 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_ping_0 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {});
+            $method_shutdown_1 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public ActivateFails_Stub() {
-	super();
+        super();
     }
     public ActivateFails_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of ping()
     public void ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public ShutdownThread shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    Object $result = ref.invoke(this, $method_shutdown_1, null, -3616843253114182719L);
-	    return ((ShutdownThread) $result);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-	    ref.invoke(call);
-	    ShutdownThread $result;
-	    try {
-		java.io.ObjectInput in = call.getInputStream();
-		$result = (ShutdownThread) in.readObject();
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } catch (java.lang.ClassNotFoundException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } finally {
-		ref.done(call);
-	    }
-	    return $result;
-	}
+        if (useNewInvoke) {
+            Object $result = ref.invoke(this, $method_shutdown_1, null, -3616843253114182719L);
+            return ((ShutdownThread) $result);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+            ref.invoke(call);
+            ShutdownThread $result;
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $result = (ShutdownThread) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } finally {
+                ref.done(call);
+            }
+            return $result;
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateMe.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ActivateMe.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ShutdownThread.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivateFailedException/activateFails/ShutdownThread.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,21 +31,20 @@
     ActivationID activationID = null;
 
     public ShutdownThread(Remote remoteObject, ActivationID activationID) {
-	remoteObject = remoteObject;
-	activationID = activationID;
+        remoteObject = remoteObject;
+        activationID = activationID;
     }
 
     public void run() {
 
-	try {
+        try {
 
-	    Activatable.unexportObject(remoteObject, true);
-	    Activatable.inactive(activationID);
+            Activatable.unexportObject(remoteObject, true);
+            Activatable.inactive(activationID);
 
-	} catch (Exception e) {
-	}
+        } catch (Exception e) {
+        }
 
     }
 
 }
-
--- a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4510355 
+ * @bug 4510355
  * @summary ActivationGroup implementations cannot be downloaded by default;
  * Creates a custom activation group without setting a security manager
  * in activation group's descriptor.  The custom activation group
@@ -49,28 +49,28 @@
 import java.util.Properties;
 
 public class DownloadActivationGroup
-	implements Ping, Runnable
+        implements Ping, Runnable
 {
 
     private ActivationID id;
 
     public DownloadActivationGroup(ActivationID id, MarshalledObject mobj)
-    	throws ActivationException, RemoteException
+        throws ActivationException, RemoteException
     {
-	this.id = id;
-	Activatable.exportObject(this, id, 0);
-	System.err.println("object activated in group");
+        this.id = id;
+        Activatable.exportObject(this, id, 0);
+        System.err.println("object activated in group");
     }
 
     public DownloadActivationGroup() throws RemoteException {
-	UnicastRemoteObject.exportObject(this, 0);
+        UnicastRemoteObject.exportObject(this, 0);
     }
 
     /**
      * Used to activate object.
      */
     public void ping() {
-	System.err.println("received ping");
+        System.err.println("received ping");
     }
 
     /**
@@ -79,87 +79,87 @@
      */
     public void shutdown() throws Exception
     {
-	(new Thread(this,"DownloadActivationGroup")).start();
+        (new Thread(this,"DownloadActivationGroup")).start();
     }
 
     /**
      * Thread to deactivate object.
      */
     public void run() {
-	ActivationLibrary.deactivate(this, getID());
+        ActivationLibrary.deactivate(this, getID());
     }
-    
+
     public ActivationID getID() {
-	return id;
+        return id;
     }
 
 
     public static void main(String[] args) {
 
-	RMID rmid = null;
-	
-	System.out.println("\nRegression test for bug 4510355\n");
-	
-	try {
-	    TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+        RMID rmid = null;
+
+        System.out.println("\nRegression test for bug 4510355\n");
+
+        try {
+            TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+
+            /*
+             * Install group class file in codebase.
+             */
+            System.err.println("install class file in codebase");
+            URL groupURL = TestLibrary.installClassInCodebase(
+                                  "MyActivationGroupImpl", "group");
+            System.err.println("class file installed");
 
-	    /*
-	     * Install group class file in codebase.
-	     */
-	    System.err.println("install class file in codebase");
-	    URL groupURL = TestLibrary.installClassInCodebase(
-				  "MyActivationGroupImpl", "group");
-	    System.err.println("class file installed");
+            /*
+             * Start rmid.
+             */
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            String execPolicyOption = "-Dsun.rmi.activation.execPolicy=none";
+            rmid.addOptions(new String[] { execPolicyOption });
+            rmid.start();
 
-	    /*
-	     * Start rmid.
-	     */
-	    RMID.removeLog();
-	    rmid = RMID.createRMID();
-	    String execPolicyOption = "-Dsun.rmi.activation.execPolicy=none";
-	    rmid.addOptions(new String[] { execPolicyOption });
-	    rmid.start();
+            /*
+             * Create and register descriptors for custom group and an
+             * activatable object in that group.
+             */
+            System.err.println("register group");
 
-	    /*
-	     * Create and register descriptors for custom group and an
-	     * activatable object in that group.
-	     */
-	    System.err.println("register group");
-	    
-	    Properties p = new Properties();
-	    p.put("java.security.policy", TestParams.defaultGroupPolicy);
-	    
-	    ActivationGroupDesc groupDesc =
-		new ActivationGroupDesc("MyActivationGroupImpl",
-					groupURL.toExternalForm(),
-					null, p, null);
-	    ActivationGroupID groupID =
-		ActivationGroup.getSystem().registerGroup(groupDesc);
-	    
-	    
-	    System.err.println("register activatable object");
-	    ActivationDesc desc =
-		new ActivationDesc(groupID, "DownloadActivationGroup",
-				   null, null);
-	    Ping obj = (Ping) Activatable.register(desc);
+            Properties p = new Properties();
+            p.put("java.security.policy", TestParams.defaultGroupPolicy);
+
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc("MyActivationGroupImpl",
+                                        groupURL.toExternalForm(),
+                                        null, p, null);
+            ActivationGroupID groupID =
+                ActivationGroup.getSystem().registerGroup(groupDesc);
+
+
+            System.err.println("register activatable object");
+            ActivationDesc desc =
+                new ActivationDesc(groupID, "DownloadActivationGroup",
+                                   null, null);
+            Ping obj = (Ping) Activatable.register(desc);
 
-	    /*
-	     * Start group (by calling ping).
-	     */
-	    System.err.println(
-		"ping object (forces download of group's class)");
-	    obj.ping();
-	    System.err.println(
-		"TEST PASSED: group's class downloaded successfully");
-	    System.err.println("shutdown object");
-	    obj.shutdown();
-	    System.err.println("TEST PASSED");
+            /*
+             * Start group (by calling ping).
+             */
+            System.err.println(
+                "ping object (forces download of group's class)");
+            obj.ping();
+            System.err.println(
+                "TEST PASSED: group's class downloaded successfully");
+            System.err.println("shutdown object");
+            obj.shutdown();
+            System.err.println("TEST PASSED");
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    ActivationLibrary.rmidCleanup(rmid);
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            ActivationLibrary.rmidCleanup(rmid);
+        }
     }
 }
 
--- a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/DownloadActivationGroup_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,46 +29,46 @@
     implements Ping
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_ping_0;
     private static java.lang.reflect.Method $method_shutdown_1;
-    
+
     static {
-	try {
-	    $method_ping_0 = Ping.class.getMethod("ping", new java.lang.Class[] {});
-	    $method_shutdown_1 = Ping.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_ping_0 = Ping.class.getMethod("ping", new java.lang.Class[] {});
+            $method_shutdown_1 = Ping.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public DownloadActivationGroup_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of ping()
     public void ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L);
+        ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L);
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/MyActivationGroupImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationGroup/downloadActivationGroup/MyActivationGroupImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,11 +27,11 @@
 
 
 public class MyActivationGroupImpl extends ActivationGroupImpl {
-    
+
     public MyActivationGroupImpl(ActivationGroupID id, MarshalledObject mobj)
-	throws RemoteException, ActivationException
+        throws RemoteException, ActivationException
     {
-	super(id, mobj);
-	System.err.println("custom group implementation created");
+        super(id, mobj);
+        System.err.println("custom group implementation created");
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationGroupDesc/checkDefaultGroupName/CheckDefaultGroupName.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -42,19 +42,19 @@
  */
 public class CheckDefaultGroupName {
     public static void main(String[] args) {
-	System.out.println("\n\nRegression test for, 4252236\n\n");
+        System.out.println("\n\nRegression test for, 4252236\n\n");
 
-	ActivationGroupDesc groupDesc =
-	    new ActivationGroupDesc(null, null);
+        ActivationGroupDesc groupDesc =
+            new ActivationGroupDesc(null, null);
 
-	String className = groupDesc.getClassName();
-	if (className != null) {
-	    TestLibrary.bomb("ActivationGroupDesc had incorrect default" +
-			     " group implementation class name: " + className);
-	} else {
-	    System.err.println("test passed, had correct default group" +
-			       " implementation class name: " + className +
-			       "\n\n");
-	}
+        String className = groupDesc.getClassName();
+        if (className != null) {
+            TestLibrary.bomb("ActivationGroupDesc had incorrect default" +
+                             " group implementation class name: " + className);
+        } else {
+            System.err.println("test passed, had correct default group" +
+                               " implementation class name: " + className +
+                               "\n\n");
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/activeGroup/IdempotentActiveGroup.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/activeGroup/IdempotentActiveGroup.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -49,81 +49,81 @@
 import java.rmi.server.UnicastRemoteObject;
 
 public class IdempotentActiveGroup {
-    
+
     public static void main(String[] args) {
 
- 	System.err.println("\nRegression test for bug 4720528\n");
-	
-	TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
-	RMID rmid = null;
-	ActivationInstantiator inst1 = null;
-	ActivationInstantiator inst2 = null;
-	
-	try {
-	    RMID.removeLog();
-	    rmid = RMID.createRMID();
-	    rmid.start();
+        System.err.println("\nRegression test for bug 4720528\n");
+
+        TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+        RMID rmid = null;
+        ActivationInstantiator inst1 = null;
+        ActivationInstantiator inst2 = null;
+
+        try {
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
-	    System.err.println("Create group descriptor");
-	    ActivationGroupDesc groupDesc =
-		new ActivationGroupDesc(null, null);
-	    ActivationSystem system = ActivationGroup.getSystem();
-	    System.err.println("Register group descriptor");
-	    ActivationGroupID groupID = system.registerGroup(groupDesc);
-	    inst1 = new FakeInstantiator();
-	    inst2 = new FakeInstantiator();
-	    
-	    System.err.println("Invoke activeGroup with inst1");
-	    system.activeGroup(groupID, inst1, 0);
+            System.err.println("Create group descriptor");
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc(null, null);
+            ActivationSystem system = ActivationGroup.getSystem();
+            System.err.println("Register group descriptor");
+            ActivationGroupID groupID = system.registerGroup(groupDesc);
+            inst1 = new FakeInstantiator();
+            inst2 = new FakeInstantiator();
+
+            System.err.println("Invoke activeGroup with inst1");
+            system.activeGroup(groupID, inst1, 0);
 
-	    try {
-	    System.err.println("Invoke activeGroup with inst2");
-		system.activeGroup(groupID, inst2, 0);
-		throw new RuntimeException(
-		    "TEST FAILED: activeGroup with unequal groups succeeded!");
-	    } catch (ActivationException expected) {
-		System.err.println("Caught expected ActivationException");
-		System.err.println("Test 1 (of 2) passed");
-	    }
+            try {
+            System.err.println("Invoke activeGroup with inst2");
+                system.activeGroup(groupID, inst2, 0);
+                throw new RuntimeException(
+                    "TEST FAILED: activeGroup with unequal groups succeeded!");
+            } catch (ActivationException expected) {
+                System.err.println("Caught expected ActivationException");
+                System.err.println("Test 1 (of 2) passed");
+            }
 
-	    try {
-		System.err.println("Invoke activeGroup with inst1");
-		system.activeGroup(groupID, inst1, 0);
-		System.err.println("activeGroup call succeeded");
-		System.err.println("Test 2 (of 2) passed");
-	    } catch (ActivationException unexpected) {
-		throw new RuntimeException(
-		    "TEST FAILED: activeGroup with equal groups failed!",
-		    unexpected);
-	    }
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("test failed", e);
-	} finally {
-	    try {
-		if (inst1 != null) {
-		    UnicastRemoteObject.unexportObject(inst1, true);
-		}
-		if (inst2 != null) {
-		    UnicastRemoteObject.unexportObject(inst2, true);
-		}
-	    } catch (NoSuchObjectException unexpected) {
-		throw new AssertionError(unexpected);
-	    }
-	    ActivationLibrary.rmidCleanup(rmid);
-	}
+            try {
+                System.err.println("Invoke activeGroup with inst1");
+                system.activeGroup(groupID, inst1, 0);
+                System.err.println("activeGroup call succeeded");
+                System.err.println("Test 2 (of 2) passed");
+            } catch (ActivationException unexpected) {
+                throw new RuntimeException(
+                    "TEST FAILED: activeGroup with equal groups failed!",
+                    unexpected);
+            }
+
+        } catch (Exception e) {
+            TestLibrary.bomb("test failed", e);
+        } finally {
+            try {
+                if (inst1 != null) {
+                    UnicastRemoteObject.unexportObject(inst1, true);
+                }
+                if (inst2 != null) {
+                    UnicastRemoteObject.unexportObject(inst2, true);
+                }
+            } catch (NoSuchObjectException unexpected) {
+                throw new AssertionError(unexpected);
+            }
+            ActivationLibrary.rmidCleanup(rmid);
+        }
     }
 
     private static class FakeInstantiator
-    	extends UnicastRemoteObject
-    	implements ActivationInstantiator
+        extends UnicastRemoteObject
+        implements ActivationInstantiator
     {
-	FakeInstantiator() throws RemoteException {}
+        FakeInstantiator() throws RemoteException {}
 
-	public MarshalledObject newInstance(ActivationID id,
-					    ActivationDesc desc)
-	{
-	    throw new AssertionError();
-	}
+        public MarshalledObject newInstance(ActivationID id,
+                                            ActivationDesc desc)
+        {
+            throw new AssertionError();
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ActivateMe.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ActivateMe.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,7 +25,7 @@
  * @bug 4127754
  *
  * @summary synopsis: need to modify registered ActivationDesc and
- * ActivationGroupDesc 
+ * ActivationGroupDesc
  * @author Ann Wollrath
  *
  * @library ../../../testlibrary
@@ -43,7 +43,7 @@
 import java.util.*;
 
 public class ModifyDescriptor
-	implements ActivateMe, Runnable
+        implements ActivateMe, Runnable
 {
 
     private ActivationID id;
@@ -54,28 +54,28 @@
 
 
     public ModifyDescriptor(ActivationID id, MarshalledObject mobj)
-	throws ActivationException, RemoteException
+        throws ActivationException, RemoteException
     {
-	this.id = id;
-	Activatable.exportObject(this, id, 0);
-	
-	try {
-	    message = (String) mobj.get();
-	} catch (Exception e) {
-	    System.err.println("unable to get message from marshalled object");
-	}
+        this.id = id;
+        Activatable.exportObject(this, id, 0);
+
+        try {
+            message = (String) mobj.get();
+        } catch (Exception e) {
+            System.err.println("unable to get message from marshalled object");
+        }
     }
 
     public String getMessage() {
-	return message;
+        return message;
     }
 
     public String getProperty(String name) {
-	return TestLibrary.getProperty(name, null);
+        return TestLibrary.getProperty(name, null);
     }
 
     public ActivationID getID() {
-	return id;
+        return id;
     }
 
     /**
@@ -83,7 +83,7 @@
      */
     public void shutdown() throws Exception
     {
-	(new Thread(this,"ModifyDescriptor")).start();
+        (new Thread(this,"ModifyDescriptor")).start();
     }
 
     /**
@@ -93,165 +93,165 @@
      * unexport the object forcibly.
      */
     public void run() {
-	ActivationLibrary.deactivate(this, getID());
+        ActivationLibrary.deactivate(this, getID());
     }
-    
+
     public static void main(String[] args) {
 
-	System.out.println("\nRegression test for bug 4127754\n");
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");	
+        System.out.println("\nRegression test for bug 4127754\n");
+
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+
+        RMID rmid = null;
 
-	RMID rmid = null;
-	
-	try {
-	    RMID.removeLog();
-	    rmid = RMID.createRMID();
-	    rmid.start();
+        try {
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
-	    /*
-	     * Create and register a group and activatable object
-	     */
+            /*
+             * Create and register a group and activatable object
+             */
 
-	    System.err.println("Creating group descriptor");
-	    Properties props = new Properties();
-	    props.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    props.put("java.security.manager", 
-		  TestParams.defaultSecurityManager);
-	    props.put("test.message", MESSAGE1);
-	    ActivationGroupDesc initialGroupDesc =
-		new ActivationGroupDesc(props, null);
-	    System.err.println("Registering group");
-	    ActivationSystem system = ActivationGroup.getSystem();
-	    ActivationGroupID groupID = system.registerGroup(initialGroupDesc);
-	    
-	    System.err.println("Creating descriptor");
-	    ActivationDesc initialDesc =
-		new ActivationDesc(groupID, "ModifyDescriptor", null,
-				   new MarshalledObject(MESSAGE1), false);
-	    
-	    System.err.println("Registering descriptor");
-	    ActivateMe obj = (ActivateMe) Activatable.register(initialDesc);
+            System.err.println("Creating group descriptor");
+            Properties props = new Properties();
+            props.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            props.put("java.security.manager",
+                  TestParams.defaultSecurityManager);
+            props.put("test.message", MESSAGE1);
+            ActivationGroupDesc initialGroupDesc =
+                new ActivationGroupDesc(props, null);
+            System.err.println("Registering group");
+            ActivationSystem system = ActivationGroup.getSystem();
+            ActivationGroupID groupID = system.registerGroup(initialGroupDesc);
+
+            System.err.println("Creating descriptor");
+            ActivationDesc initialDesc =
+                new ActivationDesc(groupID, "ModifyDescriptor", null,
+                                   new MarshalledObject(MESSAGE1), false);
+
+            System.err.println("Registering descriptor");
+            ActivateMe obj = (ActivateMe) Activatable.register(initialDesc);
 
-	    /*
-	     * Ping object and verify that MarshalledObject is okay.
-	     */
-	    System.err.println("Ping object");
-	    String message1 = obj.getMessage();
-	    System.err.println("message = " + message1);
+            /*
+             * Ping object and verify that MarshalledObject is okay.
+             */
+            System.err.println("Ping object");
+            String message1 = obj.getMessage();
+            System.err.println("message = " + message1);
 
-	    if (message1.equals(MESSAGE1)) {
-		System.err.println("Test1a passed: initial MarshalledObject " +
-				   "correct");
-	    } else {
-		TestLibrary.bomb("Test1 failed: unexpected MarshalledObject passed to " +
-		     "constructor", null);
-	    }
+            if (message1.equals(MESSAGE1)) {
+                System.err.println("Test1a passed: initial MarshalledObject " +
+                                   "correct");
+            } else {
+                TestLibrary.bomb("Test1 failed: unexpected MarshalledObject passed to " +
+                     "constructor", null);
+            }
 
-	    /*
-	     * Get property from remote group and make sure it's okay
-	     */
-	    message1 = obj.getProperty("test.message");
-	    if (message1.equals(MESSAGE1)) {
-		System.err.println("Test1b passed: initial group property " +
-				   "correct");
-	    } else {
-		TestLibrary.bomb("Test1 failed: unexpected property passed to " +
-		     "group", null);
-	    }
+            /*
+             * Get property from remote group and make sure it's okay
+             */
+            message1 = obj.getProperty("test.message");
+            if (message1.equals(MESSAGE1)) {
+                System.err.println("Test1b passed: initial group property " +
+                                   "correct");
+            } else {
+                TestLibrary.bomb("Test1 failed: unexpected property passed to " +
+                     "group", null);
+            }
 
-	    /*
-	     * Update activation descriptor for object and group
-	     */
-	    System.err.println("Update activation descriptor");
-	    ActivationDesc newDesc =
-		new ActivationDesc(groupID, "ModifyDescriptor", null,
-			       new MarshalledObject(MESSAGE2), false);
-	    ActivationID id = obj.getID();
-	    ActivationDesc oldDesc = system.setActivationDesc(id, newDesc);
+            /*
+             * Update activation descriptor for object and group
+             */
+            System.err.println("Update activation descriptor");
+            ActivationDesc newDesc =
+                new ActivationDesc(groupID, "ModifyDescriptor", null,
+                               new MarshalledObject(MESSAGE2), false);
+            ActivationID id = obj.getID();
+            ActivationDesc oldDesc = system.setActivationDesc(id, newDesc);
 
-	    if (oldDesc.equals(initialDesc)) {
-		System.err.println("Test2a passed: desc returned from " +
-				   "setActivationDesc is okay");
-	    } else {
-		TestLibrary.bomb("Test2a failed: desc returned from setActivationDesc " +
-		     "is not the initial descriptor!", null);
-	    }
+            if (oldDesc.equals(initialDesc)) {
+                System.err.println("Test2a passed: desc returned from " +
+                                   "setActivationDesc is okay");
+            } else {
+                TestLibrary.bomb("Test2a failed: desc returned from setActivationDesc " +
+                     "is not the initial descriptor!", null);
+            }
 
 
-	    Properties props2 = new Properties();
-	    props2.put("test.message", MESSAGE2);
-	    props2.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    props2.put("java.security.manager", 
-		  TestParams.defaultSecurityManager);
-	    ActivationGroupDesc newGroupDesc =
-		new ActivationGroupDesc(props2, null);
+            Properties props2 = new Properties();
+            props2.put("test.message", MESSAGE2);
+            props2.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            props2.put("java.security.manager",
+                  TestParams.defaultSecurityManager);
+            ActivationGroupDesc newGroupDesc =
+                new ActivationGroupDesc(props2, null);
 
-	    ActivationGroupDesc oldGroupDesc =
-		system.setActivationGroupDesc(groupID, newGroupDesc);
+            ActivationGroupDesc oldGroupDesc =
+                system.setActivationGroupDesc(groupID, newGroupDesc);
 
-	    if (oldGroupDesc.equals(initialGroupDesc)) {
-		System.err.println("Test2b passed: group desc returned from " +
-				   "setActivationGroupDesc is okay");
-	    } else {
-		TestLibrary.bomb("Test2b failed: group desc returned from " +
-		     "setActivationGroupDesc is not the initial descriptor!",
-		     null);
-	    }
-		
-	    /*
-	     * Restart rmid; and ping object to make sure that it has
-	     * new message.
-	     */
-	    rmid.restart();
+            if (oldGroupDesc.equals(initialGroupDesc)) {
+                System.err.println("Test2b passed: group desc returned from " +
+                                   "setActivationGroupDesc is okay");
+            } else {
+                TestLibrary.bomb("Test2b failed: group desc returned from " +
+                     "setActivationGroupDesc is not the initial descriptor!",
+                     null);
+            }
 
-	    System.err.println("Ping object after restart");
-	    String message2 = obj.getMessage();
+            /*
+             * Restart rmid; and ping object to make sure that it has
+             * new message.
+             */
+            rmid.restart();
+
+            System.err.println("Ping object after restart");
+            String message2 = obj.getMessage();
 
-	    if (message2.equals(MESSAGE2)) {
-		System.err.println("Test3a passed: setActivationDesc takes " +
-				   "effect after a restart");
-	    } else {
-		TestLibrary.bomb("Test3a failed: setActivationDesc did not take effect " +
-		     "after a restart", null);
-	    }
+            if (message2.equals(MESSAGE2)) {
+                System.err.println("Test3a passed: setActivationDesc takes " +
+                                   "effect after a restart");
+            } else {
+                TestLibrary.bomb("Test3a failed: setActivationDesc did not take effect " +
+                     "after a restart", null);
+            }
+
+            message2 = obj.getProperty("test.message");
 
-	    message2 = obj.getProperty("test.message");
-	    
-	    if (message2.equals(MESSAGE2)) {
-		System.err.println("Test3b passed: setActivationGroupDesc " +
-				   "takes effect after a restart");
-	    } else {
-		TestLibrary.bomb("Test3b failed: setActivationGroupDesc did not take " +
-		     "effect after a restart", null);
-	    }
+            if (message2.equals(MESSAGE2)) {
+                System.err.println("Test3b passed: setActivationGroupDesc " +
+                                   "takes effect after a restart");
+            } else {
+                TestLibrary.bomb("Test3b failed: setActivationGroupDesc did not take " +
+                     "effect after a restart", null);
+            }
 
-	    System.err.println("Get activation descriptor");
-	    ActivationDesc latestDesc = system.getActivationDesc(id);
+            System.err.println("Get activation descriptor");
+            ActivationDesc latestDesc = system.getActivationDesc(id);
 
-	    if (latestDesc.equals(newDesc)) {
-		System.err.println("Test4a passed: desc is same as latest");
-	    } else {
-		TestLibrary.bomb("Test4a failed: there is no way this would happen", null);
-	    }
+            if (latestDesc.equals(newDesc)) {
+                System.err.println("Test4a passed: desc is same as latest");
+            } else {
+                TestLibrary.bomb("Test4a failed: there is no way this would happen", null);
+            }
 
-	    System.err.println("Get activation group descriptor");
-	    ActivationGroupDesc latestGroupDesc =
-		system.getActivationGroupDesc(groupID);
+            System.err.println("Get activation group descriptor");
+            ActivationGroupDesc latestGroupDesc =
+                system.getActivationGroupDesc(groupID);
 
-	    if (latestGroupDesc.equals(newGroupDesc)) {
-		System.err.println("Test4b passed: group desc is same as " +
-				   "latest");
-	    } else {
-		TestLibrary.bomb("Test4b failed: there is no way this would happen", null);
-	    }
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("test failed", e);
-	} finally {
-	    ActivationLibrary.rmidCleanup(rmid);
-	}
+            if (latestGroupDesc.equals(newGroupDesc)) {
+                System.err.println("Test4b passed: group desc is same as " +
+                                   "latest");
+            } else {
+                TestLibrary.bomb("Test4b failed: there is no way this would happen", null);
+            }
+
+        } catch (Exception e) {
+            TestLibrary.bomb("test failed", e);
+        } finally {
+            ActivationLibrary.rmidCleanup(rmid);
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,166 +29,166 @@
     implements ActivateMe
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("java.rmi.activation.ActivationID getID()"),
-	new java.rmi.server.Operation("java.lang.String getMessage()"),
-	new java.rmi.server.Operation("java.lang.String getProperty(java.lang.String)"),
-	new java.rmi.server.Operation("void shutdown()")
+        new java.rmi.server.Operation("java.rmi.activation.ActivationID getID()"),
+        new java.rmi.server.Operation("java.lang.String getMessage()"),
+        new java.rmi.server.Operation("java.lang.String getProperty(java.lang.String)"),
+        new java.rmi.server.Operation("void shutdown()")
     };
-    
+
     private static final long interfaceHash = 7998207954486691383L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_getID_0;
     private static java.lang.reflect.Method $method_getMessage_1;
     private static java.lang.reflect.Method $method_getProperty_2;
     private static java.lang.reflect.Method $method_shutdown_3;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_getID_0 = ActivateMe.class.getMethod("getID", new java.lang.Class[] {});
-	    $method_getMessage_1 = ActivateMe.class.getMethod("getMessage", new java.lang.Class[] {});
-	    $method_getProperty_2 = ActivateMe.class.getMethod("getProperty", new java.lang.Class[] {java.lang.String.class});
-	    $method_shutdown_3 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_getID_0 = ActivateMe.class.getMethod("getID", new java.lang.Class[] {});
+            $method_getMessage_1 = ActivateMe.class.getMethod("getMessage", new java.lang.Class[] {});
+            $method_getProperty_2 = ActivateMe.class.getMethod("getProperty", new java.lang.Class[] {java.lang.String.class});
+            $method_shutdown_3 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public ModifyDescriptor_Stub() {
-	super();
+        super();
     }
     public ModifyDescriptor_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getID()
     public java.rmi.activation.ActivationID getID()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getID_0, null, -7795865521150345044L);
-		return ((java.rmi.activation.ActivationID) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		java.rmi.activation.ActivationID $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.rmi.activation.ActivationID) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getID_0, null, -7795865521150345044L);
+                return ((java.rmi.activation.ActivationID) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                java.rmi.activation.ActivationID $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationID) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of getMessage()
     public java.lang.String getMessage()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getMessage_1, null, 5353407034680111516L);
-		return ((java.lang.String) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		ref.invoke(call);
-		java.lang.String $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.lang.String) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getMessage_1, null, 5353407034680111516L);
+                return ((java.lang.String) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                ref.invoke(call);
+                java.lang.String $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.lang.String) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of getProperty(String)
     public java.lang.String getProperty(java.lang.String $param_String_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getProperty_2, new java.lang.Object[] {$param_String_1}, 77249282285080913L);
-		return ((java.lang.String) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
-		try {
-		    java.io.ObjectOutput out = call.getOutputStream();
-		    out.writeObject($param_String_1);
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.MarshalException("error marshalling arguments", e);
-		}
-		ref.invoke(call);
-		java.lang.String $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.lang.String) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getProperty_2, new java.lang.Object[] {$param_String_1}, 77249282285080913L);
+                return ((java.lang.String) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_String_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("error marshalling arguments", e);
+                }
+                ref.invoke(call);
+                java.lang.String $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.lang.String) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    ref.invoke(this, $method_shutdown_3, null, -7207851917985848402L);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
-	    ref.invoke(call);
-	    ref.done(call);
-	}
+        if (useNewInvoke) {
+            ref.invoke(this, $method_shutdown_3, null, -7207851917985848402L);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
+            ref.invoke(call);
+            ref.done(call);
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/CanCreateStubs.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/CanCreateStubs.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,4 +34,3 @@
     Object getForbiddenClass() throws Exception;
     ActivationGroupID returnGroupID() throws RemoteException;
 }
-
--- a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -20,7 +20,7 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
- 
+
 /* @test
  * @bug 4179055
  * @summary Some java apps need to have access to read "accessClassInPackage.sun.rmi.server"
@@ -55,151 +55,151 @@
  *
  * The test causes the activation system to need to create each of
  * these classes in turn.  The test will fail if the activation system
- * does not allow these classes to be created.  
+ * does not allow these classes to be created.
  */
 public class StubClassesPermitted
     extends Activatable implements Runnable, CanCreateStubs
 {
     public static boolean sameGroup = false;
-    
+
     private static CanCreateStubs canCreateStubs = null;
     private static Registry registry = null;
 
-    public static void main(String args[]) {  
+    public static void main(String args[]) {
 
-	sameGroup = true;
-	
-	RMID rmid = null;
+        sameGroup = true;
+
+        RMID rmid = null;
 
-	System.err.println("\nRegression test for bug/rfe 4179055\n");
-	    
-	try {
-	    TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+        System.err.println("\nRegression test for bug/rfe 4179055\n");
 
-	    registry = java.rmi.registry.LocateRegistry.
-		createRegistry(TestLibrary.REGISTRY_PORT);
+        try {
+            TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+
+            registry = java.rmi.registry.LocateRegistry.
+                createRegistry(TestLibrary.REGISTRY_PORT);
 
-	    // must run with java.lang.SecurityManager or the test
-	    // result will be nullified if running with a build where
-	    // 4180392 has not been fixed.
-	    String smClassName = 
-		System.getSecurityManager().getClass().getName();
-	    if (!smClassName.equals("java.lang.SecurityManager")) {
-		TestLibrary.bomb("Test must run with java.lang.SecurityManager");
-	    }
+            // must run with java.lang.SecurityManager or the test
+            // result will be nullified if running with a build where
+            // 4180392 has not been fixed.
+            String smClassName =
+                System.getSecurityManager().getClass().getName();
+            if (!smClassName.equals("java.lang.SecurityManager")) {
+                TestLibrary.bomb("Test must run with java.lang.SecurityManager");
+            }
 
-	    // start an rmid.
-  	    RMID.removeLog();
-  	    rmid = RMID.createRMID();
-  	    rmid.start();
+            // start an rmid.
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
-	    //rmid.addOptions(new String[] {"-C-Djava.rmi.server.logCalls=true"});
+            //rmid.addOptions(new String[] {"-C-Djava.rmi.server.logCalls=true"});
 
-	    // Ensure that activation groups run with the correct
-	    // security manager.
-	    //
-	    Properties p = new Properties();
-	    p.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    p.put("java.security.manager", 
-		  "java.lang.SecurityManager");
+            // Ensure that activation groups run with the correct
+            // security manager.
+            //
+            Properties p = new Properties();
+            p.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            p.put("java.security.manager",
+                  "java.lang.SecurityManager");
 
-	    // This action causes the following classes to be created
-	    // in this VM (RMI must permit the creation of these classes):
-	    //
-	    // sun.rmi.server.Activation$ActivationSystemImpl_Stub
-	    // sun.rmi.server.Activation$ActivationMonitorImpl_Stub
-	    //
-  	    System.err.println("Create activation group, in a new VM");
-  	    ActivationGroupDesc groupDesc =
-  		new ActivationGroupDesc(p, null);
-  	    ActivationSystem system = ActivationGroup.getSystem();
-  	    ActivationGroupID groupID = system.registerGroup(groupDesc);
-	    
-	    System.err.println("register activatable");
-	    // Fix for: 4271615: make sure activation group runs in a new VM
-	    ActivationDesc desc = new ActivationDesc 
-		(groupID, "StubClassesPermitted", null, null);
-	    canCreateStubs = (CanCreateStubs) Activatable.register(desc);
+            // This action causes the following classes to be created
+            // in this VM (RMI must permit the creation of these classes):
+            //
+            // sun.rmi.server.Activation$ActivationSystemImpl_Stub
+            // sun.rmi.server.Activation$ActivationMonitorImpl_Stub
+            //
+            System.err.println("Create activation group, in a new VM");
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc(p, null);
+            ActivationSystem system = ActivationGroup.getSystem();
+            ActivationGroupID groupID = system.registerGroup(groupDesc);
+
+            System.err.println("register activatable");
+            // Fix for: 4271615: make sure activation group runs in a new VM
+            ActivationDesc desc = new ActivationDesc
+                (groupID, "StubClassesPermitted", null, null);
+            canCreateStubs = (CanCreateStubs) Activatable.register(desc);
 
-	    // ensure registry stub can be passed in a remote call
-	    System.err.println("getting the registry");
-	    registry = canCreateStubs.getRegistry();
+            // ensure registry stub can be passed in a remote call
+            System.err.println("getting the registry");
+            registry = canCreateStubs.getRegistry();
+
+            // make sure a client cant load just any sun.* class, just
+            // as a sanity check, try to create a class we are not
+            // allowed to access but which was passed in a remote call
+            try {
+                System.err.println("accessing forbidden class");
+                Object secureRandom = canCreateStubs.getForbiddenClass();
 
-	    // make sure a client cant load just any sun.* class, just
-	    // as a sanity check, try to create a class we are not
-	    // allowed to access but which was passed in a remote call
-	    try {
-		System.err.println("accessing forbidden class");
-		Object secureRandom = canCreateStubs.getForbiddenClass();
-		
-		TestLibrary.bomb("test allowed to access forbidden class," + 
-				 " sun.security.provider.SecureRandom");
-	    } catch (java.security.AccessControlException e) {
+                TestLibrary.bomb("test allowed to access forbidden class," +
+                                 " sun.security.provider.SecureRandom");
+            } catch (java.security.AccessControlException e) {
 
-		// Make sure we received a *local* AccessControlException
-		ByteArrayOutputStream bout = new ByteArrayOutputStream();
-		PrintStream ps = new PrintStream(bout);
-		e.printStackTrace(ps);
-		ps.flush();
-		String trace = new String(bout.toByteArray());
-		if ((trace.indexOf("exceptionReceivedFromServer") >= 0) ||
-		    trace.equals(""))
+                // Make sure we received a *local* AccessControlException
+                ByteArrayOutputStream bout = new ByteArrayOutputStream();
+                PrintStream ps = new PrintStream(bout);
+                e.printStackTrace(ps);
+                ps.flush();
+                String trace = new String(bout.toByteArray());
+                if ((trace.indexOf("exceptionReceivedFromServer") >= 0) ||
+                    trace.equals(""))
                 {
-		    throw e;
-		}
-		System.err.println("received expected local access control exception");
-	    }
+                    throw e;
+                }
+                System.err.println("received expected local access control exception");
+            }
 
-	    // make sure that an ActivationGroupID can be passed in a
-	    // remote call; this is slightly more inclusive than
-	    // just passing a reference to the activation system
-	    System.err.println("returning group desc");
-	    canCreateStubs.returnGroupID();
-		    
-	    // Clean up object
-	    System.err.println
-		("Deactivate object via method call");
-	    canCreateStubs.shutdown();
+            // make sure that an ActivationGroupID can be passed in a
+            // remote call; this is slightly more inclusive than
+            // just passing a reference to the activation system
+            System.err.println("returning group desc");
+            canCreateStubs.returnGroupID();
+
+            // Clean up object
+            System.err.println
+                ("Deactivate object via method call");
+            canCreateStubs.shutdown();
+
+            System.err.println
+                ("\nsuccess: StubClassesPermitted test passed ");
 
-	    System.err.println
-		("\nsuccess: StubClassesPermitted test passed ");
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("\nfailure: unexpected exception ", e);
-	} finally {
-	    try {
-		Thread.sleep(4000);
-	    } catch (InterruptedException e) {
-	    }
-	    
-	    canCreateStubs = null;
-	    ActivationLibrary.rmidCleanup(rmid);
-	    System.err.println("rmid shut down");
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb("\nfailure: unexpected exception ", e);
+        } finally {
+            try {
+                Thread.sleep(4000);
+            } catch (InterruptedException e) {
+            }
+
+            canCreateStubs = null;
+            ActivationLibrary.rmidCleanup(rmid);
+            System.err.println("rmid shut down");
+        }
     }
-    
+
     static ActivationGroupID GroupID = null;
 
     /**
-     * implementation of CanCreateStubs 
+     * implementation of CanCreateStubs
      */
     public StubClassesPermitted
-	(ActivationID id, MarshalledObject mo) throws RemoteException 
+        (ActivationID id, MarshalledObject mo) throws RemoteException
     {
-	// register/export anonymously
-	super(id, 0);
+        // register/export anonymously
+        super(id, 0);
 
-	// obtain reference to the test registry
-	registry = java.rmi.registry.LocateRegistry.
-	    getRegistry(TestLibrary.REGISTRY_PORT);
+        // obtain reference to the test registry
+        registry = java.rmi.registry.LocateRegistry.
+            getRegistry(TestLibrary.REGISTRY_PORT);
     }
-    
+
     /**
      * Spawns a thread to deactivate the object.
      */
     public void shutdown() throws Exception {
-	(new Thread(this,"StubClassesPermitted")).start();
+        (new Thread(this,"StubClassesPermitted")).start();
     }
 
     /**
@@ -209,7 +209,7 @@
      * unexport the object forcibly.
      */
     public void run() {
-	ActivationLibrary.deactivate(this, getID());
+        ActivationLibrary.deactivate(this, getID());
     }
 
     /**
@@ -217,12 +217,12 @@
      * the stub for it can be deserialized in the test client VM.
      */
     public Registry getRegistry() throws RemoteException {
-	if (sameGroup) {
-	    System.out.println("in same group");
-	} else {
-	    System.out.println("not in same group");
-	}
-	return registry;
+        if (sameGroup) {
+            System.out.println("in same group");
+        } else {
+            System.out.println("not in same group");
+        }
+        return registry;
     }
 
     /**
@@ -232,8 +232,8 @@
      * can be resolved in a remote call.
      */
     public Object getForbiddenClass() throws RemoteException {
-	System.err.println("creating sun class");
-	return new sun.security.provider.SecureRandom();
+        System.err.println("creating sun class");
+        return new sun.security.provider.SecureRandom();
     }
 
     /**
@@ -242,6 +242,6 @@
      * system implementation).
      */
     public ActivationGroupID returnGroupID() throws RemoteException {
-	return ActivationGroup.currentGroupID();
+        return ActivationGroup.currentGroupID();
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,152 +29,152 @@
     implements CanCreateStubs, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("java.lang.Object getForbiddenClass()"),
-	new java.rmi.server.Operation("java.rmi.registry.Registry getRegistry()"),
-	new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID returnGroupID()"),
-	new java.rmi.server.Operation("void shutdown()")
+        new java.rmi.server.Operation("java.lang.Object getForbiddenClass()"),
+        new java.rmi.server.Operation("java.rmi.registry.Registry getRegistry()"),
+        new java.rmi.server.Operation("java.rmi.activation.ActivationGroupID returnGroupID()"),
+        new java.rmi.server.Operation("void shutdown()")
     };
-    
+
     private static final long interfaceHash = 1677779850431817575L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_getForbiddenClass_0;
     private static java.lang.reflect.Method $method_getRegistry_1;
     private static java.lang.reflect.Method $method_returnGroupID_2;
     private static java.lang.reflect.Method $method_shutdown_3;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_getForbiddenClass_0 = CanCreateStubs.class.getMethod("getForbiddenClass", new java.lang.Class[] {});
-	    $method_getRegistry_1 = CanCreateStubs.class.getMethod("getRegistry", new java.lang.Class[] {});
-	    $method_returnGroupID_2 = CanCreateStubs.class.getMethod("returnGroupID", new java.lang.Class[] {});
-	    $method_shutdown_3 = CanCreateStubs.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_getForbiddenClass_0 = CanCreateStubs.class.getMethod("getForbiddenClass", new java.lang.Class[] {});
+            $method_getRegistry_1 = CanCreateStubs.class.getMethod("getRegistry", new java.lang.Class[] {});
+            $method_returnGroupID_2 = CanCreateStubs.class.getMethod("returnGroupID", new java.lang.Class[] {});
+            $method_shutdown_3 = CanCreateStubs.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public StubClassesPermitted_Stub() {
-	super();
+        super();
     }
     public StubClassesPermitted_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getForbiddenClass()
     public java.lang.Object getForbiddenClass()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    Object $result = ref.invoke(this, $method_getForbiddenClass_0, null, -658265783646674294L);
-	    return ((java.lang.Object) $result);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-	    ref.invoke(call);
-	    java.lang.Object $result;
-	    try {
-		java.io.ObjectInput in = call.getInputStream();
-		$result = (java.lang.Object) in.readObject();
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } catch (java.lang.ClassNotFoundException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } finally {
-		ref.done(call);
-	    }
-	    return $result;
-	}
+        if (useNewInvoke) {
+            Object $result = ref.invoke(this, $method_getForbiddenClass_0, null, -658265783646674294L);
+            return ((java.lang.Object) $result);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+            ref.invoke(call);
+            java.lang.Object $result;
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $result = (java.lang.Object) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } finally {
+                ref.done(call);
+            }
+            return $result;
+        }
     }
-    
+
     // implementation of getRegistry()
     public java.rmi.registry.Registry getRegistry()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getRegistry_1, null, 255311215504696981L);
-		return ((java.rmi.registry.Registry) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		ref.invoke(call);
-		java.rmi.registry.Registry $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.rmi.registry.Registry) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getRegistry_1, null, 255311215504696981L);
+                return ((java.rmi.registry.Registry) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                ref.invoke(call);
+                java.rmi.registry.Registry $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.registry.Registry) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of returnGroupID()
     public java.rmi.activation.ActivationGroupID returnGroupID()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_returnGroupID_2, null, 6267304638191237098L);
-		return ((java.rmi.activation.ActivationGroupID) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
-		ref.invoke(call);
-		java.rmi.activation.ActivationGroupID $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.rmi.activation.ActivationGroupID) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_returnGroupID_2, null, 6267304638191237098L);
+                return ((java.rmi.activation.ActivationGroupID) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+                ref.invoke(call);
+                java.rmi.activation.ActivationGroupID $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.activation.ActivationGroupID) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    ref.invoke(this, $method_shutdown_3, null, -7207851917985848402L);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
-	    ref.invoke(call);
-	    ref.done(call);
-	}
+        if (useNewInvoke) {
+            ref.invoke(this, $method_shutdown_3, null, -7207851917985848402L);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
+            ref.invoke(call);
+            ref.done(call);
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/ActivateMe.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/ActivateMe.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/CallbackInterface.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/CallbackInterface.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,4 +27,3 @@
     public void inc() throws RemoteException;
     public int getNumDeactivated() throws RemoteException;
 }
-
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/Callback_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/Callback_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,94 +29,94 @@
     implements CallbackInterface, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("int getNumDeactivated()"),
-	new java.rmi.server.Operation("void inc()")
+        new java.rmi.server.Operation("int getNumDeactivated()"),
+        new java.rmi.server.Operation("void inc()")
     };
-    
+
     private static final long interfaceHash = -1008194523112388035L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_getNumDeactivated_0;
     private static java.lang.reflect.Method $method_inc_1;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_getNumDeactivated_0 = CallbackInterface.class.getMethod("getNumDeactivated", new java.lang.Class[] {});
-	    $method_inc_1 = CallbackInterface.class.getMethod("inc", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_getNumDeactivated_0 = CallbackInterface.class.getMethod("getNumDeactivated", new java.lang.Class[] {});
+            $method_inc_1 = CallbackInterface.class.getMethod("inc", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public Callback_Stub() {
-	super();
+        super();
     }
     public Callback_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getNumDeactivated()
     public int getNumDeactivated()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getNumDeactivated_0, null, -761062487639949912L);
-		return ((java.lang.Integer) $result).intValue();
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		int $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = in.readInt();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getNumDeactivated_0, null, -761062487639949912L);
+                return ((java.lang.Integer) $result).intValue();
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                int $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = in.readInt();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of inc()
     public void inc()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_inc_1, null, 4394985085384332959L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_inc_1, null, 4394985085384332959L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -65,8 +65,8 @@
 }
 
 public class UnregisterGroup
-	extends Activatable
-	implements ActivateMe, Runnable
+        extends Activatable
+        implements ActivateMe, Runnable
 {
 
     private static Exception exception = null;
@@ -77,30 +77,30 @@
     private static int PORT = 2006;
 
     public UnregisterGroup(ActivationID id, MarshalledObject mobj)
-	throws Exception
+        throws Exception
     {
-	super(id, 0);
+        super(id, 0);
     }
 
     public void ping()
     {}
 
     public void unregister() throws Exception {
-	super.unregister(super.getID());
+        super.unregister(super.getID());
     }
-    
+
     /**
      * Spawns a thread to deactivate the object.
      */
     public void shutdown() throws Exception {
-	(new Thread(this,"UnregisterGroup")).start();
+        (new Thread(this,"UnregisterGroup")).start();
     }
 
     /**
      * To support exiting of group VM as a last resort
      */
     public void justGoAway() {
-	System.exit(0);
+        System.exit(0);
     }
 
     /**
@@ -111,151 +111,151 @@
      */
     public void run() {
 
-	ActivationLibrary.deactivate(this, getID());
-	System.err.println("\tActivationLibrary.deactivate returned");
+        ActivationLibrary.deactivate(this, getID());
+        System.err.println("\tActivationLibrary.deactivate returned");
 
-	try {
-	    CallbackInterface cobj =
-		(CallbackInterface)Naming.lookup("//:" + PORT + "/Callback");
-	    cobj.inc();
-	} catch (Exception e) {
-	    System.err.println("cobj.inc exception");
-	    e.printStackTrace();
-	}
+        try {
+            CallbackInterface cobj =
+                (CallbackInterface)Naming.lookup("//:" + PORT + "/Callback");
+            cobj.inc();
+        } catch (Exception e) {
+            System.err.println("cobj.inc exception");
+            e.printStackTrace();
+        }
 
     }
 
     public static void main(String[] args) {
 
-	Registry registry;
+        Registry registry;
+
+        System.err.println("\nRegression test for bug 4134233\n");
+
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+        RMID rmid = null;
+
+        try {
+            RMID.removeLog();
+            rmid = RMID.createRMID();
+            rmid.start();
 
- 	System.err.println("\nRegression test for bug 4134233\n");
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");		
-	RMID rmid = null;
-	
-	try {
-	    RMID.removeLog();
-	    rmid = RMID.createRMID();
-	    rmid.start();
+            /* Cause activation groups to have a security policy that will
+             * allow security managers to be downloaded and installed
+             */
+            final Properties p = new Properties();
+            // this test must always set policies/managers in its
+            // activation groups
+            p.put("java.security.policy",
+                  TestParams.defaultGroupPolicy);
+            p.put("java.security.manager",
+                  TestParams.defaultSecurityManager);
 
-	    /* Cause activation groups to have a security policy that will
-	     * allow security managers to be downloaded and installed
-	     */
-	    final Properties p = new Properties();
-	    // this test must always set policies/managers in its
-	    // activation groups
-	    p.put("java.security.policy", 
-		  TestParams.defaultGroupPolicy);
-	    p.put("java.security.manager", 
-		  TestParams.defaultSecurityManager);
+            //final int NUM_OBJECTS = 10;
 
-	    //final int NUM_OBJECTS = 10;
-	    
-	    Thread t = new Thread() {
-		public void run () {
-		    try {
-			System.err.println("Creating group descriptor");
-			ActivationGroupDesc groupDesc =
-			    new ActivationGroupDesc(p, null);
-			ActivationSystem system = ActivationGroup.getSystem();
-			ActivationGroupID groupID =
-			    system.registerGroup(groupDesc);
+            Thread t = new Thread() {
+                public void run () {
+                    try {
+                        System.err.println("Creating group descriptor");
+                        ActivationGroupDesc groupDesc =
+                            new ActivationGroupDesc(p, null);
+                        ActivationSystem system = ActivationGroup.getSystem();
+                        ActivationGroupID groupID =
+                            system.registerGroup(groupDesc);
 
-			ActivateMe[] obj = new ActivateMe[NUM_OBJECTS];
+                        ActivateMe[] obj = new ActivateMe[NUM_OBJECTS];
 
-			for (int i = 0; i < NUM_OBJECTS; i++) {
-			    System.err.println("Creating descriptor: " + i);
-			    ActivationDesc desc =
-				new ActivationDesc(groupID, "UnregisterGroup",
-						   null, null);
-			    System.err.println("Registering descriptor: " + i);
-			    obj[i] = (ActivateMe) Activatable.register(desc);
-			    System.err.println("Activating object: " + i);
-			    obj[i].ping();
-			}
-			lastResortExitObj = obj[0];
+                        for (int i = 0; i < NUM_OBJECTS; i++) {
+                            System.err.println("Creating descriptor: " + i);
+                            ActivationDesc desc =
+                                new ActivationDesc(groupID, "UnregisterGroup",
+                                                   null, null);
+                            System.err.println("Registering descriptor: " + i);
+                            obj[i] = (ActivateMe) Activatable.register(desc);
+                            System.err.println("Activating object: " + i);
+                            obj[i].ping();
+                        }
+                        lastResortExitObj = obj[0];
 
-			System.err.println("Unregistering group");
-			system.unregisterGroup(groupID);
+                        System.err.println("Unregistering group");
+                        system.unregisterGroup(groupID);
 
-			try {
-			    System.err.println("Get the group descriptor");
-			    system.getActivationGroupDesc(groupID);
-			    error = "test failed: group still registered";
-			} catch (UnknownGroupException e) {
-			    System.err.println("Test passed: " +
-					       "group unregistered");
-			}
+                        try {
+                            System.err.println("Get the group descriptor");
+                            system.getActivationGroupDesc(groupID);
+                            error = "test failed: group still registered";
+                        } catch (UnknownGroupException e) {
+                            System.err.println("Test passed: " +
+                                               "group unregistered");
+                        }
 
 
-			/*
-			 * Deactivate objects so group VM will exit.
-			 */
-			for (int i = 0; i < NUM_OBJECTS; i++) {
-			    System.err.println("Deactivating object: " + i);
-			    obj[i].shutdown();
-			    obj[i] = null;
-			}
-			lastResortExitObj = null;
+                        /*
+                         * Deactivate objects so group VM will exit.
+                         */
+                        for (int i = 0; i < NUM_OBJECTS; i++) {
+                            System.err.println("Deactivating object: " + i);
+                            obj[i].shutdown();
+                            obj[i] = null;
+                        }
+                        lastResortExitObj = null;
 
-		    } catch (Exception e) {
-			exception = e;
-		    }
+                    } catch (Exception e) {
+                        exception = e;
+                    }
 
-		    done = true;
-		}
-	    };
+                    done = true;
+                }
+            };
 
-	    t.start();
-	    t.join(120000);
+            t.start();
+            t.join(120000);
 
-	    if (exception != null) {
-		TestLibrary.bomb("test failed", exception);
-	    } else if (error != null) {
-		TestLibrary.bomb(error, null);
-	    } else if (!done) {
-		TestLibrary.bomb("test failed: not completed before timeout", null);
-	    } else {
-		System.err.println("Test passed");
-	    }
+            if (exception != null) {
+                TestLibrary.bomb("test failed", exception);
+            } else if (error != null) {
+                TestLibrary.bomb(error, null);
+            } else if (!done) {
+                TestLibrary.bomb("test failed: not completed before timeout", null);
+            } else {
+                System.err.println("Test passed");
+            }
+
 
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("test failed", e);
-	} finally {
-	    if (lastResortExitObj != null) {
-		try {
-		    lastResortExitObj.justGoAway();
-		} catch (Exception munch) {
-		}
-	    }
+        } catch (Exception e) {
+            TestLibrary.bomb("test failed", e);
+        } finally {
+            if (lastResortExitObj != null) {
+                try {
+                    lastResortExitObj.justGoAway();
+                } catch (Exception munch) {
+                }
+            }
 
-	    // Wait for the object deactivation to take place first
-	    try {
+            // Wait for the object deactivation to take place first
+            try {
 
- 		// create reg and export callback object
- 		registry = LocateRegistry.createRegistry(PORT);
- 		Callback robj = new Callback();
- 		registry.bind("Callback", robj);
+                // create reg and export callback object
+                registry = LocateRegistry.createRegistry(PORT);
+                Callback robj = new Callback();
+                registry.bind("Callback", robj);
 
- 		//get the callback object 
- 		int maxwait=30;
- 		int nd = robj.getNumDeactivated();
- 		while ((nd < NUM_OBJECTS) && (maxwait> 0)) {
-		    System.err.println("num_deactivated="+nd);
-		    try {
-			Thread.sleep(1000);
-		    } catch (InterruptedException ie) {}
-		    maxwait--;
-		    nd = robj.getNumDeactivated();
- 		}
-	    } catch (Exception ce) {
- 		System.err.println("E:"+ce);
- 		ce.printStackTrace();
-	    }
+                //get the callback object
+                int maxwait=30;
+                int nd = robj.getNumDeactivated();
+                while ((nd < NUM_OBJECTS) && (maxwait> 0)) {
+                    System.err.println("num_deactivated="+nd);
+                    try {
+                        Thread.sleep(1000);
+                    } catch (InterruptedException ie) {}
+                    maxwait--;
+                    nd = robj.getNumDeactivated();
+                }
+            } catch (Exception ce) {
+                System.err.println("E:"+ce);
+                ce.printStackTrace();
+            }
 
-	    ActivationLibrary.rmidCleanup(rmid);
-	}
+            ActivationLibrary.rmidCleanup(rmid);
+        }
     }
 }
--- a/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/activation/ActivationSystem/unregisterGroup/UnregisterGroup_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,116 +29,116 @@
     implements ActivateMe, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("void justGoAway()"),
-	new java.rmi.server.Operation("void ping()"),
-	new java.rmi.server.Operation("void shutdown()"),
-	new java.rmi.server.Operation("void unregister()")
+        new java.rmi.server.Operation("void justGoAway()"),
+        new java.rmi.server.Operation("void ping()"),
+        new java.rmi.server.Operation("void shutdown()"),
+        new java.rmi.server.Operation("void unregister()")
     };
-    
+
     private static final long interfaceHash = -4733924075192691630L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_justGoAway_0;
     private static java.lang.reflect.Method $method_ping_1;
     private static java.lang.reflect.Method $method_shutdown_2;
     private static java.lang.reflect.Method $method_unregister_3;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_justGoAway_0 = ActivateMe.class.getMethod("justGoAway", new java.lang.Class[] {});
-	    $method_ping_1 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {});
-	    $method_shutdown_2 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
-	    $method_unregister_3 = ActivateMe.class.getMethod("unregister", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_justGoAway_0 = ActivateMe.class.getMethod("justGoAway", new java.lang.Class[] {});
+            $method_ping_1 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {});
+            $method_shutdown_2 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {});
+            $method_unregister_3 = ActivateMe.class.getMethod("unregister", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public UnregisterGroup_Stub() {
-	super();
+        super();
     }
     public UnregisterGroup_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of justGoAway()
     public void justGoAway()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_justGoAway_0, null, -5382478058620783904L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_justGoAway_0, null, -5382478058620783904L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of ping()
     public void ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_ping_1, null, 5866401369815527589L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_ping_1, null, 5866401369815527589L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    ref.invoke(this, $method_shutdown_2, null, -7207851917985848402L);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
-	    ref.invoke(call);
-	    ref.done(call);
-	}
+        if (useNewInvoke) {
+            ref.invoke(this, $method_shutdown_2, null, -7207851917985848402L);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+            ref.invoke(call);
+            ref.done(call);
+        }
     }
-    
+
     // implementation of unregister()
     public void unregister()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	if (useNewInvoke) {
-	    ref.invoke(this, $method_unregister_3, null, -5366864281862648102L);
-	} else {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
-	    ref.invoke(call);
-	    ref.done(call);
-	}
+        if (useNewInvoke) {
+            ref.invoke(this, $method_unregister_3, null, -5366864281862648102L);
+        } else {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
+            ref.invoke(call);
+            ref.done(call);
+        }
     }
 }
--- a/jdk/test/java/rmi/dgc/VMID/CheckVMID.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/VMID/CheckVMID.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,17 +41,17 @@
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4171370\n");
+        System.err.println("\nRegression test for bug 4171370\n");
 
-	TestLibrary.suggestSecurityManager(null);
+        TestLibrary.suggestSecurityManager(null);
 
-	try {
-	    System.err.println("Create a VMID");
-	    VMID vmid = new VMID();
-	    System.err.println("vmid = " + vmid);
-	} catch (Exception e) {
-	    e.printStackTrace();
-	    throw new RuntimeException("TEST FAILED: " + e.toString());
-	}
+        try {
+            System.err.println("Create a VMID");
+            VMID vmid = new VMID();
+            System.err.println("vmid = " + vmid);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("TEST FAILED: " + e.toString());
+        }
     }
 }
--- a/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -51,123 +51,123 @@
     private static final long TIMEOUT = 20000;
 
     public Object returnRemote() {
-	return new Wrapper(this);
+        return new Wrapper(this);
     }
 
     public static void main(String[] args) throws Exception {
 
-	System.setProperty("sun.rmi.dgc.ackTimeout", "10000");
+        System.setProperty("sun.rmi.dgc.ackTimeout", "10000");
 
-	/*
-	 * Set a socket factory that has a hook for shutting down all client
-	 * output (writes from client-created sockets and new connection
-	 * attempts).  We then use this hook right before a remote stub gets
-	 * deserialized, so that the client will not be able to send a DGC
-	 * dirty call, or a DGC acknowledgment.  Without the DGC ack, we
-	 * hope that the RMI runtime will still eventually allow the remote
-	 * object to be garbage collected.
-	 */
-	RMISocketFactory.setSocketFactory(new TestSF());
-	System.err.println("test socket factory set");
+        /*
+         * Set a socket factory that has a hook for shutting down all client
+         * output (writes from client-created sockets and new connection
+         * attempts).  We then use this hook right before a remote stub gets
+         * deserialized, so that the client will not be able to send a DGC
+         * dirty call, or a DGC acknowledgment.  Without the DGC ack, we
+         * hope that the RMI runtime will still eventually allow the remote
+         * object to be garbage collected.
+         */
+        RMISocketFactory.setSocketFactory(new TestSF());
+        System.err.println("test socket factory set");
 
-	Remote impl = new DGCAckFailure();
-	ReferenceQueue refQueue = new ReferenceQueue();
-	Reference weakRef = new WeakReference(impl, refQueue);
-	ReturnRemote stub =
-	    (ReturnRemote) UnicastRemoteObject.exportObject(impl);
-	System.err.println("remote object exported; stub = " + stub);
+        Remote impl = new DGCAckFailure();
+        ReferenceQueue refQueue = new ReferenceQueue();
+        Reference weakRef = new WeakReference(impl, refQueue);
+        ReturnRemote stub =
+            (ReturnRemote) UnicastRemoteObject.exportObject(impl);
+        System.err.println("remote object exported; stub = " + stub);
 
-	try {
-	    Object wrappedStub = stub.returnRemote();
-	    System.err.println("invocation returned: " + wrappedStub);
+        try {
+            Object wrappedStub = stub.returnRemote();
+            System.err.println("invocation returned: " + wrappedStub);
 
-	    impl = null;
-	    stub = null;	// in case 4114579 ever gets fixed
-	    System.err.println("strong references to impl cleared");
+            impl = null;
+            stub = null;        // in case 4114579 ever gets fixed
+            System.err.println("strong references to impl cleared");
 
-	    System.err.println("waiting for weak reference notification:");
-	    Reference ref = null;
-	    for (int i = 0; i < 6; i++) {
-		System.gc();
-		ref = refQueue.remove(TIMEOUT / 5);
-		if (ref != null) {
-		    break;
-		}
-	    }
-	    if (ref == weakRef) {
-		System.err.println("TEST PASSED");
-	    } else {
-		throw new RuntimeException("TEST FAILED: " +
-		    "timed out, remote object not garbage collected");
-	    }
-	} finally {
-	    try {
-		UnicastRemoteObject.unexportObject((Remote) weakRef.get(),
-						   true);
-	    } catch (Exception e) {
-	    }
-	}
+            System.err.println("waiting for weak reference notification:");
+            Reference ref = null;
+            for (int i = 0; i < 6; i++) {
+                System.gc();
+                ref = refQueue.remove(TIMEOUT / 5);
+                if (ref != null) {
+                    break;
+                }
+            }
+            if (ref == weakRef) {
+                System.err.println("TEST PASSED");
+            } else {
+                throw new RuntimeException("TEST FAILED: " +
+                    "timed out, remote object not garbage collected");
+            }
+        } finally {
+            try {
+                UnicastRemoteObject.unexportObject((Remote) weakRef.get(),
+                                                   true);
+            } catch (Exception e) {
+            }
+        }
     }
 
     private static class Wrapper implements Serializable {
-	private final Remote obj;
-	Wrapper(Remote obj) { this.obj = obj; }
+        private final Remote obj;
+        Wrapper(Remote obj) { this.obj = obj; }
 
-	private void readObject(ObjectInputStream in)
-	    throws IOException, ClassNotFoundException
-	{
-	    TestSF.shutdownClientOutput();
-	    System.err.println(
-		"Wrapper.readObject: SHUTTING DOWN CLIENT OUTPUT");
-	    in.defaultReadObject();
-	}
+        private void readObject(ObjectInputStream in)
+            throws IOException, ClassNotFoundException
+        {
+            TestSF.shutdownClientOutput();
+            System.err.println(
+                "Wrapper.readObject: SHUTTING DOWN CLIENT OUTPUT");
+            in.defaultReadObject();
+        }
 
-	public String toString() { return "Wrapper[" + obj + "]"; }
+        public String toString() { return "Wrapper[" + obj + "]"; }
     }
 
     private static class TestSF extends RMISocketFactory {
 
-	private static volatile boolean shutdown = false;
-	static void shutdownClientOutput() { shutdown = true; }
+        private static volatile boolean shutdown = false;
+        static void shutdownClientOutput() { shutdown = true; }
 
-	public Socket createSocket(String host, int port) throws IOException {
-	    if (shutdown) {
-		IOException e = new java.net.ConnectException(
-		    "test socket factory rejecting client connection");
-		System.err.println(e);
-//		e.printStackTrace();
-		throw e;
-	    } else {
-		return new TestSocket(host, port);
-	    }
-	}
+        public Socket createSocket(String host, int port) throws IOException {
+            if (shutdown) {
+                IOException e = new java.net.ConnectException(
+                    "test socket factory rejecting client connection");
+                System.err.println(e);
+//              e.printStackTrace();
+                throw e;
+            } else {
+                return new TestSocket(host, port);
+            }
+        }
 
-	public ServerSocket createServerSocket(int port) throws IOException {
-	    return new ServerSocket(port);
-	}
+        public ServerSocket createServerSocket(int port) throws IOException {
+            return new ServerSocket(port);
+        }
 
-	private static class TestSocket extends Socket {
-	    TestSocket(String host, int port) throws IOException {
-		super(host, port);
-	    }
-	    public OutputStream getOutputStream() throws IOException {
-		return new TestOutputStream(super.getOutputStream());
-	    }
-	}
+        private static class TestSocket extends Socket {
+            TestSocket(String host, int port) throws IOException {
+                super(host, port);
+            }
+            public OutputStream getOutputStream() throws IOException {
+                return new TestOutputStream(super.getOutputStream());
+            }
+        }
 
-	private static class TestOutputStream extends FilterOutputStream {
-	    TestOutputStream(OutputStream out) { super(out); }
-	    public void write(int b) throws IOException {
-		if (shutdown) {
-		    IOException e = new IOException(
-			"connection broken by test socket factory");
-		    System.err.println(e);
-//		    e.printStackTrace();
-		    throw e;
-		} else {
-		    super.write(b);
-		}
-	    }
-	}
+        private static class TestOutputStream extends FilterOutputStream {
+            TestOutputStream(OutputStream out) { super(out); }
+            public void write(int b) throws IOException {
+                if (shutdown) {
+                    IOException e = new IOException(
+                        "connection broken by test socket factory");
+                    System.err.println(e);
+//                  e.printStackTrace();
+                    throw e;
+                } else {
+                    super.write(b);
+                }
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/dgcAckFailure/DGCAckFailure_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,38 +29,38 @@
     implements ReturnRemote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_returnRemote_0;
-    
+
     static {
-	try {
-	    $method_returnRemote_0 = ReturnRemote.class.getMethod("returnRemote", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_returnRemote_0 = ReturnRemote.class.getMethod("returnRemote", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public DGCAckFailure_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of returnRemote()
     public java.lang.Object returnRemote()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_returnRemote_0, null, -8981544221566403070L);
-	    return ((java.lang.Object) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_returnRemote_0, null, -8981544221566403070L);
+            return ((java.lang.Object) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -57,55 +57,55 @@
 
     public static void main(String[] args) throws Exception {
 
-	TestLibrary.suggestSecurityManager(null);
+        TestLibrary.suggestSecurityManager(null);
 
-	Permissions perms = new Permissions();
-	perms.add(new SocketPermission("*:1024-", "listen"));
-	AccessControlContext acc =
-	    new AccessControlContext(new ProtectionDomain[] {
-		new ProtectionDomain(
-		    new CodeSource(null, (Certificate[]) null), perms) });
+        Permissions perms = new Permissions();
+        perms.add(new SocketPermission("*:1024-", "listen"));
+        AccessControlContext acc =
+            new AccessControlContext(new ProtectionDomain[] {
+                new ProtectionDomain(
+                    new CodeSource(null, (Certificate[]) null), perms) });
 
-	Remote impl = new DGCImplInsulation();;
+        Remote impl = new DGCImplInsulation();;
 
-	try {
-	    Remote stub = (Remote) java.security.AccessController.doPrivileged(
-		new ExportAction(impl));
-	    System.err.println("exported remote object; local stub: " + stub);
+        try {
+            Remote stub = (Remote) java.security.AccessController.doPrivileged(
+                new ExportAction(impl));
+            System.err.println("exported remote object; local stub: " + stub);
 
-	    MarshalledObject mobj = new MarshalledObject(stub);
-	    stub = (Remote) mobj.get();
-	    System.err.println("marshalled/unmarshalled stub: " + stub);
+            MarshalledObject mobj = new MarshalledObject(stub);
+            stub = (Remote) mobj.get();
+            System.err.println("marshalled/unmarshalled stub: " + stub);
 
-	    ReferenceQueue refQueue = new ReferenceQueue();
-	    Reference weakRef = new WeakReference(impl, refQueue);
-	    impl = null;
-	    System.gc();
-	    if (refQueue.remove(TIMEOUT) == weakRef) {
-		throw new RuntimeException(
-		    "TEST FAILED: remote object garbage collected");
-	    } else {
-		System.err.println("TEST PASSED");
-		stub = null;
-		System.gc();
-		Thread.sleep(2000);
-		System.gc();
-	    }
-	} finally {
-	    try {
-		UnicastRemoteObject.unexportObject(impl, true);
-	    } catch (Exception e) {
-	    }
-	}
+            ReferenceQueue refQueue = new ReferenceQueue();
+            Reference weakRef = new WeakReference(impl, refQueue);
+            impl = null;
+            System.gc();
+            if (refQueue.remove(TIMEOUT) == weakRef) {
+                throw new RuntimeException(
+                    "TEST FAILED: remote object garbage collected");
+            } else {
+                System.err.println("TEST PASSED");
+                stub = null;
+                System.gc();
+                Thread.sleep(2000);
+                System.gc();
+            }
+        } finally {
+            try {
+                UnicastRemoteObject.unexportObject(impl, true);
+            } catch (Exception e) {
+            }
+        }
     }
 
     private static class ExportAction implements PrivilegedExceptionAction {
-	private final Remote impl;
-	ExportAction(Remote impl) {
-	    this.impl = impl;
-	}
-	public Object run() throws Exception {
-	    return UnicastRemoteObject.exportObject(impl);
-	}
+        private final Remote impl;
+        ExportAction(Remote impl) {
+            this.impl = impl;
+        }
+        public Object run() throws Exception {
+            return UnicastRemoteObject.exportObject(impl);
+        }
     }
 }
--- a/jdk/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public DGCImplInsulation_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -55,108 +55,108 @@
      * Return this object.  The need for this method is explained below.
      */
     public Self getSelf() {
-	return this;
+        return this;
     }
 
     public void unreferenced() {
-	synchronized (this) {
-	    unreferenced = true;
-	    notifyAll();
-	}
+        synchronized (this) {
+            unreferenced = true;
+            notifyAll();
+        }
     }
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4268258\n");
+        System.err.println("\nRegression test for bug 4268258\n");
 
-	/*
-	 * Set properties to tweak DGC behavior so that this test will execute
-	 * quickly: set the granted lease duration to 10 seconds, the interval
-	 * that leases are checked to 3 seconds.
-	 */
-	System.setProperty("java.rmi.dgc.leaseValue", "10000");
-	System.setProperty("sun.rmi.dgc.checkInterval", "3000");
+        /*
+         * Set properties to tweak DGC behavior so that this test will execute
+         * quickly: set the granted lease duration to 10 seconds, the interval
+         * that leases are checked to 3 seconds.
+         */
+        System.setProperty("java.rmi.dgc.leaseValue", "10000");
+        System.setProperty("sun.rmi.dgc.checkInterval", "3000");
 
-	/*
-	 * Make idle connections time out almost instantly (0.1 seconds) so
-	 * that the DGC implementation will have to make a new connection for
-	 * each dirty call, thus going through the socket factory, where we
-	 * can easily cause the operation to fail.
-	 */
-	System.setProperty("sun.rmi.transport.connectionTimeout", "100");
+        /*
+         * Make idle connections time out almost instantly (0.1 seconds) so
+         * that the DGC implementation will have to make a new connection for
+         * each dirty call, thus going through the socket factory, where we
+         * can easily cause the operation to fail.
+         */
+        System.setProperty("sun.rmi.transport.connectionTimeout", "100");
 
-	RetryDirtyCalls impl = new RetryDirtyCalls();
+        RetryDirtyCalls impl = new RetryDirtyCalls();
 
-	try {
-	    TestSF sf = new TestSF();
-	    RMISocketFactory.setSocketFactory(sf);
+        try {
+            TestSF sf = new TestSF();
+            RMISocketFactory.setSocketFactory(sf);
 
-	    /*
-	     * The stub returned by UnicastRemoteObject.exportObject() does
-	     * not participate in DGC, but it does allow us to invoke a method
-	     * on the remote object through RMI.  Therefore, we invoke the
-	     * getSelf() method through RMI, which returns an equivalent stub
-	     * that does participate in DGC.
-	     */
-	    Self stub = (Self) UnicastRemoteObject.exportObject(impl);
-	    Self dgcStub = stub.getSelf();
-	    stub = null;		// in case 4114579 has been fixed
+            /*
+             * The stub returned by UnicastRemoteObject.exportObject() does
+             * not participate in DGC, but it does allow us to invoke a method
+             * on the remote object through RMI.  Therefore, we invoke the
+             * getSelf() method through RMI, which returns an equivalent stub
+             * that does participate in DGC.
+             */
+            Self stub = (Self) UnicastRemoteObject.exportObject(impl);
+            Self dgcStub = stub.getSelf();
+            stub = null;                // in case 4114579 has been fixed
 
-	    /*
-	     * Set the socket factory to cause 3 connections attempts in a row
-	     * to fail before allowing a connection to succeed, expecting the
-	     * client-side DGC implementation to make at least four attempts.
-	     */
-	    final int FLAKE_FACTOR = 3;
-	    sf.setFlakeFactor(FLAKE_FACTOR);
+            /*
+             * Set the socket factory to cause 3 connections attempts in a row
+             * to fail before allowing a connection to succeed, expecting the
+             * client-side DGC implementation to make at least four attempts.
+             */
+            final int FLAKE_FACTOR = 3;
+            sf.setFlakeFactor(FLAKE_FACTOR);
 
-	    long deadline = System.currentTimeMillis() + TIMEOUT;
-	    boolean unreferenced;
+            long deadline = System.currentTimeMillis() + TIMEOUT;
+            boolean unreferenced;
 
-	    synchronized (impl) {
-		while (!(unreferenced = impl.unreferenced)) {
-		    long timeToWait = deadline - System.currentTimeMillis();
-		    if (timeToWait > 0) {
-			impl.wait(timeToWait);
-		    } else {
-			break;
-		    }
-		}
-	    }
+            synchronized (impl) {
+                while (!(unreferenced = impl.unreferenced)) {
+                    long timeToWait = deadline - System.currentTimeMillis();
+                    if (timeToWait > 0) {
+                        impl.wait(timeToWait);
+                    } else {
+                        break;
+                    }
+                }
+            }
 
-	    if (unreferenced) {
-		throw new RuntimeException("remote object unreferenced");
-	    }
+            if (unreferenced) {
+                throw new RuntimeException("remote object unreferenced");
+            }
 
-	    int createCount = sf.getCreateCount();
-	    if (createCount == 0) {
-		throw new RuntimeException("test socket factory never used");
-	    } else if (createCount < (FLAKE_FACTOR + 3)) {
-		/*
-		 * The unreferenced method was not invoked for some reason,
-		 * but the dirty calls were clearly not retried well enough.
-		 */
-		throw new RuntimeException(
-		    "test failed because dirty calls not retried enough, " +
-		    "but remote object not unreferenced");
-	    }
+            int createCount = sf.getCreateCount();
+            if (createCount == 0) {
+                throw new RuntimeException("test socket factory never used");
+            } else if (createCount < (FLAKE_FACTOR + 3)) {
+                /*
+                 * The unreferenced method was not invoked for some reason,
+                 * but the dirty calls were clearly not retried well enough.
+                 */
+                throw new RuntimeException(
+                    "test failed because dirty calls not retried enough, " +
+                    "but remote object not unreferenced");
+            }
 
-	    System.err.println(
-		"TEST PASSED: remote object not unreferenced");
+            System.err.println(
+                "TEST PASSED: remote object not unreferenced");
 
-	} catch (Exception e) {
-	    e.printStackTrace();
-	    throw new RuntimeException("TEST FAILED: " + e.toString());
-	} finally {
-	    /*
-	     * When all is said and done, try to unexport the remote object
-	     * so that the VM has a chance to exit.
-	     */
-	    try {
-		UnicastRemoteObject.unexportObject(impl, true);
-	    } catch (Exception e) {
-	    }
-	}
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("TEST FAILED: " + e.toString());
+        } finally {
+            /*
+             * When all is said and done, try to unexport the remote object
+             * so that the VM has a chance to exit.
+             */
+            try {
+                UnicastRemoteObject.unexportObject(impl, true);
+            } catch (Exception e) {
+            }
+        }
     }
 }
 
@@ -169,30 +169,30 @@
     private int createCount = 0;
 
     public synchronized void setFlakeFactor(int newFlakeFactor) {
-	flakeFactor = newFlakeFactor;
+        flakeFactor = newFlakeFactor;
     }
 
     public synchronized int getCreateCount() {
-	return createCount;
+        return createCount;
     }
 
     public synchronized Socket createSocket(String host, int port)
-	throws IOException
+        throws IOException
     {
-	createCount++;
+        createCount++;
 
-	if (++flakeState > flakeFactor) {
-	    flakeState = 0;
-	}
+        if (++flakeState > flakeFactor) {
+            flakeState = 0;
+        }
 
-	if (flakeState == 0) {
-	    return new Socket(host, port);
-	} else {
-	    throw new IOException("random network failure");
-	}
+        if (flakeState == 0) {
+            return new Socket(host, port);
+        } else {
+            throw new IOException("random network failure");
+        }
     }
 
     public ServerSocket createServerSocket(int port) throws IOException {
-	return new ServerSocket(port);
+        return new ServerSocket(port);
     }
 }
--- a/jdk/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/dgc/retryDirtyCalls/RetryDirtyCalls_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,38 +29,38 @@
     implements Self
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_getSelf_0;
-    
+
     static {
-	try {
-	    $method_getSelf_0 = Self.class.getMethod("getSelf", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_getSelf_0 = Self.class.getMethod("getSelf", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public RetryDirtyCalls_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getSelf()
     public Self getSelf()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_getSelf_0, null, 2868857108246021904L);
-	    return ((Self) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_getSelf_0, null, 2868857108246021904L);
+            return ((Self) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/registry/altSecurityManager/AltSecurityManager.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/altSecurityManager/AltSecurityManager.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,8 +26,8 @@
  * @summary rmid and rmiregistry could allow alternate security manager
  * @author Laird Dornin
  *
- * @library ../../testlibrary 
- * @build StreamPipe TestParams TestLibrary JavaVM 
+ * @library ../../testlibrary
+ * @build StreamPipe TestParams TestLibrary JavaVM
  * @build AltSecurityManager TestSecurityManager
  * @run main/othervm AltSecurityManager
  */
@@ -38,7 +38,7 @@
  * that throws a runtime exception in its checkListen method, this
  * will cause rmiregistry and rmid to exit early because those
  * utilities will be unable to export any remote objects; test fails
- * if registry and rmid take too long to exit. 
+ * if registry and rmid take too long to exit.
  */
 public class AltSecurityManager implements Runnable {
 
@@ -54,74 +54,74 @@
     static long TIME_OUT = 15000;
 
     public void run() {
-	try {
-	    vm = new JavaVM(utilityToStart,
-			    " -Djava.security.manager=TestSecurityManager",
-			    "");
-	    System.err.println("starting " + utilityToStart);
-	    vm.start();
-	    vm.getVM().waitFor();
+        try {
+            vm = new JavaVM(utilityToStart,
+                            " -Djava.security.manager=TestSecurityManager",
+                            "");
+            System.err.println("starting " + utilityToStart);
+            vm.start();
+            vm.getVM().waitFor();
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        }
     }
-    
+
     /**
      * Wait to make sure that the registry and rmid exit after
      * their security manager is set.
      */
     public static void ensureExit(String utility) throws Exception {
-	utilityToStart = utility;
-	
-	try {
-	    Thread thread = new Thread(new AltSecurityManager());
-	    System.err.println("expecting RuntimeException for " + 
-			       "checkListen in child process");
-	    long start = System.currentTimeMillis();
-	    thread.start();
-	    thread.join(TIME_OUT);
-	    
-	    long time = System.currentTimeMillis() - start;
-	    System.err.println("waited " + time + " millis for " + 
-			       utilityToStart + " to die");
+        utilityToStart = utility;
 
-	    if (time >= TIME_OUT) {
-		
-		// dont pollute other tests; increase the likelihood 
+        try {
+            Thread thread = new Thread(new AltSecurityManager());
+            System.err.println("expecting RuntimeException for " +
+                               "checkListen in child process");
+            long start = System.currentTimeMillis();
+            thread.start();
+            thread.join(TIME_OUT);
+
+            long time = System.currentTimeMillis() - start;
+            System.err.println("waited " + time + " millis for " +
+                               utilityToStart + " to die");
+
+            if (time >= TIME_OUT) {
+
+                // dont pollute other tests; increase the likelihood
                 // that rmid will go away if it did not exit already.
-		if (utility.equals(rmid)) {
-		    RMID.shutdown();
-		}
-		
-		TestLibrary.bomb(utilityToStart + 
-				 " took too long to die...");
-	    } else {
-		System.err.println(utilityToStart + 
-				   " terminated on time");
-	    }
-	} finally {
-	    vm.destroy();
-	    vm = null;
-	}
+                if (utility.equals(rmid)) {
+                    RMID.shutdown();
+                }
+
+                TestLibrary.bomb(utilityToStart +
+                                 " took too long to die...");
+            } else {
+                System.err.println(utilityToStart +
+                                   " terminated on time");
+            }
+        } finally {
+            vm.destroy();
+            vm = null;
+        }
     }
-    
+
     public static void main(String[] args) {
-	try {
-	    System.err.println("\nRegression test for bug 4183202\n");
+        try {
+            System.err.println("\nRegression test for bug 4183202\n");
 
-	    // make sure the registry exits early.
-	    ensureExit(registry);
+            // make sure the registry exits early.
+            ensureExit(registry);
 
-	    // make sure rmid exits early
-	    ensureExit(rmid);
+            // make sure rmid exits early
+            ensureExit(rmid);
 
-	    System.err.println("test passed");
+            System.err.println("test passed");
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    RMID.removeLog();
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            RMID.removeLog();
+        }
     }
 }
--- a/jdk/test/java/rmi/registry/altSecurityManager/TestSecurityManager.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/altSecurityManager/TestSecurityManager.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,18 +28,18 @@
     }
 
     public void checkListen(int port) {
-	// 4269910: ok, now rmid and the regsitry will *really* go
-	// away...
-	//
-	// rmid and the registry need to listen on sockets so they
-	// will exit when they try to do so... this is used as a sign
-	// by the main test process to detect that the proper security
-	// manager has been installed in the relevant VMs.
-	//
-	System.exit(1);
+        // 4269910: ok, now rmid and the regsitry will *really* go
+        // away...
+        //
+        // rmid and the registry need to listen on sockets so they
+        // will exit when they try to do so... this is used as a sign
+        // by the main test process to detect that the proper security
+        // manager has been installed in the relevant VMs.
+        //
+        System.exit(1);
     }
 
     public void checkExit(int status) {
-	// permit check exit for all code
+        // permit check exit for all code
     }
 }
--- a/jdk/test/java/rmi/registry/checkusage/CheckUsage.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/checkusage/CheckUsage.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,48 +36,48 @@
 /**
  * Make sure that the rmiregistry prints out a correct usage statement
  * when run with an incorrect command line; test written to conform to
- * new tighter bug fix/regression test guidelines.  
+ * new tighter bug fix/regression test guidelines.
  */
 public class CheckUsage {
     public static void main(String[] args) {
 
-	System.err.println("\nregression test for 4151966\n");
+        System.err.println("\nregression test for 4151966\n");
+
+        JavaVM registryVM = null;
 
-	JavaVM registryVM = null;
+        try {
+            // make sure the registry exits with a proper usage statement
+            ByteArrayOutputStream berr = new ByteArrayOutputStream();
+
+            // run a VM to start the registry
+            registryVM = new JavaVM("sun.rmi.registry.RegistryImpl",
+                                    "", "foo",
+                                    System.out, berr);
+            System.err.println("starting registry");
+            registryVM.start();
 
-	try {
-	    // make sure the registry exits with a proper usage statement
-	    ByteArrayOutputStream berr = new ByteArrayOutputStream();
-	    
-	    // run a VM to start the registry
-	    registryVM = new JavaVM("sun.rmi.registry.RegistryImpl", 
-				    "", "foo", 
-				    System.out, berr);
-	    System.err.println("starting registry");
-	    registryVM.start();
-	    
-	    // wait for registry exit
-	    System.err.println(" registry exited with status: " + 
-			       registryVM.getVM().waitFor());
-	    try {
-		Thread.sleep(7000);
-	    } catch (InterruptedException ie) {
-	    }
-	    
-	    String usage = new String(berr.toByteArray());
-	    
-	    System.err.println("rmiregistry usage: " + usage);
-	    
-	    if (usage.indexOf("-J") < 0) {
-		TestLibrary.bomb("rmiregistry has incorrect usage statement");
-	    } else {
-		System.err.println("test passed");
-	    }
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    registryVM.destroy();
-	    registryVM = null;
-	}
+            // wait for registry exit
+            System.err.println(" registry exited with status: " +
+                               registryVM.getVM().waitFor());
+            try {
+                Thread.sleep(7000);
+            } catch (InterruptedException ie) {
+            }
+
+            String usage = new String(berr.toByteArray());
+
+            System.err.println("rmiregistry usage: " + usage);
+
+            if (usage.indexOf("-J") < 0) {
+                TestLibrary.bomb("rmiregistry has incorrect usage statement");
+            } else {
+                System.err.println("test passed");
+            }
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            registryVM.destroy();
+            registryVM = null;
+        }
     }
 }
--- a/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -55,121 +55,121 @@
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4242317\n");
+        System.err.println("\nRegression test for bug 4242317\n");
 
-	TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
+        TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
 
-	Process rmiregistry = null;
+        Process rmiregistry = null;
 
-	try {
-	    /*
-	     * Install a dummy class in two codebases: one that will be in
-	     * the rmiregistry's CLASSPATH (the "import" codebase) and one
-	     * that will be in the rmiregistry's "java.rmi.server.codebase"
-	     * property (the "export" codebase).
-	     */
-	    URL importCodebaseURL = TestLibrary.installClassInCodebase(
-		dummyClassName, importCodebase, false);
-	    URL exportCodebaseURL = TestLibrary.installClassInCodebase(
-		dummyClassName, exportCodebase, true);
+        try {
+            /*
+             * Install a dummy class in two codebases: one that will be in
+             * the rmiregistry's CLASSPATH (the "import" codebase) and one
+             * that will be in the rmiregistry's "java.rmi.server.codebase"
+             * property (the "export" codebase).
+             */
+            URL importCodebaseURL = TestLibrary.installClassInCodebase(
+                dummyClassName, importCodebase, false);
+            URL exportCodebaseURL = TestLibrary.installClassInCodebase(
+                dummyClassName, exportCodebase, true);
 
-	    /*
-	     * Spawn an rmiregistry in the "import" codebase directory.
-	     */
-	    File rmiregistryDir =
-		new File(System.getProperty("user.dir", "."), importCodebase);
+            /*
+             * Spawn an rmiregistry in the "import" codebase directory.
+             */
+            File rmiregistryDir =
+                new File(System.getProperty("user.dir", "."), importCodebase);
+
+            String rmiregistryCommand =
+                System.getProperty("java.home") + File.separator +
+                "bin" + File.separator + "rmiregistry";
 
-	    String rmiregistryCommand =
-		System.getProperty("java.home") + File.separator +
-		"bin" + File.separator + "rmiregistry";
-	    
-	    String cmdarray[] = new String[] {
-		rmiregistryCommand,
-		"-J-Denv.class.path=.",
-		"-J-Djava.rmi.server.codebase=" + exportCodebaseURL,
-		Integer.toString(TestLibrary.REGISTRY_PORT) };
+            String cmdarray[] = new String[] {
+                rmiregistryCommand,
+                "-J-Denv.class.path=.",
+                "-J-Djava.rmi.server.codebase=" + exportCodebaseURL,
+                Integer.toString(TestLibrary.REGISTRY_PORT) };
 
-	    System.err.println("\nCommand used to spawn rmiregistry process:");
-	    System.err.println("\t" + Arrays.asList(cmdarray).toString());
+            System.err.println("\nCommand used to spawn rmiregistry process:");
+            System.err.println("\t" + Arrays.asList(cmdarray).toString());
 
-	    rmiregistry = Runtime.getRuntime().exec(cmdarray, null, rmiregistryDir);
+            rmiregistry = Runtime.getRuntime().exec(cmdarray, null, rmiregistryDir);
+
+            // pipe rmiregistry output to our output, for debugging failures
+            StreamPipe.plugTogether(rmiregistry.getInputStream(), System.err);
+            StreamPipe.plugTogether(rmiregistry.getErrorStream(), System.err);
 
-	    // pipe rmiregistry output to our output, for debugging failures
-	    StreamPipe.plugTogether(rmiregistry.getInputStream(), System.err);
-	    StreamPipe.plugTogether(rmiregistry.getErrorStream(), System.err);
+            /*
+             * Wait for the registry to initialize and be ready to call.
+             */
+            Thread.sleep(REGISTRY_WAIT);
+            System.err.println();
 
-	    /*
-	     * Wait for the registry to initialize and be ready to call.
-	     */
-	    Thread.sleep(REGISTRY_WAIT);
-	    System.err.println();
-
-	    /*
-	     * Create an instance of the dummy class, finding it from the
-	     * "import" codebase.
-	     */
-	    ClassLoader loader = URLClassLoader.newInstance(
-		new URL[] { importCodebaseURL });
-	    Class dummyClass = Class.forName(dummyClassName, false, loader);
-	    Remote dummyObject = (Remote) dummyClass.newInstance();
+            /*
+             * Create an instance of the dummy class, finding it from the
+             * "import" codebase.
+             */
+            ClassLoader loader = URLClassLoader.newInstance(
+                new URL[] { importCodebaseURL });
+            Class dummyClass = Class.forName(dummyClassName, false, loader);
+            Remote dummyObject = (Remote) dummyClass.newInstance();
 
-	    /*
-	     * Find the registry that we created and bind the
-	     * dummy object to it.
-	     */
-	    Registry registry = LocateRegistry.getRegistry(
-		"localhost", TestLibrary.REGISTRY_PORT);
+            /*
+             * Find the registry that we created and bind the
+             * dummy object to it.
+             */
+            Registry registry = LocateRegistry.getRegistry(
+                "localhost", TestLibrary.REGISTRY_PORT);
 
-	    try {
-		registry.bind(dummyBinding, dummyObject);
-		System.err.println("Bound dummy object in registry");
-	    } catch (java.rmi.ConnectException e) {
-		System.err.println("Error: rmiregistry not started in time");
-		throw e;
-	    } catch (ServerException e) {
-		if (e.detail instanceof UnmarshalException &&
-		    ((UnmarshalException) e.detail).detail instanceof
-			ClassNotFoundException)
-		{
-		    System.err.println(
-			"Error: another registry running on port " +
-			TestLibrary.REGISTRY_PORT + "?");
-		}
-		throw e;
-	    }
+            try {
+                registry.bind(dummyBinding, dummyObject);
+                System.err.println("Bound dummy object in registry");
+            } catch (java.rmi.ConnectException e) {
+                System.err.println("Error: rmiregistry not started in time");
+                throw e;
+            } catch (ServerException e) {
+                if (e.detail instanceof UnmarshalException &&
+                    ((UnmarshalException) e.detail).detail instanceof
+                        ClassNotFoundException)
+                {
+                    System.err.println(
+                        "Error: another registry running on port " +
+                        TestLibrary.REGISTRY_PORT + "?");
+                }
+                throw e;
+            }
 
-	    /*
-	     * Look up the dummy object from our registry and make sure
-	     * that its class was annotated with the "export" codebase.
-	     */
-	    Remote dummyLookup = registry.lookup(dummyBinding);
-	    System.err.println(
-		"Looked up dummy object from registry: " + dummyLookup);
-	    Class dummyLookupClass = dummyLookup.getClass();
-	    String dummyLookupAnnotation =
-		RMIClassLoader.getClassAnnotation(dummyLookupClass);
-	    System.err.println(
-		"Class annotation from registry: " + dummyLookupAnnotation);
+            /*
+             * Look up the dummy object from our registry and make sure
+             * that its class was annotated with the "export" codebase.
+             */
+            Remote dummyLookup = registry.lookup(dummyBinding);
+            System.err.println(
+                "Looked up dummy object from registry: " + dummyLookup);
+            Class dummyLookupClass = dummyLookup.getClass();
+            String dummyLookupAnnotation =
+                RMIClassLoader.getClassAnnotation(dummyLookupClass);
+            System.err.println(
+                "Class annotation from registry: " + dummyLookupAnnotation);
 
-	    System.err.println();
-	    if (dummyLookupAnnotation.indexOf(exportCodebase) >= 0) {
-		System.err.println("TEST PASSED");
-	    } else if (dummyLookupAnnotation.indexOf(importCodebase) >= 0) {
-		throw new RuntimeException(
-		    "rmiregistry annotated with CLASSPATH element URL");
-	    } else {
-		throw new RuntimeException(
-		    "rmiregistry used unexpected annotation: \"" +
-		    dummyLookupAnnotation + "\"");
-	    }
+            System.err.println();
+            if (dummyLookupAnnotation.indexOf(exportCodebase) >= 0) {
+                System.err.println("TEST PASSED");
+            } else if (dummyLookupAnnotation.indexOf(importCodebase) >= 0) {
+                throw new RuntimeException(
+                    "rmiregistry annotated with CLASSPATH element URL");
+            } else {
+                throw new RuntimeException(
+                    "rmiregistry used unexpected annotation: \"" +
+                    dummyLookupAnnotation + "\"");
+            }
 
-	} catch (Exception e) {
-	    e.printStackTrace();
-	    throw new RuntimeException("TEST FAILED: " + e.toString());
-	} finally {
-	    if (rmiregistry != null) {
-		rmiregistry.destroy();
-	    }
-	}
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("TEST FAILED: " + e.toString());
+        } finally {
+            if (rmiregistry != null) {
+                rmiregistry.destroy();
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/registry/classPathCodebase/Dummy.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/classPathCodebase/Dummy.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,12 +36,12 @@
     }
 
     public void writeExternal(java.io.ObjectOutput out)
-	throws java.io.IOException
+        throws java.io.IOException
     {
     }
 
     public void readExternal(java.io.ObjectInput in)
-	throws java.io.IOException, ClassNotFoundException
+        throws java.io.IOException, ClassNotFoundException
     {
     }
 }
--- a/jdk/test/java/rmi/registry/emptyName/EmptyName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/emptyName/EmptyName.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,12 +32,12 @@
 
 public class EmptyName {
     public static void main(String[] args) throws Exception {
-	Registry impl = LocateRegistry.createRegistry(0);
-	Registry stub = (Registry) RemoteObject.toStub(impl);
-	stub.bind("", stub);
-	stub.lookup("");
-	stub.rebind("", stub);
-	stub.lookup("");
-	stub.unbind("");
+        Registry impl = LocateRegistry.createRegistry(0);
+        Registry stub = (Registry) RemoteObject.toStub(impl);
+        stub.bind("", stub);
+        stub.lookup("");
+        stub.rebind("", stub);
+        stub.lookup("");
+        stub.unbind("");
     }
 }
--- a/jdk/test/java/rmi/registry/interfaceHash/InterfaceHash.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/interfaceHash/InterfaceHash.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -62,157 +62,157 @@
     private static final String NAME = "WMM";
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 4472769");
+        System.err.println("\nRegression test for bug 4472769");
 
-	System.err.println(
-	    "\n=== verifying that J2SE registry's skeleton uses" +
-	    "\ncorrect interface hash and operation numbers:");
+        System.err.println(
+            "\n=== verifying that J2SE registry's skeleton uses" +
+            "\ncorrect interface hash and operation numbers:");
 
-	Registry testImpl = LocateRegistry.createRegistry(PORT);
-	System.err.println("created test registry on port " + PORT);
+        Registry testImpl = LocateRegistry.createRegistry(PORT);
+        System.err.println("created test registry on port " + PORT);
 
-	RemoteRef ref = new UnicastRef(
-	    new LiveRef(new ObjID(ObjID.REGISTRY_ID),
-			new TCPEndpoint("", PORT), false));
-	Registry referenceStub = new ReferenceRegistryStub(ref);
-	System.err.println("created reference registry stub: " +
-			   referenceStub);
+        RemoteRef ref = new UnicastRef(
+            new LiveRef(new ObjID(ObjID.REGISTRY_ID),
+                        new TCPEndpoint("", PORT), false));
+        Registry referenceStub = new ReferenceRegistryStub(ref);
+        System.err.println("created reference registry stub: " +
+                           referenceStub);
 
-	referenceStub.bind(NAME, referenceStub);
-	System.err.println("bound name \"" + NAME + "\" in registry");
+        referenceStub.bind(NAME, referenceStub);
+        System.err.println("bound name \"" + NAME + "\" in registry");
 
-	String[] list = referenceStub.list();
-	System.err.println("list of registry contents: " +
-			   Arrays.asList(list));
-	if (list.length != 1 || !list[0].equals(NAME)) {
-	    throw new RuntimeException(
-		"TEST FAILED: unexpected list contents");
-	}
+        String[] list = referenceStub.list();
+        System.err.println("list of registry contents: " +
+                           Arrays.asList(list));
+        if (list.length != 1 || !list[0].equals(NAME)) {
+            throw new RuntimeException(
+                "TEST FAILED: unexpected list contents");
+        }
 
-	Registry result = (Registry) referenceStub.lookup(NAME);
-	System.err.println("lookup of name \"" + NAME + "\" returned: " +
-			   result);
-	if (!result.equals(referenceStub)) {
-	    throw new RuntimeException(
-		"TEST FAILED: unexpected lookup result");
-	}
+        Registry result = (Registry) referenceStub.lookup(NAME);
+        System.err.println("lookup of name \"" + NAME + "\" returned: " +
+                           result);
+        if (!result.equals(referenceStub)) {
+            throw new RuntimeException(
+                "TEST FAILED: unexpected lookup result");
+        }
 
-	referenceStub.rebind(NAME, referenceStub);
-	referenceStub.unbind(NAME);
-	System.err.println("unbound name \"" + NAME + "\"");
+        referenceStub.rebind(NAME, referenceStub);
+        referenceStub.unbind(NAME);
+        System.err.println("unbound name \"" + NAME + "\"");
 
-	list = referenceStub.list();
-	System.err.println("list of registry contents: " +
-			   Arrays.asList(list));
-	if (list.length != 0) {
-	    throw new RuntimeException("TEST FAILED: list not empty");
-	}
+        list = referenceStub.list();
+        System.err.println("list of registry contents: " +
+                           Arrays.asList(list));
+        if (list.length != 0) {
+            throw new RuntimeException("TEST FAILED: list not empty");
+        }
 
-	System.err.println("\n=== verifying that J2SE registry's stub uses" +
-			   "correct interface hash:");
+        System.err.println("\n=== verifying that J2SE registry's stub uses" +
+                           "correct interface hash:");
 
-	class FakeRemoteRef implements RemoteRef {
-	    long hash;
-	    int opnum;
-	    public RemoteCall newCall(RemoteObject obj, Operation[] op,
-				      int opnum, long hash)
-	    {
-		this.hash = hash;
-		this.opnum = opnum;
-		throw new UnsupportedOperationException();
-	    }
-	    public void invoke(RemoteCall call) { }
-	    public void done(RemoteCall call) { }
-	    public Object invoke(Remote obj, Method method,
-				 Object[] args, long hash)
-	    {
-		throw new UnsupportedOperationException();
-	    }
-	    public String getRefClass(java.io.ObjectOutput out) {
-		return "FakeRemoteRef";
-	    }
-	    public int remoteHashCode() { return 1013; }
-	    public boolean remoteEquals(RemoteRef obj) { return false; }
-	    public String remoteToString() { return "FakeRemoteRef"; }
-	    public void writeExternal(java.io.ObjectOutput out) { }
-	    public void readExternal(java.io.ObjectInput in) { }
-	}
-	FakeRemoteRef f = new FakeRemoteRef();
+        class FakeRemoteRef implements RemoteRef {
+            long hash;
+            int opnum;
+            public RemoteCall newCall(RemoteObject obj, Operation[] op,
+                                      int opnum, long hash)
+            {
+                this.hash = hash;
+                this.opnum = opnum;
+                throw new UnsupportedOperationException();
+            }
+            public void invoke(RemoteCall call) { }
+            public void done(RemoteCall call) { }
+            public Object invoke(Remote obj, Method method,
+                                 Object[] args, long hash)
+            {
+                throw new UnsupportedOperationException();
+            }
+            public String getRefClass(java.io.ObjectOutput out) {
+                return "FakeRemoteRef";
+            }
+            public int remoteHashCode() { return 1013; }
+            public boolean remoteEquals(RemoteRef obj) { return false; }
+            public String remoteToString() { return "FakeRemoteRef"; }
+            public void writeExternal(java.io.ObjectOutput out) { }
+            public void readExternal(java.io.ObjectInput in) { }
+        }
+        FakeRemoteRef f = new FakeRemoteRef();
 
-	Registry testRegistry = LocateRegistry.getRegistry(PORT);
-	System.err.println("created original test registry stub: " +
-			   testRegistry);
+        Registry testRegistry = LocateRegistry.getRegistry(PORT);
+        System.err.println("created original test registry stub: " +
+                           testRegistry);
 
-	Class stubClass = testRegistry.getClass();
-	System.err.println("test registry stub class: " + stubClass);
+        Class stubClass = testRegistry.getClass();
+        System.err.println("test registry stub class: " + stubClass);
 
-	Constructor cons = stubClass.getConstructor(
-	    new Class[] { RemoteRef.class });
-	Registry testStub = (Registry) cons.newInstance(
-	    new Object[] { f });
-	System.err.println("created new instrumented test registry stub: " +
-			   testStub);
+        Constructor cons = stubClass.getConstructor(
+            new Class[] { RemoteRef.class });
+        Registry testStub = (Registry) cons.newInstance(
+            new Object[] { f });
+        System.err.println("created new instrumented test registry stub: " +
+                           testStub);
 
-	System.err.println("invoking bind:");
-	try {
-	    testStub.bind(NAME, referenceStub);
-	} catch (UnsupportedOperationException e) {
-	}
-	System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
-	if (f.hash != 4905912898345647071L) {
-	    throw new RuntimeException("TEST FAILED: wrong interface hash");
-	} else if (f.opnum != 0) {
-	    throw new RuntimeException("TEST FAILED: wrong operation number");
-	}
+        System.err.println("invoking bind:");
+        try {
+            testStub.bind(NAME, referenceStub);
+        } catch (UnsupportedOperationException e) {
+        }
+        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
+        if (f.hash != 4905912898345647071L) {
+            throw new RuntimeException("TEST FAILED: wrong interface hash");
+        } else if (f.opnum != 0) {
+            throw new RuntimeException("TEST FAILED: wrong operation number");
+        }
 
-	System.err.println("invoking list:");
-	try {
-	    testStub.list();
-	} catch (UnsupportedOperationException e) {
-	}
-	System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
-	if (f.hash != 4905912898345647071L) {
-	    throw new RuntimeException("TEST FAILED: wrong interface hash");
-	} else if (f.opnum != 1) {
-	    throw new RuntimeException("TEST FAILED: wrong operation number");
-	}
+        System.err.println("invoking list:");
+        try {
+            testStub.list();
+        } catch (UnsupportedOperationException e) {
+        }
+        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
+        if (f.hash != 4905912898345647071L) {
+            throw new RuntimeException("TEST FAILED: wrong interface hash");
+        } else if (f.opnum != 1) {
+            throw new RuntimeException("TEST FAILED: wrong operation number");
+        }
 
-	System.err.println("invoking lookup:");
-	try {
-	    testStub.lookup(NAME);
-	} catch (UnsupportedOperationException e) {
-	}
-	System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
-	if (f.hash != 4905912898345647071L) {
-	    throw new RuntimeException("TEST FAILED: wrong interface hash");
-	} else if (f.opnum != 2) {
-	    throw new RuntimeException("TEST FAILED: wrong operation number");
-	}
+        System.err.println("invoking lookup:");
+        try {
+            testStub.lookup(NAME);
+        } catch (UnsupportedOperationException e) {
+        }
+        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
+        if (f.hash != 4905912898345647071L) {
+            throw new RuntimeException("TEST FAILED: wrong interface hash");
+        } else if (f.opnum != 2) {
+            throw new RuntimeException("TEST FAILED: wrong operation number");
+        }
 
-	System.err.println("invoking rebind:");
-	try {
-	    testStub.rebind(NAME, referenceStub);
-	} catch (UnsupportedOperationException e) {
-	}
-	System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
-	if (f.hash != 4905912898345647071L) {
-	    throw new RuntimeException("TEST FAILED: wrong interface hash");
-	} else if (f.opnum != 3) {
-	    throw new RuntimeException("TEST FAILED: wrong operation number");
-	}
+        System.err.println("invoking rebind:");
+        try {
+            testStub.rebind(NAME, referenceStub);
+        } catch (UnsupportedOperationException e) {
+        }
+        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
+        if (f.hash != 4905912898345647071L) {
+            throw new RuntimeException("TEST FAILED: wrong interface hash");
+        } else if (f.opnum != 3) {
+            throw new RuntimeException("TEST FAILED: wrong operation number");
+        }
 
-	System.err.println("invoking unbind:");
-	try {
-	    testStub.unbind(NAME);
-	} catch (UnsupportedOperationException e) {
-	}
-	System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
-	if (f.hash != 4905912898345647071L) {
-	    throw new RuntimeException("TEST FAILED: wrong interface hash");
-	} else if (f.opnum != 4) {
-	    throw new RuntimeException("TEST FAILED: wrong operation number");
-	}
+        System.err.println("invoking unbind:");
+        try {
+            testStub.unbind(NAME);
+        } catch (UnsupportedOperationException e) {
+        }
+        System.err.println("hash == " + f.hash + ", opnum == " + f.opnum);
+        if (f.hash != 4905912898345647071L) {
+            throw new RuntimeException("TEST FAILED: wrong interface hash");
+        } else if (f.opnum != 4) {
+            throw new RuntimeException("TEST FAILED: wrong operation number");
+        }
 
-	System.err.println("TEST PASSED");
+        System.err.println("TEST PASSED");
     }
 }
--- a/jdk/test/java/rmi/registry/interfaceHash/ReferenceRegistryStub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/interfaceHash/ReferenceRegistryStub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,161 +26,161 @@
     implements java.rmi.registry.Registry, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
-	new java.rmi.server.Operation("java.lang.String list()[]"),
-	new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
-	new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
-	new java.rmi.server.Operation("void unbind(java.lang.String)")
+        new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
+        new java.rmi.server.Operation("java.lang.String list()[]"),
+        new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
+        new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
+        new java.rmi.server.Operation("void unbind(java.lang.String)")
     };
-    
+
     private static final long interfaceHash = 4905912898345647071L;
-    
+
     // constructors
     public ReferenceRegistryStub() {
-	super();
+        super();
     }
     public ReferenceRegistryStub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of bind(String, Remote)
     public void bind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
-	throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException
+        throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException
     {
-	try {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-	    try {
-		java.io.ObjectOutput out = call.getOutputStream();
-		out.writeObject($param_String_1);
-		out.writeObject($param_Remote_2);
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.MarshalException("error marshalling arguments", e);
-	    }
-	    ref.invoke(call);
-	    ref.done(call);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.rmi.AlreadyBoundException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+            try {
+                java.io.ObjectOutput out = call.getOutputStream();
+                out.writeObject($param_String_1);
+                out.writeObject($param_Remote_2);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("error marshalling arguments", e);
+            }
+            ref.invoke(call);
+            ref.done(call);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.AlreadyBoundException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of list()
     public java.lang.String[] list()
-	throws java.rmi.AccessException, java.rmi.RemoteException
+        throws java.rmi.AccessException, java.rmi.RemoteException
     {
-	try {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-	    ref.invoke(call);
-	    java.lang.String[] $result;
-	    try {
-		java.io.ObjectInput in = call.getInputStream();
-		$result = (java.lang.String[]) in.readObject();
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } catch (java.lang.ClassNotFoundException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } finally {
-		ref.done(call);
-	    }
-	    return $result;
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+            ref.invoke(call);
+            java.lang.String[] $result;
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $result = (java.lang.String[]) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } finally {
+                ref.done(call);
+            }
+            return $result;
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of lookup(String)
     public java.rmi.Remote lookup(java.lang.String $param_String_1)
-	throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
+        throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
     {
-	try {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
-	    try {
-		java.io.ObjectOutput out = call.getOutputStream();
-		out.writeObject($param_String_1);
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.MarshalException("error marshalling arguments", e);
-	    }
-	    ref.invoke(call);
-	    java.rmi.Remote $result;
-	    try {
-		java.io.ObjectInput in = call.getInputStream();
-		$result = (java.rmi.Remote) in.readObject();
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } catch (java.lang.ClassNotFoundException e) {
-		throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-	    } finally {
-		ref.done(call);
-	    }
-	    return $result;
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.rmi.NotBoundException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+            try {
+                java.io.ObjectOutput out = call.getOutputStream();
+                out.writeObject($param_String_1);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("error marshalling arguments", e);
+            }
+            ref.invoke(call);
+            java.rmi.Remote $result;
+            try {
+                java.io.ObjectInput in = call.getInputStream();
+                $result = (java.rmi.Remote) in.readObject();
+            } catch (java.io.IOException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } catch (java.lang.ClassNotFoundException e) {
+                throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+            } finally {
+                ref.done(call);
+            }
+            return $result;
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.NotBoundException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of rebind(String, Remote)
     public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
-	throws java.rmi.AccessException, java.rmi.RemoteException
+        throws java.rmi.AccessException, java.rmi.RemoteException
     {
-	try {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
-	    try {
-		java.io.ObjectOutput out = call.getOutputStream();
-		out.writeObject($param_String_1);
-		out.writeObject($param_Remote_2);
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.MarshalException("error marshalling arguments", e);
-	    }
-	    ref.invoke(call);
-	    ref.done(call);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
+            try {
+                java.io.ObjectOutput out = call.getOutputStream();
+                out.writeObject($param_String_1);
+                out.writeObject($param_Remote_2);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("error marshalling arguments", e);
+            }
+            ref.invoke(call);
+            ref.done(call);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of unbind(String)
     public void unbind(java.lang.String $param_String_1)
-	throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
+        throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
     {
-	try {
-	    java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
-	    try {
-		java.io.ObjectOutput out = call.getOutputStream();
-		out.writeObject($param_String_1);
-	    } catch (java.io.IOException e) {
-		throw new java.rmi.MarshalException("error marshalling arguments", e);
-	    }
-	    ref.invoke(call);
-	    ref.done(call);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.rmi.NotBoundException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
+            try {
+                java.io.ObjectOutput out = call.getOutputStream();
+                out.writeObject($param_String_1);
+            } catch (java.io.IOException e) {
+                throw new java.rmi.MarshalException("error marshalling arguments", e);
+            }
+            ref.invoke(call);
+            ref.done(call);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.rmi.NotBoundException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/registry/multipleRegistries/MultipleRegistries.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/multipleRegistries/MultipleRegistries.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,49 +41,49 @@
     private static final String NAME = "MultipleRegistries";
 
     public Object passObject(Object obj) {
-	return obj;
+        return obj;
     }
-    
+
     public static void main(String[] args) throws Exception {
-	
-	RemoteInterface server = null;
-	RemoteInterface proxy = null;
-	
-	try {
-	    System.err.println("export object");
-	    server = new MultipleRegistries();
-	    proxy =
-		(RemoteInterface) UnicastRemoteObject.exportObject(server, 0);
+
+        RemoteInterface server = null;
+        RemoteInterface proxy = null;
 
-	    System.err.println("proxy = " + proxy);
+        try {
+            System.err.println("export object");
+            server = new MultipleRegistries();
+            proxy =
+                (RemoteInterface) UnicastRemoteObject.exportObject(server, 0);
 
-	    System.err.println("export registries");
-	    Registry registryImpl1 = LocateRegistry.createRegistry(2030);
-	    Registry registryImpl2 = LocateRegistry.createRegistry(2040);
+            System.err.println("proxy = " + proxy);
+
+            System.err.println("export registries");
+            Registry registryImpl1 = LocateRegistry.createRegistry(2030);
+            Registry registryImpl2 = LocateRegistry.createRegistry(2040);
 
-	    System.err.println("bind remote object in registries");
-	    Registry registry1 = LocateRegistry.getRegistry(2030);
-	    Registry registry2 = LocateRegistry.getRegistry(2040);
+            System.err.println("bind remote object in registries");
+            Registry registry1 = LocateRegistry.getRegistry(2030);
+            Registry registry2 = LocateRegistry.getRegistry(2040);
 
-	    registry1.bind(NAME, proxy);
-	    registry2.bind(NAME, proxy);
+            registry1.bind(NAME, proxy);
+            registry2.bind(NAME, proxy);
 
-	    System.err.println("lookup remote object in registries");
+            System.err.println("lookup remote object in registries");
 
-	    RemoteInterface remote1 = (RemoteInterface) registry1.lookup(NAME);
-	    RemoteInterface remote2 = (RemoteInterface) registry2.lookup(NAME);
+            RemoteInterface remote1 = (RemoteInterface) registry1.lookup(NAME);
+            RemoteInterface remote2 = (RemoteInterface) registry2.lookup(NAME);
 
-	    System.err.println("invoke methods on remote objects");
-	    remote1.passObject(remote1);
-	    remote2.passObject(remote2);
+            System.err.println("invoke methods on remote objects");
+            remote1.passObject(remote1);
+            remote2.passObject(remote2);
+
+            System.err.println("TEST PASSED");
 
-	    System.err.println("TEST PASSED");
-	    
-	} finally {
-	    if (proxy != null) {
-		UnicastRemoteObject.unexportObject(server, true);
-	    }
-	}
+        } finally {
+            if (proxy != null) {
+                UnicastRemoteObject.unexportObject(server, true);
+            }
+        }
     }
 }
 
--- a/jdk/test/java/rmi/registry/reexport/Reexport.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/registry/reexport/Reexport.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,13 +25,13 @@
  * @bug 4120329
  * @summary RMI registry creation is impossible if first attempt fails.
  * @library ../../testlibrary
- * @build StreamPipe TestParams TestLibrary JavaVM 
+ * @build StreamPipe TestParams TestLibrary JavaVM
  * @build RegistryRunner RegistryRunner_Stub
  * @build Reexport
  * @run main/othervm Reexport
  */
 
-/* 
+/*
  * If a VM could not create an RMI registry because another registry
  * usually in another process, was using the registry port, the next
  * time the VM tried to create a registry (after the other registry
@@ -40,7 +40,7 @@
  * use when it should never have been allocated.
  *
  * The test creates this conflict using Runtime.exec and ensures that
- * a registry can still be created after the conflict is resolved.  
+ * a registry can still be created after the conflict is resolved.
  */
 
 import java.io.*;
@@ -50,106 +50,106 @@
 
 public class Reexport {
     static public final int regport = TestLibrary.REGISTRY_PORT;
-    
+
     static public void main(String[] argv) {
 
-	Registry reg = null;
+        Registry reg = null;
+
+        try {
+            System.err.println("\nregression test for 4120329\n");
+
+            // establish the registry (we hope)
+            System.err.println("Starting registry on port " + regport);
+            Reexport.makeRegistry(regport);
+
+            // Get a handle to the registry
+            System.err.println("Creating duplicate registry, this should fail...");
+            reg = createReg(true);
+
+            if (reg != null) {
+                TestLibrary.bomb("failed was able to duplicate the registry?!?");
+            }
+
+            // Kill the first registry.
+            System.err.println("Bringing down the first registry");
+            try {
+                Reexport.killRegistry();
+            } catch (Exception foo) {
+            }
+
+            // start another registry now that the first is gone; this should work
+            System.err.println("Trying again to start our own " +
+                               "registry... this should work");
+
+            reg = createReg(false);
 
-	try {
-	    System.err.println("\nregression test for 4120329\n");
-	    
-	    // establish the registry (we hope)
-	    System.err.println("Starting registry on port " + regport);
-	    Reexport.makeRegistry(regport);
-	    
-	    // Get a handle to the registry
-	    System.err.println("Creating duplicate registry, this should fail...");
-	    reg = createReg(true);
-	    
-	    if (reg != null) {
-		TestLibrary.bomb("failed was able to duplicate the registry?!?");
-	    }
-	    
-	    // Kill the first registry.
-	    System.err.println("Bringing down the first registry");
-	    try {
-		Reexport.killRegistry();
-	    } catch (Exception foo) {
-	    }
-	    
-	    // start another registry now that the first is gone; this should work
-	    System.err.println("Trying again to start our own " + 
-			       "registry... this should work");
-	    
-	    reg = createReg(false);
-	    
-	    if (reg == null) {
-		TestLibrary.bomb("Could not create registry on second try");
-	    }
-	    
-	    System.err.println("Test passed");
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    // dont leave the registry around to affect other tests.
-	    killRegistry();
+            if (reg == null) {
+                TestLibrary.bomb("Could not create registry on second try");
+            }
+
+            System.err.println("Test passed");
+
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            // dont leave the registry around to affect other tests.
+            killRegistry();
+
+            reg = null;
+        }
+    }
 
-	    reg = null;
-	}
-    }
-    
     static Registry createReg(boolean remoteOk) {
-	Registry reg = null;
+        Registry reg = null;
 
-	try {
-	    reg = LocateRegistry.createRegistry(regport);
-	} catch (Throwable e) {
-	    if (remoteOk) {
-		System.err.println("EXPECTING PORT IN USE EXCEPTION:");
-		System.err.println(e.getMessage());
-		e.printStackTrace();
-	    } else {
-		TestLibrary.bomb((Exception) e);
-	    }
-	}
+        try {
+            reg = LocateRegistry.createRegistry(regport);
+        } catch (Throwable e) {
+            if (remoteOk) {
+                System.err.println("EXPECTING PORT IN USE EXCEPTION:");
+                System.err.println(e.getMessage());
+                e.printStackTrace();
+            } else {
+                TestLibrary.bomb((Exception) e);
+            }
+        }
 
-	return reg;
+        return reg;
     }
 
     public static void makeRegistry(int p) {
-	// sadly, we can't kill a registry if we have too-close control
-	// over it.  We must make it in a subprocess, and then kill the
-	// subprocess when it has served our needs.
+        // sadly, we can't kill a registry if we have too-close control
+        // over it.  We must make it in a subprocess, and then kill the
+        // subprocess when it has served our needs.
 
-	try {
-	    JavaVM jvm = new JavaVM("RegistryRunner", "", Integer.toString(p));
-	    jvm.start();
-	    Reexport.subreg = jvm.getVM();
+        try {
+            JavaVM jvm = new JavaVM("RegistryRunner", "", Integer.toString(p));
+            jvm.start();
+            Reexport.subreg = jvm.getVM();
 
-	} catch (IOException e) {
-	    // one of these is summarily dropped, can't remember which one
-	    System.out.println ("Test setup failed - cannot run rmiregistry");
-	    TestLibrary.bomb("Test setup failed - cannot run test", e);
-	}
-	// Slop - wait for registry to come up.  This is stupid.
-	try {
-	    Thread.sleep (5000);
-	} catch (Exception whatever) {
-	}
+        } catch (IOException e) {
+            // one of these is summarily dropped, can't remember which one
+            System.out.println ("Test setup failed - cannot run rmiregistry");
+            TestLibrary.bomb("Test setup failed - cannot run test", e);
+        }
+        // Slop - wait for registry to come up.  This is stupid.
+        try {
+            Thread.sleep (5000);
+        } catch (Exception whatever) {
+        }
     }
     private static Process subreg = null;
-    
+
     public static void killRegistry() {
-	if (Reexport.subreg != null) {
+        if (Reexport.subreg != null) {
 
-	    RegistryRunner.requestExit();
+            RegistryRunner.requestExit();
 
-	    try {
-		Reexport.subreg.waitFor();
-	    } catch (InterruptedException ie) {
-	    }
-	}
-	Reexport.subreg = null;
-    }    
+            try {
+                Reexport.subreg.waitFor();
+            } catch (InterruptedException ie) {
+            }
+        }
+        Reexport.subreg = null;
+    }
 }
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BenchServer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BenchServer.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,7 +33,7 @@
 
 /**
  * The RMI benchmark server is a simple compute-engine-like server which allows
- * client benchmarks to create/export and unexport objects off of the server, 
+ * client benchmarks to create/export and unexport objects off of the server,
  * or run arbitrary tasks.
  */
 public interface BenchServer extends Remote {
@@ -41,41 +41,40 @@
      * Interface used for creating server-side remote objects.
      */
     public interface RemoteObjectFactory extends Serializable {
-	Remote create() throws RemoteException;
+        Remote create() throws RemoteException;
     }
-    
+
     /**
      * Interface used for server-side tasks.
      */
     public interface Task extends Serializable {
-	Object execute() throws Exception;
+        Object execute() throws Exception;
     }
 
     /**
-     * Uses the given remote object factory to create a new remote object on 
+     * Uses the given remote object factory to create a new remote object on
      * the server side.
      */
     Remote create(RemoteObjectFactory factory) throws RemoteException;
-    
+
     /**
-     * Unexports the specified remote object.  Returns true if successful, 
+     * Unexports the specified remote object.  Returns true if successful,
      * false otherwise.
      */
     boolean unexport(Remote obj, boolean force) throws RemoteException;
-    
+
     /**
      * Execute given task.
      */
     Object execute(Task task) throws Exception;
-    
+
     /**
      * Invoke the garbage collector.
      */
     void gc() throws RemoteException;
-    
+
     /**
      * Terminate the server.
      */
     void terminate(int delay) throws RemoteException;
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BenchServerImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BenchServerImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -37,8 +37,8 @@
 /**
  * Benchmark server implementation.
  */
-public class BenchServerImpl 
-    extends UnicastRemoteObject implements BenchServer 
+public class BenchServerImpl
+    extends UnicastRemoteObject implements BenchServer
 {
     HashMap implTable = new HashMap();
 
@@ -47,52 +47,51 @@
      */
     public BenchServerImpl() throws RemoteException {
     }
-    
+
     /**
-     * Uses the given remote object factory to create a new remote object on 
+     * Uses the given remote object factory to create a new remote object on
      * the server side.
      */
-    public Remote create(BenchServer.RemoteObjectFactory factory) 
-	throws RemoteException 
+    public Remote create(BenchServer.RemoteObjectFactory factory)
+        throws RemoteException
     {
-	Remote impl = factory.create();
-	implTable.put(RemoteObject.toStub(impl), new WeakReference(impl));
-	return impl;
+        Remote impl = factory.create();
+        implTable.put(RemoteObject.toStub(impl), new WeakReference(impl));
+        return impl;
     }
-    
+
     /**
-     * Unexports the specified remote object.  Returns true if successful, 
+     * Unexports the specified remote object.  Returns true if successful,
      * false otherwise.
      */
     public boolean unexport(Remote obj, boolean force) throws RemoteException {
-	WeakReference iref = (WeakReference) implTable.get(obj);
-	if (iref == null)
-	    return false;
-	Remote impl = (Remote) iref.get();
-	if (impl == null)
-	    return false;
-	return UnicastRemoteObject.unexportObject(impl, force);
+        WeakReference iref = (WeakReference) implTable.get(obj);
+        if (iref == null)
+            return false;
+        Remote impl = (Remote) iref.get();
+        if (impl == null)
+            return false;
+        return UnicastRemoteObject.unexportObject(impl, force);
     }
-    
+
     /**
      * Execute given task.
      */
     public Object execute(BenchServer.Task task) throws Exception {
-	return task.execute();
+        return task.execute();
     }
-    
+
     /**
      * Invoke the garbage collector.
      */
     public void gc() throws RemoteException {
-	System.gc();
+        System.gc();
     }
-    
+
     /**
      * Terminate the server.
      */
     public void terminate(int delay) throws RemoteException {
-	System.exit(0);
+        System.exit(0);
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BooleanArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BooleanArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class BooleanArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public boolean[] call(boolean[] a) throws RemoteException;
+        public boolean[] call(boolean[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public boolean[] call(boolean[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public boolean[] call(boolean[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue boolean array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	boolean[] array = new boolean[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        boolean[] array = new boolean[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BooleanCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/BooleanCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class BooleanCalls implements Benchmark {
 
     interface Server extends Remote {
-	public boolean call(boolean val) throws RemoteException;
+        public boolean call(boolean val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public boolean call(boolean val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public boolean call(boolean val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue boolean calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call(true);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call(true);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ByteArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ByteArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class ByteArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public byte[] call(byte[] a) throws RemoteException;
+        public byte[] call(byte[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public byte[] call(byte[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public byte[] call(byte[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue byte array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	byte[] array = new byte[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        byte[] array = new byte[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ByteCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ByteCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class ByteCalls implements Benchmark {
 
     interface Server extends Remote {
-	public byte call(byte val) throws RemoteException;
+        public byte call(byte val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public byte call(byte val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public byte call(byte val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue byte calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call((byte) 0);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call((byte) 0);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/CharArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/CharArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class CharArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public char[] call(char[] a) throws RemoteException;
+        public char[] call(char[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public char[] call(char[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public char[] call(char[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue char array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	char[] array = new char[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        char[] array = new char[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/CharCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/CharCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class CharCalls implements Benchmark {
 
     interface Server extends Remote {
-	public char call(char val) throws RemoteException;
+        public char call(char val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public char call(char val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public char call(char val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue char calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call('0');
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call('0');
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ClassLoading.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ClassLoading.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -45,16 +45,15 @@
      * Arguments: <# reps>
      */
     public long run(String[] args) throws Exception {
-	int reps = Integer.parseInt(args[0]);
-	CodeSource csrc = getClass().getProtectionDomain().getCodeSource();
-	String url = "jar:" + csrc.getLocation().toString() + ALTROOT;
-	
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    RMIClassLoader.loadClass(url, CLASSNAME);
-	long time = System.currentTimeMillis() - start;
-	
-	return time;
+        int reps = Integer.parseInt(args[0]);
+        CodeSource csrc = getClass().getProtectionDomain().getCodeSource();
+        String url = "jar:" + csrc.getLocation().toString() + ALTROOT;
+
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            RMIClassLoader.loadClass(url, CLASSNAME);
+        long time = System.currentTimeMillis() - start;
+
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/DoubleArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/DoubleArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class DoubleArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public double[] call(double[] a) throws RemoteException;
+        public double[] call(double[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public double[] call(double[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public double[] call(double[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue double array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	double[] array = new double[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        double[] array = new double[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/DoubleCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/DoubleCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class DoubleCalls implements Benchmark {
 
     interface Server extends Remote {
-	public double call(double val) throws RemoteException;
+        public double call(double val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public double call(double val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public double call(double val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue double calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call(0.0);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call(0.0);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ExceptionCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ExceptionCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,43 +41,42 @@
     }
 
     interface Server extends Remote {
-	public void call() throws RemoteException, FooException;
+        public void call() throws RemoteException, FooException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public void call() throws RemoteException, FooException {
-	    throw new FooException();
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public void call() throws RemoteException, FooException {
+            throw new FooException();
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue calls which throw exceptions.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int reps = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int reps = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++) {
-	    try {
-		stub.call();
-	    } catch (FooException e) {}
-	}
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++) {
+            try {
+                stub.call();
+            } catch (FooException e) {}
+        }
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ExportObjs.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ExportObjs.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000-2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of UnicastRemoteObject.exportObject().
  */
 public class ExportObjs implements Benchmark {
-    
+
     static class RemoteObj implements Remote {
     }
 
@@ -44,19 +44,18 @@
      * Arguments: <# objects>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	Remote[] objs = new Remote[size];
-	for (int i = 0; i < size; i++)
-	    objs[i] = new RemoteObj();
-	
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < size; i++)
-	    UnicastRemoteObject.exportObject(objs[i],0);
-	long time = System.currentTimeMillis() - start;
-	
-	for (int i = 0; i < size; i++)
-	    UnicastRemoteObject.unexportObject(objs[i], true);
-	return time;
+        int size = Integer.parseInt(args[0]);
+        Remote[] objs = new Remote[size];
+        for (int i = 0; i < size; i++)
+            objs[i] = new RemoteObj();
+
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < size; i++)
+            UnicastRemoteObject.exportObject(objs[i],0);
+        long time = System.currentTimeMillis() - start;
+
+        for (int i = 0; i < size; i++)
+            UnicastRemoteObject.unexportObject(objs[i], true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/FloatArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/FloatArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class FloatArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public float[] call(float[] a) throws RemoteException;
+        public float[] call(float[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public float[] call(float[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public float[] call(float[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue float array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	float[] array = new float[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        float[] array = new float[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/FloatCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/FloatCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class FloatCalls implements Benchmark {
 
     interface Server extends Remote {
-	public float call(float val) throws RemoteException;
+        public float call(float val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public float call(float val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public float call(float val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue float calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call((float) 0.0);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call((float) 0.0);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/IntArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/IntArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class IntArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public int[] call(int[] a) throws RemoteException;
+        public int[] call(int[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public int[] call(int[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public int[] call(int[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue int array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	int[] array = new int[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        int[] array = new int[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/IntCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/IntCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class IntCalls implements Benchmark {
 
     interface Server extends Remote {
-	public int call(int val) throws RemoteException;
+        public int call(int val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public int call(int val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public int call(int val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue int calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call(0);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call(0);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/LongArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/LongArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,42 +39,41 @@
 public class LongArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public long[] call(long[] a) throws RemoteException;
+        public long[] call(long[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public long[] call(long[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public long[] call(long[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue long array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	long[] array = new long[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        long[] array = new long[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/LongCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/LongCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class LongCalls implements Benchmark {
 
     interface Server extends Remote {
-	public long call(long val) throws RemoteException;
+        public long call(long val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public long call(long val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public long call(long val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue long calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call(0L);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call(0L);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/Main.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/Main.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -47,35 +47,35 @@
 import java.util.Timer;
 import java.util.TimerTask;
 
-/* 
+/*
  * RMI/Serialization benchmark tests.
  */
 public class Main {
-    
+
     /**
      * RMI-specific benchmark harness.
      */
     static class RMIHarness extends Harness {
-	/**
-	 * Construct new RMI benchmark harness.
-	 */
-	RMIHarness(InputStream in) throws IOException, ConfigFormatException {
-	    super(in);
-	}
-	
-	/**
-	 * Cleanup both client and server side in between each benchmark.
-	 */
-	protected void cleanup() {
-	    System.gc();
-	    if (Main.runmode == CLIENT) {
-		try {
-		    Main.server.gc();
-		} catch (Exception e) {
-		    System.err.println("Warning: server gc failed: " + e);
-		}
-	    }
-	}
+        /**
+         * Construct new RMI benchmark harness.
+         */
+        RMIHarness(InputStream in) throws IOException, ConfigFormatException {
+            super(in);
+        }
+
+        /**
+         * Cleanup both client and server side in between each benchmark.
+         */
+        protected void cleanup() {
+            System.gc();
+            if (Main.runmode == CLIENT) {
+                try {
+                    Main.server.gc();
+                } catch (Exception e) {
+                    System.err.println("Warning: server gc failed: " + e);
+                }
+            }
+        }
     }
 
     static final String CONFFILE = "/bench/rmi/config";
@@ -85,7 +85,7 @@
     static final int SAMEVM = 0;
     static final int CLIENT = 1;
     static final int SERVER = 2;
-    
+
     static final int TEXT = 0;
     static final int HTML = 1;
     static final int XML = 2;
@@ -111,7 +111,7 @@
      * Returns reference to benchmark server.
      */
     public static BenchServer getBenchServer() {
-	return server;
+        return server;
     }
 
     /**
@@ -127,252 +127,252 @@
         p.println("  -t <num hours>       repeat benchmarks for specified number of hours");
         p.println("  -o <file>            specify output file");
         p.println("  -c <file>            specify (non-default) " +
-		"configuration file");
+                "configuration file");
         p.println("  -html                format output as html " +
-		"(default is text)");
+                "(default is text)");
         p.println("  -xml                 format output as xml");
-	p.println("  -client <host:port>  run benchmark client using server " +
-		"on specified host/port");
-	p.println("  -server <port>       run benchmark server on given port");
+        p.println("  -client <host:port>  run benchmark client using server " +
+                "on specified host/port");
+        p.println("  -server <port>       run benchmark server on given port");
     }
-    
+
     /**
      * Print error message and exit.
      */
     static void die(String mesg) {
-	System.err.println(mesg);
-	System.exit(1);
+        System.err.println(mesg);
+        System.exit(1);
     }
 
     /**
      * Stop server and exit.
      */
     public static void exit() {
-	switch (runmode) {
-	    case CLIENT:
-		if (server != null) {
-		    try {
-			server.terminate(0);
-		    } catch (RemoteException re) {
-			// ignore
-		    }
-		}
-	    default:
-		System.exit(0);
-	}
+        switch (runmode) {
+            case CLIENT:
+                if (server != null) {
+                    try {
+                        server.terminate(0);
+                    } catch (RemoteException re) {
+                        // ignore
+                    }
+                }
+            default:
+                System.exit(0);
+        }
     }
 
     /**
      * Benchmark mainline.
      */
     public static void main(String[] args) {
-	setupSecurity();
-	parseArgs(args);
-	setupStreams();
-	if (list) {
-	    listConfig();
-	} else {
-	    setupServer();
-	    if (runmode != SERVER) {
-		setupHarness();
-		setupReporter();
-		if (exitOnTimer) {
-		    setupTimer(testDurationSeconds);
-		    while (true) {
-			runBenchmarks();
-			if (exitRequested) {
-			    exit();
-			}
-		    }
-		} else {
-		    runBenchmarks();
-		    exit();
-		}
-	    }
-	}
+        setupSecurity();
+        parseArgs(args);
+        setupStreams();
+        if (list) {
+            listConfig();
+        } else {
+            setupServer();
+            if (runmode != SERVER) {
+                setupHarness();
+                setupReporter();
+                if (exitOnTimer) {
+                    setupTimer(testDurationSeconds);
+                    while (true) {
+                        runBenchmarks();
+                        if (exitRequested) {
+                            exit();
+                        }
+                    }
+                } else {
+                    runBenchmarks();
+                    exit();
+                }
+            }
+        }
     }
-    
+
     /**
      * Parse command-line arguments.
      */
     static void parseArgs(String[] args) {
-	for (int i = 0; i < args.length; i++) {
-	    if (args[i].equals("-h")) {
-		usage();
-		System.exit(0);
-	    } else if (args[i].equals("-v")) {
-		verbose = true;
-	    } else if (args[i].equals("-l")) {
-		list = true;
-	    } else if (args[i].equals("-t")) {
-		if (++i >= args.length)
-		    die("Error: no timeout value specified");
-		try {
-		    exitOnTimer = true;
-		    testDurationSeconds = Integer.parseInt(args[i]) * 3600;
-		} catch (Exception e) {
-		    die("Error: unable to determine timeout value");
-		}
-	    } else if (args[i].equals("-o")) {
-		if (++i >= args.length)
-		    die("Error: no output file specified");
-		try {
-		    repstr = new FileOutputStream(args[i]);
-		} catch (IOException e) {
-		    die("Error: unable to open \"" + args[i] + "\"");
-		}
-	    } else if (args[i].equals("-c")) {
-		if (++i >= args.length)
-		    die("Error: no config file specified");
-		try {
-		    confstr = new FileInputStream(args[i]);
-		} catch (IOException e) {
-		    die("Error: unable to open \"" + args[i] + "\"");
-		}
-	    } else if (args[i].equals("-html")) {
-		if (format != TEXT)
-		    die("Error: conflicting formats");
-		format = HTML;
-	    } else if (args[i].equals("-xml")) {
-		if (format != TEXT)
-		    die("Error: conflicting formats");
-		format = XML;
-	    } else if (args[i].equals("-client")) {
-		if (runmode == CLIENT)
-		    die("Error: multiple -client options");
-		if (runmode == SERVER)
-		    die("Error: -client and -server options conflict");
-		if (++i >= args.length)
-		    die("Error: -client missing host/port");
-		try {
-		    int sepi = args[i].indexOf(':');
-		    host = args[i].substring(0, sepi);
-		    port = Integer.parseInt(args[i].substring(sepi + 1));
-		} catch (Exception e) {
-		    die("Error: illegal host/port specified for -client");
-		}
-		runmode = CLIENT;
-	    } else if (args[i].equals("-server")) {
-		if (runmode == CLIENT)
-		    die("Error: -client and -server options conflict");
-		if (runmode == SERVER)
-		    die("Error: multiple -server options");
-		if (++i >= args.length)
-		    die("Error: -server missing port");
-		try {
-		    port = Integer.parseInt(args[i]);
-		} catch (Exception e) {
-		    die("Error: illegal port specified for -server");
-		}
-		runmode = SERVER;
-	    } else {
-		System.err.println("Illegal option: \"" + args[i] + "\"");
-		usage();
-		System.exit(1);
-	    }
-	}
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-h")) {
+                usage();
+                System.exit(0);
+            } else if (args[i].equals("-v")) {
+                verbose = true;
+            } else if (args[i].equals("-l")) {
+                list = true;
+            } else if (args[i].equals("-t")) {
+                if (++i >= args.length)
+                    die("Error: no timeout value specified");
+                try {
+                    exitOnTimer = true;
+                    testDurationSeconds = Integer.parseInt(args[i]) * 3600;
+                } catch (Exception e) {
+                    die("Error: unable to determine timeout value");
+                }
+            } else if (args[i].equals("-o")) {
+                if (++i >= args.length)
+                    die("Error: no output file specified");
+                try {
+                    repstr = new FileOutputStream(args[i]);
+                } catch (IOException e) {
+                    die("Error: unable to open \"" + args[i] + "\"");
+                }
+            } else if (args[i].equals("-c")) {
+                if (++i >= args.length)
+                    die("Error: no config file specified");
+                try {
+                    confstr = new FileInputStream(args[i]);
+                } catch (IOException e) {
+                    die("Error: unable to open \"" + args[i] + "\"");
+                }
+            } else if (args[i].equals("-html")) {
+                if (format != TEXT)
+                    die("Error: conflicting formats");
+                format = HTML;
+            } else if (args[i].equals("-xml")) {
+                if (format != TEXT)
+                    die("Error: conflicting formats");
+                format = XML;
+            } else if (args[i].equals("-client")) {
+                if (runmode == CLIENT)
+                    die("Error: multiple -client options");
+                if (runmode == SERVER)
+                    die("Error: -client and -server options conflict");
+                if (++i >= args.length)
+                    die("Error: -client missing host/port");
+                try {
+                    int sepi = args[i].indexOf(':');
+                    host = args[i].substring(0, sepi);
+                    port = Integer.parseInt(args[i].substring(sepi + 1));
+                } catch (Exception e) {
+                    die("Error: illegal host/port specified for -client");
+                }
+                runmode = CLIENT;
+            } else if (args[i].equals("-server")) {
+                if (runmode == CLIENT)
+                    die("Error: -client and -server options conflict");
+                if (runmode == SERVER)
+                    die("Error: multiple -server options");
+                if (++i >= args.length)
+                    die("Error: -server missing port");
+                try {
+                    port = Integer.parseInt(args[i]);
+                } catch (Exception e) {
+                    die("Error: illegal port specified for -server");
+                }
+                runmode = SERVER;
+            } else {
+                System.err.println("Illegal option: \"" + args[i] + "\"");
+                usage();
+                System.exit(1);
+            }
+        }
     }
-    
+
     /**
      * Set up security manager and policy, if not set already.
      */
     static void setupSecurity() {
-	if (System.getSecurityManager() != null)
-	    return;
-	
-	/* As of 1.4, it is too late to set the security policy
-	 * file at this point so these line have been commented out.
-	 */
-	//System.setProperty("java.security.policy",
-	//	Main.class.getResource("/bench/rmi/policy.all").toString());
-	System.setSecurityManager(new RMISecurityManager());
+        if (System.getSecurityManager() != null)
+            return;
+
+        /* As of 1.4, it is too late to set the security policy
+         * file at this point so these line have been commented out.
+         */
+        //System.setProperty("java.security.policy",
+        //      Main.class.getResource("/bench/rmi/policy.all").toString());
+        System.setSecurityManager(new RMISecurityManager());
     }
 
     /**
      * Set up configuration file and report streams, if not set already.
      */
     static void setupStreams() {
-	if (repstr == null)
-	    repstr = System.out;
-	if (confstr == null)
-	    confstr = (new Main()).getClass().getResourceAsStream(CONFFILE);
-	if (confstr == null)
-	    die("Error: unable to find default config file");
+        if (repstr == null)
+            repstr = System.out;
+        if (confstr == null)
+            confstr = (new Main()).getClass().getResourceAsStream(CONFFILE);
+        if (confstr == null)
+            die("Error: unable to find default config file");
     }
-    
+
     /**
      * Print contents of configuration file to selected output stream.
      */
     static void listConfig() {
-	try {
-	    byte[] buf = new byte[256];
-	    int len;
-	    while ((len = confstr.read(buf)) != -1)
-		repstr.write(buf, 0, len);
-	} catch (IOException e) {
-	    die("Error: failed to list config file");
-	}
+        try {
+            byte[] buf = new byte[256];
+            int len;
+            while ((len = confstr.read(buf)) != -1)
+                repstr.write(buf, 0, len);
+        } catch (IOException e) {
+            die("Error: failed to list config file");
+        }
     }
-    
+
     /**
      * Setup benchmark server.
      */
     static void setupServer() {
-	switch (runmode) {
-	    case SAMEVM:
-		try {
-		    serverImpl = new BenchServerImpl();
-		    server = (BenchServer) RemoteObject.toStub(serverImpl);
-		} catch (Exception e) {
-		    die("Error: failed to create local server: " + e);
-		}
-		if (verbose)
-		    System.out.println("Benchmark server created locally");
-		break;
-		
-	    case CLIENT:
-		try {
-		    Registry reg = LocateRegistry.getRegistry(host, port);
-		    server = (BenchServer) reg.lookup(REGNAME);
-		} catch (Exception e) {
-		    die("Error: failed to connect to server: " + e);
-		}
-		if (server == null) {
-		    die("Error: server not found");
-		}
-		if (verbose) {
-		    System.out.println("Connected to benchmark server on " +
-			    host + ":" + port);
-		}
-		break;
-		
-	    case SERVER:
-		try {
-		    Registry reg = LocateRegistry.createRegistry(port);
-		    serverImpl = new BenchServerImpl();
-		    reg.bind(REGNAME, serverImpl);
-		} catch (Exception e) {
-		    die("Error: failed to initialize server: " + e);
-		}
-		if (verbose) {
-		    System.out.println("Benchmark server started on port " +
-			    port);
-		}
-		break;
-		
-	    default:
-		throw new InternalError("illegal runmode");
-	}
+        switch (runmode) {
+            case SAMEVM:
+                try {
+                    serverImpl = new BenchServerImpl();
+                    server = (BenchServer) RemoteObject.toStub(serverImpl);
+                } catch (Exception e) {
+                    die("Error: failed to create local server: " + e);
+                }
+                if (verbose)
+                    System.out.println("Benchmark server created locally");
+                break;
+
+            case CLIENT:
+                try {
+                    Registry reg = LocateRegistry.getRegistry(host, port);
+                    server = (BenchServer) reg.lookup(REGNAME);
+                } catch (Exception e) {
+                    die("Error: failed to connect to server: " + e);
+                }
+                if (server == null) {
+                    die("Error: server not found");
+                }
+                if (verbose) {
+                    System.out.println("Connected to benchmark server on " +
+                            host + ":" + port);
+                }
+                break;
+
+            case SERVER:
+                try {
+                    Registry reg = LocateRegistry.createRegistry(port);
+                    serverImpl = new BenchServerImpl();
+                    reg.bind(REGNAME, serverImpl);
+                } catch (Exception e) {
+                    die("Error: failed to initialize server: " + e);
+                }
+                if (verbose) {
+                    System.out.println("Benchmark server started on port " +
+                            port);
+                }
+                break;
+
+            default:
+                throw new InternalError("illegal runmode");
+        }
     }
 
     /**
      * Set up the timer to end the test.
      *
-     * @param delay the amount of delay, in seconds, before requesting 
+     * @param delay the amount of delay, in seconds, before requesting
      * the process exit
      */
     static void setupTimer(int delay) {
-	timer = new Timer(true);
+        timer = new Timer(true);
         timer.schedule(
             new TimerTask() {
                 public void run() {
@@ -391,12 +391,12 @@
         } catch (ConfigFormatException e) {
             String errmsg = e.getMessage();
             if (errmsg != null) {
-		die("Error parsing config file: " + errmsg);
-	    } else {
+                die("Error parsing config file: " + errmsg);
+            } else {
                 die("Error: illegal config file syntax");
-	    }
+            }
         } catch (IOException e) {
-	    die("Error: failed to read config file");
+            die("Error: failed to read config file");
         }
     }
 
@@ -405,24 +405,24 @@
      */
     static void setupReporter() {
         String title = "RMI Benchmark, v" + VERSION;
-	switch (format) {
-	    case TEXT:
-		reporter = new TextReporter(repstr, title);
-		break;
-		
-	    case HTML:
-		reporter = new HtmlReporter(repstr, title);
-		break;
+        switch (format) {
+            case TEXT:
+                reporter = new TextReporter(repstr, title);
+                break;
+
+            case HTML:
+                reporter = new HtmlReporter(repstr, title);
+                break;
 
-	    case XML:
-		reporter = new XmlReporter(repstr, title);
-		break;
-		
-	    default:
-		die("Error: unrecognized format type");
-	}
+            case XML:
+                reporter = new XmlReporter(repstr, title);
+                break;
+
+            default:
+                die("Error: unrecognized format type");
+        }
     }
-    
+
     /**
      * Run benchmarks.
      */
@@ -430,4 +430,3 @@
         harness.runBenchmarks(reporter, verbose);
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/NullCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/NullCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,39 +38,38 @@
 public class NullCalls implements Benchmark {
 
     interface Server extends Remote {
-	public void call() throws RemoteException;
+        public void call() throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public void call() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public void call() throws RemoteException {
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue null calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int reps = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int reps = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call();
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call();
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ObjArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ObjArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,16 +41,16 @@
 
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -61,44 +61,43 @@
     }
 
     interface Server extends Remote {
-	public Node[] call(Node[] a) throws RemoteException;
+        public Node[] call(Node[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
 
-	public Node[] call(Node[] a) throws RemoteException {
-	    return a;
-	}
+        public Node[] call(Node[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue calls using arrays of objects as parameters/return values.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	Node[] nodes = new Node[size];
-	for (int i = 0; i < size; i++)
-	    nodes[i] = new Node(null, 0);
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        Node[] nodes = new Node[size];
+        for (int i = 0; i < size; i++)
+            nodes[i] = new Node(null, 0);
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(nodes);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(nodes);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ObjTreeCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ObjTreeCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,16 +41,16 @@
 
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -61,42 +61,41 @@
     }
 
     interface Server extends Remote {
-	public Node call(Node val) throws RemoteException;
+        public Node call(Node val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
 
-	public Node call(Node val) throws RemoteException {
-	    return val;
-	}
+        public Node call(Node val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue calls using trees of objects as parameters/return values.
      * Arguments: <tree depth> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	Node node = new Node(null, depth);
+        int depth = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        Node node = new Node(null, depth);
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(node);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(node);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ProxyArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ProxyArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -44,52 +44,52 @@
 public class ProxyArrayCalls implements Benchmark {
 
     static class DummyHandler implements InvocationHandler, Serializable {
-	public Object invoke(Object proxy, Method method, Object[] args)
-	    throws Throwable
-	{
-	    return null;
-	}
+        public Object invoke(Object proxy, Method method, Object[] args)
+            throws Throwable
+        {
+            return null;
+        }
     }
-    
+
     public static interface DummyInterface {
-	public void foo();
+        public void foo();
     }
 
     interface Server extends Remote {
-	public Proxy[] call(Proxy[] a) throws RemoteException;
+        public Proxy[] call(Proxy[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
 
-	public Proxy[] call(Proxy[] a) throws RemoteException {
-	    return a;
-	}
+        public Proxy[] call(Proxy[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Generate proxy object array of the given size.
      */
     Proxy[] genProxies(int size) throws Exception {
-	Class proxyClass = 
-	    Proxy.getProxyClass(DummyInterface.class.getClassLoader(),
-		    new Class[] { DummyInterface.class });
-	Constructor proxyCons = 
-	    proxyClass.getConstructor(new Class[] { InvocationHandler.class });
-	Object[] consArgs = new Object[] { new DummyHandler() };
-	Proxy[] proxies = new Proxy[size];
+        Class proxyClass =
+            Proxy.getProxyClass(DummyInterface.class.getClassLoader(),
+                    new Class[] { DummyInterface.class });
+        Constructor proxyCons =
+            proxyClass.getConstructor(new Class[] { InvocationHandler.class });
+        Object[] consArgs = new Object[] { new DummyHandler() };
+        Proxy[] proxies = new Proxy[size];
 
-	for (int i = 0; i < size; i++)
-	    proxies[i] = (Proxy) proxyCons.newInstance(consArgs);
+        for (int i = 0; i < size; i++)
+            proxies[i] = (Proxy) proxyCons.newInstance(consArgs);
 
-	return proxies;
+        return proxies;
     }
 
     /**
@@ -97,19 +97,18 @@
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	Proxy[] proxies = genProxies(size);
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        Proxy[] proxies = genProxies(size);
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(proxies);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(proxies);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/RemoteObjArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/RemoteObjArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,49 +39,48 @@
 public class RemoteObjArrayCalls implements Benchmark {
 
     static class RemoteObj extends UnicastRemoteObject implements Remote {
-	RemoteObj() throws RemoteException {
-	}
+        RemoteObj() throws RemoteException {
+        }
     }
 
     interface Server extends Remote {
-	public Remote[] call(Remote[] a) throws RemoteException;
+        public Remote[] call(Remote[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
 
-	public Remote[] call(Remote[] a) throws RemoteException {
-	    return a;
-	}
+        public Remote[] call(Remote[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue calls using arrays of remote objects as parameters/return values.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	Remote[] objs = new Remote[size];
-	for (int i = 0; i < size; i++)
-	    objs[i] = new RemoteObj();
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        Remote[] objs = new Remote[size];
+        for (int i = 0; i < size; i++)
+            objs[i] = new RemoteObj();
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(objs);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(objs);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ShortArrayCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ShortArrayCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -20,7 +20,7 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
- 
+
 /*
  *
  */
@@ -39,42 +39,41 @@
 public class ShortArrayCalls implements Benchmark {
 
     interface Server extends Remote {
-	public short[] call(short[] a) throws RemoteException;
+        public short[] call(short[] a) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public short[] call(short[] a) throws RemoteException {
-	    return a;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public short[] call(short[] a) throws RemoteException {
+            return a;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue short array calls.
      * Arguments: <array size> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	short[] array = new short[size];
+        int size = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        short[] array = new short[size];
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(array);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(array);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ShortCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/ShortCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,40 +38,39 @@
 public class ShortCalls implements Benchmark {
 
     interface Server extends Remote {
-	public short call(short val) throws RemoteException;
+        public short call(short val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
-	
-	public short call(short val) throws RemoteException {
-	    return val;
-	}
+        public ServerImpl() throws RemoteException {
+        }
+
+        public short call(short val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue short calls.
      * Arguments: <# calls>
      */
     public long run(String[] args) throws Exception {
-	int cycles = Integer.parseInt(args[0]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
+        int cycles = Integer.parseInt(args[0]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < cycles; i++)
-	    stub.call((short) 0);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < cycles; i++)
+            stub.call((short) 0);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/rmi/SmallObjTreeCalls.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/rmi/SmallObjTreeCalls.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -41,7 +41,7 @@
 
     static class Node implements Serializable {
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -52,42 +52,41 @@
     }
 
     interface Server extends Remote {
-	public Node call(Node val) throws RemoteException;
+        public Node call(Node val) throws RemoteException;
     }
 
     static class ServerImpl extends UnicastRemoteObject implements Server {
-	public ServerImpl() throws RemoteException {
-	}
+        public ServerImpl() throws RemoteException {
+        }
 
-	public Node call(Node val) throws RemoteException {
-	    return val;
-	}
+        public Node call(Node val) throws RemoteException {
+            return val;
+        }
     }
-    
+
     static class ServerFactory implements BenchServer.RemoteObjectFactory {
-	public Remote create() throws RemoteException {
-	    return new ServerImpl();
-	}
+        public Remote create() throws RemoteException {
+            return new ServerImpl();
+        }
     }
-    
+
     /**
      * Issue calls using trees of small objects as parameters/return values.
      * Arguments: <tree depth> <# calls>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int reps = Integer.parseInt(args[1]);
-	BenchServer bsrv = Main.getBenchServer();
-	Server stub = (Server) bsrv.create(new ServerFactory());
-	Node node = new Node(null, depth);
+        int depth = Integer.parseInt(args[0]);
+        int reps = Integer.parseInt(args[1]);
+        BenchServer bsrv = Main.getBenchServer();
+        Server stub = (Server) bsrv.create(new ServerFactory());
+        Node node = new Node(null, depth);
 
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < reps; i++)
-	    stub.call(node);
-	long time = System.currentTimeMillis() - start;
-	
-	bsrv.unexport(stub, true);
-	return time;
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < reps; i++)
+            stub.call(node);
+        long time = System.currentTimeMillis() - start;
+
+        bsrv.unexport(stub, true);
+        return time;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/BooleanArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/BooleanArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of boolean array reads/writes.
  */
 public class BooleanArrays implements Benchmark {
-    
+
     /**
      * Write and read boolean arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	boolean[][] arrays = new boolean[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        boolean[][] arrays = new boolean[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, boolean[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, boolean[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Booleans.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Booleans.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of boolean reads/writes.
  */
 public class Booleans implements Benchmark {
-    
+
     /**
      * Write and read boolean values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,40 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeBoolean(false);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readBoolean();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeBoolean(false);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readBoolean();
+            }
+        }
     }
 }
-    
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ByteArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ByteArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of byte array reads/writes.
  */
 public class ByteArrays implements Benchmark {
-    
+
     /**
      * Write and read byte arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	byte[][] arrays = new byte[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        byte[][] arrays = new byte[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, byte[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, byte[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Bytes.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Bytes.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of byte reads/writes.
  */
 public class Bytes implements Benchmark {
-    
+
     /**
      * Write and read byte values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeByte(0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readByte();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeByte(0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readByte();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/CharArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/CharArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of char array reads/writes.
  */
 public class CharArrays implements Benchmark {
-    
+
     /**
      * Write and read char arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	char[][] arrays = new char[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        char[][] arrays = new char[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, char[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, char[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Chars.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Chars.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of char reads/writes.
  */
 public class Chars implements Benchmark {
-    
+
     /**
      * Write and read char values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeChar('0');
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readChar();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeChar('0');
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readChar();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ClassDesc.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ClassDesc.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -89,41 +89,40 @@
     static class Dummy48 extends Dummy47 { Dummy48 i48; }
     static class Dummy49 extends Dummy48 { Dummy49 i49; }
     static class Dummy50 extends Dummy49 { Dummy50 i50; }
-    
+
     /**
      * Write and read class descriptors to/from a stream.
      * Arguments: <# cycles>
      */
     public long run(String[] args) throws Exception {
-	int ncycles = Integer.parseInt(args[0]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	ObjectStreamClass desc = ObjectStreamClass.lookup(Dummy50.class);
-	
-	doReps(oout, oin, sbuf, desc, 1);	// warmup
+        int ncycles = Integer.parseInt(args[0]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
+        ObjectStreamClass desc = ObjectStreamClass.lookup(Dummy50.class);
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, desc, ncycles);
+        doReps(oout, oin, sbuf, desc, 1);       // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, desc, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, ObjectStreamClass desc, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, ObjectStreamClass desc, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < ncycles; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    oout.writeObject(desc);
-	    oout.flush();
-	    oin.readObject();
-	}
+        for (int i = 0; i < ncycles; i++) {
+            sbuf.reset();
+            oout.reset();
+            oout.writeObject(desc);
+            oout.flush();
+            oin.readObject();
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Cons.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Cons.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -53,29 +53,28 @@
     public long run(String[] args) throws Exception {
         int reps = Integer.parseInt(args[0]);
         Dummy dummy = new Dummy();
-	StreamBuffer sbuf = new StreamBuffer();
-	
-	doReps(sbuf, dummy, 1);		// warmup
+        StreamBuffer sbuf = new StreamBuffer();
 
-	long start = System.currentTimeMillis();
-	doReps(sbuf, dummy, reps);
+        doReps(sbuf, dummy, 1);         // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(sbuf, dummy, reps);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of cycles.
      */
     void doReps(StreamBuffer sbuf, Dummy dummy, int reps) throws Exception {
-	OutputStream out = sbuf.getOutputStream();
-	InputStream in = sbuf.getInputStream();
-	for (int i = 0; i < reps; i++) {
-	    sbuf.reset();
-	    ObjectOutputStream oout = new ObjectOutputStream(out);
-	    oout.writeObject(dummy);
-	    oout.flush();
-	    ObjectInputStream oin = new ObjectInputStream(in);
-	    oin.readObject();
-	}
+        OutputStream out = sbuf.getOutputStream();
+        InputStream in = sbuf.getInputStream();
+        for (int i = 0; i < reps; i++) {
+            sbuf.reset();
+            ObjectOutputStream oout = new ObjectOutputStream(out);
+            oout.writeObject(dummy);
+            oout.flush();
+            ObjectInputStream oin = new ObjectInputStream(in);
+            oin.readObject();
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/CustomDefaultObjTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/CustomDefaultObjTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,19 +39,19 @@
  * defaultWriteObject() and defaultReadObject().
  */
 public class CustomDefaultObjTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -61,13 +61,13 @@
         }
 
         private void writeObject(ObjectOutputStream out) throws IOException {
-	    out.defaultWriteObject();
+            out.defaultWriteObject();
         }
-        
-        private void readObject(ObjectInputStream in) 
+
+        private void readObject(ObjectInputStream in)
             throws IOException, ClassNotFoundException
         {
-	    in.defaultReadObject();
+            in.defaultReadObject();
         }
     }
 
@@ -79,20 +79,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -100,33 +100,32 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
-     * Run benchmark for given number of batches, with each batch containing 
+     * Run benchmark for given number of batches, with each batch containing
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/CustomObjTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/CustomObjTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,19 +38,19 @@
  * nodes contain custom writeObject() and readObject() methods.
  */
 public class CustomObjTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -60,35 +60,35 @@
         }
 
         private void writeObject(ObjectOutputStream out) throws IOException {
-	    out.writeBoolean(z);
-	    out.writeByte(b);
-	    out.writeChar(c);
-	    out.writeShort(s);
-	    out.writeInt(i);
-	    out.writeFloat(f);
-	    out.writeLong(j);
-	    out.writeDouble(d);
-	    out.writeObject(str);
-	    out.writeObject(parent);
-	    out.writeObject(left);
-	    out.writeObject(right);
+            out.writeBoolean(z);
+            out.writeByte(b);
+            out.writeChar(c);
+            out.writeShort(s);
+            out.writeInt(i);
+            out.writeFloat(f);
+            out.writeLong(j);
+            out.writeDouble(d);
+            out.writeObject(str);
+            out.writeObject(parent);
+            out.writeObject(left);
+            out.writeObject(right);
         }
-        
-        private void readObject(ObjectInputStream in) 
+
+        private void readObject(ObjectInputStream in)
             throws IOException, ClassNotFoundException
         {
-	    z = in.readBoolean();
-	    b = in.readByte();
-	    c = in.readChar();
-	    s = in.readShort();
-	    i = in.readInt();
-	    f = in.readFloat();
-	    j = in.readLong();
-	    d = in.readDouble();
-	    str = (String) in.readObject();
-	    parent = in.readObject();
-	    left = in.readObject();
-	    right = in.readObject();
+            z = in.readBoolean();
+            b = in.readByte();
+            c = in.readChar();
+            s = in.readShort();
+            i = in.readInt();
+            f = in.readFloat();
+            j = in.readLong();
+            d = in.readDouble();
+            str = (String) in.readObject();
+            parent = in.readObject();
+            left = in.readObject();
+            right = in.readObject();
         }
     }
 
@@ -100,20 +100,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -121,33 +121,32 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
-     * Run benchmark for given number of batches, with each batch containing 
+     * Run benchmark for given number of batches, with each batch containing
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/DoubleArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/DoubleArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of double array reads/writes.
  */
 public class DoubleArrays implements Benchmark {
-    
+
     /**
      * Write and read double arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	double[][] arrays = new double[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        double[][] arrays = new double[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, double[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, double[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Doubles.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Doubles.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of double reads/writes.
  */
 public class Doubles implements Benchmark {
-    
+
     /**
      * Write and read double values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeDouble(0.0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readDouble();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeDouble(0.0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readDouble();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ExternObjTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ExternObjTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -40,19 +40,19 @@
  * objects.
  */
 public class ExternObjTrees implements Benchmark {
-    
+
     static class Node implements Externalizable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -61,40 +61,40 @@
             }
         }
 
-	public Node() {
-	}
-	
-	public void writeExternal(ObjectOutput out) throws IOException {
-	    out.writeBoolean(z);
-	    out.writeByte(b);
-	    out.writeChar(c);
-	    out.writeShort(s);
-	    out.writeInt(i);
-	    out.writeFloat(f);
-	    out.writeLong(j);
-	    out.writeDouble(d);
-	    out.writeObject(str);
-	    out.writeObject(parent);
-	    out.writeObject(left);
-	    out.writeObject(right);
-	}
-	
-	public void readExternal(ObjectInput in) 
-	    throws IOException, ClassNotFoundException
-	{
-	    z = in.readBoolean();
-	    b = in.readByte();
-	    c = in.readChar();
-	    s = in.readShort();
-	    i = in.readInt();
-	    f = in.readFloat();
-	    j = in.readLong();
-	    d = in.readDouble();
-	    str = (String) in.readObject();
-	    parent = in.readObject();
-	    left = in.readObject();
-	    right = in.readObject();
-	}
+        public Node() {
+        }
+
+        public void writeExternal(ObjectOutput out) throws IOException {
+            out.writeBoolean(z);
+            out.writeByte(b);
+            out.writeChar(c);
+            out.writeShort(s);
+            out.writeInt(i);
+            out.writeFloat(f);
+            out.writeLong(j);
+            out.writeDouble(d);
+            out.writeObject(str);
+            out.writeObject(parent);
+            out.writeObject(left);
+            out.writeObject(right);
+        }
+
+        public void readExternal(ObjectInput in)
+            throws IOException, ClassNotFoundException
+        {
+            z = in.readBoolean();
+            b = in.readByte();
+            c = in.readChar();
+            s = in.readShort();
+            i = in.readInt();
+            f = in.readFloat();
+            j = in.readLong();
+            d = in.readDouble();
+            str = (String) in.readObject();
+            parent = in.readObject();
+            left = in.readObject();
+            right = in.readObject();
+        }
     }
 
     /**
@@ -105,20 +105,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -126,33 +126,32 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
-     * Run benchmark for given number of batches, with each batch containing 
+     * Run benchmark for given number of batches, with each batch containing
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/FloatArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/FloatArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of float array reads/writes.
  */
 public class FloatArrays implements Benchmark {
-    
+
     /**
      * Write and read float arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	float[][] arrays = new float[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        float[][] arrays = new float[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, float[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, float[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Floats.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Floats.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of float reads/writes.
  */
 public class Floats implements Benchmark {
-    
+
     /**
      * Write and read float values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeFloat((float) 0.0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readFloat();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeFloat((float) 0.0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readFloat();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/GetPutFieldTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/GetPutFieldTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,19 +39,19 @@
  * GetField()/PutField() API.
  */
 public class GetPutFieldTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -76,19 +76,19 @@
             fields.put("right", right);
             out.writeFields();
         }
-        
-        private void readObject(ObjectInputStream in) 
+
+        private void readObject(ObjectInputStream in)
             throws IOException, ClassNotFoundException
         {
             ObjectInputStream.GetField fields = in.readFields();
-	    z = fields.get("z", false);
-	    b = fields.get("b", (byte) 0);
-	    c = fields.get("c", (char) 0);
-	    s = fields.get("s", (short) 0);
-	    i = fields.get("i", (int) 0);
-	    f = fields.get("f", (float) 0.0);
-	    j = fields.get("j", (long) 0);
-	    d = fields.get("d", (double) 0.0);
+            z = fields.get("z", false);
+            b = fields.get("b", (byte) 0);
+            c = fields.get("c", (char) 0);
+            s = fields.get("s", (short) 0);
+            i = fields.get("i", (int) 0);
+            f = fields.get("f", (float) 0.0);
+            j = fields.get("j", (long) 0);
+            d = fields.get("d", (double) 0.0);
             str = (String) fields.get("str", null);
             parent = fields.get("parent", null);
             left = fields.get("left", null);
@@ -104,20 +104,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -125,33 +125,32 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
-     * Run benchmark for given number of batches, with each batch containing 
+     * Run benchmark for given number of batches, with each batch containing
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/IntArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/IntArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of int array reads/writes.
  */
 public class IntArrays implements Benchmark {
-    
+
     /**
      * Write and read int arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	int[][] arrays = new int[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        int[][] arrays = new int[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, int[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Ints.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Ints.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of int reads/writes.
  */
 public class Ints implements Benchmark {
-    
+
     /**
      * Write and read int values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeInt(0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readInt();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeInt(0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readInt();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/LongArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/LongArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of long array reads/writes.
  */
 public class LongArrays implements Benchmark {
-    
+
     /**
      * Write and read long arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	long[][] arrays = new long[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        long[][] arrays = new long[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, long[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, long[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Longs.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Longs.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of long reads/writes.
  */
 public class Longs implements Benchmark {
-    
+
     /**
      * Write and read long values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeLong(0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readLong();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeLong(0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readLong();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Main.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Main.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -46,7 +46,7 @@
  * Object serialization benchmark mainline.
  */
 public class Main {
-    
+
     static final String CONFFILE = "/bench/serial/config";
     static final String VERSION = "1.3";
 
@@ -80,55 +80,55 @@
         p.println("  -o <file>       specify output file");
         p.println("  -c <file>       specify (non-default) configuration file");
         p.println("  -html           format output as html (default is text)");
-	p.println("  -xml            format output as xml");
+        p.println("  -xml            format output as xml");
     }
 
     /**
      * Print error message and exit.
      */
     static void die(String mesg) {
-	System.err.println(mesg);
-	System.exit(1);
+        System.err.println(mesg);
+        System.exit(1);
     }
 
     /**
      * Mainline parses command line, then hands off to benchmark harness.
      */
     public static void main(String[] args) {
-	parseArgs(args);
-	setupStreams();
-	if (list) {
-	    listConfig();
-	} else {
-	    setupHarness();
-	    setupReporter();
-	    if (exitOnTimer) {
-		setupTimer(testDurationSeconds);
-		while (true) {
-		    runBenchmarks();
-		    if (exitRequested) {
-			System.exit(0);
-		    }
-		}
-	    } else {
-		runBenchmarks();
-		System.exit(0);
-	    }
-	}
+        parseArgs(args);
+        setupStreams();
+        if (list) {
+            listConfig();
+        } else {
+            setupHarness();
+            setupReporter();
+            if (exitOnTimer) {
+                setupTimer(testDurationSeconds);
+                while (true) {
+                    runBenchmarks();
+                    if (exitRequested) {
+                        System.exit(0);
+                    }
+                }
+            } else {
+                runBenchmarks();
+                System.exit(0);
+            }
+        }
     }
-        
+
     /**
      * Parse command-line arguments.
      */
     static void parseArgs(String[] args) {
-	for (int i = 0; i < args.length; i++) {
-	    if (args[i].equals("-h")) {
-		usage();
-		System.exit(0);
-	    } else if (args[i].equals("-v")) {
-		verbose = true;
-	    } else if (args[i].equals("-l")) {
-		list = true;
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-h")) {
+                usage();
+                System.exit(0);
+            } else if (args[i].equals("-v")) {
+                verbose = true;
+            } else if (args[i].equals("-l")) {
+                list = true;
             } else if (args[i].equals("-t")) {
                 if (++i >= args.length)
                     die("Error: no timeout value specified");
@@ -138,64 +138,64 @@
                 } catch (Exception e) {
                     die("Error: unable to determine timeout value");
                 }
-	    } else if (args[i].equals("-o")) {
-		if (++i >= args.length)
-		    die("Error: no output file specified");
-		try {
-		    repstr = new FileOutputStream(args[i]);
-		} catch (IOException e) {
-		    die("Error: unable to open \"" + args[i] + "\"");
-		}
-	    } else if (args[i].equals("-c")) {
-		if (++i >= args.length)
-		    die("Error: no config file specified");
-		try {
-		    confstr = new FileInputStream(args[i]);
-		} catch (IOException e) {
-		    die("Error: unable to open \"" + args[i] + "\"");
-		}
-	    } else if (args[i].equals("-html")) {
-		if (format != TEXT)
-		    die("Error: conflicting formats");
-		format = HTML;
-	    } else if (args[i].equals("-xml")) {
-		if (format != TEXT)
-		    die("Error: conflicting formats");
-		format = XML;
-	    } else {
-		System.err.println("Illegal option: \"" + args[i] + "\"");
-		usage();
-		System.exit(1);
-	    }
-	}
+            } else if (args[i].equals("-o")) {
+                if (++i >= args.length)
+                    die("Error: no output file specified");
+                try {
+                    repstr = new FileOutputStream(args[i]);
+                } catch (IOException e) {
+                    die("Error: unable to open \"" + args[i] + "\"");
+                }
+            } else if (args[i].equals("-c")) {
+                if (++i >= args.length)
+                    die("Error: no config file specified");
+                try {
+                    confstr = new FileInputStream(args[i]);
+                } catch (IOException e) {
+                    die("Error: unable to open \"" + args[i] + "\"");
+                }
+            } else if (args[i].equals("-html")) {
+                if (format != TEXT)
+                    die("Error: conflicting formats");
+                format = HTML;
+            } else if (args[i].equals("-xml")) {
+                if (format != TEXT)
+                    die("Error: conflicting formats");
+                format = XML;
+            } else {
+                System.err.println("Illegal option: \"" + args[i] + "\"");
+                usage();
+                System.exit(1);
+            }
+        }
     }
-        
+
     /**
      * Set up configuration file and report streams, if not set already.
      */
     static void setupStreams() {
-	if (repstr == null)
-	    repstr = System.out;
-	if (confstr == null)
-	    confstr = (new Main()).getClass().getResourceAsStream(CONFFILE);
-	if (confstr == null)
-	    die("Error: unable to find default config file");
+        if (repstr == null)
+            repstr = System.out;
+        if (confstr == null)
+            confstr = (new Main()).getClass().getResourceAsStream(CONFFILE);
+        if (confstr == null)
+            die("Error: unable to find default config file");
     }
-    
+
     /**
      * Print contents of configuration file to selected output stream.
      */
     static void listConfig() {
-	try {
-	    byte[] buf = new byte[256];
-	    int len;
-	    while ((len = confstr.read(buf)) != -1)
-		repstr.write(buf, 0, len);
-	} catch (IOException e) {
-	    die("Error: failed to list config file");
-	}
+        try {
+            byte[] buf = new byte[256];
+            int len;
+            while ((len = confstr.read(buf)) != -1)
+                repstr.write(buf, 0, len);
+        } catch (IOException e) {
+            die("Error: failed to list config file");
+        }
     }
-    
+
     /**
      * Set up the timer to end the test.
      *
@@ -222,12 +222,12 @@
         } catch (ConfigFormatException e) {
             String errmsg = e.getMessage();
             if (errmsg != null) {
-		die("Error parsing config file: " + errmsg);
-	    } else {
+                die("Error parsing config file: " + errmsg);
+            } else {
                 die("Error: illegal config file syntax");
-	    }
+            }
         } catch (IOException e) {
-	    die("Error: failed to read config file");
+            die("Error: failed to read config file");
         }
     }
 
@@ -236,22 +236,22 @@
      */
     static void setupReporter() {
         String title = "Object Serialization Benchmark, v" + VERSION;
-	switch (format) {
-	    case TEXT:
-		reporter = new TextReporter(repstr, title);
-		break;
-		
-	    case HTML:
-		reporter = new HtmlReporter(repstr, title);
-		break;
+        switch (format) {
+            case TEXT:
+                reporter = new TextReporter(repstr, title);
+                break;
 
-	    case XML:
-		reporter = new XmlReporter(repstr, title);
-		break;
-		
-	    default:
-		die("Error: unrecognized format type");
-	}
+            case HTML:
+                reporter = new HtmlReporter(repstr, title);
+                break;
+
+            case XML:
+                reporter = new XmlReporter(repstr, title);
+                break;
+
+            default:
+                die("Error: unrecognized format type");
+        }
     }
 
     /**
@@ -261,4 +261,3 @@
         harness.runBenchmarks(reporter, verbose);
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ObjArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ObjArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,16 +39,16 @@
 
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -57,7 +57,7 @@
             }
         }
     }
-    
+
     /**
      * Write and read object arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -66,34 +66,34 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[][] arrays = genArrays(size, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[][] arrays = genArrays(size, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Generate object arrays.
      */
     Node[][] genArrays(int size, int narrays) {
-	Node[][] arrays = new Node[narrays][size];
-	for (int i = 0; i < narrays; i++) {
-	    for (int j = 0; j < size; j++) {
-		arrays[i][j] = new Node(null, 0);
-	    }
-	}
-	return arrays;
+        Node[][] arrays = new Node[narrays][size];
+        for (int i = 0; i < narrays; i++) {
+            for (int j = 0; j < size; j++) {
+                arrays[i][j] = new Node(null, 0);
+            }
+        }
+        return arrays;
     }
 
     /**
@@ -101,22 +101,20 @@
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ObjTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ObjTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,19 +36,19 @@
  * Benchmark for testing speed of writes and reads of an object tree.
  */
 public class ObjTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         boolean z;
-	byte b;
-	char c;
-	short s;
-	int i;
-	float f;
-	long j;
-	double d;
-	String str = "bodega";
+        byte b;
+        char c;
+        short s;
+        int i;
+        float f;
+        long j;
+        double d;
+        String str = "bodega";
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -66,20 +66,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -87,33 +87,32 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
-     * Run benchmark for given number of batches, with each batch containing 
+     * Run benchmark for given number of batches, with each batch containing
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ProxyArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ProxyArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -42,15 +42,15 @@
 public class ProxyArrays implements Benchmark {
 
     static class DummyHandler implements InvocationHandler, Serializable {
-	public Object invoke(Object proxy, Method method, Object[] args)
-	    throws Throwable
-	{
-	    return null;
-	}
+        public Object invoke(Object proxy, Method method, Object[] args)
+            throws Throwable
+        {
+            return null;
+        }
     }
-    
+
     static interface DummyInterface {
-	public void foo();
+        public void foo();
     }
 
     /**
@@ -61,40 +61,40 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Proxy[][] arrays = genArrays(size, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Proxy[][] arrays = genArrays(size, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Generate proxy arrays.
      */
     Proxy[][] genArrays(int size, int narrays) throws Exception {
-	Class proxyClass = 
-	    Proxy.getProxyClass(DummyInterface.class.getClassLoader(),
-		    new Class[] { DummyInterface.class });
-	Constructor proxyCons = 
-	    proxyClass.getConstructor(new Class[] { InvocationHandler.class });
-	Object[] consArgs = new Object[] { new DummyHandler() };
-	Proxy[][] arrays = new Proxy[narrays][size];
-	for (int i = 0; i < narrays; i++) {
-	    for (int j = 0; j < size; j++) {
-		arrays[i][j] = (Proxy) proxyCons.newInstance(consArgs);
-	    }
-	}
-	return arrays;
+        Class proxyClass =
+            Proxy.getProxyClass(DummyInterface.class.getClassLoader(),
+                    new Class[] { DummyInterface.class });
+        Constructor proxyCons =
+            proxyClass.getConstructor(new Class[] { InvocationHandler.class });
+        Object[] consArgs = new Object[] { new DummyHandler() };
+        Proxy[][] arrays = new Proxy[narrays][size];
+        for (int i = 0; i < narrays; i++) {
+            for (int j = 0; j < size; j++) {
+                arrays[i][j] = (Proxy) proxyCons.newInstance(consArgs);
+            }
+        }
+        return arrays;
     }
 
     /**
@@ -102,22 +102,20 @@
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Proxy[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Proxy[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ProxyClassDesc.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ProxyClassDesc.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,7 +38,7 @@
  * Benchmark for testing speed of proxy class descriptor reads/writes.
  */
 public class ProxyClassDesc implements Benchmark {
-    
+
     static interface A1 {};
     static interface A2 {};
     static interface A3 {};
@@ -54,75 +54,74 @@
     static interface C3 {};
     static interface C4 {};
     static interface C5 {};
-    
+
     /**
      * Write and read proxy class descriptors to/from a stream.
      * Arguments: <# cycles>
      */
     public long run(String[] args) throws Exception {
-	int ncycles = Integer.parseInt(args[0]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	ObjectStreamClass[] descs = genDescs();
+        int ncycles = Integer.parseInt(args[0]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
+        ObjectStreamClass[] descs = genDescs();
 
-	doReps(oout, oin, sbuf, descs, 1);	// warmup
+        doReps(oout, oin, sbuf, descs, 1);      // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, descs, ncycles);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, descs, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Generate proxy class descriptors.
      */
     ObjectStreamClass[] genDescs() {
-	ClassLoader ldr = ProxyClassDesc.class.getClassLoader();
-	Class[] ifaces = new Class[3];
-	Class[] a = 
-	    new Class[] { A1.class, A2.class, A3.class, A4.class, A5.class };
-	Class[] b = 
-	    new Class[] { B1.class, B2.class, B3.class, B4.class, B5.class };
-	Class[] c = 
-	    new Class[] { C1.class, C2.class, C3.class, C4.class, C5.class };
-	ObjectStreamClass[] descs = 
-	    new ObjectStreamClass[a.length * b.length * c.length];
-	int n = 0;
-	for (int i = 0; i < a.length; i++) {
-	    ifaces[0] = a[i];
-	    for (int j = 0; j < b.length; j++) {
-		ifaces[1] = b[j];
-		for (int k = 0; k < c.length; k++) {
-		    ifaces[2] = c[k];
-		    Class proxyClass = Proxy.getProxyClass(ldr, ifaces);
-		    descs[n++] = ObjectStreamClass.lookup(proxyClass);
-		}
-	    }
-	}
-	return descs;
+        ClassLoader ldr = ProxyClassDesc.class.getClassLoader();
+        Class[] ifaces = new Class[3];
+        Class[] a =
+            new Class[] { A1.class, A2.class, A3.class, A4.class, A5.class };
+        Class[] b =
+            new Class[] { B1.class, B2.class, B3.class, B4.class, B5.class };
+        Class[] c =
+            new Class[] { C1.class, C2.class, C3.class, C4.class, C5.class };
+        ObjectStreamClass[] descs =
+            new ObjectStreamClass[a.length * b.length * c.length];
+        int n = 0;
+        for (int i = 0; i < a.length; i++) {
+            ifaces[0] = a[i];
+            for (int j = 0; j < b.length; j++) {
+                ifaces[1] = b[j];
+                for (int k = 0; k < c.length; k++) {
+                    ifaces[2] = c[k];
+                    Class proxyClass = Proxy.getProxyClass(ldr, ifaces);
+                    descs[n++] = ObjectStreamClass.lookup(proxyClass);
+                }
+            }
+        }
+        return descs;
     }
 
     /**
      * Run benchmark for given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, ObjectStreamClass[] descs, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, ObjectStreamClass[] descs, int ncycles)
+        throws Exception
     {
-	int ndescs = descs.length;
-	for (int i = 0; i < ncycles; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ndescs; j++) {
-		oout.writeObject(descs[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ndescs; j++) {
-		oin.readObject();
-	    }
-	}
+        int ndescs = descs.length;
+        for (int i = 0; i < ncycles; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ndescs; j++) {
+                oout.writeObject(descs[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ndescs; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/RepeatObjs.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/RepeatObjs.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,7 +36,7 @@
  * Benchmark for testing speed of reads/writes of repeated objects.
  */
 public class RepeatObjs implements Benchmark {
-    
+
     static class Node implements Serializable {
     }
 
@@ -49,50 +49,49 @@
      * Arguments: <# objects> <# cycles>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	Node[] objs = genObjs(size);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, objs, 1);	// warmup
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        Node[] objs = genObjs(size);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, objs, nbatches);
+        doReps(oout, oin, sbuf, objs, 1);       // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, objs, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Generate objects.
      */
     Node[] genObjs(int nobjs) {
-	Node[] objs = new Node[nobjs];
-	for (int i = 0; i < nobjs; i++)
-	    objs[i] = new Node();
-	return objs;
+        Node[] objs = new Node[nobjs];
+        for (int i = 0; i < nobjs; i++)
+            objs[i] = new Node();
+        return objs;
     }
-    
+
     /**
      * Run benchmark for given number of batches.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	    	StreamBuffer sbuf, Node[] objs, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] objs, int nbatches)
+        throws Exception
     {
-	int nobjs = objs.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < nobjs; j++) {
-		oout.writeObject(objs[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < nobjs; j++) {
-		oin.readObject();
-	    }
-	}
+        int nobjs = objs.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < nobjs; j++) {
+                oout.writeObject(objs[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < nobjs; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ReplaceTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ReplaceTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -37,15 +37,15 @@
  * objects.
  */
 public class ReplaceTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         Object parent, left, right;
-        
-	Node(Object parent, Object left, Object right) {
-	    this.parent = parent;
-	    this.left = left;
-	    this.right = right;
-	}
+
+        Node(Object parent, Object left, Object right) {
+            this.parent = parent;
+            this.left = left;
+            this.right = right;
+        }
 
         Node(Object parent, int depth) {
             this.parent = parent;
@@ -54,26 +54,26 @@
                 right = new Node(this, depth - 1);
             }
         }
-	
-	Object writeReplace() {
-	    return new RepNode(parent, left, right);
-	}
+
+        Object writeReplace() {
+            return new RepNode(parent, left, right);
+        }
     }
-    
+
     static class RepNode implements Serializable {
-	Object parent, left, right;
-	
-	RepNode(Object parent, Object left, Object right) {
-	    this.parent = parent;
-	    this.left = left;
-	    this.right = right;
-	}
-	
-	Object readResolve() {
-	    return new Node(parent, left, right);
-	}
+        Object parent, left, right;
+
+        RepNode(Object parent, Object left, Object right) {
+            this.parent = parent;
+            this.left = left;
+            this.right = right;
+        }
+
+        Object readResolve() {
+            return new Node(parent, left, right);
+        }
     }
-    
+
     /**
      * Write and read a tree of replaceable objects from a stream.  The
      * benchmark is run in batches: each "batch" consists of a fixed number of
@@ -82,20 +82,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -103,11 +103,11 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
@@ -115,21 +115,20 @@
      * the given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/ShortArrays.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/ShortArrays.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of short array reads/writes.
  */
 public class ShortArrays implements Benchmark {
-    
+
     /**
      * Write and read short arrays to/from a stream.  The benchmark is run in
      * batches, with each batch consisting of a fixed number of read/write
@@ -44,44 +44,42 @@
      * Arguments: <array size> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int size = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	short[][] arrays = new short[ncycles][size];
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
+        int size = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        short[][] arrays = new short[ncycles][size];
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	doReps(oout, oin, sbuf, arrays, 1);	// warmup
+        doReps(oout, oin, sbuf, arrays, 1);     // warmup
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, arrays, nbatches);
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, arrays, nbatches);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, short[][] arrays, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, short[][] arrays, int nbatches)
+        throws Exception
     {
-	int ncycles = arrays.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(arrays[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = arrays.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(arrays[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Shorts.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Shorts.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -35,7 +35,7 @@
  * Benchmark for testing speed of short reads/writes.
  */
 public class Shorts implements Benchmark {
-    
+
     /**
      * Write and read short values to/from a stream.  The benchmark is run in
      * batches: each "batch" consists of a fixed number of read/write cycles,
@@ -44,39 +44,38 @@
      * Arguments: <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int nbatches = Integer.parseInt(args[0]);
-	int ncycles = Integer.parseInt(args[1]);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin =
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, 1, ncycles);	// warmup
+        int nbatches = Integer.parseInt(args[0]);
+        int ncycles = Integer.parseInt(args[1]);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, nbatches, ncycles);
+        doReps(oout, oin, sbuf, 1, ncycles);    // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
-    
+
     /**
      * Run benchmark for given number of batches, with given number of cycles
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeShort(0);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readShort();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeShort(0);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readShort();
+            }
+        }
     }
 }
-    
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/SmallObjTrees.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/SmallObjTrees.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,10 +36,10 @@
  * Benchmark for testing speed of writes and reads of a tree of small objects.
  */
 public class SmallObjTrees implements Benchmark {
-    
+
     static class Node implements Serializable {
         Object parent, left, right;
-        
+
         Node(Object parent, int depth) {
             this.parent = parent;
             if (depth > 0) {
@@ -57,20 +57,20 @@
      * Arguments: <tree depth> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int depth = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	Node[] trees = genTrees(depth, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, trees, 1);	// warmup
+        int depth = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        Node[] trees = genTrees(depth, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, trees, nbatches);
+        doReps(oout, oin, sbuf, trees, 1);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, trees, nbatches);
         return System.currentTimeMillis() - start;
     }
 
@@ -78,11 +78,11 @@
      * Generate object trees.
      */
     Node[] genTrees(int depth, int ntrees) {
-	Node[] trees = new Node[ntrees];
-	for (int i = 0; i < ntrees; i++) {
-	    trees[i] = new Node(null, depth);
-	}
-	return trees;
+        Node[] trees = new Node[ntrees];
+        for (int i = 0; i < ntrees; i++) {
+            trees[i] = new Node(null, depth);
+        }
+        return trees;
     }
 
     /**
@@ -90,21 +90,20 @@
      * given number of cycles.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, Node[] trees, int nbatches)
-	throws Exception
+                StreamBuffer sbuf, Node[] trees, int nbatches)
+        throws Exception
     {
-	int ncycles = trees.length;
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(trees[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        int ncycles = trees.length;
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(trees[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/StreamBuffer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/StreamBuffer.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -47,85 +47,85 @@
  * StreamBufferInputStream.read().
  */
 public class StreamBuffer {
-    
+
     /**
      * Output stream for writing to stream buffer.
      */
     private class StreamBufferOutputStream extends OutputStream {
-	
-	private int pos;
+
+        private int pos;
+
+        public void write(int b) throws IOException {
+            if (mode != WRITE_MODE)
+                throw new IOException();
+            while (pos >= buf.length)
+                grow();
+            buf[pos++] = (byte) b;
+        }
 
-	public void write(int b) throws IOException {
-	    if (mode != WRITE_MODE)
-		throw new IOException();
-	    while (pos >= buf.length)
-		grow();
-	    buf[pos++] = (byte) b;
-	}
-	
-	public void write(byte[] b, int off, int len) throws IOException {
-	    if (mode != WRITE_MODE)
-		throw new IOException();
-	    while (pos + len > buf.length)
-		grow();
-	    System.arraycopy(b, off, buf, pos, len);
-	    pos += len;
-	}
-	
-	public void close() throws IOException {
-	    if (mode != WRITE_MODE)
-		throw new IOException();
-	    mode = READ_MODE;
-	}
+        public void write(byte[] b, int off, int len) throws IOException {
+            if (mode != WRITE_MODE)
+                throw new IOException();
+            while (pos + len > buf.length)
+                grow();
+            System.arraycopy(b, off, buf, pos, len);
+            pos += len;
+        }
+
+        public void close() throws IOException {
+            if (mode != WRITE_MODE)
+                throw new IOException();
+            mode = READ_MODE;
+        }
     }
-    
+
     /**
      * Input stream for reading from stream buffer.
      */
     private class StreamBufferInputStream extends InputStream {
-	
-	private int pos;
+
+        private int pos;
+
+        public int read() throws IOException {
+            if (mode == CLOSED_MODE)
+                throw new IOException();
+            mode = READ_MODE;
+            return (pos < out.pos) ? (buf[pos++] & 0xFF) : -1;
+        }
+
+        public int read(byte[] b, int off, int len) throws IOException {
+            if (mode == CLOSED_MODE)
+                throw new IOException();
+            mode = READ_MODE;
+            int avail = out.pos - pos;
+            int rlen = (avail < len) ? avail : len;
+            System.arraycopy(buf, pos, b, off, rlen);
+            pos += rlen;
+            return rlen;
+        }
 
-	public int read() throws IOException {
-	    if (mode == CLOSED_MODE)
-		throw new IOException();
-	    mode = READ_MODE;
-	    return (pos < out.pos) ? (buf[pos++] & 0xFF) : -1;
-	}
-	
-	public int read(byte[] b, int off, int len) throws IOException {
-	    if (mode == CLOSED_MODE)
-		throw new IOException();
-	    mode = READ_MODE;
-	    int avail = out.pos - pos;
-	    int rlen = (avail < len) ? avail : len;
-	    System.arraycopy(buf, pos, b, off, rlen);
-	    pos += rlen;
-	    return rlen;
-	}
-	
-	public long skip(long len) throws IOException {
-	    if (mode == CLOSED_MODE)
-		throw new IOException();
-	    mode = READ_MODE;
-	    int avail = out.pos - pos;
-	    long slen = (avail < len) ? avail : len;
-	    pos += slen;
-	    return slen;
-	}
+        public long skip(long len) throws IOException {
+            if (mode == CLOSED_MODE)
+                throw new IOException();
+            mode = READ_MODE;
+            int avail = out.pos - pos;
+            long slen = (avail < len) ? avail : len;
+            pos += slen;
+            return slen;
+        }
 
-	public int available() throws IOException {
-	    if (mode == CLOSED_MODE)
-		throw new IOException();
-	    mode = READ_MODE;
-	    return out.pos - pos;
-	}
-	
-	public void close() throws IOException {
-	    if (mode == CLOSED_MODE)
-		throw new IOException();
-	    mode = CLOSED_MODE;
-	}
+        public int available() throws IOException {
+            if (mode == CLOSED_MODE)
+                throw new IOException();
+            mode = READ_MODE;
+            return out.pos - pos;
+        }
+
+        public void close() throws IOException {
+            if (mode == CLOSED_MODE)
+                throw new IOException();
+            mode = CLOSED_MODE;
+        }
     }
 
     private static final int START_BUFSIZE = 256;
@@ -140,30 +140,29 @@
     private int mode = WRITE_MODE;
 
     public StreamBuffer() {
-	this(START_BUFSIZE);
+        this(START_BUFSIZE);
     }
-    
+
     public StreamBuffer(int size) {
-	buf = new byte[size];
+        buf = new byte[size];
     }
-    
+
     public OutputStream getOutputStream() {
-	return out;
+        return out;
     }
-    
+
     public InputStream getInputStream() {
-	return in;
+        return in;
     }
-    
+
     public void reset() {
-	in.pos = out.pos = 0;
-	mode = WRITE_MODE;
+        in.pos = out.pos = 0;
+        mode = WRITE_MODE;
     }
-    
+
     private void grow() {
-	byte[] newbuf = new byte[buf.length * GROW_FACTOR];
-	System.arraycopy(buf, 0, newbuf, 0, buf.length);
-	buf = newbuf;
+        byte[] newbuf = new byte[buf.length * GROW_FACTOR];
+        System.arraycopy(buf, 0, newbuf, 0, buf.length);
+        buf = newbuf;
     }
 }
-
--- a/jdk/test/java/rmi/reliability/benchmark/bench/serial/Strings.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/benchmark/bench/serial/Strings.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -45,20 +45,20 @@
      * Arguments: <string length> <# batches> <# cycles per batch>
      */
     public long run(String[] args) throws Exception {
-	int slen = Integer.parseInt(args[0]);
-	int nbatches = Integer.parseInt(args[1]);
-	int ncycles = Integer.parseInt(args[2]);
-	String[] strs = genStrings(slen, ncycles);
-	StreamBuffer sbuf = new StreamBuffer();
-	ObjectOutputStream oout = 
-	    new ObjectOutputStream(sbuf.getOutputStream());
-	ObjectInputStream oin = 
-	    new ObjectInputStream(sbuf.getInputStream());
-	
-	doReps(oout, oin, sbuf, strs, 1, ncycles);	// warmup
+        int slen = Integer.parseInt(args[0]);
+        int nbatches = Integer.parseInt(args[1]);
+        int ncycles = Integer.parseInt(args[2]);
+        String[] strs = genStrings(slen, ncycles);
+        StreamBuffer sbuf = new StreamBuffer();
+        ObjectOutputStream oout =
+            new ObjectOutputStream(sbuf.getOutputStream());
+        ObjectInputStream oin =
+            new ObjectInputStream(sbuf.getInputStream());
 
-	long start = System.currentTimeMillis();
-	doReps(oout, oin, sbuf, strs, nbatches, ncycles);
+        doReps(oout, oin, sbuf, strs, 1, ncycles);      // warmup
+
+        long start = System.currentTimeMillis();
+        doReps(oout, oin, sbuf, strs, nbatches, ncycles);
         return System.currentTimeMillis() - start;
     }
 
@@ -66,16 +66,16 @@
      * Generate nstrings random strings, each of length len.
      */
     String[] genStrings(int len, int nstrings) {
-	String[] strs = new String[nstrings];
-	char[] ca = new char[len];
-	Random rand = new Random(System.currentTimeMillis());
-	for (int i = 0; i < nstrings; i++) {
-	    for (int j = 0; j < len; j++) {
-		ca[j] = (char) rand.nextInt();
-	    }
-	    strs[i] = new String(ca);
-	}
-	return strs;
+        String[] strs = new String[nstrings];
+        char[] ca = new char[len];
+        Random rand = new Random(System.currentTimeMillis());
+        for (int i = 0; i < nstrings; i++) {
+            for (int j = 0; j < len; j++) {
+                ca[j] = (char) rand.nextInt();
+            }
+            strs[i] = new String(ca);
+        }
+        return strs;
     }
 
     /**
@@ -83,20 +83,19 @@
      * for each batch.
      */
     void doReps(ObjectOutputStream oout, ObjectInputStream oin,
-	        StreamBuffer sbuf, String[] strs, int nbatches, int ncycles)
-	throws Exception
+                StreamBuffer sbuf, String[] strs, int nbatches, int ncycles)
+        throws Exception
     {
-	for (int i = 0; i < nbatches; i++) {
-	    sbuf.reset();
-	    oout.reset();
-	    for (int j = 0; j < ncycles; j++) {
-		oout.writeObject(strs[j]);
-	    }
-	    oout.flush();
-	    for (int j = 0; j < ncycles; j++) {
-		oin.readObject();
-	    }
-	}
+        for (int i = 0; i < nbatches; i++) {
+            sbuf.reset();
+            oout.reset();
+            for (int j = 0; j < ncycles; j++) {
+                oout.writeObject(strs[j]);
+            }
+            oout.flush();
+            for (int j = 0; j < ncycles; j++) {
+                oin.readObject();
+            }
+        }
     }
 }
-
--- a/jdk/test/java/rmi/reliability/juicer/Apple.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/Apple.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,7 +25,7 @@
 import java.rmi.RemoteException;
 
 /**
- * A remote factory for Orange instances.  This interface also 
+ * A remote factory for Orange instances.  This interface also
  * includes a method to test object array serialization.
  */
 public interface Apple extends Remote {
--- a/jdk/test/java/rmi/reliability/juicer/AppleEvent.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/AppleEvent.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,7 +26,7 @@
 
 /**
  * The AppleEvent class is simply an object to be passed to a
- * remote object exported by an applet.  The intent is to verify 
+ * remote object exported by an applet.  The intent is to verify
  * proper object serialization of arrays.
  */
 public class AppleEvent implements Serializable {
@@ -39,24 +39,24 @@
     private final Date when;
 
     public AppleEvent(int what) {
-	this.what = what;
-	this.when = new Date();
+        this.what = what;
+        this.when = new Date();
     }
 
     public String toString() {
-	String desc = "[";
-	switch (what) {
-	case BUY:
-	    desc += "BUY";
-	    break;
-	case EAT:
-	    desc += "EAT";
-	    break;
-	case THROW:
-	    desc += "THROW";
-	    break;
-	}
-	desc += " @ " + when + "]";
-	return desc;
+        String desc = "[";
+        switch (what) {
+        case BUY:
+            desc += "BUY";
+            break;
+        case EAT:
+            desc += "EAT";
+            break;
+        case THROW:
+            desc += "THROW";
+            break;
+        }
+        desc += " @ " + when + "]";
+        return desc;
     }
 }
--- a/jdk/test/java/rmi/reliability/juicer/AppleImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/AppleImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,46 +34,46 @@
 
     private static final Logger logger = Logger.getLogger("reliability.apple");
     private final String name;
-    
+
     public AppleImpl(String name) throws RemoteException {
-	this.name = name;
+        this.name = name;
     }
 
     /**
      * Receive an array of AppleEvent objects.
      */
     public void notify(AppleEvent[] events) {
-	String threadName = Thread.currentThread().getName();
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".notify: BEGIN");
+        String threadName = Thread.currentThread().getName();
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".notify: BEGIN");
 
-	for (int i = 0; i < events.length; i++) {
-	    logger.log(Level.FINEST,
-		threadName + ": " + toString() + ".notify(): events[" 
-		+ i + "] = " + events[i].toString());
-	}
+        for (int i = 0; i < events.length; i++) {
+            logger.log(Level.FINEST,
+                threadName + ": " + toString() + ".notify(): events["
+                + i + "] = " + events[i].toString());
+        }
 
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".notify(): END");
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".notify(): END");
     }
 
     /**
      * Return a newly created and exported orange implementation.
      */
     public Orange newOrange(String name) throws RemoteException {
-	String threadName = Thread.currentThread().getName();
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".newOrange(" + name + "): BEGIN");
+        String threadName = Thread.currentThread().getName();
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".newOrange(" + name + "): BEGIN");
 
-	Orange orange = new OrangeImpl(name);
-	    
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".newOrange(" + name + "): END");
+        Orange orange = new OrangeImpl(name);
 
-	return orange;
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".newOrange(" + name + "): END");
+
+        return orange;
     }
 
     public String toString() {
-	return name;
+        return name;
     }
 }
--- a/jdk/test/java/rmi/reliability/juicer/AppleUser.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/AppleUser.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/reliability/juicer/AppleUserImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/AppleUserImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,30 +27,30 @@
  * a large number of concurrent, long running, remote method invocations
  * between many threads which have exported remote objects.  These
  * threads use remote objects that carry on deep "two party"
- * recursion.  The juicer relies on Distributed Garbage Collection to 
- * unexport these remote objects when no more references are held to them.  
+ * recursion.  The juicer relies on Distributed Garbage Collection to
+ * unexport these remote objects when no more references are held to them.
  * The two parties in the recursion are OrangeImpl and
  * OrangeEchoImpl.  OrangeImpl checks the base case of the recursion
  * so that the program will exit.
  *
  * When the AppleUserImpl.main() method is invoked, the class binds an
  * instance of itself in a registry.  A second server process,
- * an ApplicationServer, is started which looks up the recently 
+ * an ApplicationServer, is started which looks up the recently
  * bound AppleUser object.  This server is either started up in
  * the same VM or can optionally be started in a separate VM on the
- * same host or on a different host. When this test is run on the 
- * RMI profile, ApplicationServer must be started by AppleUserImpl 
+ * same host or on a different host. When this test is run on the
+ * RMI profile, ApplicationServer must be started by AppleUserImpl
  * and the complete juicer runs in a single process.
  *
  * The second server process instructs the AppleUserImpl to "use" some apples.
  * AppleUserImpl creates a new thread for each apple.  These threads
  * initiate the two party recursion.
- * 
+ *
  * Each recursive call nests to a depth determined by this
- * expression: (2 + Math.abs(random.nextInt() % (maxLevel + 1)), 
+ * expression: (2 + Math.abs(random.nextInt() % (maxLevel + 1)),
  * where maxLevel is a command line parameter.  Thus each recursive
  * call nests a random number of levels between 2 and maxLevel.
- * 
+ *
  * The test ends when an exception is encountered or the stop time
  * has been reached.
  *
@@ -81,8 +81,8 @@
  */
 public class AppleUserImpl extends UnicastRemoteObject implements AppleUser {
 
-    private static final Logger logger = 
-	Logger.getLogger("reliability.appleuser");
+    private static final Logger logger =
+        Logger.getLogger("reliability.appleuser");
     private static int threadNum = 0;
     private static long testDuration = 0;
     private static int maxLevel = 7;
@@ -91,7 +91,7 @@
     private static boolean startTestNotified = false;
     private static final Random random = new Random();
     private static final Object lock = new Object();
-    
+
     public AppleUserImpl() throws RemoteException {
     }
 
@@ -100,7 +100,7 @@
      * to start "juicing".
      */
     public synchronized void startTest() throws RemoteException {
-	startTestNotified = true;
+        startTestNotified = true;
         this.notifyAll();
     }
 
@@ -109,9 +109,9 @@
      * process and thereby terminate the test.
      */
     public void reportException(Exception status) throws RemoteException {
-	synchronized (lock) {
-	    this.status = status;
-	    lock.notifyAll();
+        synchronized (lock) {
+            this.status = status;
+            lock.notifyAll();
         }
     }
 
@@ -120,136 +120,136 @@
      * stress it out.
      */
     public synchronized void useApple(Apple apple) throws RemoteException {
-	String threadName = Thread.currentThread().getName();
-	logger.log(Level.FINEST, 
-	    threadName + ": AppleUserImpl.useApple(): BEGIN");
+        String threadName = Thread.currentThread().getName();
+        logger.log(Level.FINEST,
+            threadName + ": AppleUserImpl.useApple(): BEGIN");
 
-	AppleUserThread t =
-	    new AppleUserThread("AppleUserThread-" + (++threadNum), apple);
-	t.start();
+        AppleUserThread t =
+            new AppleUserThread("AppleUserThread-" + (++threadNum), apple);
+        t.start();
 
-	logger.log(Level.FINEST, 
-	    threadName + ": AppleUserImpl.useApple(): END");
+        logger.log(Level.FINEST,
+            threadName + ": AppleUserImpl.useApple(): END");
     }
-    
+
     /**
      * The AppleUserThread class repeatedly invokes calls on its associated
      * Apple object to stress the RMI system.
      */
     class AppleUserThread extends Thread {
 
-	final Apple apple;
+        final Apple apple;
 
-	public AppleUserThread(String name, Apple apple) {
-	    super(name);
-	    this.apple = apple;
-	}
+        public AppleUserThread(String name, Apple apple) {
+            super(name);
+            this.apple = apple;
+        }
 
-	public void run() {
-	    int orangeNum = 0;
+        public void run() {
+            int orangeNum = 0;
             long stopTime = System.currentTimeMillis() + testDuration;
             Logger logger = Logger.getLogger("reliability.appleuserthread");
-	    
-	    try {
-	        do { // loop until stopTime is reached
 
-		    /*
-		     * Notify apple with some apple events.  This tests
+            try {
+                do { // loop until stopTime is reached
+
+                    /*
+                     * Notify apple with some apple events.  This tests
                      * serialization of arrays.
-		     */
-                    int numEvents = Math.abs(random.nextInt() % 5); 
-		    AppleEvent[] events = new AppleEvent[numEvents];
-		    for (int i = 0; i < events.length; i++) {
-			events[i] = new AppleEvent(orangeNum % 3);
-		    }
-		    apple.notify(events);
+                     */
+                    int numEvents = Math.abs(random.nextInt() % 5);
+                    AppleEvent[] events = new AppleEvent[numEvents];
+                    for (int i = 0; i < events.length; i++) {
+                        events[i] = new AppleEvent(orangeNum % 3);
+                    }
+                    apple.notify(events);
 
-		    /*
-		     * Request a new orange object be created in 
+                    /*
+                     * Request a new orange object be created in
                      * the application server.
-		     */
-		    Orange orange = apple.newOrange(
-		        "Orange(" + getName() + ")-" + (++orangeNum));
+                     */
+                    Orange orange = apple.newOrange(
+                        "Orange(" + getName() + ")-" + (++orangeNum));
 
-		    /*
-		     * Create a large message of random ints to pass to orange.
-		     */
+                    /*
+                     * Create a large message of random ints to pass to orange.
+                     */
                     int msgLength = 1000 + Math.abs(random.nextInt() % 3000);
-		    int[] message = new int[msgLength];
-		    for (int i = 0; i < message.length; i++) {
-			message[i] = random.nextInt();
-		    }
+                    int[] message = new int[msgLength];
+                    for (int i = 0; i < message.length; i++) {
+                        message[i] = random.nextInt();
+                    }
 
-		    /*
-		     * Invoke recursive call on the orange.  Base case
+                    /*
+                     * Invoke recursive call on the orange.  Base case
                      * of recursion inverts messgage.
-		     */
-		    OrangeEchoImpl echo = new OrangeEchoImpl(
-			"OrangeEcho(" + getName() + ")-" + orangeNum);
-		    int[] response = orange.recurse(echo, message,
-			2 + Math.abs(random.nextInt() % (maxLevel + 1)));
+                     */
+                    OrangeEchoImpl echo = new OrangeEchoImpl(
+                        "OrangeEcho(" + getName() + ")-" + orangeNum);
+                    int[] response = orange.recurse(echo, message,
+                        2 + Math.abs(random.nextInt() % (maxLevel + 1)));
 
-		    /*
-		     * Verify message was properly inverted and not corrupted
-		     * through all the recursive method invocations.
-		     */
-		    if (response.length != message.length) {
-			throw new RuntimeException(
-			    "ERROR: CORRUPTED RESPONSE: " +
-			    "wrong length of returned array " + "(should be " +
-			    message.length + ", is " + response.length + ")");
-		    }
-		    for (int i = 0; i < message.length; i++) {
-			if (~message[i] != response[i]) {
-			    throw new RuntimeException(
-			        "ERROR: CORRUPTED RESPONSE: " +
-			        "at element " + i + "/" + message.length +
-				" of returned array (should be " +
-				Integer.toHexString(~message[i]) + ", is " +
-				Integer.toHexString(response[i]) + ")");
-			}
-		    }
+                    /*
+                     * Verify message was properly inverted and not corrupted
+                     * through all the recursive method invocations.
+                     */
+                    if (response.length != message.length) {
+                        throw new RuntimeException(
+                            "ERROR: CORRUPTED RESPONSE: " +
+                            "wrong length of returned array " + "(should be " +
+                            message.length + ", is " + response.length + ")");
+                    }
+                    for (int i = 0; i < message.length; i++) {
+                        if (~message[i] != response[i]) {
+                            throw new RuntimeException(
+                                "ERROR: CORRUPTED RESPONSE: " +
+                                "at element " + i + "/" + message.length +
+                                " of returned array (should be " +
+                                Integer.toHexString(~message[i]) + ", is " +
+                                Integer.toHexString(response[i]) + ")");
+                        }
+                    }
 
-	            try {
-	                Thread.sleep(Math.abs(random.nextInt() % 10) * 1000);
-	            } catch (InterruptedException e) {
-	            }
+                    try {
+                        Thread.sleep(Math.abs(random.nextInt() % 10) * 1000);
+                    } catch (InterruptedException e) {
+                    }
 
-	        } while (System.currentTimeMillis() < stopTime);
+                } while (System.currentTimeMillis() < stopTime);
 
-	    } catch (Exception e) {
-	        status = e;
-	    }
-	    finished = true;
-	    synchronized (lock) {
-	        lock.notifyAll();
-	    }
-	}
+            } catch (Exception e) {
+                status = e;
+            }
+            finished = true;
+            synchronized (lock) {
+                lock.notifyAll();
+            }
+        }
     }
 
     private static void usage() {
-	System.err.println("Usage: AppleUserImpl [-hours <hours> | " +
-	    					 "-seconds <seconds>]");
-	System.err.println("                     [-maxLevel <maxLevel>]");
-	System.err.println("                     [-othervm]");
-	System.err.println("                     [-exit]");
-	System.err.println("  hours    The number of hours to run the juicer.");
-	System.err.println("           The default is 0 hours.");
-	System.err.println("  seconds  The number of seconds to run the juicer.");
-	System.err.println("           The default is 0 seconds.");
-	System.err.println("  maxLevel The maximum number of levels to ");
-	System.err.println("           recurse on each call.");
-	System.err.println("           The default is 7 levels.");
-	System.err.println("  othervm  If present, the VM will wait for the");
-	System.err.println("           ApplicationServer to start in");
-	System.err.println("           another process.");
-	System.err.println("           The default is to run everything in");
-	System.err.println("           a single VM.");
-	System.err.println("  exit     If present, the VM will call");
-	System.err.println("           System.exit() when main() finishes.");
-	System.err.println("           The default is to not call");
-	System.err.println("           System.exit().");
-	System.err.println();
+        System.err.println("Usage: AppleUserImpl [-hours <hours> | " +
+                                                 "-seconds <seconds>]");
+        System.err.println("                     [-maxLevel <maxLevel>]");
+        System.err.println("                     [-othervm]");
+        System.err.println("                     [-exit]");
+        System.err.println("  hours    The number of hours to run the juicer.");
+        System.err.println("           The default is 0 hours.");
+        System.err.println("  seconds  The number of seconds to run the juicer.");
+        System.err.println("           The default is 0 seconds.");
+        System.err.println("  maxLevel The maximum number of levels to ");
+        System.err.println("           recurse on each call.");
+        System.err.println("           The default is 7 levels.");
+        System.err.println("  othervm  If present, the VM will wait for the");
+        System.err.println("           ApplicationServer to start in");
+        System.err.println("           another process.");
+        System.err.println("           The default is to run everything in");
+        System.err.println("           a single VM.");
+        System.err.println("  exit     If present, the VM will call");
+        System.err.println("           System.exit() when main() finishes.");
+        System.err.println("           The default is to not call");
+        System.err.println("           System.exit().");
+        System.err.println();
     }
 
     /**
@@ -257,122 +257,122 @@
      * an apple user implementation in an rmiregistry running on localhost.
      */
     public static void main(String[] args) {
-	String durationString = null;
+        String durationString = null;
         boolean othervm = false;
         boolean exit = false;
-	try {
-	    // parse command line args
-	    for (int i = 0; i < args.length ; i++ ) {
+        try {
+            // parse command line args
+            for (int i = 0; i < args.length ; i++ ) {
                 String arg = args[i];
                 if (arg.equals("-hours")) {
-		    if (durationString != null) {
-			usage();
-		    }
-		    i++;
-		    int hours = Integer.parseInt(args[i]);
-		    durationString = hours + " hours";
-		    testDuration = hours * 60 * 60 * 1000;
+                    if (durationString != null) {
+                        usage();
+                    }
+                    i++;
+                    int hours = Integer.parseInt(args[i]);
+                    durationString = hours + " hours";
+                    testDuration = hours * 60 * 60 * 1000;
                 } else if (arg.equals("-seconds")) {
-		    if (durationString != null) {
-			usage();
-		    }
-		    i++;
-		    long seconds = Long.parseLong(args[i]);
-		    durationString = seconds + " seconds";
-		    testDuration = seconds * 1000;
+                    if (durationString != null) {
+                        usage();
+                    }
+                    i++;
+                    long seconds = Long.parseLong(args[i]);
+                    durationString = seconds + " seconds";
+                    testDuration = seconds * 1000;
                 } else if (arg.equals("-maxLevel")) {
-		    i++;
-		    maxLevel = Integer.parseInt(args[i]);
+                    i++;
+                    maxLevel = Integer.parseInt(args[i]);
                 } else if (arg.equals("-othervm")) {
-		    othervm = true;
+                    othervm = true;
                 } else if (arg.equals("-exit")) {
-		    exit = true;
+                    exit = true;
                 } else {
-	            usage();
+                    usage();
                 }
             }
             if (durationString == null) {
                 durationString = testDuration + " milliseconds";
             }
-	} catch (Throwable t) {
-	    usage();
-	    throw new RuntimeException("TEST FAILED: Bad argument");
-	}
+        } catch (Throwable t) {
+            usage();
+            throw new RuntimeException("TEST FAILED: Bad argument");
+        }
 
-	AppleUserImpl user = null;
-	long startTime = 0;
-	Thread server = null;
-	int exitValue = 0;
-	try {
-	    user = new AppleUserImpl();
+        AppleUserImpl user = null;
+        long startTime = 0;
+        Thread server = null;
+        int exitValue = 0;
+        try {
+            user = new AppleUserImpl();
 
-	    synchronized (user) {
-	        // create new registry and bind new AppleUserImpl in registry
+            synchronized (user) {
+                // create new registry and bind new AppleUserImpl in registry
                 LocateRegistry.createRegistry(2006);
                 LocateRegistry.getRegistry(2006).rebind("AppleUser",user);
-    
-	        // start the other server if applicable
-	        if (othervm) {
-	            // the other server must be running in a separate process
-	            logger.log(Level.INFO, "Application server must be " +
-		        "started in separate process");
-	        } else {
-	            Class app = Class.forName("ApplicationServer");
-	            server = new Thread((Runnable) app.newInstance());
-	            logger.log(Level.INFO, "Starting application server " +
+
+                // start the other server if applicable
+                if (othervm) {
+                    // the other server must be running in a separate process
+                    logger.log(Level.INFO, "Application server must be " +
+                        "started in separate process");
+                } else {
+                    Class app = Class.forName("ApplicationServer");
+                    server = new Thread((Runnable) app.newInstance());
+                    logger.log(Level.INFO, "Starting application server " +
                         "in same process");
-	            server.start();
-	        }
+                    server.start();
+                }
 
-	        // wait for other server to call startTest method
-	        logger.log(Level.INFO, "Waiting for application server " +
+                // wait for other server to call startTest method
+                logger.log(Level.INFO, "Waiting for application server " +
                     "process to start");
-		while (!startTestNotified) {
-	           user.wait();
-	        }
-	    }
+                while (!startTestNotified) {
+                   user.wait();
+                }
+            }
 
-	    startTime = System.currentTimeMillis();
-	    logger.log(Level.INFO, "Test starting");
+            startTime = System.currentTimeMillis();
+            logger.log(Level.INFO, "Test starting");
 
-	    // wait for exception to be reported or first thread to complete
-	    logger.log(Level.INFO, "Waiting " + durationString + " for " +
-		"test to complete or exception to be thrown");
+            // wait for exception to be reported or first thread to complete
+            logger.log(Level.INFO, "Waiting " + durationString + " for " +
+                "test to complete or exception to be thrown");
 
-	    synchronized (lock) {
-		while (status == null && !finished) {
-		    lock.wait();
-	        }
-	    }
+            synchronized (lock) {
+                while (status == null && !finished) {
+                    lock.wait();
+                }
+            }
 
-	    if (status != null) {
-		throw new RuntimeException("TEST FAILED: "
-		    + "juicer server reported an exception", status);
-	    } else {
-	        logger.log(Level.INFO, "TEST PASSED");
+            if (status != null) {
+                throw new RuntimeException("TEST FAILED: "
+                    + "juicer server reported an exception", status);
+            } else {
+                logger.log(Level.INFO, "TEST PASSED");
             }
-	} catch (Exception e) {
-	    logger.log(Level.INFO, "TEST FAILED");
-	    exitValue = 1;
-	    if (exit) {
-	        e.printStackTrace();
-	    }
-  	    throw new RuntimeException("TEST FAILED: "
-  		    + "unexpected exception", e);
-	} finally {
-	    long actualDuration = System.currentTimeMillis() - startTime;
-	    logger.log(Level.INFO, "Test finished");
-	    try {
-	        UnicastRemoteObject.unexportObject(user, true);
+        } catch (Exception e) {
+            logger.log(Level.INFO, "TEST FAILED");
+            exitValue = 1;
+            if (exit) {
+                e.printStackTrace();
+            }
+            throw new RuntimeException("TEST FAILED: "
+                    + "unexpected exception", e);
+        } finally {
+            long actualDuration = System.currentTimeMillis() - startTime;
+            logger.log(Level.INFO, "Test finished");
+            try {
+                UnicastRemoteObject.unexportObject(user, true);
             } catch (NoSuchObjectException ignore) {
-	    }
-	    logger.log(Level.INFO, "Test duration was " +
-		(actualDuration/1000) + " seconds " +
-		"(" + (actualDuration/3600000) + " hours)");
-	    System.gc(); System.gc();
-	    if (exit) {
-	        System.exit(exitValue);
-	    }
+            }
+            logger.log(Level.INFO, "Test duration was " +
+                (actualDuration/1000) + " seconds " +
+                "(" + (actualDuration/3600000) + " hours)");
+            System.gc(); System.gc();
+            if (exit) {
+                System.exit(exitValue);
+            }
         }
     }
 }
--- a/jdk/test/java/rmi/reliability/juicer/ApplicationServer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/ApplicationServer.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,7 +32,7 @@
  * stress test of RMI.
  */
 public class ApplicationServer implements Runnable {
-    
+
     /** number of remote Apple objects to export */
     private static final Logger logger = Logger.getLogger("reliability.orange");
     private static final int LOOKUP_ATTEMPTS = 5;
@@ -58,102 +58,102 @@
      * them with server.
      */
     public void run() {
-	try {
-	    int i = 0;
+        try {
+            int i = 0;
 
-	    /*
-	     * Locate apple user object in registry.  The lookup will
-	     * occur until it is successful or fails LOOKUP_ATTEMPTS times.
-	     * These repeated attempts allow the ApplicationServer
-	     * to be started before the AppleUserImpl.
-	     */
-	    Exception exc = null;
-	    for (i = 0; i < LOOKUP_ATTEMPTS; i++) {
-	        try {
-		    Registry registry = LocateRegistry.getRegistry(
-			registryHost, 2006);
-		    user = (AppleUser) registry.lookup("AppleUser");
-		    user.startTest();
-		    break; //successfully obtained AppleUser
-	        } catch (Exception e) {
-		    exc = e;
-		    Thread.sleep(10000); //sleep 10 seconds and try again
-		}
-	    }
-	    if (user == null) {
-	        logger.log(Level.SEVERE, "Failed to lookup AppleUser:", exc);
-		return;
-	    }
+            /*
+             * Locate apple user object in registry.  The lookup will
+             * occur until it is successful or fails LOOKUP_ATTEMPTS times.
+             * These repeated attempts allow the ApplicationServer
+             * to be started before the AppleUserImpl.
+             */
+            Exception exc = null;
+            for (i = 0; i < LOOKUP_ATTEMPTS; i++) {
+                try {
+                    Registry registry = LocateRegistry.getRegistry(
+                        registryHost, 2006);
+                    user = (AppleUser) registry.lookup("AppleUser");
+                    user.startTest();
+                    break; //successfully obtained AppleUser
+                } catch (Exception e) {
+                    exc = e;
+                    Thread.sleep(10000); //sleep 10 seconds and try again
+                }
+            }
+            if (user == null) {
+                logger.log(Level.SEVERE, "Failed to lookup AppleUser:", exc);
+                return;
+            }
 
-	    /*
-	     * Create and export apple implementations.
-	     */
-	    try {
-		for (i = 0; i < numApples; i++) {
-		    apples[i] = new AppleImpl("AppleImpl #" + (i + 1));
-		}
-	    } catch (RemoteException e) {
-	        logger.log(Level.SEVERE, 
-		    "Failed to create AppleImpl #" + (i + 1) + ":", e);
-		user.reportException(e);
-		return;
-	    }
+            /*
+             * Create and export apple implementations.
+             */
+            try {
+                for (i = 0; i < numApples; i++) {
+                    apples[i] = new AppleImpl("AppleImpl #" + (i + 1));
+                }
+            } catch (RemoteException e) {
+                logger.log(Level.SEVERE,
+                    "Failed to create AppleImpl #" + (i + 1) + ":", e);
+                user.reportException(e);
+                return;
+            }
 
-	    /*
-	     * Hand apple objects to apple user.
-	     */
-	    try {
-		for (i = 0; i < numApples; i++) {
-		    user.useApple(apples[i]);
+            /*
+             * Hand apple objects to apple user.
+             */
+            try {
+                for (i = 0; i < numApples; i++) {
+                    user.useApple(apples[i]);
                 }
-	    } catch (RemoteException e) {
-	        logger.log(Level.SEVERE, 
-		    "Failed to register callbacks for " + apples[i] + ":", e);
-		user.reportException(e);
-		return;
-	    }
-	} catch (Exception e) {
-	    logger.log(Level.SEVERE, "Unexpected exception:", e);
-	}
+            } catch (RemoteException e) {
+                logger.log(Level.SEVERE,
+                    "Failed to register callbacks for " + apples[i] + ":", e);
+                user.reportException(e);
+                return;
+            }
+        } catch (Exception e) {
+            logger.log(Level.SEVERE, "Unexpected exception:", e);
+        }
     }
 
     private static void usage() {
-	System.err.println("Usage: ApplicationServer [-numApples <numApples>]");
-	System.err.println("                         [-registryHost <host>]");
-	System.err.println("  numApples  The number of apples (threads) to use.");
-	System.err.println("             The default is 10 apples.");
-	System.err.println("  host       The host running rmiregistry " +
-					 "which contains AppleUser.");
-	System.err.println("             The default is \"localhost\".");
-	System.err.println();
+        System.err.println("Usage: ApplicationServer [-numApples <numApples>]");
+        System.err.println("                         [-registryHost <host>]");
+        System.err.println("  numApples  The number of apples (threads) to use.");
+        System.err.println("             The default is 10 apples.");
+        System.err.println("  host       The host running rmiregistry " +
+                                         "which contains AppleUser.");
+        System.err.println("             The default is \"localhost\".");
+        System.err.println();
     }
 
     public static void main(String[] args) {
         int num = DEFAULT_NUMAPPLES;
         String host = DEFAULT_REGISTRYHOST;
 
-	// parse command line args
-	try {
+        // parse command line args
+        try {
             for (int i = 0; i < args.length ; i++ ) {
-		String arg = args[i];
-		if (arg.equals("-numApples")) {
+                String arg = args[i];
+                if (arg.equals("-numApples")) {
                     i++;
                     num = Integer.parseInt(args[i]);
-		} else if (arg.equals("-registryHost")) {
+                } else if (arg.equals("-registryHost")) {
                     i++;
                     host = args[i];
-		} else {
+                } else {
                     usage();
-		}
+                }
             }
-	} catch (Throwable t) {
+        } catch (Throwable t) {
             usage();
-	    throw new RuntimeException("TEST FAILED: Bad argument");
-	}
+            throw new RuntimeException("TEST FAILED: Bad argument");
+        }
 
-	// start the client server
-	Thread server = new Thread(new ApplicationServer(num,host));
-	server.start();
-	// main should exit once all exported remote objects are gc'd
+        // start the client server
+        Thread server = new Thread(new ApplicationServer(num,host));
+        server.start();
+        // main should exit once all exported remote objects are gc'd
     }
 }
--- a/jdk/test/java/rmi/reliability/juicer/Orange.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/Orange.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,11 +26,11 @@
 
 /**
  * Represents one remote party of the deep 2-party recursion implemented by
- * this RMI reliability test. An Orange instance recursively calls back 
+ * this RMI reliability test. An Orange instance recursively calls back
  * to it's caller, typically an OrangeEcho instance.
  * The recursion stops when it reaches a given 'level'.
  */
 public interface Orange extends Remote {
-    int[] recurse(OrangeEcho echo, int[] message, int level) 
-	throws RemoteException;
+    int[] recurse(OrangeEcho echo, int[] message, int level)
+        throws RemoteException;
 }
--- a/jdk/test/java/rmi/reliability/juicer/OrangeEcho.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/OrangeEcho.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,11 +26,11 @@
 
 /**
  * Represents one remote party of the deep 2-party recursion implemented by
- * this RMI reliability test. An OrangeEcho instance recursively calls back 
+ * this RMI reliability test. An OrangeEcho instance recursively calls back
  * to it's caller, an Orange instance.
  * The recursion stops when it reaches a given 'level'.
  */
 public interface OrangeEcho extends Remote {
     int[] recurse(Orange orange, int[] message, int level)
-	throws RemoteException;
+        throws RemoteException;
 }
--- a/jdk/test/java/rmi/reliability/juicer/OrangeEchoImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/OrangeEchoImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,12 +33,12 @@
  */
 public class OrangeEchoImpl extends UnicastRemoteObject implements OrangeEcho {
 
-    private static final Logger logger = 
-	Logger.getLogger("reliability.orangeecho");
+    private static final Logger logger =
+        Logger.getLogger("reliability.orangeecho");
     private final String name;
 
     public OrangeEchoImpl(String name) throws RemoteException {
-	this.name = name;
+        this.name = name;
     }
 
     /**
@@ -46,24 +46,24 @@
      * with the same message data and a decremented recursion level.
      */
     public int[] recurse(Orange orange, int[] message, int level)
-	throws RemoteException
+        throws RemoteException
     {
-	String threadName = Thread.currentThread().getName();
+        String threadName = Thread.currentThread().getName();
 
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".recurse(message[" 
-	    + message.length + "], " + level + "): BEGIN");
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".recurse(message["
+            + message.length + "], " + level + "): BEGIN");
 
-	int[] response = orange.recurse(this, message, level - 1);
+        int[] response = orange.recurse(this, message, level - 1);
 
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".recurse(message[" 
-	    + message.length + "], " + level + "): END");
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".recurse(message["
+            + message.length + "], " + level + "): END");
 
-	return response;
+        return response;
     }
 
     public String toString() {
-	return name;
+        return name;
     }
 }
--- a/jdk/test/java/rmi/reliability/juicer/OrangeImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/reliability/juicer/OrangeImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,7 +36,7 @@
     private final String name;
 
     public OrangeImpl(String name) throws RemoteException {
-	this.name = name;
+        this.name = name;
     }
 
     /**
@@ -44,31 +44,31 @@
      * object if not at recursion level zero.
      */
     public int[] recurse(OrangeEcho echo, int[] message, int level)
-	throws RemoteException
+        throws RemoteException
     {
-	String threadName = Thread.currentThread().getName();
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".recurse(message[" 
-	    + message.length + "], " + level + "): BEGIN");
+        String threadName = Thread.currentThread().getName();
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".recurse(message["
+            + message.length + "], " + level + "): BEGIN");
 
-	int[] response;
-	if (level > 0) {
-	    response = echo.recurse(this, message, level);
-	} else {
-	    for (int i = 0; i < message.length; i++) {
-		message[i] = ~message[i];
-	    }
-	    response = message;
-	}
+        int[] response;
+        if (level > 0) {
+            response = echo.recurse(this, message, level);
+        } else {
+            for (int i = 0; i < message.length; i++) {
+                message[i] = ~message[i];
+            }
+            response = message;
+        }
 
-	logger.log(Level.FINEST,
-	    threadName + ": " + toString() + ".recurse(message[" 
-	    + message.length + "], " + level + "): END");
+        logger.log(Level.FINEST,
+            threadName + ": " + toString() + ".recurse(message["
+            + message.length + "], " + level + "): END");
 
-	return response;
+        return response;
     }
 
     public String toString() {
-	return name;
+        return name;
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressConstants.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressConstants.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,9 +27,9 @@
 interface CompressConstants {
 
     // constants for 6-bit code values
-    static final int NOP  = 0;	// no operation: used to pad words on flush()
-    static final int RAW  = 1;	// introduces raw byte format
-    static final int BASE = 2;	// base for codes found in lookup table
+    static final int NOP  = 0;  // no operation: used to pad words on flush()
+    static final int RAW  = 1;  // introduces raw byte format
+    static final int BASE = 2;  // base for codes found in lookup table
     static final String codeTable =
-	"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
+        "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressInputStream.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressInputStream.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,7 +31,7 @@
 {
 
     public CompressInputStream(InputStream in) {
-	super(in);
+        super(in);
     }
 
     // buffer of unpacked 6-bit codes from last 32-word read
@@ -41,70 +41,70 @@
     int bufPos = 5;
 
     public int read() throws IOException {
-	try {
-	    int code;
-	    do {
-		code = readCode();
-	    } while (code == NOP);	// ignore NOP codes
+        try {
+            int code;
+            do {
+                code = readCode();
+            } while (code == NOP);      // ignore NOP codes
 
-	    if (code >= BASE)
-		return codeTable.charAt(code - BASE);
-	    else if (code == RAW) {
-		int high = readCode();
-		int low = readCode();
-		return (high << 4) | low;
-	    } else
-		throw new IOException("unknown compression code: " + code);
-	} catch (EOFException e) {
-	    return -1;
-	}
+            if (code >= BASE)
+                return codeTable.charAt(code - BASE);
+            else if (code == RAW) {
+                int high = readCode();
+                int low = readCode();
+                return (high << 4) | low;
+            } else
+                throw new IOException("unknown compression code: " + code);
+        } catch (EOFException e) {
+            return -1;
+        }
     }
 
     public int read(byte b[], int off, int len) throws IOException {
-	if (len <= 0) {
-	    return 0;
-	}
+        if (len <= 0) {
+            return 0;
+        }
 
-	int c = read();
-	if (c == -1) {
-	    return -1;
-	}
-	b[off] = (byte)c;
+        int c = read();
+        if (c == -1) {
+            return -1;
+        }
+        b[off] = (byte)c;
 
-	int i = 1;
+        int i = 1;
 /*****
-	try {
-	    for (; i < len ; i++) {
-		c = read();
-		if (c == -1) {
-		    break;
-		}
-		if (b != null) {
-		    b[off + i] = (byte)c;
-		}
-	    }
-	} catch (IOException ee) {
-	}
+        try {
+            for (; i < len ; i++) {
+                c = read();
+                if (c == -1) {
+                    break;
+                }
+                if (b != null) {
+                    b[off + i] = (byte)c;
+                }
+            }
+        } catch (IOException ee) {
+        }
  *****/
-	return i;
+        return i;
     }
 
     private int readCode() throws IOException {
-	if (bufPos == 5) {
-	    int b1 = in.read();
-	    int b2 = in.read();
-	    int b3 = in.read();
-	    int b4 = in.read();
-	    if ((b1 | b2 | b3 | b4) < 0)
-		throw new EOFException();
-	    int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
-	    buf[0] = (pack >>> 24) & 0x3F;
-	    buf[1] = (pack >>> 18) & 0x3F;
-	    buf[2] = (pack >>> 12) & 0x3F;
-	    buf[3] = (pack >>>  6) & 0x3F;
-	    buf[4] = (pack >>>  0) & 0x3F;
-	    bufPos = 0;
-	}
-	return buf[bufPos++];
+        if (bufPos == 5) {
+            int b1 = in.read();
+            int b2 = in.read();
+            int b3 = in.read();
+            int b4 = in.read();
+            if ((b1 | b2 | b3 | b4) < 0)
+                throw new EOFException();
+            int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
+            buf[0] = (pack >>> 24) & 0x3F;
+            buf[1] = (pack >>> 18) & 0x3F;
+            buf[2] = (pack >>> 12) & 0x3F;
+            buf[3] = (pack >>>  6) & 0x3F;
+            buf[4] = (pack >>>  0) & 0x3F;
+            bufPos = 0;
+        }
+        return buf[bufPos++];
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressOutputStream.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/CompressOutputStream.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,7 +31,7 @@
 {
 
     public CompressOutputStream(OutputStream out) {
-	super(out);
+        super(out);
     }
 
     // buffer of 6-bit codes to pack into next 32-bit word
@@ -41,44 +41,44 @@
     int bufPos = 0;
 
     public void write(int b) throws IOException {
-	b &= 0xFF;			// force argument to a byte
+        b &= 0xFF;                      // force argument to a byte
 
-	int pos = codeTable.indexOf((char)b);
-	if (pos != -1)
-	    writeCode(BASE + pos);
-	else {
-	    writeCode(RAW);
-	    writeCode(b >> 4);
-	    writeCode(b & 0xF);
-	}
+        int pos = codeTable.indexOf((char)b);
+        if (pos != -1)
+            writeCode(BASE + pos);
+        else {
+            writeCode(RAW);
+            writeCode(b >> 4);
+            writeCode(b & 0xF);
+        }
     }
 
     public void write(byte b[], int off, int len) throws IOException {
-	/*
-	 * This is quite an inefficient implementation, because it has to
-	 * call the other write method for every byte in the array.  It
+        /*
+         * This is quite an inefficient implementation, because it has to
+         * call the other write method for every byte in the array.  It
          * could be optimized for performance by doing all the processing
-	 * in this method.
-	 */
-	for (int i = 0; i < len; i++)
-	    write(b[off + i]);
+         * in this method.
+         */
+        for (int i = 0; i < len; i++)
+            write(b[off + i]);
     }
 
     public void flush() throws IOException {
-	while (bufPos > 0)
-	    writeCode(NOP);
+        while (bufPos > 0)
+            writeCode(NOP);
     }
 
     private void writeCode(int c) throws IOException {
-	buf[bufPos++] = c;
-	if (bufPos == 5) {	// write next word when we have 5 codes
-	    int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
-	               (buf[3] << 6) | buf[4];
-	    out.write((pack >>> 24) & 0xFF);
-	    out.write((pack >>> 16) & 0xFF);
-	    out.write((pack >>> 8)  & 0xFF);
-	    out.write((pack >>> 0)  & 0xFF);
-	    bufPos = 0;
-	}
+        buf[bufPos++] = c;
+        if (bufPos == 5) {      // write next word when we have 5 codes
+            int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
+                       (buf[3] << 6) | buf[4];
+            out.write((pack >>> 24) & 0xFF);
+            out.write((pack >>> 16) & 0xFF);
+            out.write((pack >>> 8)  & 0xFF);
+            out.write((pack >>> 0)  & 0xFF);
+            bufPos = 0;
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/Echo.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/Echo.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/EchoImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/EchoImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -39,49 +39,49 @@
      * Initialization constructor.
      */
     public EchoImpl(String protocol)
-	throws ActivationException, RemoteException
+        throws ActivationException, RemoteException
     {
-	super(null, makeMarshalledObject(protocol), false, 0,
-	      new MultiSocketFactory.ClientFactory(protocol, pattern),
-	      new MultiSocketFactory.ServerFactory(protocol, pattern));
+        super(null, makeMarshalledObject(protocol), false, 0,
+              new MultiSocketFactory.ClientFactory(protocol, pattern),
+              new MultiSocketFactory.ServerFactory(protocol, pattern));
     }
 
     /**
      * Activation constructor.
      */
     public EchoImpl(ActivationID id, MarshalledObject obj)
-	throws RemoteException
+        throws RemoteException
     {
-	super(id, 0,
-	      new MultiSocketFactory.ClientFactory(getProtocol(obj), pattern),
-	      new MultiSocketFactory.ServerFactory(getProtocol(obj), pattern));
+        super(id, 0,
+              new MultiSocketFactory.ClientFactory(getProtocol(obj), pattern),
+              new MultiSocketFactory.ServerFactory(getProtocol(obj), pattern));
     }
 
     private static MarshalledObject makeMarshalledObject(String protocol) {
-	MarshalledObject obj = null;
-	try {
-	    obj = new MarshalledObject(protocol);
-	} catch (Exception willNotHappen) {
-	}
+        MarshalledObject obj = null;
+        try {
+            obj = new MarshalledObject(protocol);
+        } catch (Exception willNotHappen) {
+        }
 
-	return obj;
+        return obj;
     }
 
     private static String getProtocol(MarshalledObject obj) {
-	String protocol = "";
-	try {
-	    protocol = (String) obj.get();
-	} catch (Exception willNotHappen) {
-	}
+        String protocol = "";
+        try {
+            protocol = (String) obj.get();
+        } catch (Exception willNotHappen) {
+        }
 
-	return protocol;
+        return protocol;
     }
-	      
+
     public byte[] echoNot(byte[] data) {
-	byte[] result = new byte[data.length];
-	for (int i = 0; i < data.length; i++)
-	    result[i] = (byte) ~data[i];
-	return result;
+        byte[] result = new byte[data.length];
+        for (int i = 0; i < data.length; i++)
+            result[i] = (byte) ~data[i];
+        return result;
     }
 
     /**
@@ -89,7 +89,7 @@
      */
     public void shutdown() throws Exception
     {
-	(new Thread(this,"Echo.shutdown")).start();
+        (new Thread(this,"Echo.shutdown")).start();
     }
 
     /**
@@ -98,43 +98,43 @@
      * object may still have pending/executing calls), then
      * unexport the object forcibly.
      */
-    public void run() 
+    public void run()
     {
-	ActivationLibrary.deactivate(this, getID());
+        ActivationLibrary.deactivate(this, getID());
     }
 
     public static void main(String[] args) {
-	/*
-	 * The following line is required with the JDK 1.2 VM so that the
-	 * VM can exit gracefully when this test completes.  Otherwise, the
-	 * conservative garbage collector will find a handle to the server
-	 * object on the native stack and not clear the weak reference to
-	 * it in the RMI runtime's object table.
-	 */
-	Object dummy = new Object();
-	
-	System.setSecurityManager(new RMISecurityManager());
-	
-	try {
-	    String protocol = "";
-	    if (args.length >= 1)
-		protocol = args[0];
+        /*
+         * The following line is required with the JDK 1.2 VM so that the
+         * VM can exit gracefully when this test completes.  Otherwise, the
+         * conservative garbage collector will find a handle to the server
+         * object on the native stack and not clear the weak reference to
+         * it in the RMI runtime's object table.
+         */
+        Object dummy = new Object();
+
+        System.setSecurityManager(new RMISecurityManager());
+
+        try {
+            String protocol = "";
+            if (args.length >= 1)
+                protocol = args[0];
 
-	    System.out.println("EchoServer: creating remote object");
-	    ActivationGroupDesc groupDesc =
-		new ActivationGroupDesc(null, null);
-	    ActivationSystem system = ActivationGroup.getSystem();
-	    ActivationGroupID groupID = system.registerGroup(groupDesc);
-	    ActivationGroup.createGroup(groupID, groupDesc, 0);
-	    
-	    EchoImpl impl = new EchoImpl(protocol);
-	    System.out.println("EchoServer: binding in registry");
-	    Naming.rebind("//:" + UseCustomSocketFactory.REGISTRY_PORT +
-			  "/EchoServer", impl);
-	    System.out.println("EchoServer ready.");
-	} catch (Exception e) {
-	    System.err.println("EXCEPTION OCCURRED:");
-	    e.printStackTrace();
-	}
+            System.out.println("EchoServer: creating remote object");
+            ActivationGroupDesc groupDesc =
+                new ActivationGroupDesc(null, null);
+            ActivationSystem system = ActivationGroup.getSystem();
+            ActivationGroupID groupID = system.registerGroup(groupDesc);
+            ActivationGroup.createGroup(groupID, groupDesc, 0);
+
+            EchoImpl impl = new EchoImpl(protocol);
+            System.out.println("EchoServer: binding in registry");
+            Naming.rebind("//:" + UseCustomSocketFactory.REGISTRY_PORT +
+                          "/EchoServer", impl);
+            System.out.println("EchoServer ready.");
+        } catch (Exception e) {
+            System.err.println("EXCEPTION OCCURRED:");
+            e.printStackTrace();
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/EchoImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/EchoImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,47 +29,47 @@
     implements Echo, java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_echoNot_0;
     private static java.lang.reflect.Method $method_shutdown_1;
-    
+
     static {
-	try {
-	    $method_echoNot_0 = Echo.class.getMethod("echoNot", new java.lang.Class[] {byte[].class});
-	    $method_shutdown_1 = Echo.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_echoNot_0 = Echo.class.getMethod("echoNot", new java.lang.Class[] {byte[].class});
+            $method_shutdown_1 = Echo.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public EchoImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of echoNot(byte[])
     public byte[] echoNot(byte[] $param_arrayOf_byte_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_echoNot_0, new java.lang.Object[] {$param_arrayOf_byte_1}, -4295721514897591756L);
-	    return ((byte[]) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_echoNot_0, new java.lang.Object[] {$param_arrayOf_byte_1}, -4295721514897591756L);
+            return ((byte[]) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.lang.Exception
+        throws java.lang.Exception
     {
-	ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L);
+        ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L);
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/MultiSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/MultiSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,194 +34,193 @@
 public class MultiSocketFactory  {
 
     private static RMISocketFactory def =
-    	RMISocketFactory.getDefaultSocketFactory();
+        RMISocketFactory.getDefaultSocketFactory();
+
 
-    
     public static class ServerFactory
-	implements RMIServerSocketFactory, Serializable
+        implements RMIServerSocketFactory, Serializable
     {
 
-	private String protocol;
-	private byte[] data;
+        private String protocol;
+        private byte[] data;
 
-	public ServerFactory(String protocol, byte[] data) {
-	    this.protocol = protocol;
-	    this.data = data;
-	}
+        public ServerFactory(String protocol, byte[] data) {
+            this.protocol = protocol;
+            this.data = data;
+        }
 
-	public ServerSocket createServerSocket(int port) throws IOException
-	{
-	    if (protocol.equals("compress")) {
-		return new CompressServerSocket(port);
-		
-	    } else if (protocol.equals("xor")) {
-		if (data == null || data.length != 1)
-		    throw new IOException("invalid argument for XOR protocol");
-		return new XorServerSocket(port, data[0]);
+        public ServerSocket createServerSocket(int port) throws IOException
+        {
+            if (protocol.equals("compress")) {
+                return new CompressServerSocket(port);
 
-	    } 
-	    
-	    return def.createServerSocket(port);
-	}
+            } else if (protocol.equals("xor")) {
+                if (data == null || data.length != 1)
+                    throw new IOException("invalid argument for XOR protocol");
+                return new XorServerSocket(port, data[0]);
+
+            }
+
+            return def.createServerSocket(port);
+        }
     }
 
     public static class ClientFactory
-	implements RMIClientSocketFactory, Serializable
+        implements RMIClientSocketFactory, Serializable
     {
 
-	private String protocol;
-	private byte[] data;
+        private String protocol;
+        private byte[] data;
+
+        public ClientFactory(String protocol, byte[] data) {
+            this.protocol = protocol;
+            this.data = data;
+        }
 
-	public ClientFactory(String protocol, byte[] data) {
-	    this.protocol = protocol;
-	    this.data = data;
-	}
-	
-	public Socket createSocket(String host, int port)
-	    throws IOException
-	{
-	    if (protocol.equals("compress")) {
-		return new CompressSocket(host, port);
-		
-	    } else if (protocol.equals("xor")) {
-		if (data == null || data.length != 1)
-		    throw new IOException("invalid argument for XOR protocol");
-		return new XorSocket(host, port, data[0]);
+        public Socket createSocket(String host, int port)
+            throws IOException
+        {
+            if (protocol.equals("compress")) {
+                return new CompressSocket(host, port);
 
-	    } 
+            } else if (protocol.equals("xor")) {
+                if (data == null || data.length != 1)
+                    throw new IOException("invalid argument for XOR protocol");
+                return new XorSocket(host, port, data[0]);
 
-	    return def.createSocket(host, port);  
-	}
+            }
+
+            return def.createSocket(host, port);
+        }
     }
 
     static class CompressSocket extends Socket {
-	private InputStream in;
-	private OutputStream out;
-	public CompressSocket() { super(); }
-	public CompressSocket(String host, int port) throws IOException {
-	    super(host, port);
-	}
-	public InputStream getInputStream() throws IOException {
-	    if (in == null) {
-		in = new CompressInputStream(super.getInputStream());
-	    }
-	    return in;
+        private InputStream in;
+        private OutputStream out;
+        public CompressSocket() { super(); }
+        public CompressSocket(String host, int port) throws IOException {
+            super(host, port);
         }
-	public OutputStream getOutputStream() throws IOException {
-	    if (out == null) {
-		out = new CompressOutputStream(super.getOutputStream());
-	    }
-	    return out;
-	}
+        public InputStream getInputStream() throws IOException {
+            if (in == null) {
+                in = new CompressInputStream(super.getInputStream());
+            }
+            return in;
+        }
+        public OutputStream getOutputStream() throws IOException {
+            if (out == null) {
+                out = new CompressOutputStream(super.getOutputStream());
+            }
+            return out;
+        }
     }
 
     static class CompressServerSocket extends ServerSocket {
-	public CompressServerSocket(int port) throws IOException {
-	    super(port);
-	}
-	public Socket accept() throws IOException {
-	    Socket s = new CompressSocket();
-	    implAccept(s);
-	    return s;
-	}
+        public CompressServerSocket(int port) throws IOException {
+            super(port);
+        }
+        public Socket accept() throws IOException {
+            Socket s = new CompressSocket();
+            implAccept(s);
+            return s;
+        }
     }
 
     static class XorSocket extends Socket {
-	private byte pattern;
-	private InputStream in;
-	private OutputStream out;
-	public XorSocket(byte pattern) { super(); this.pattern = pattern; }
-	public XorSocket(String host, int port, byte pattern)
-	    throws IOException
-	{
-	    super(host, port);
-	    this.pattern = pattern;
-	}
-	public InputStream getInputStream() throws IOException {
-	    if (in == null) {
-		in = new XorInputStream(super.getInputStream(), pattern);
-	    }
-	    return in;
+        private byte pattern;
+        private InputStream in;
+        private OutputStream out;
+        public XorSocket(byte pattern) { super(); this.pattern = pattern; }
+        public XorSocket(String host, int port, byte pattern)
+            throws IOException
+        {
+            super(host, port);
+            this.pattern = pattern;
         }
-	public OutputStream getOutputStream() throws IOException {
-	    if (out == null) {
-		out = new XorOutputStream(super.getOutputStream(), pattern);
-	    }
-	    return out;
-	}
+        public InputStream getInputStream() throws IOException {
+            if (in == null) {
+                in = new XorInputStream(super.getInputStream(), pattern);
+            }
+            return in;
+        }
+        public OutputStream getOutputStream() throws IOException {
+            if (out == null) {
+                out = new XorOutputStream(super.getOutputStream(), pattern);
+            }
+            return out;
+        }
     }
 
     static class XorServerSocket extends ServerSocket {
-	private byte pattern;
-	public XorServerSocket(int port, byte pattern) throws IOException {
-	    super(port);
-	    this.pattern = pattern;
-	}
-	public Socket accept() throws IOException {
-	    Socket s = new XorSocket(pattern);
-	    implAccept(s);
-	    return s;
-	}
+        private byte pattern;
+        public XorServerSocket(int port, byte pattern) throws IOException {
+            super(port);
+            this.pattern = pattern;
+        }
+        public Socket accept() throws IOException {
+            Socket s = new XorSocket(pattern);
+            implAccept(s);
+            return s;
+        }
     }
 
     static class XorOutputStream extends FilterOutputStream {
-	private byte pattern;
-	public XorOutputStream(OutputStream out, byte pattern) {
-	    super(out);
-	    this.pattern = pattern;
-	}
-	public void write(int b) throws IOException {
-	    out.write(b ^ pattern);
-	    out.flush();
-	}
-	public void write(byte b[], int off, int len) throws IOException {
-	    for (int i = 0; i < len; i++)
-		write(b[off + i]);
-	}
+        private byte pattern;
+        public XorOutputStream(OutputStream out, byte pattern) {
+            super(out);
+            this.pattern = pattern;
+        }
+        public void write(int b) throws IOException {
+            out.write(b ^ pattern);
+            out.flush();
+        }
+        public void write(byte b[], int off, int len) throws IOException {
+            for (int i = 0; i < len; i++)
+                write(b[off + i]);
+        }
     }
 
     static class XorInputStream extends FilterInputStream {
-	private byte pattern;
-	public XorInputStream(InputStream in, byte pattern) {
-	    super(in);
-	    this.pattern = pattern;
-	}
-	public int read() throws IOException {
-	    int b = in.read();
-//	    System.out.print("BEFORE: " + Integer.toHexString(b));
-	    if (b != -1)
-		b = (b ^ pattern) & 0xFF;
-//	    System.out.println("\tAFTER: " + Integer.toHexString(b));
-	    return b;
-	}
-	public int read(byte b[], int off, int len) throws IOException {
-	    if (len <= 0) {
-		return 0;
-	    }
+        private byte pattern;
+        public XorInputStream(InputStream in, byte pattern) {
+            super(in);
+            this.pattern = pattern;
+        }
+        public int read() throws IOException {
+            int b = in.read();
+//          System.out.print("BEFORE: " + Integer.toHexString(b));
+            if (b != -1)
+                b = (b ^ pattern) & 0xFF;
+//          System.out.println("\tAFTER: " + Integer.toHexString(b));
+            return b;
+        }
+        public int read(byte b[], int off, int len) throws IOException {
+            if (len <= 0) {
+                return 0;
+            }
 
-	    int c = read();
-	    if (c == -1) {
-		return -1;
-	    }
-	    b[off] = (byte)c;
+            int c = read();
+            if (c == -1) {
+                return -1;
+            }
+            b[off] = (byte)c;
 
-	    int i = 1;
+            int i = 1;
 /*****
-	    try {
-		for (; i < len ; i++) {
-		    c = read();
-		    if (c == -1) {
-			break;
-		    }
-		    if (b != null) {
-			b[off + i] = (byte)c;
-		    }
-		}
-	    } catch (IOException ee) {
-	    }
+            try {
+                for (; i < len ; i++) {
+                    c = read();
+                    if (c == -1) {
+                        break;
+                    }
+                    if (b != null) {
+                        b[off + i] = (byte)c;
+                    }
+                }
+            } catch (IOException ee) {
+            }
 *****/
-	    return i;
-	}
+            return i;
+        }
     }
 }
-
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/UseCustomSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/UseCustomSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -45,124 +45,124 @@
 
     final static int REGISTRY_PORT = 2006;
     static String[] protocol = new String[] { "", "compress", "xor" };
-    
+
     public static void main(String[] args) {
 
-	System.out.println("\nRegression test for bug 4115696\n");
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");	
+        System.out.println("\nRegression test for bug 4115696\n");
+
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 
-	try {
-	    LocateRegistry.createRegistry(REGISTRY_PORT);
-	} catch (Exception e) {
-	    TestLibrary.bomb("creating registry", e);
-	}
+        try {
+            LocateRegistry.createRegistry(REGISTRY_PORT);
+        } catch (Exception e) {
+            TestLibrary.bomb("creating registry", e);
+        }
+
+        RMID rmid = null;
 
-	RMID rmid = null;
-	
-	try {
-	    rmid = RMID.createRMID(true);
-	    rmid.addArguments(new String[] {
-		"-C-Djava.security.policy=" + 
-		    TestParams.defaultGroupPolicy + 
-		    " -C-Djava.security.manager=java.rmi.RMISecurityManager "});
-	    rmid.start();
+        try {
+            rmid = RMID.createRMID(true);
+            rmid.addArguments(new String[] {
+                "-C-Djava.security.policy=" +
+                    TestParams.defaultGroupPolicy +
+                    " -C-Djava.security.manager=java.rmi.RMISecurityManager "});
+            rmid.start();
 
-	    Echo[] echo = spawnAndTest();
-	    reactivateAndTest(echo);
-	} catch (IOException e) {
-	    TestLibrary.bomb("creating rmid", e);
-	} finally {
-	    if (rmid != null)
-		rmid.destroy();
-	}
+            Echo[] echo = spawnAndTest();
+            reactivateAndTest(echo);
+        } catch (IOException e) {
+            TestLibrary.bomb("creating rmid", e);
+        } finally {
+            if (rmid != null)
+                rmid.destroy();
+        }
     }
 
     private static Echo[] spawnAndTest() {
-	
-	System.err.println("\nCreate Test-->");
+
+        System.err.println("\nCreate Test-->");
+
+        Echo[] echo = new Echo[protocol.length];
+
+        for (int i = 0; i < protocol.length; i++) {
 
-	Echo[] echo = new Echo[protocol.length];
-	
-	for (int i = 0; i < protocol.length; i++) {
-	    
-	    JavaVM serverVM = new JavaVM("EchoImpl", 
-					 "-Djava.security.policy=" + 
-					 TestParams.defaultPolicy,
-					 protocol[i]);
+            JavaVM serverVM = new JavaVM("EchoImpl",
+                                         "-Djava.security.policy=" +
+                                         TestParams.defaultPolicy,
+                                         protocol[i]);
 
-	    System.err.println("\nusing protocol: " +
-			       (protocol[i] == "" ? "none" : protocol[i]));
-	    
-	    try {
-		/* spawn VM for EchoServer */
-		serverVM.start();
+            System.err.println("\nusing protocol: " +
+                               (protocol[i] == "" ? "none" : protocol[i]));
+
+            try {
+                /* spawn VM for EchoServer */
+                serverVM.start();
 
-		/* lookup server */
-		int tries = 12;        // need enough tries for slow machine.
-		echo[i] = null;
-		do {
-		    try {
-			echo[i] = (Echo) Naming.lookup("//:" + REGISTRY_PORT +
-						       "/EchoServer");
-			break;
-		    } catch (NotBoundException e) {
-			try {
-			    Thread.sleep(2000);
-			} catch (Exception ignore) {
-			}
-			continue;
-		    }
-		} while (--tries > 0);
+                /* lookup server */
+                int tries = 12;        // need enough tries for slow machine.
+                echo[i] = null;
+                do {
+                    try {
+                        echo[i] = (Echo) Naming.lookup("//:" + REGISTRY_PORT +
+                                                       "/EchoServer");
+                        break;
+                    } catch (NotBoundException e) {
+                        try {
+                            Thread.sleep(2000);
+                        } catch (Exception ignore) {
+                        }
+                        continue;
+                    }
+                } while (--tries > 0);
 
-		if (echo[i] == null)
-		    TestLibrary.bomb("server not bound in 12 tries", null);
+                if (echo[i] == null)
+                    TestLibrary.bomb("server not bound in 12 tries", null);
 
-		/* invoke remote method and print result*/
-		System.err.println("Bound to " + echo[i]);
-		byte[] data = ("Greetings, citizen " +
-			       System.getProperty("user.name") + "!"). getBytes();
-		byte[] result = echo[i].echoNot(data);
-		for (int j = 0; j < result.length; j++)
-		    result[j] = (byte) ~result[j];
-		System.err.println("Result: " + new String(result));
-		echo[i].shutdown();
-		
-	    } catch (Exception e) {
-		TestLibrary.bomb("test failed", e);
-		
-	    } finally {
-		serverVM.destroy();
-		try {
-		    Naming.unbind("//:" + REGISTRY_PORT + "/EchoServer");
-		} catch (Exception e) {
-		    TestLibrary.bomb("unbinding EchoServer", e);
-		    
-		}
-	    }
-	}
-	return echo;
+                /* invoke remote method and print result*/
+                System.err.println("Bound to " + echo[i]);
+                byte[] data = ("Greetings, citizen " +
+                               System.getProperty("user.name") + "!"). getBytes();
+                byte[] result = echo[i].echoNot(data);
+                for (int j = 0; j < result.length; j++)
+                    result[j] = (byte) ~result[j];
+                System.err.println("Result: " + new String(result));
+                echo[i].shutdown();
+
+            } catch (Exception e) {
+                TestLibrary.bomb("test failed", e);
+
+            } finally {
+                serverVM.destroy();
+                try {
+                    Naming.unbind("//:" + REGISTRY_PORT + "/EchoServer");
+                } catch (Exception e) {
+                    TestLibrary.bomb("unbinding EchoServer", e);
+
+                }
+            }
+        }
+        return echo;
     }
 
 
     private static void reactivateAndTest(Echo[] echo) {
 
-	System.err.println("\nReactivate Test-->");
+        System.err.println("\nReactivate Test-->");
 
-	for (int i = 0; i < echo.length; i++) {
-	    try {
-		System.err.println("\nusing protocol: " +
-				   (protocol[i] == "" ? "none" : protocol[i]));
-		byte[] data = ("Greetings, citizen " +
-			       System.getProperty("user.name") + "!").getBytes();
-		byte[] result = echo[i].echoNot(data);
-		for (int j = 0; j < result.length; j++)
-		    result[j] = (byte) ~result[j];
-		System.err.println("Result: " + new String(result));
-		echo[i].shutdown();
-	    } catch (Exception e) {
-		TestLibrary.bomb("activating EchoServer for protocol " + protocol[i], e);
-	    }
-	}
+        for (int i = 0; i < echo.length; i++) {
+            try {
+                System.err.println("\nusing protocol: " +
+                                   (protocol[i] == "" ? "none" : protocol[i]));
+                byte[] data = ("Greetings, citizen " +
+                               System.getProperty("user.name") + "!").getBytes();
+                byte[] result = echo[i].echoNot(data);
+                for (int j = 0; j < result.length; j++)
+                    result[j] = (byte) ~result[j];
+                System.err.println("Result: " + new String(result));
+                echo[i].shutdown();
+            } catch (Exception e) {
+                TestLibrary.bomb("activating EchoServer for protocol " + protocol[i], e);
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/Compress.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/Compress.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,204 +31,204 @@
 public class Compress {
 
     interface CompressConstants {
-	// constants for 6-bit code values
-	static final int NOP  = 0;	// no operation: used to pad words on flush()
-	static final int RAW  = 1;	// introduces raw byte format
-	static final int BASE = 2;	// base for codes found in lookup table
-	static final String codeTable =
-	    "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
+        // constants for 6-bit code values
+        static final int NOP  = 0;      // no operation: used to pad words on flush()
+        static final int RAW  = 1;      // introduces raw byte format
+        static final int BASE = 2;      // base for codes found in lookup table
+        static final String codeTable =
+            "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
     }
-    
-    public static class CompressRMIClientSocketFactory 
-	implements java.rmi.server.RMIClientSocketFactory, Serializable {
+
+    public static class CompressRMIClientSocketFactory
+        implements java.rmi.server.RMIClientSocketFactory, Serializable {
 
-	public Socket createSocket(String host, int port) 
-	    throws IOException {
-	    
-	    return ((Socket) new CompressSocket(host, port));
-	}
+        public Socket createSocket(String host, int port)
+            throws IOException {
+
+            return ((Socket) new CompressSocket(host, port));
+        }
     }
 
-    public static class CompressRMIServerSocketFactory 
-	implements RMIServerSocketFactory, 
-		   Serializable {
-	
-	public ServerSocket createServerSocket(int port) 
-	    throws IOException {
+    public static class CompressRMIServerSocketFactory
+        implements RMIServerSocketFactory,
+                   Serializable {
 
-	    return ((ServerSocket) new CompressServerSocket(port));
-	}
+        public ServerSocket createServerSocket(int port)
+            throws IOException {
+
+            return ((ServerSocket) new CompressServerSocket(port));
+        }
     }
-    
+
     public static class CompressSocket extends Socket {
-	private InputStream in;
-	private OutputStream out;
-	public CompressSocket() { super(); }
-	public CompressSocket(String host, int port) throws IOException {
-	    super(host, port);
-	}
-	public InputStream getInputStream() throws IOException {
-	    if (in == null) {
-		in = new CompressInputStream(super.getInputStream());
-	    }
-	    return in;
+        private InputStream in;
+        private OutputStream out;
+        public CompressSocket() { super(); }
+        public CompressSocket(String host, int port) throws IOException {
+            super(host, port);
         }
-	public OutputStream getOutputStream() throws IOException {
-	    if (out == null) {
-		out = new CompressOutputStream(super.getOutputStream());
-	    }
-	    return out;
-	}
+        public InputStream getInputStream() throws IOException {
+            if (in == null) {
+                in = new CompressInputStream(super.getInputStream());
+            }
+            return in;
+        }
+        public OutputStream getOutputStream() throws IOException {
+            if (out == null) {
+                out = new CompressOutputStream(super.getOutputStream());
+            }
+            return out;
+        }
     }
 
     public static class CompressServerSocket extends ServerSocket {
-	public CompressServerSocket(int port) throws IOException {
-	    super(port);
-	}
-	public Socket accept() throws IOException {
-	    Socket s = new CompressSocket();
-	    implAccept(s);
-	    return s;
-	}
+        public CompressServerSocket(int port) throws IOException {
+            super(port);
+        }
+        public Socket accept() throws IOException {
+            Socket s = new CompressSocket();
+            implAccept(s);
+            return s;
+        }
     }
 
     public static class CompressInputStream extends FilterInputStream
-	implements CompressConstants
+        implements CompressConstants
     {
-	
-	public CompressInputStream(InputStream in) {
-	    super(in);
-	}
-	
-	// buffer of unpacked 6-bit codes from last 32-word read
-	int buf[] = new int[5];
-	
-	// position of next code to read in buffer (5 == end of buffer)
-	int bufPos = 5;
-	
-	public int read() throws IOException {
-	    try {
-		int code;
-		do {
-		    code = readCode();
-		} while (code == NOP);	// ignore NOP codes
-		
-		if (code >= BASE)
-		    return codeTable.charAt(code - BASE);
-		else if (code == RAW) {
-		    int high = readCode();
-		    int low = readCode();
-		    return (high << 4) | low;
-		} else
-		    throw new IOException("unknown compression code: " + code);
-	    } catch (EOFException e) {
-		return -1;
-	    }
-	}
-	
-	public int read(byte b[], int off, int len) throws IOException {
-	    if (len <= 0) {
-		return 0;
-	    }
-	    
-	    int c = read();
-	    if (c == -1) {
-		return -1;
-	    }
-	    b[off] = (byte)c;
-	    
-	    int i = 1;
-	    /*****
-		  try {
-		  for (; i < len ; i++) {
-		  c = read();
-		  if (c == -1) {
-		  break;
-		  }
-		  if (b != null) {
-		  b[off + i] = (byte)c;
-		  }
-		  }
-		  } catch (IOException ee) {
-		  }
-	    *****/
-	    return i;
-	}
-	
-	private int readCode() throws IOException {
-	    if (bufPos == 5) {
-		int b1 = in.read();
-		int b2 = in.read();
-		int b3 = in.read();
-		int b4 = in.read();
-		if ((b1 | b2 | b3 | b4) < 0)
-		    throw new EOFException();
-		int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
-		buf[0] = (pack >>> 24) & 0x3F;
-		buf[1] = (pack >>> 18) & 0x3F;
-		buf[2] = (pack >>> 12) & 0x3F;
-		buf[3] = (pack >>>  6) & 0x3F;
-		buf[4] = (pack >>>  0) & 0x3F;
-		bufPos = 0;
-	    }
-	    return buf[bufPos++];
-	}
+
+        public CompressInputStream(InputStream in) {
+            super(in);
+        }
+
+        // buffer of unpacked 6-bit codes from last 32-word read
+        int buf[] = new int[5];
+
+        // position of next code to read in buffer (5 == end of buffer)
+        int bufPos = 5;
+
+        public int read() throws IOException {
+            try {
+                int code;
+                do {
+                    code = readCode();
+                } while (code == NOP);  // ignore NOP codes
+
+                if (code >= BASE)
+                    return codeTable.charAt(code - BASE);
+                else if (code == RAW) {
+                    int high = readCode();
+                    int low = readCode();
+                    return (high << 4) | low;
+                } else
+                    throw new IOException("unknown compression code: " + code);
+            } catch (EOFException e) {
+                return -1;
+            }
+        }
+
+        public int read(byte b[], int off, int len) throws IOException {
+            if (len <= 0) {
+                return 0;
+            }
+
+            int c = read();
+            if (c == -1) {
+                return -1;
+            }
+            b[off] = (byte)c;
+
+            int i = 1;
+            /*****
+                  try {
+                  for (; i < len ; i++) {
+                  c = read();
+                  if (c == -1) {
+                  break;
+                  }
+                  if (b != null) {
+                  b[off + i] = (byte)c;
+                  }
+                  }
+                  } catch (IOException ee) {
+                  }
+            *****/
+            return i;
+        }
+
+        private int readCode() throws IOException {
+            if (bufPos == 5) {
+                int b1 = in.read();
+                int b2 = in.read();
+                int b3 = in.read();
+                int b4 = in.read();
+                if ((b1 | b2 | b3 | b4) < 0)
+                    throw new EOFException();
+                int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
+                buf[0] = (pack >>> 24) & 0x3F;
+                buf[1] = (pack >>> 18) & 0x3F;
+                buf[2] = (pack >>> 12) & 0x3F;
+                buf[3] = (pack >>>  6) & 0x3F;
+                buf[4] = (pack >>>  0) & 0x3F;
+                bufPos = 0;
+            }
+            return buf[bufPos++];
+        }
     }
 
     public static class CompressOutputStream extends FilterOutputStream
-	implements CompressConstants
+        implements CompressConstants
     {
-	
-	public CompressOutputStream(OutputStream out) {
-	    super(out);
-	}
-	
-	// buffer of 6-bit codes to pack into next 32-bit word
-	int buf[] = new int[5];
-	
-	// number of valid codes pending in buffer
-	int bufPos = 0;
-	
-	public void write(int b) throws IOException {
-	    b &= 0xFF;			// force argument to a byte
-	    
-	    int pos = codeTable.indexOf((char)b);
-	    if (pos != -1)
-		writeCode(BASE + pos);
-	    else {
-		writeCode(RAW);
-		writeCode(b >> 4);
-		writeCode(b & 0xF);
-	    }
-	}
-	
-	public void write(byte b[], int off, int len) throws IOException {
-	    /*
-	     * This is quite an inefficient implementation, because it has to
-	     * call the other write method for every byte in the array.  It
-	     * could be optimized for performance by doing all the processing
-	     * in this method.
-	     */
-	    for (int i = 0; i < len; i++)
-		write(b[off + i]);
-	}
-	
-	public void flush() throws IOException {
-	    while (bufPos > 0)
-		writeCode(NOP);
-	}
-	
-	private void writeCode(int c) throws IOException {
-	    buf[bufPos++] = c;
-	    if (bufPos == 5) {	// write next word when we have 5 codes
-		int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
-		    (buf[3] << 6) | buf[4];
-		out.write((pack >>> 24) & 0xFF);
-		out.write((pack >>> 16) & 0xFF);
-		out.write((pack >>> 8)  & 0xFF);
-		out.write((pack >>> 0)  & 0xFF);
-		bufPos = 0;
-	    }
-	}
+
+        public CompressOutputStream(OutputStream out) {
+            super(out);
+        }
+
+        // buffer of 6-bit codes to pack into next 32-bit word
+        int buf[] = new int[5];
+
+        // number of valid codes pending in buffer
+        int bufPos = 0;
+
+        public void write(int b) throws IOException {
+            b &= 0xFF;                  // force argument to a byte
+
+            int pos = codeTable.indexOf((char)b);
+            if (pos != -1)
+                writeCode(BASE + pos);
+            else {
+                writeCode(RAW);
+                writeCode(b >> 4);
+                writeCode(b & 0xF);
+            }
+        }
+
+        public void write(byte b[], int off, int len) throws IOException {
+            /*
+             * This is quite an inefficient implementation, because it has to
+             * call the other write method for every byte in the array.  It
+             * could be optimized for performance by doing all the processing
+             * in this method.
+             */
+            for (int i = 0; i < len; i++)
+                write(b[off + i]);
+        }
+
+        public void flush() throws IOException {
+            while (bufPos > 0)
+                writeCode(NOP);
+        }
+
+        private void writeCode(int c) throws IOException {
+            buf[bufPos++] = c;
+            if (bufPos == 5) {  // write next word when we have 5 codes
+                int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
+                    (buf[3] << 6) | buf[4];
+                out.write((pack >>> 24) & 0xFF);
+                out.write((pack >>> 16) & 0xFF);
+                out.write((pack >>> 8)  & 0xFF);
+                out.write((pack >>> 0)  & 0xFF);
+                bufPos = 0;
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/Hello.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/Hello.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/HelloImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/HelloImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -36,49 +36,49 @@
     public static boolean clientCalledSuccessfully = false;
 
     public HelloImpl() throws RemoteException {
-	super(0);
+        super(0);
     }
-    
+
     public synchronized String sayHello() {
-	HelloImpl.clientCalledSuccessfully = true;
-	System.out.println("hello method called");
-	this.notifyAll();
-	return "hello";
+        HelloImpl.clientCalledSuccessfully = true;
+        System.out.println("hello method called");
+        this.notifyAll();
+        return "hello";
     }
 
     public static void main(String[] args) {
-	/*
-	 * The following line is required with the JDK 1.2 VM so that the
-	 * VM can exit gracefully when this test completes.  Otherwise, the
-	 * conservative garbage collector will find a handle to the server
-	 * object on the native stack and not clear the weak reference to
-	 * it in the RMI runtime's object table.
-	 */
-	Object dummy = new Object();
-	Hello hello = null;
-	Registry registry = null;
+        /*
+         * The following line is required with the JDK 1.2 VM so that the
+         * VM can exit gracefully when this test completes.  Otherwise, the
+         * conservative garbage collector will find a handle to the server
+         * object on the native stack and not clear the weak reference to
+         * it in the RMI runtime's object table.
+         */
+        Object dummy = new Object();
+        Hello hello = null;
+        Registry registry = null;
 
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");	
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 
-	try {
-	    String protocol = "";
-	    if (args.length >= 1)
-		protocol = args[0];
+        try {
+            String protocol = "";
+            if (args.length >= 1)
+                protocol = args[0];
 
-	    registry = java.rmi.registry.LocateRegistry.
-		getRegistry("localhost", TestLibrary.REGISTRY_PORT,
-			    new Compress.CompressRMIClientSocketFactory());
-	    UseCustomSocketFactory.checkStub(registry, "RMIClientSocket");
-	    hello = (Hello) registry.lookup("/HelloServer");
+            registry = java.rmi.registry.LocateRegistry.
+                getRegistry("localhost", TestLibrary.REGISTRY_PORT,
+                            new Compress.CompressRMIClientSocketFactory());
+            UseCustomSocketFactory.checkStub(registry, "RMIClientSocket");
+            hello = (Hello) registry.lookup("/HelloServer");
 
-	    /* lookup server */
-	    System.err.println(hello.sayHello() + 
-			       ", remote greeting.");
-	} catch (Exception e) {
-	    System.err.println("EXCEPTION OCCURRED:");
-	    e.printStackTrace();
-	} finally {
-	    hello = null;
-	}
+            /* lookup server */
+            System.err.println(hello.sayHello() +
+                               ", remote greeting.");
+        } catch (Exception e) {
+            System.err.println("EXCEPTION OCCURRED:");
+            e.printStackTrace();
+        } finally {
+            hello = null;
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/HelloImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/HelloImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,72 +29,72 @@
     implements Hello, java.rmi.Remote
 {
     private static java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("java.lang.String sayHello()")
+        new java.rmi.server.Operation("java.lang.String sayHello()")
     };
-    
+
     private static final long interfaceHash = 6486744599627128933L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_sayHello_0;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_sayHello_0 = Hello.class.getMethod("sayHello", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_sayHello_0 = Hello.class.getMethod("sayHello", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public HelloImpl_Stub() {
-	super();
+        super();
     }
     public HelloImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of sayHello()
     public java.lang.String sayHello()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_sayHello_0, null, 6043973830760146143L);
-		return ((java.lang.String) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		java.lang.String $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.lang.String) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_sayHello_0, null, 6043973830760146143L);
+                return ((java.lang.String) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                java.lang.String $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.lang.String) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/UseCustomSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/registry/UseCustomSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -47,86 +47,86 @@
  * (i.e. compression) client and server socket factories.
  */
 public class UseCustomSocketFactory {
-    
+
     Hello hello = null;
-    
+
     public static void main(String[] args) {
-	
-	Registry registry = null;
-	HelloImpl impl = null;
+
+        Registry registry = null;
+        HelloImpl impl = null;
 
-	System.out.println("\nRegression test for bug 4148850\n");
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");	
+        System.out.println("\nRegression test for bug 4148850\n");
 
-	try {
-	    impl = new HelloImpl();
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+
+        try {
+            impl = new HelloImpl();
 
-	    /* Make sure that the rmiregistry can communicate over a
-	     * custom socket.  Ensure that the functionality exists to
-	     * allow the rmiregistry to be secure.  
-	     */
-	    registry = LocateRegistry.
-		createRegistry(TestLibrary.REGISTRY_PORT,
-			       new Compress.CompressRMIClientSocketFactory(),
-			       new Compress.CompressRMIServerSocketFactory());
-	    registry.rebind("/HelloServer", impl);
-	    checkStub(registry, "RMIServerSocket");
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("creating registry", e);
-	}
-	
-	JavaVM serverVM = new JavaVM("HelloImpl", "-Djava.security.policy=" + 
-				     TestParams.defaultPolicy, "");
+            /* Make sure that the rmiregistry can communicate over a
+             * custom socket.  Ensure that the functionality exists to
+             * allow the rmiregistry to be secure.
+             */
+            registry = LocateRegistry.
+                createRegistry(TestLibrary.REGISTRY_PORT,
+                               new Compress.CompressRMIClientSocketFactory(),
+                               new Compress.CompressRMIServerSocketFactory());
+            registry.rebind("/HelloServer", impl);
+            checkStub(registry, "RMIServerSocket");
 
-	try {
+        } catch (Exception e) {
+            TestLibrary.bomb("creating registry", e);
+        }
+
+        JavaVM serverVM = new JavaVM("HelloImpl", "-Djava.security.policy=" +
+                                     TestParams.defaultPolicy, "");
+
+        try {
 
-	    /*
-	     * spawn VM for HelloServer which will download a client socket
-	     * factory 
-	     */
-	    serverVM.start();
+            /*
+             * spawn VM for HelloServer which will download a client socket
+             * factory
+             */
+            serverVM.start();
 
-	    synchronized (impl) {
+            synchronized (impl) {
+
+                System.out.println("waiting for remote notification");
+
+                if (!HelloImpl.clientCalledSuccessfully) {
+                    impl.wait(75 * 1000);
+                }
 
-		System.out.println("waiting for remote notification");
-		 
-		if (!HelloImpl.clientCalledSuccessfully) {
-		    impl.wait(75 * 1000);
-		}
-		
-		if (!HelloImpl.clientCalledSuccessfully) {
-		    throw new RuntimeException("Client did not execute call in time...");
-		}
-	    }
+                if (!HelloImpl.clientCalledSuccessfully) {
+                    throw new RuntimeException("Client did not execute call in time...");
+                }
+            }
 
-	    System.err.println("\nRegression test for bug 4148850 passed.\n ");
+            System.err.println("\nRegression test for bug 4148850 passed.\n ");
+
+        } catch (Exception e) {
+            TestLibrary.bomb("test failed", e);
 
-	} catch (Exception e) {
-	    TestLibrary.bomb("test failed", e);
-	    
-	} finally {
-	    serverVM.destroy();
-	    try {
-		registry.unbind("/HelloServer");
-	    } catch (Exception e) {
-		TestLibrary.bomb("unbinding HelloServer", e);
-	    }
-	    TestLibrary.unexport(registry);
-	    TestLibrary.unexport(impl);
-	    impl = null;
-	    registry = null;
-	}
+        } finally {
+            serverVM.destroy();
+            try {
+                registry.unbind("/HelloServer");
+            } catch (Exception e) {
+                TestLibrary.bomb("unbinding HelloServer", e);
+            }
+            TestLibrary.unexport(registry);
+            TestLibrary.unexport(impl);
+            impl = null;
+            registry = null;
+        }
     }
 
     static void checkStub(Object stub, String toCheck) throws RemoteException {
-	System.err.println("Ensuring that the stub contains a socket factory string: " +
-			   toCheck);
-	System.err.println(stub);
-	if (stub.toString().indexOf(toCheck) < 0) {
-	    throw new RemoteException("RemoteStub.toString() did not contain instance of "
-				      + toCheck);
-	}
+        System.err.println("Ensuring that the stub contains a socket factory string: " +
+                           toCheck);
+        System.err.println(stub);
+        if (stub.toString().indexOf(toCheck) < 0) {
+            throw new RemoteException("RemoteStub.toString() did not contain instance of "
+                                      + toCheck);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressConstants.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressConstants.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,9 +27,9 @@
 interface CompressConstants {
 
     // constants for 6-bit code values
-    static final int NOP  = 0;	// no operation: used to pad words on flush()
-    static final int RAW  = 1;	// introduces raw byte format
-    static final int BASE = 2;	// base for codes found in lookup table
+    static final int NOP  = 0;  // no operation: used to pad words on flush()
+    static final int RAW  = 1;  // introduces raw byte format
+    static final int BASE = 2;  // base for codes found in lookup table
     static final String codeTable =
-	"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
+        "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.!?\"'()";
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressInputStream.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressInputStream.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,7 +31,7 @@
 {
 
     public CompressInputStream(InputStream in) {
-	super(in);
+        super(in);
     }
 
     // buffer of unpacked 6-bit codes from last 32-word read
@@ -41,70 +41,70 @@
     int bufPos = 5;
 
     public int read() throws IOException {
-	try {
-	    int code;
-	    do {
-		code = readCode();
-	    } while (code == NOP);	// ignore NOP codes
+        try {
+            int code;
+            do {
+                code = readCode();
+            } while (code == NOP);      // ignore NOP codes
 
-	    if (code >= BASE)
-		return codeTable.charAt(code - BASE);
-	    else if (code == RAW) {
-		int high = readCode();
-		int low = readCode();
-		return (high << 4) | low;
-	    } else
-		throw new IOException("unknown compression code: " + code);
-	} catch (EOFException e) {
-	    return -1;
-	}
+            if (code >= BASE)
+                return codeTable.charAt(code - BASE);
+            else if (code == RAW) {
+                int high = readCode();
+                int low = readCode();
+                return (high << 4) | low;
+            } else
+                throw new IOException("unknown compression code: " + code);
+        } catch (EOFException e) {
+            return -1;
+        }
     }
 
     public int read(byte b[], int off, int len) throws IOException {
-	if (len <= 0) {
-	    return 0;
-	}
+        if (len <= 0) {
+            return 0;
+        }
 
-	int c = read();
-	if (c == -1) {
-	    return -1;
-	}
-	b[off] = (byte)c;
+        int c = read();
+        if (c == -1) {
+            return -1;
+        }
+        b[off] = (byte)c;
 
-	int i = 1;
+        int i = 1;
 /*****
-	try {
-	    for (; i < len ; i++) {
-		c = read();
-		if (c == -1) {
-		    break;
-		}
-		if (b != null) {
-		    b[off + i] = (byte)c;
-		}
-	    }
-	} catch (IOException ee) {
-	}
+        try {
+            for (; i < len ; i++) {
+                c = read();
+                if (c == -1) {
+                    break;
+                }
+                if (b != null) {
+                    b[off + i] = (byte)c;
+                }
+            }
+        } catch (IOException ee) {
+        }
  *****/
-	return i;
+        return i;
     }
 
     private int readCode() throws IOException {
-	if (bufPos == 5) {
-	    int b1 = in.read();
-	    int b2 = in.read();
-	    int b3 = in.read();
-	    int b4 = in.read();
-	    if ((b1 | b2 | b3 | b4) < 0)
-		throw new EOFException();
-	    int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
-	    buf[0] = (pack >>> 24) & 0x3F;
-	    buf[1] = (pack >>> 18) & 0x3F;
-	    buf[2] = (pack >>> 12) & 0x3F;
-	    buf[3] = (pack >>>  6) & 0x3F;
-	    buf[4] = (pack >>>  0) & 0x3F;
-	    bufPos = 0;
-	}
-	return buf[bufPos++];
+        if (bufPos == 5) {
+            int b1 = in.read();
+            int b2 = in.read();
+            int b3 = in.read();
+            int b4 = in.read();
+            if ((b1 | b2 | b3 | b4) < 0)
+                throw new EOFException();
+            int pack = (b1 << 24) | (b2 << 16) | (b3 << 8) | b4;
+            buf[0] = (pack >>> 24) & 0x3F;
+            buf[1] = (pack >>> 18) & 0x3F;
+            buf[2] = (pack >>> 12) & 0x3F;
+            buf[3] = (pack >>>  6) & 0x3F;
+            buf[4] = (pack >>>  0) & 0x3F;
+            bufPos = 0;
+        }
+        return buf[bufPos++];
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressOutputStream.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/CompressOutputStream.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -31,7 +31,7 @@
 {
 
     public CompressOutputStream(OutputStream out) {
-	super(out);
+        super(out);
     }
 
     // buffer of 6-bit codes to pack into next 32-bit word
@@ -41,44 +41,44 @@
     int bufPos = 0;
 
     public void write(int b) throws IOException {
-	b &= 0xFF;			// force argument to a byte
+        b &= 0xFF;                      // force argument to a byte
 
-	int pos = codeTable.indexOf((char)b);
-	if (pos != -1)
-	    writeCode(BASE + pos);
-	else {
-	    writeCode(RAW);
-	    writeCode(b >> 4);
-	    writeCode(b & 0xF);
-	}
+        int pos = codeTable.indexOf((char)b);
+        if (pos != -1)
+            writeCode(BASE + pos);
+        else {
+            writeCode(RAW);
+            writeCode(b >> 4);
+            writeCode(b & 0xF);
+        }
     }
 
     public void write(byte b[], int off, int len) throws IOException {
-	/*
-	 * This is quite an inefficient implementation, because it has to
-	 * call the other write method for every byte in the array.  It
+        /*
+         * This is quite an inefficient implementation, because it has to
+         * call the other write method for every byte in the array.  It
          * could be optimized for performance by doing all the processing
-	 * in this method.
-	 */
-	for (int i = 0; i < len; i++)
-	    write(b[off + i]);
+         * in this method.
+         */
+        for (int i = 0; i < len; i++)
+            write(b[off + i]);
     }
 
     public void flush() throws IOException {
-	while (bufPos > 0)
-	    writeCode(NOP);
+        while (bufPos > 0)
+            writeCode(NOP);
     }
 
     private void writeCode(int c) throws IOException {
-	buf[bufPos++] = c;
-	if (bufPos == 5) {	// write next word when we have 5 codes
-	    int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
-	               (buf[3] << 6) | buf[4];
-	    out.write((pack >>> 24) & 0xFF);
-	    out.write((pack >>> 16) & 0xFF);
-	    out.write((pack >>> 8)  & 0xFF);
-	    out.write((pack >>> 0)  & 0xFF);
-	    bufPos = 0;
-	}
+        buf[bufPos++] = c;
+        if (bufPos == 5) {      // write next word when we have 5 codes
+            int pack = (buf[0] << 24) | (buf[1] << 18) | (buf[2] << 12) |
+                       (buf[3] << 6) | buf[4];
+            out.write((pack >>> 24) & 0xFF);
+            out.write((pack >>> 16) & 0xFF);
+            out.write((pack >>> 8)  & 0xFF);
+            out.write((pack >>> 0)  & 0xFF);
+            bufPos = 0;
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/Echo.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/Echo.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -33,44 +33,44 @@
     private static final byte[] pattern = { (byte) 'A' };
 
     public EchoImpl(String protocol) throws RemoteException {
-	super(0,
-	      new MultiSocketFactory.ClientFactory(protocol, pattern),
-	      new MultiSocketFactory.ServerFactory(protocol, pattern));
+        super(0,
+              new MultiSocketFactory.ClientFactory(protocol, pattern),
+              new MultiSocketFactory.ServerFactory(protocol, pattern));
     }
-    
+
     public byte[] echoNot(byte[] data) {
-	byte[] result = new byte[data.length];
-	for (int i = 0; i < data.length; i++)
-	    result[i] = (byte) ~data[i];
-	return result;
+        byte[] result = new byte[data.length];
+        for (int i = 0; i < data.length; i++)
+            result[i] = (byte) ~data[i];
+        return result;
     }
 
     public static void main(String[] args) {
-	/*
-	 * The following line is required with the JDK 1.2 VM so that the
-	 * VM can exit gracefully when this test completes.  Otherwise, the
-	 * conservative garbage collector will find a handle to the server
-	 * object on the native stack and not clear the weak reference to
-	 * it in the RMI runtime's object table.
-	 */
-	Object dummy = new Object();
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
-	
-	try {
-	    String protocol = "";
-	    if (args.length >= 1)
-		protocol = args[0];
+        /*
+         * The following line is required with the JDK 1.2 VM so that the
+         * VM can exit gracefully when this test completes.  Otherwise, the
+         * conservative garbage collector will find a handle to the server
+         * object on the native stack and not clear the weak reference to
+         * it in the RMI runtime's object table.
+         */
+        Object dummy = new Object();
+
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 
-	    System.out.println("EchoServer: creating remote object");
-	    EchoImpl impl = new EchoImpl(protocol);
-	    System.out.println("EchoServer: binding in registry");
-	    Naming.rebind("//:" + TestLibrary.REGISTRY_PORT +
-			  "/EchoServer", impl);
-	    System.out.println("EchoServer ready.");
-	} catch (Exception e) {
-	    System.err.println("EXCEPTION OCCURRED:");
-	    e.printStackTrace();
-	}
+        try {
+            String protocol = "";
+            if (args.length >= 1)
+                protocol = args[0];
+
+            System.out.println("EchoServer: creating remote object");
+            EchoImpl impl = new EchoImpl(protocol);
+            System.out.println("EchoServer: binding in registry");
+            Naming.rebind("//:" + TestLibrary.REGISTRY_PORT +
+                          "/EchoServer", impl);
+            System.out.println("EchoServer ready.");
+        } catch (Exception e) {
+            System.err.println("EXCEPTION OCCURRED:");
+            e.printStackTrace();
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/EchoImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,38 +29,38 @@
     implements Echo, java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_echoNot_0;
-    
+
     static {
-	try {
-	    $method_echoNot_0 = Echo.class.getMethod("echoNot", new java.lang.Class[] {byte[].class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_echoNot_0 = Echo.class.getMethod("echoNot", new java.lang.Class[] {byte[].class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public EchoImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of echoNot(byte[])
     public byte[] echoNot(byte[] $param_arrayOf_byte_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_echoNot_0, new java.lang.Object[] {$param_arrayOf_byte_1}, -4295721514897591756L);
-	    return ((byte[]) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_echoNot_0, new java.lang.Object[] {$param_arrayOf_byte_1}, -4295721514897591756L);
+            return ((byte[]) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/MultiSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/MultiSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,194 +34,193 @@
 public class MultiSocketFactory  {
 
     private static RMISocketFactory def =
-    	RMISocketFactory.getDefaultSocketFactory();
+        RMISocketFactory.getDefaultSocketFactory();
+
 
-    
     public static class ServerFactory
-	implements RMIServerSocketFactory, Serializable
+        implements RMIServerSocketFactory, Serializable
     {
 
-	private String protocol;
-	private byte[] data;
+        private String protocol;
+        private byte[] data;
 
-	public ServerFactory(String protocol, byte[] data) {
-	    this.protocol = protocol;
-	    this.data = data;
-	}
+        public ServerFactory(String protocol, byte[] data) {
+            this.protocol = protocol;
+            this.data = data;
+        }
 
-	public ServerSocket createServerSocket(int port) throws IOException
-	{
-	    if (protocol.equals("compress")) {
-		return new CompressServerSocket(port);
-		
-	    } else if (protocol.equals("xor")) {
-		if (data == null || data.length != 1)
-		    throw new IOException("invalid argument for XOR protocol");
-		return new XorServerSocket(port, data[0]);
+        public ServerSocket createServerSocket(int port) throws IOException
+        {
+            if (protocol.equals("compress")) {
+                return new CompressServerSocket(port);
 
-	    } 
-	    
-	    return def.createServerSocket(port);
-	}
+            } else if (protocol.equals("xor")) {
+                if (data == null || data.length != 1)
+                    throw new IOException("invalid argument for XOR protocol");
+                return new XorServerSocket(port, data[0]);
+
+            }
+
+            return def.createServerSocket(port);
+        }
     }
 
     public static class ClientFactory
-	implements RMIClientSocketFactory, Serializable
+        implements RMIClientSocketFactory, Serializable
     {
 
-	private String protocol;
-	private byte[] data;
+        private String protocol;
+        private byte[] data;
+
+        public ClientFactory(String protocol, byte[] data) {
+            this.protocol = protocol;
+            this.data = data;
+        }
 
-	public ClientFactory(String protocol, byte[] data) {
-	    this.protocol = protocol;
-	    this.data = data;
-	}
-	
-	public Socket createSocket(String host, int port)
-	    throws IOException
-	{
-	    if (protocol.equals("compress")) {
-		return new CompressSocket(host, port);
-		
-	    } else if (protocol.equals("xor")) {
-		if (data == null || data.length != 1)
-		    throw new IOException("invalid argument for XOR protocol");
-		return new XorSocket(host, port, data[0]);
+        public Socket createSocket(String host, int port)
+            throws IOException
+        {
+            if (protocol.equals("compress")) {
+                return new CompressSocket(host, port);
 
-	    } 
+            } else if (protocol.equals("xor")) {
+                if (data == null || data.length != 1)
+                    throw new IOException("invalid argument for XOR protocol");
+                return new XorSocket(host, port, data[0]);
 
-	    return def.createSocket(host, port);  
-	}
+            }
+
+            return def.createSocket(host, port);
+        }
     }
 
     static class CompressSocket extends Socket {
-	private InputStream in;
-	private OutputStream out;
-	public CompressSocket() { super(); }
-	public CompressSocket(String host, int port) throws IOException {
-	    super(host, port);
-	}
-	public InputStream getInputStream() throws IOException {
-	    if (in == null) {
-		in = new CompressInputStream(super.getInputStream());
-	    }
-	    return in;
+        private InputStream in;
+        private OutputStream out;
+        public CompressSocket() { super(); }
+        public CompressSocket(String host, int port) throws IOException {
+            super(host, port);
         }
-	public OutputStream getOutputStream() throws IOException {
-	    if (out == null) {
-		out = new CompressOutputStream(super.getOutputStream());
-	    }
-	    return out;
-	}
+        public InputStream getInputStream() throws IOException {
+            if (in == null) {
+                in = new CompressInputStream(super.getInputStream());
+            }
+            return in;
+        }
+        public OutputStream getOutputStream() throws IOException {
+            if (out == null) {
+                out = new CompressOutputStream(super.getOutputStream());
+            }
+            return out;
+        }
     }
 
     static class CompressServerSocket extends ServerSocket {
-	public CompressServerSocket(int port) throws IOException {
-	    super(port);
-	}
-	public Socket accept() throws IOException {
-	    Socket s = new CompressSocket();
-	    implAccept(s);
-	    return s;
-	}
+        public CompressServerSocket(int port) throws IOException {
+            super(port);
+        }
+        public Socket accept() throws IOException {
+            Socket s = new CompressSocket();
+            implAccept(s);
+            return s;
+        }
     }
 
     static class XorSocket extends Socket {
-	private byte pattern;
-	private InputStream in;
-	private OutputStream out;
-	public XorSocket(byte pattern) { super(); this.pattern = pattern; }
-	public XorSocket(String host, int port, byte pattern)
-	    throws IOException
-	{
-	    super(host, port);
-	    this.pattern = pattern;
-	}
-	public InputStream getInputStream() throws IOException {
-	    if (in == null) {
-		in = new XorInputStream(super.getInputStream(), pattern);
-	    }
-	    return in;
+        private byte pattern;
+        private InputStream in;
+        private OutputStream out;
+        public XorSocket(byte pattern) { super(); this.pattern = pattern; }
+        public XorSocket(String host, int port, byte pattern)
+            throws IOException
+        {
+            super(host, port);
+            this.pattern = pattern;
         }
-	public OutputStream getOutputStream() throws IOException {
-	    if (out == null) {
-		out = new XorOutputStream(super.getOutputStream(), pattern);
-	    }
-	    return out;
-	}
+        public InputStream getInputStream() throws IOException {
+            if (in == null) {
+                in = new XorInputStream(super.getInputStream(), pattern);
+            }
+            return in;
+        }
+        public OutputStream getOutputStream() throws IOException {
+            if (out == null) {
+                out = new XorOutputStream(super.getOutputStream(), pattern);
+            }
+            return out;
+        }
     }
 
     static class XorServerSocket extends ServerSocket {
-	private byte pattern;
-	public XorServerSocket(int port, byte pattern) throws IOException {
-	    super(port);
-	    this.pattern = pattern;
-	}
-	public Socket accept() throws IOException {
-	    Socket s = new XorSocket(pattern);
-	    implAccept(s);
-	    return s;
-	}
+        private byte pattern;
+        public XorServerSocket(int port, byte pattern) throws IOException {
+            super(port);
+            this.pattern = pattern;
+        }
+        public Socket accept() throws IOException {
+            Socket s = new XorSocket(pattern);
+            implAccept(s);
+            return s;
+        }
     }
 
     static class XorOutputStream extends FilterOutputStream {
-	private byte pattern;
-	public XorOutputStream(OutputStream out, byte pattern) {
-	    super(out);
-	    this.pattern = pattern;
-	}
-	public void write(int b) throws IOException {
-	    out.write(b ^ pattern);
-	    out.flush();
-	}
-	public void write(byte b[], int off, int len) throws IOException {
-	    for (int i = 0; i < len; i++)
-		write(b[off + i]);
-	}
+        private byte pattern;
+        public XorOutputStream(OutputStream out, byte pattern) {
+            super(out);
+            this.pattern = pattern;
+        }
+        public void write(int b) throws IOException {
+            out.write(b ^ pattern);
+            out.flush();
+        }
+        public void write(byte b[], int off, int len) throws IOException {
+            for (int i = 0; i < len; i++)
+                write(b[off + i]);
+        }
     }
 
     static class XorInputStream extends FilterInputStream {
-	private byte pattern;
-	public XorInputStream(InputStream in, byte pattern) {
-	    super(in);
-	    this.pattern = pattern;
-	}
-	public int read() throws IOException {
-	    int b = in.read();
-//	    System.out.print("BEFORE: " + Integer.toHexString(b));
-	    if (b != -1)
-		b = (b ^ pattern) & 0xFF;
-//	    System.out.println("\tAFTER: " + Integer.toHexString(b));
-	    return b;
-	}
-	public int read(byte b[], int off, int len) throws IOException {
-	    if (len <= 0) {
-		return 0;
-	    }
+        private byte pattern;
+        public XorInputStream(InputStream in, byte pattern) {
+            super(in);
+            this.pattern = pattern;
+        }
+        public int read() throws IOException {
+            int b = in.read();
+//          System.out.print("BEFORE: " + Integer.toHexString(b));
+            if (b != -1)
+                b = (b ^ pattern) & 0xFF;
+//          System.out.println("\tAFTER: " + Integer.toHexString(b));
+            return b;
+        }
+        public int read(byte b[], int off, int len) throws IOException {
+            if (len <= 0) {
+                return 0;
+            }
 
-	    int c = read();
-	    if (c == -1) {
-		return -1;
-	    }
-	    b[off] = (byte)c;
+            int c = read();
+            if (c == -1) {
+                return -1;
+            }
+            b[off] = (byte)c;
 
-	    int i = 1;
+            int i = 1;
 /*****
-	    try {
-		for (; i < len ; i++) {
-		    c = read();
-		    if (c == -1) {
-			break;
-		    }
-		    if (b != null) {
-			b[off + i] = (byte)c;
-		    }
-		}
-	    } catch (IOException ee) {
-	    }
+            try {
+                for (; i < len ; i++) {
+                    c = read();
+                    if (c == -1) {
+                        break;
+                    }
+                    if (b != null) {
+                        b[off + i] = (byte)c;
+                    }
+                }
+            } catch (IOException ee) {
+            }
 *****/
-	    return i;
-	}
+            return i;
+        }
     }
 }
-
--- a/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/UseCustomSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/UseCustomSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,7 +25,7 @@
  * @bug 4127826
  *
  * @summary synopsis: need to download factories for use with custom socket
- * types 
+ * types
  * @author Ann Wollrath
  *
  * @library ../../../../testlibrary
@@ -45,77 +45,77 @@
 public class UseCustomSocketFactory {
 
     public static void main(String[] args) {
-	
-	String[] protocol = new String[] { "", "compress", "xor" };
+
+        String[] protocol = new String[] { "", "compress", "xor" };
+
+        System.out.println("\nRegression test for bug 4127826\n");
 
-	System.out.println("\nRegression test for bug 4127826\n");
-	
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");	
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 
-	try {
-	    LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
-	} catch (Exception e) {
-	    TestLibrary.bomb("creating registry", e);
-	}
+        try {
+            LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+        } catch (Exception e) {
+            TestLibrary.bomb("creating registry", e);
+        }
 
-	for (int i = 0; i < protocol.length; i++) {
+        for (int i = 0; i < protocol.length; i++) {
 
-	    System.err.println("test policy: " + 
-			       TestParams.defaultPolicy);
+            System.err.println("test policy: " +
+                               TestParams.defaultPolicy);
 
-	    JavaVM serverVM = new JavaVM("EchoImpl", 
-					 "-Djava.security.policy=" + 
-					 TestParams.defaultPolicy,
-					 protocol[i]);
-	    System.err.println("\nusing protocol: " +
-			       (protocol[i] == "" ? "none" : protocol[i]));
-	    
-	    try {
-		/* spawn VM for EchoServer */
-		serverVM.start();
+            JavaVM serverVM = new JavaVM("EchoImpl",
+                                         "-Djava.security.policy=" +
+                                         TestParams.defaultPolicy,
+                                         protocol[i]);
+            System.err.println("\nusing protocol: " +
+                               (protocol[i] == "" ? "none" : protocol[i]));
+
+            try {
+                /* spawn VM for EchoServer */
+                serverVM.start();
 
-		/* lookup server */
-		int tries = 8;
-		Echo obj = null;
-		do {
-		    try {
-			obj = (Echo) Naming.lookup("//:" + TestLibrary.REGISTRY_PORT +
-						   "/EchoServer");
-			break;
-		    } catch (NotBoundException e) {
-			try {
-			    Thread.sleep(2000);
-			} catch (Exception ignore) {
-			}
-			continue;
-		    }
-		} while (--tries > 0);
+                /* lookup server */
+                int tries = 8;
+                Echo obj = null;
+                do {
+                    try {
+                        obj = (Echo) Naming.lookup("//:" + TestLibrary.REGISTRY_PORT +
+                                                   "/EchoServer");
+                        break;
+                    } catch (NotBoundException e) {
+                        try {
+                            Thread.sleep(2000);
+                        } catch (Exception ignore) {
+                        }
+                        continue;
+                    }
+                } while (--tries > 0);
 
-		if (obj == null)
-		    TestLibrary.bomb("server not bound in 8 tries", null);
+                if (obj == null)
+                    TestLibrary.bomb("server not bound in 8 tries", null);
 
-		/* invoke remote method and print result*/
-		System.err.println("Bound to " + obj);
-		byte[] data = ("Greetings, citizen " +
-			       System.getProperty("user.name") + "!"). getBytes();
-		byte[] result = obj.echoNot(data);
-		for (int j = 0; j < result.length; j++)
-		    result[j] = (byte) ~result[j];
-		System.err.println("Result: " + new String(result));
-		
-	    } catch (Exception e) {
-		TestLibrary.bomb("test failed", e);
-		
-	    } finally {
-		serverVM.destroy();
-		try {
-		    Naming.unbind("//:" + TestLibrary.REGISTRY_PORT + 
-				  "/EchoServer");
-		} catch (Exception e) {
-		    TestLibrary.bomb("unbinding EchoServer", e);
-		    
-		}
-	    }
-	}
+                /* invoke remote method and print result*/
+                System.err.println("Bound to " + obj);
+                byte[] data = ("Greetings, citizen " +
+                               System.getProperty("user.name") + "!"). getBytes();
+                byte[] result = obj.echoNot(data);
+                for (int j = 0; j < result.length; j++)
+                    result[j] = (byte) ~result[j];
+                System.err.println("Result: " + new String(result));
+
+            } catch (Exception e) {
+                TestLibrary.bomb("test failed", e);
+
+            } finally {
+                serverVM.destroy();
+                try {
+                    Naming.unbind("//:" + TestLibrary.REGISTRY_PORT +
+                                  "/EchoServer");
+                } catch (Exception e) {
+                    TestLibrary.bomb("unbinding EchoServer", e);
+
+                }
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,7 +25,7 @@
  * @bug 4533390
  * @summary SecurityException can be obtained but is not specified.
  * The RemoteServer.setLog method requires
- * java.util.log.LoggingPermission("control"). 
+ * java.util.log.LoggingPermission("control").
  * @author Ann Wollrath
  * @run main/othervm/policy=java.policy SetLogPermission
  */
@@ -40,42 +40,42 @@
 
     public static void main(String[] args) throws Exception {
 
-	System.err.println("\nRegression test for bug 4533390\n");
+        System.err.println("\nRegression test for bug 4533390\n");
+
+        if (System.getSecurityManager() == null) {
+            System.setSecurityManager(new SecurityManager());
+        }
+
+        CodeSource codesource = new CodeSource(null, (Certificate[]) null);
+        Permissions perms = null;
+        ProtectionDomain pd = new ProtectionDomain(codesource, perms);
+        AccessControlContext acc =
+            new AccessControlContext(new ProtectionDomain[] { pd });
 
-	if (System.getSecurityManager() == null) {
-	    System.setSecurityManager(new SecurityManager());
-	}
-	
-	CodeSource codesource = new CodeSource(null, (Certificate[]) null);
-	Permissions perms = null;
-	ProtectionDomain pd = new ProtectionDomain(codesource, perms);
-	AccessControlContext acc =
-	    new AccessControlContext(new ProtectionDomain[] { pd });
-	
-	java.security.AccessController.doPrivileged(
-	    new java.security.PrivilegedAction() {
-	    public Object run() {
-		try {
-		    System.err.println(
-			"Attempt to set log without permission");
-		    RemoteServer.setLog(new ByteArrayOutputStream());
-		    throw new RuntimeException(
-			"TEST FAILED: set log without permission");
-		} catch (SecurityException e) {
-		    System.err.println(
-			"TEST PASSED: unable to set log without permission");
-		}
-		return null;
-	    }}, acc);
+        java.security.AccessController.doPrivileged(
+            new java.security.PrivilegedAction() {
+            public Object run() {
+                try {
+                    System.err.println(
+                        "Attempt to set log without permission");
+                    RemoteServer.setLog(new ByteArrayOutputStream());
+                    throw new RuntimeException(
+                        "TEST FAILED: set log without permission");
+                } catch (SecurityException e) {
+                    System.err.println(
+                        "TEST PASSED: unable to set log without permission");
+                }
+                return null;
+            }}, acc);
 
-	try {
-	    System.err.println("Attempt to set log with permission");
-	    RemoteServer.setLog(new ByteArrayOutputStream());
-	    System.err.println(
-		"TEST PASSED: sufficient permission to set log");
-	} catch (SecurityException e) {
-	    System.err.println("TEST FAILED: unable to set log");
-	    throw e;
-	}
+        try {
+            System.err.println("Attempt to set log with permission");
+            RemoteServer.setLog(new ByteArrayOutputStream());
+            System.err.println(
+                "TEST PASSED: sufficient permission to set log");
+        } catch (SecurityException e) {
+            System.err.println("TEST FAILED: unable to set log");
+            throw e;
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -50,40 +50,40 @@
     }
 
     public void receive(Remote obj) {
-	System.err.println("received: " + obj.toString());
+        System.err.println("received: " + obj.toString());
     }
 
     public static void main(String[] args) throws Exception {
 
-	InetAddress localAddress = InetAddress.getLocalHost();
-	String[] hostlist = new String[] {
-	    localAddress.getHostAddress(), localAddress.getHostName() };
+        InetAddress localAddress = InetAddress.getLocalHost();
+        String[] hostlist = new String[] {
+            localAddress.getHostAddress(), localAddress.getHostName() };
+
+        for (int i = 0; i < hostlist.length; i++) {
 
-	for (int i = 0; i < hostlist.length; i++) {
-		
-	    System.setProperty("java.rmi.server.hostname", hostlist[i]);
-	    Remote impl = new ChangeHostName();
-	    System.err.println("\ncreated impl extending URO: " + impl);
-		
-	    Receiver stub = (Receiver) RemoteObject.toStub(impl);
-	    System.err.println("stub for impl: " + stub);
+            System.setProperty("java.rmi.server.hostname", hostlist[i]);
+            Remote impl = new ChangeHostName();
+            System.err.println("\ncreated impl extending URO: " + impl);
+
+            Receiver stub = (Receiver) RemoteObject.toStub(impl);
+            System.err.println("stub for impl: " + stub);
 
-	    System.err.println("invoking method on stub");
-	    stub.receive(stub);
+            System.err.println("invoking method on stub");
+            stub.receive(stub);
 
-	    UnicastRemoteObject.unexportObject(impl, true);
-	    System.err.println("unexported impl");
+            UnicastRemoteObject.unexportObject(impl, true);
+            System.err.println("unexported impl");
 
-	    if (stub.toString().indexOf(hostlist[i]) >= 0) {
-		System.err.println("stub's ref contains hostname: " +
-				   hostlist[i]);
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: stub's ref doesn't contain hostname: " +
-		    hostlist[i]);
-	    }
-	}
-	System.err.println("TEST PASSED");
+            if (stub.toString().indexOf(hostlist[i]) >= 0) {
+                System.err.println("stub's ref contains hostname: " +
+                                   hostlist[i]);
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: stub's ref doesn't contain hostname: " +
+                    hostlist[i]);
+            }
+        }
+        System.err.println("TEST PASSED");
     }
 }
 
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/changeHostName/ChangeHostName_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,37 +29,37 @@
     implements Receiver, java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_receive_0;
-    
+
     static {
-	try {
-	    $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public ChangeHostName_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of receive(Remote)
     public void receive(java.rmi.Remote $param_Remote_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -59,83 +59,83 @@
     private boolean stillAlive = false;
 
     public void submitShutdown(Shutdown shutdown) {
-	synchronized (lock) {
-	    this.shutdown = shutdown;
-	    lock.notifyAll();
-	}
+        synchronized (lock) {
+            this.shutdown = shutdown;
+            lock.notifyAll();
+        }
     }
 
     public void declareStillAlive() {
-	synchronized (lock) {
-	    stillAlive = true;
-	    lock.notifyAll();
-	}
+        synchronized (lock) {
+            stillAlive = true;
+            lock.notifyAll();
+        }
     }
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4308492\n");
+        System.err.println("\nRegression test for bug 4308492\n");
 
-	KeepAliveDuringCall obj = new KeepAliveDuringCall();
+        KeepAliveDuringCall obj = new KeepAliveDuringCall();
 
-	try {
-	    UnicastRemoteObject.exportObject(obj);
-	    System.err.println("exported shutdown monitor");
+        try {
+            UnicastRemoteObject.exportObject(obj);
+            System.err.println("exported shutdown monitor");
 
-	    Registry localRegistry =
-		LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
-	    System.err.println("created local registry");
+            Registry localRegistry =
+                LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+            System.err.println("created local registry");
 
-	    localRegistry.bind(BINDING, obj);
-	    System.err.println("bound shutdown monitor in local registry");
+            localRegistry.bind(BINDING, obj);
+            System.err.println("bound shutdown monitor in local registry");
 
-	    System.err.println("starting remote ShutdownImpl VM...");
-	    (new JavaVM("ShutdownImpl")).start();
+            System.err.println("starting remote ShutdownImpl VM...");
+            (new JavaVM("ShutdownImpl")).start();
 
-	    Shutdown s;
-	    synchronized (obj.lock) {
-		System.err.println(
-		    "waiting for submission of object to shutdown...");
-		while ((s = obj.shutdown) == null) {
-		    obj.lock.wait(TIMEOUT);
-		}
-		if (s == null) {
-		    throw new RuntimeException(
-			"TEST FAILED: timeout waiting for shutdown object " +
-			"to make initial contact");
-		}
-		System.err.println("shutdown object submitted: " + s);
-	    }
+            Shutdown s;
+            synchronized (obj.lock) {
+                System.err.println(
+                    "waiting for submission of object to shutdown...");
+                while ((s = obj.shutdown) == null) {
+                    obj.lock.wait(TIMEOUT);
+                }
+                if (s == null) {
+                    throw new RuntimeException(
+                        "TEST FAILED: timeout waiting for shutdown object " +
+                        "to make initial contact");
+                }
+                System.err.println("shutdown object submitted: " + s);
+            }
 
-	    try {
-		s.shutdown();
-	    } catch (RemoteException e) {
-		throw new RuntimeException(
-		    "TEST FAILED: shutdown method threw remote exception", e);
-	    }
+            try {
+                s.shutdown();
+            } catch (RemoteException e) {
+                throw new RuntimeException(
+                    "TEST FAILED: shutdown method threw remote exception", e);
+            }
 
-	    synchronized (obj.lock) {
-		if (!obj.stillAlive) {
-		    throw new RuntimeException("TEST FAILED: " +
-			"shutdown object not detected alive after unexport");
-		}
-	    }
+            synchronized (obj.lock) {
+                if (!obj.stillAlive) {
+                    throw new RuntimeException("TEST FAILED: " +
+                        "shutdown object not detected alive after unexport");
+                }
+            }
 
-	    System.err.println("TEST PASSED: " +
-		"shutdown object detected still alive after unexport");
+            System.err.println("TEST PASSED: " +
+                "shutdown object detected still alive after unexport");
 
-	} catch (Exception e) {
-	    if (e instanceof RuntimeException) {
-		throw (RuntimeException) e;
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: unexpected exception", e);
-	    }
-	} finally {
-	    try {
-		UnicastRemoteObject.unexportObject(obj, true);
-	    } catch (RemoteException e) {
-	    }
-	}
+        } catch (Exception e) {
+            if (e instanceof RuntimeException) {
+                throw (RuntimeException) e;
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: unexpected exception", e);
+            }
+        } finally {
+            try {
+                UnicastRemoteObject.unexportObject(obj, true);
+            } catch (RemoteException e) {
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,54 +29,54 @@
     implements ShutdownMonitor
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_declareStillAlive_0;
     private static java.lang.reflect.Method $method_submitShutdown_1;
-    
+
     static {
-	try {
-	    $method_declareStillAlive_0 = ShutdownMonitor.class.getMethod("declareStillAlive", new java.lang.Class[] {});
-	    $method_submitShutdown_1 = ShutdownMonitor.class.getMethod("submitShutdown", new java.lang.Class[] {Shutdown.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_declareStillAlive_0 = ShutdownMonitor.class.getMethod("declareStillAlive", new java.lang.Class[] {});
+            $method_submitShutdown_1 = ShutdownMonitor.class.getMethod("submitShutdown", new java.lang.Class[] {Shutdown.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public KeepAliveDuringCall_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of declareStillAlive()
     public void declareStillAlive()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_declareStillAlive_0, null, -1562228924246272634L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_declareStillAlive_0, null, -1562228924246272634L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of submitShutdown(Shutdown)
     public void submitShutdown(Shutdown $param_Shutdown_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_submitShutdown_1, new java.lang.Object[] {$param_Shutdown_1}, 7574258166120515108L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_submitShutdown_1, new java.lang.Object[] {$param_Shutdown_1}, 7574258166120515108L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/Shutdown.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/Shutdown.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,58 +32,58 @@
 
 public class ShutdownImpl implements Shutdown {
 
-    private static Remote impl;		// rooted here to prevent GC
+    private static Remote impl;         // rooted here to prevent GC
 
     private final ShutdownMonitor monitor;
 
     private ShutdownImpl(ShutdownMonitor monitor) {
-	this.monitor = monitor;
+        this.monitor = monitor;
     }
 
     public void shutdown() {
-	try {
-	    System.err.println(
-		"(ShutdownImpl.shutdown) shutdown method invoked:");
+        try {
+            System.err.println(
+                "(ShutdownImpl.shutdown) shutdown method invoked:");
 
-	    UnicastRemoteObject.unexportObject(this, true);
-	    System.err.println(
-		"(ShutdownImpl.shutdown) shutdown object unexported");
+            UnicastRemoteObject.unexportObject(this, true);
+            System.err.println(
+                "(ShutdownImpl.shutdown) shutdown object unexported");
 
-	    Thread.sleep(500);
-	    System.err.println("(ShutDownImpl.shutdown) FEE");
-	    Thread.sleep(500);
-	    System.err.println("(ShutDownImpl.shutdown) FIE");
-	    Thread.sleep(500);
-	    System.err.println("(ShutDownImpl.shutdown) FOE");
-	    Thread.sleep(500);
-	    System.err.println("(ShutDownImpl.shutdown) FOO");
+            Thread.sleep(500);
+            System.err.println("(ShutDownImpl.shutdown) FEE");
+            Thread.sleep(500);
+            System.err.println("(ShutDownImpl.shutdown) FIE");
+            Thread.sleep(500);
+            System.err.println("(ShutDownImpl.shutdown) FOE");
+            Thread.sleep(500);
+            System.err.println("(ShutDownImpl.shutdown) FOO");
 
-	    monitor.declareStillAlive();
-	    System.err.println("(ShutDownImpl.shutdown) still alive!");
-	} catch (Exception e) {
-	    throw new RuntimeException(
-		"unexpected exception occurred in shutdown method", e);
-	}
+            monitor.declareStillAlive();
+            System.err.println("(ShutDownImpl.shutdown) still alive!");
+        } catch (Exception e) {
+            throw new RuntimeException(
+                "unexpected exception occurred in shutdown method", e);
+        }
     }
 
     public static void main(String[] args) {
-	try {
-	    Registry registry =
-		LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
-	    ShutdownMonitor monitor = (ShutdownMonitor)
-		registry.lookup(KeepAliveDuringCall.BINDING);
-	    System.err.println("(ShutdownImpl) retrieved shutdown monitor");
+        try {
+            Registry registry =
+                LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+            ShutdownMonitor monitor = (ShutdownMonitor)
+                registry.lookup(KeepAliveDuringCall.BINDING);
+            System.err.println("(ShutdownImpl) retrieved shutdown monitor");
 
-	    impl = new ShutdownImpl(monitor);
-	    Shutdown stub = (Shutdown) UnicastRemoteObject.exportObject(impl);
-	    System.err.println("(ShutdownImpl) exported shutdown object");
+            impl = new ShutdownImpl(monitor);
+            Shutdown stub = (Shutdown) UnicastRemoteObject.exportObject(impl);
+            System.err.println("(ShutdownImpl) exported shutdown object");
 
-	    monitor.submitShutdown(stub);
-	    System.err.println("(ShutdownImpl) submitted shutdown object");
+            monitor.submitShutdown(stub);
+            System.err.println("(ShutdownImpl) submitted shutdown object");
 
-	} catch (Exception e) {
-	    System.err.println("(ShutdownImpl) TEST SUBPROCESS FAILURE:");
-	    e.printStackTrace();
-	}
+        } catch (Exception e) {
+            System.err.println("(ShutdownImpl) TEST SUBPROCESS FAILURE:");
+            e.printStackTrace();
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,37 +29,37 @@
     implements Shutdown
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_shutdown_0;
-    
+
     static {
-	try {
-	    $method_shutdown_0 = Shutdown.class.getMethod("shutdown", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_shutdown_0 = Shutdown.class.getMethod("shutdown", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public ShutdownImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of shutdown()
     public void shutdown()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_shutdown_0, null, -7207851917985848402L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_shutdown_0, null, -7207851917985848402L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownMonitor.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownMonitor.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -53,35 +53,35 @@
     }
 
     public static void main(String[] args) throws Exception {
-	Remote impl2 = null;
-	try {
-	    Remote impl = new MarshalAfterUnexport();
-	    System.err.println("created impl extending URO: " + impl);
+        Remote impl2 = null;
+        try {
+            Remote impl = new MarshalAfterUnexport();
+            System.err.println("created impl extending URO: " + impl);
 
-	    Receiver stub = (Receiver) RemoteObject.toStub(impl);
-	    System.err.println("stub for impl: " + stub);
+            Receiver stub = (Receiver) RemoteObject.toStub(impl);
+            System.err.println("stub for impl: " + stub);
 
-	    UnicastRemoteObject.unexportObject(impl, true);
-	    System.err.println("unexported impl");
+            UnicastRemoteObject.unexportObject(impl, true);
+            System.err.println("unexported impl");
 
-	    impl2 = new MarshalAfterUnexport();
-	    Receiver stub2 = (Receiver) RemoteObject.toStub(impl2);
+            impl2 = new MarshalAfterUnexport();
+            Receiver stub2 = (Receiver) RemoteObject.toStub(impl2);
 
-	    System.err.println("marshalling unexported object:");
-	    MarshalledObject mobj = new MarshalledObject(impl);
+            System.err.println("marshalling unexported object:");
+            MarshalledObject mobj = new MarshalledObject(impl);
 
-	    System.err.println("passing unexported object via RMI-JRMP:");
-	    stub2.receive(stub);
+            System.err.println("passing unexported object via RMI-JRMP:");
+            stub2.receive(stub);
 
-	    System.err.println("TEST PASSED");
-	} finally {
-	    if (impl2 != null) {
-		try {
-		    UnicastRemoteObject.unexportObject(impl2, true);
-		} catch (Throwable t) {
-		}
-	    }
-	}
+            System.err.println("TEST PASSED");
+        } finally {
+            if (impl2 != null) {
+                try {
+                    UnicastRemoteObject.unexportObject(impl2, true);
+                } catch (Throwable t) {
+                }
+            }
+        }
     }
 }
 
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -49,47 +49,47 @@
     implements Receiver
 {
     public MarshalAfterUnexport2() throws RemoteException {
-	super(0, null, null);
+        super(0, null, null);
     }
 
     public void receive(Remote obj) {
     }
 
     public static void main(String[] args) throws Exception {
-	
-	System.err.println("\nRegression test for bug 4513223\n");
-	
-	Remote impl2 = null;
-	try {
-	    Remote impl = new MarshalAfterUnexport2();
-	    System.err.println(
-		"created impl extending URO (with a UnicastServerRef2): " +
-		impl);
+
+        System.err.println("\nRegression test for bug 4513223\n");
 
-	    Receiver stub = (Receiver) RemoteObject.toStub(impl);
-	    System.err.println("stub for impl: " + stub);
+        Remote impl2 = null;
+        try {
+            Remote impl = new MarshalAfterUnexport2();
+            System.err.println(
+                "created impl extending URO (with a UnicastServerRef2): " +
+                impl);
 
-	    UnicastRemoteObject.unexportObject(impl, true);
-	    System.err.println("unexported impl");
+            Receiver stub = (Receiver) RemoteObject.toStub(impl);
+            System.err.println("stub for impl: " + stub);
+
+            UnicastRemoteObject.unexportObject(impl, true);
+            System.err.println("unexported impl");
 
-	    impl2 = new MarshalAfterUnexport2();
-	    Receiver stub2 = (Receiver) RemoteObject.toStub(impl2);
+            impl2 = new MarshalAfterUnexport2();
+            Receiver stub2 = (Receiver) RemoteObject.toStub(impl2);
 
-	    System.err.println("marshalling unexported object:");
-	    MarshalledObject mobj = new MarshalledObject(impl);
+            System.err.println("marshalling unexported object:");
+            MarshalledObject mobj = new MarshalledObject(impl);
 
-	    System.err.println("passing unexported object via RMI-JRMP:");
-	    stub2.receive(stub);
+            System.err.println("passing unexported object via RMI-JRMP:");
+            stub2.receive(stub);
 
-	    System.err.println("TEST PASSED");
-	} finally {
-	    if (impl2 != null) {
-		try {
-		    UnicastRemoteObject.unexportObject(impl2, true);
-		} catch (Throwable t) {
-		}
-	    }
-	}
+            System.err.println("TEST PASSED");
+        } finally {
+            if (impl2 != null) {
+                try {
+                    UnicastRemoteObject.unexportObject(impl2, true);
+                } catch (Throwable t) {
+                }
+            }
+        }
     }
 }
 
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport2_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,37 +29,37 @@
     implements Receiver, java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_receive_0;
-    
+
     static {
-	try {
-	    $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public MarshalAfterUnexport2_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of receive(Remote)
     public void receive(java.rmi.Remote $param_Remote_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/marshalAfterUnexport/MarshalAfterUnexport_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,37 +29,37 @@
     implements Receiver, java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_receive_0;
-    
+
     static {
-	try {
-	    $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_receive_0 = Receiver.class.getMethod("receive", new java.lang.Class[] {java.rmi.Remote.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public MarshalAfterUnexport_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of receive(Remote)
     public void receive(java.rmi.Remote $param_Remote_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_receive_0, new java.lang.Object[] {$param_Remote_1}, 5876293363550629411L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/Ping.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/Ping.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,4 +26,3 @@
 public interface Ping extends Remote {
     public void ping() throws RemoteException;
 }
-
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,7 +24,7 @@
 /* @test
  * @bug 4331349
  * @summary synopsis: unexporting doesn't guarantee that DGC will
- * let go of remote object 
+ * let go of remote object
  *
  * @author Ann Wollrath
  *
@@ -40,36 +40,36 @@
 import java.rmi.registry.*;
 
 public class UnexportLeak implements Ping {
-    
+
     private static int PORT = 2006;
 
     public void ping() {
     }
 
     public static void main(String[] args) {
-	try {
-	    System.err.println("\nRegression test for bug 4331349\n");
-	    LocateRegistry.createRegistry(PORT);
-	    Remote obj = new UnexportLeak();
-	    WeakReference wr = new WeakReference(obj);
-	    UnicastRemoteObject.exportObject(obj);
-	    LocateRegistry.getRegistry(PORT).rebind("UnexportLeak", obj);
-	    UnicastRemoteObject.unexportObject(obj, true);
-	    obj = null;
-	    flushRefs();
-	    if (wr.get() != null) {
-		System.err.println("FAILED: unexported object not collected");
-		throw new RuntimeException(
-		    "FAILED: unexported object not collected");
-	    } else {
-		System.err.println("PASSED: unexported object collected");
-	    }
-	} catch (RemoteException e) {
-	    System.err.println(
-		"FAILED: RemoteException encountered: " + e.getMessage());
-	    e.printStackTrace();
-	    throw new RuntimeException("FAILED: RemoteException encountered");
-	}
+        try {
+            System.err.println("\nRegression test for bug 4331349\n");
+            LocateRegistry.createRegistry(PORT);
+            Remote obj = new UnexportLeak();
+            WeakReference wr = new WeakReference(obj);
+            UnicastRemoteObject.exportObject(obj);
+            LocateRegistry.getRegistry(PORT).rebind("UnexportLeak", obj);
+            UnicastRemoteObject.unexportObject(obj, true);
+            obj = null;
+            flushRefs();
+            if (wr.get() != null) {
+                System.err.println("FAILED: unexported object not collected");
+                throw new RuntimeException(
+                    "FAILED: unexported object not collected");
+            } else {
+                System.err.println("PASSED: unexported object collected");
+            }
+        } catch (RemoteException e) {
+            System.err.println(
+                "FAILED: RemoteException encountered: " + e.getMessage());
+            e.printStackTrace();
+            throw new RuntimeException("FAILED: RemoteException encountered");
+        }
     }
 
     /**
@@ -77,15 +77,13 @@
      * will be cleared.
      */
     private static void flushRefs() {
-	java.util.Vector chain = new java.util.Vector();
-	try {
-	    while (true) {
-		int[] hungry = new int[65536];
-		chain.addElement(hungry);
-	    }
-	} catch (OutOfMemoryError e) {
-	}
+        java.util.Vector chain = new java.util.Vector();
+        try {
+            while (true) {
+                int[] hungry = new int[65536];
+                chain.addElement(hungry);
+            }
+        } catch (OutOfMemoryError e) {
+        }
     }
 }
-
-
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,37 +29,37 @@
     implements Ping
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_ping_0;
-    
+
     static {
-	try {
-	    $method_ping_0 = Ping.class.getMethod("ping", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_ping_0 = Ping.class.getMethod("ping", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public UnexportLeak_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of ping()
     public void ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/useDynamicProxies/UseDynamicProxies.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/useDynamicProxies/UseDynamicProxies.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -43,75 +43,75 @@
 
 
     public Object passObject(Object obj) {
-	return obj;
+        return obj;
     }
 
     public int passInt(int x) {
-	return x;
+        return x;
     }
 
     public String passString(String string) {
-	return string;
+        return string;
     }
 
     public static void main(String[] args) throws Exception {
-	
-	RemoteInterface server = null;
-	RemoteInterface proxy = null;
-	
-	try {
-	    System.setProperty("java.rmi.server.ignoreStubClasses", args[0]);
-	    boolean ignoreStubClasses = Boolean.parseBoolean(args[0]);
+
+        RemoteInterface server = null;
+        RemoteInterface proxy = null;
+
+        try {
+            System.setProperty("java.rmi.server.ignoreStubClasses", args[0]);
+            boolean ignoreStubClasses = Boolean.parseBoolean(args[0]);
+
+            if (System.getSecurityManager() == null) {
+                System.setSecurityManager(new SecurityManager());
+            }
 
-	    if (System.getSecurityManager() == null) {
-		System.setSecurityManager(new SecurityManager());
-	    }
+            System.err.println("export object");
+            server = new UseDynamicProxies();
+            proxy =
+                (RemoteInterface) UnicastRemoteObject.exportObject(server, 0);
 
-	    System.err.println("export object");
-	    server = new UseDynamicProxies();
-	    proxy =
-		(RemoteInterface) UnicastRemoteObject.exportObject(server, 0);
+            System.err.println("proxy = " + proxy);
+            if (ignoreStubClasses) {
+                if (!Proxy.isProxyClass(proxy.getClass())) {
+                    throw new RuntimeException(
+                        "server proxy is not a dynamic proxy");
+                }
+                if (!(Proxy.getInvocationHandler(proxy) instanceof
+                      RemoteObjectInvocationHandler))
+                {
+                    throw new RuntimeException("invalid invocation handler");
+                }
 
-	    System.err.println("proxy = " + proxy);
-	    if (ignoreStubClasses) {
-		if (!Proxy.isProxyClass(proxy.getClass())) {
-		    throw new RuntimeException(
-		        "server proxy is not a dynamic proxy");
-		}
-		if (!(Proxy.getInvocationHandler(proxy) instanceof
-		      RemoteObjectInvocationHandler))
-		{
-		    throw new RuntimeException("invalid invocation handler");
-		}
-		
-	    } else if (!(proxy instanceof RemoteStub)) {
-		throw new RuntimeException(
- 		    "server proxy is not a RemoteStub");
-	    }
+            } else if (!(proxy instanceof RemoteStub)) {
+                throw new RuntimeException(
+                    "server proxy is not a RemoteStub");
+            }
+
+            System.err.println("invoke methods");
+            Object obj = proxy.passObject(proxy);
+            if (!proxy.equals(obj)) {
+                throw new RuntimeException("returned proxy not equal");
+            }
 
-	    System.err.println("invoke methods");
-	    Object obj = proxy.passObject(proxy);
-	    if (!proxy.equals(obj)) {
-		throw new RuntimeException("returned proxy not equal");
-	    }
-
-	    int x = proxy.passInt(53);
-	    if (x != 53) {
-		throw new RuntimeException("returned int not equal");
-	    }
+            int x = proxy.passInt(53);
+            if (x != 53) {
+                throw new RuntimeException("returned int not equal");
+            }
 
-	    String string = proxy.passString("test");
-	    if (!string.equals("test")) {
-		throw new RuntimeException("returned string not equal");
-	    }
-	    
-	    System.err.println("TEST PASSED");
-	    
-	} finally {
-	    if (proxy != null) {
-		UnicastRemoteObject.unexportObject(server, true);
-	    }
-	}
+            String string = proxy.passString("test");
+            if (!string.equals("test")) {
+                throw new RuntimeException("returned string not equal");
+            }
+
+            System.err.println("TEST PASSED");
+
+        } finally {
+            if (proxy != null) {
+                UnicastRemoteObject.unexportObject(server, true);
+            }
+        }
     }
 }
 
--- a/jdk/test/java/rmi/server/UnicastRemoteObject/useDynamicProxies/UseDynamicProxies_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/UnicastRemoteObject/useDynamicProxies/UseDynamicProxies_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,74 +29,74 @@
     implements RemoteInterface
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_passInt_0;
     private static java.lang.reflect.Method $method_passObject_1;
     private static java.lang.reflect.Method $method_passString_2;
-    
+
     static {
-	try {
-	    $method_passInt_0 = RemoteInterface.class.getMethod("passInt", new java.lang.Class[] {int.class});
-	    $method_passObject_1 = RemoteInterface.class.getMethod("passObject", new java.lang.Class[] {java.lang.Object.class});
-	    $method_passString_2 = RemoteInterface.class.getMethod("passString", new java.lang.Class[] {java.lang.String.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_passInt_0 = RemoteInterface.class.getMethod("passInt", new java.lang.Class[] {int.class});
+            $method_passObject_1 = RemoteInterface.class.getMethod("passObject", new java.lang.Class[] {java.lang.Object.class});
+            $method_passString_2 = RemoteInterface.class.getMethod("passString", new java.lang.Class[] {java.lang.String.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public UseDynamicProxies_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of passInt(int)
     public int passInt(int $param_int_1)
-	throws java.io.IOException
+        throws java.io.IOException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_passInt_0, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, 8655249712495061761L);
-	    return ((java.lang.Integer) $result).intValue();
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.io.IOException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_passInt_0, new java.lang.Object[] {new java.lang.Integer($param_int_1)}, 8655249712495061761L);
+            return ((java.lang.Integer) $result).intValue();
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.io.IOException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of passObject(Object)
     public java.lang.Object passObject(java.lang.Object $param_Object_1)
-	throws java.io.IOException
+        throws java.io.IOException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_passObject_1, new java.lang.Object[] {$param_Object_1}, 3074202549763602823L);
-	    return ((java.lang.Object) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.io.IOException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_passObject_1, new java.lang.Object[] {$param_Object_1}, 3074202549763602823L);
+            return ((java.lang.Object) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.io.IOException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of passString(String)
     public java.lang.String passString(java.lang.String $param_String_1)
-	throws java.io.IOException
+        throws java.io.IOException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_passString_2, new java.lang.Object[] {$param_String_1}, 6627880292288702000L);
-	    return ((java.lang.String) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.io.IOException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_passString_2, new java.lang.Object[] {$param_String_1}, 6627880292288702000L);
+            return ((java.lang.String) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.io.IOException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4118600 
+ * @bug 4118600
  * @summary RMI UnmarshallException, interaction on stopping a thread.
  *
  * @bug 4177704
@@ -35,7 +35,7 @@
  * @build CheckUnmarshall PoisonPill RuntimeExceptionParameter
  * @build CheckUnmarshalOnStopThread
  * @build CheckUnmarshalOnStopThread_Stub
- * @run main/othervm/timeout=480 CheckUnmarshalOnStopThread 
+ * @run main/othervm/timeout=480 CheckUnmarshalOnStopThread
  */
 
 import java.rmi.*;
@@ -44,7 +44,7 @@
 import java.rmi.registry.*;
 
 /**
- * Description for 4118600: 
+ * Description for 4118600:
  *
  * If an rmi call thread is stopped while unmarshalling a return
  * value), java.lang.ThreadDeath will be thrown during
@@ -77,8 +77,8 @@
  * occur.  This test is only written to track UnmarshalExceptions;
  * success/failure does not depend on other types of problems.
  *
- * Description for 4177704: 
- * 
+ * Description for 4177704:
+ *
  * Similar situation as for 4177704 except that instead of just
  * ensuring that RMI properly handles Errors, the second part of the
  * test ensures that RMI deals with RuntimeExceptions correctly.
@@ -88,110 +88,110 @@
  * parameters.  An object that throws a RuntimeException in its
  * writeObject method helps to carry out this part of the test.
  */
-public class CheckUnmarshalOnStopThread 
-    extends UnicastRemoteObject 
-    implements CheckUnmarshal 
+public class CheckUnmarshalOnStopThread
+    extends UnicastRemoteObject
+    implements CheckUnmarshal
 {
     final static int RUNTIME_PILL = 1;
     public static int typeToThrow = 0;
 
     /*
-     * remote object implementation 
+     * remote object implementation
      */
 
     CheckUnmarshalOnStopThread() throws RemoteException { }
 
     public PoisonPill getPoisonPill() throws RemoteException {
-	return new PoisonPill(new Integer(0));
+        return new PoisonPill(new Integer(0));
     }
 
     public Object ping() throws RemoteException {
-	return (Object) new Integer(0);
+        return (Object) new Integer(0);
     }
 
     public void passRuntimeExceptionParameter(
-        RuntimeExceptionParameter rep) throws RemoteException 
+        RuntimeExceptionParameter rep) throws RemoteException
     {
-	// will never be called
+        // will never be called
     }
 
     public static void main(String [] args) {
 
-	Object dummy = new Object();
-	CheckUnmarshal cu = null;
-	CheckUnmarshalOnStopThread cuonst = null;
+        Object dummy = new Object();
+        CheckUnmarshal cu = null;
+        CheckUnmarshalOnStopThread cuonst = null;
 
-	System.err.println("\nregression test for bugs: " + 
-			   "4118600 and 4177704\n");
+        System.err.println("\nregression test for bugs: " +
+                           "4118600 and 4177704\n");
 
-	try {
-	    cuonst = new CheckUnmarshalOnStopThread();
-	    cu = (CheckUnmarshal) UnicastRemoteObject.toStub(cuonst);
+        try {
+            cuonst = new CheckUnmarshalOnStopThread();
+            cu = (CheckUnmarshal) UnicastRemoteObject.toStub(cuonst);
 
-	    // make sure that RMI will free connections appropriately
-	    // under several situations:
+            // make sure that RMI will free connections appropriately
+            // under several situations:
 
-	    // when Errors are thrown during parameter unmarshalling
-	    System.err.println("testing to see if RMI will handle errors");
-	    ensureConnectionsAreFreed(cu, true);
+            // when Errors are thrown during parameter unmarshalling
+            System.err.println("testing to see if RMI will handle errors");
+            ensureConnectionsAreFreed(cu, true);
 
-	    // when RuntimeExceptions are thrown during parameter unmarshalling
-	    System.err.println("testing to see if RMI will handle " + 
-			       "runtime exceptions");
-	    typeToThrow = RUNTIME_PILL;
-	    ensureConnectionsAreFreed(cu, true);
+            // when RuntimeExceptions are thrown during parameter unmarshalling
+            System.err.println("testing to see if RMI will handle " +
+                               "runtime exceptions");
+            typeToThrow = RUNTIME_PILL;
+            ensureConnectionsAreFreed(cu, true);
 
-	    // when RuntimeExceptions are thrown during parameter marshalling
-	    System.err.println("testing to see if RMI will handle " + 
-			       "runtime exceptions thrown during " + 
-			       "parameter marshalling");
-	    ensureConnectionsAreFreed(cu, false);
+            // when RuntimeExceptions are thrown during parameter marshalling
+            System.err.println("testing to see if RMI will handle " +
+                               "runtime exceptions thrown during " +
+                               "parameter marshalling");
+            ensureConnectionsAreFreed(cu, false);
 
-	    System.err.println
-		("\nsuccess: CheckUnmarshalOnStopThread test passed ");
+            System.err.println
+                ("\nsuccess: CheckUnmarshalOnStopThread test passed ");
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    cu = null;
-	    deactivate(cuonst);
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            cu = null;
+            deactivate(cuonst);
+        }
     }
-    
-    static void ensureConnectionsAreFreed(CheckUnmarshal cu, boolean getPill) 
-	throws Exception
+
+    static void ensureConnectionsAreFreed(CheckUnmarshal cu, boolean getPill)
+        throws Exception
     {
-	// invoke a remote call that will corrupt a call connection
-	// that will not be freed (if the bug is not fixed)
+        // invoke a remote call that will corrupt a call connection
+        // that will not be freed (if the bug is not fixed)
 
-	for (int i = 0 ; i < 250 ; i++) {
-	    try {
-		Object test = cu.ping();
-		if (getPill) {
-		    cu.getPoisonPill();
-		} else {
-		    cu.passRuntimeExceptionParameter(
-		        new RuntimeExceptionParameter());
-		}
-	    } catch (Error e) {
-		// expect an Error from call unmarshalling, ignore it
-	    } catch (RuntimeException e) {
-		// " RuntimeException "
-	    }
-	}
+        for (int i = 0 ; i < 250 ; i++) {
+            try {
+                Object test = cu.ping();
+                if (getPill) {
+                    cu.getPoisonPill();
+                } else {
+                    cu.passRuntimeExceptionParameter(
+                        new RuntimeExceptionParameter());
+                }
+            } catch (Error e) {
+                // expect an Error from call unmarshalling, ignore it
+            } catch (RuntimeException e) {
+                // " RuntimeException "
+            }
+        }
 
-	System.err.println("remote calls passed, received no " + 
-			   "unmarshal exceptions\n\n");
+        System.err.println("remote calls passed, received no " +
+                           "unmarshal exceptions\n\n");
     }
 
     static void deactivate(RemoteServer r) {
-	// make sure that the object goes away
-	try {
-	    System.err.println("deactivating object.");
-	    UnicastRemoteObject.unexportObject(r, true);
-	} catch (Exception e) {
-	    e.getMessage();
-	    e.printStackTrace();
-	}
+        // make sure that the object goes away
+        try {
+            System.err.println("deactivating object.");
+            UnicastRemoteObject.unexportObject(r, true);
+        } catch (Exception e) {
+            e.getMessage();
+            e.printStackTrace();
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshalOnStopThread_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,138 +29,138 @@
     implements CheckUnmarshal, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("PoisonPill getPoisonPill()"),
-	new java.rmi.server.Operation("void passRuntimeExceptionParameter(RuntimeExceptionParameter)"),
-	new java.rmi.server.Operation("java.lang.Object ping()")
+        new java.rmi.server.Operation("PoisonPill getPoisonPill()"),
+        new java.rmi.server.Operation("void passRuntimeExceptionParameter(RuntimeExceptionParameter)"),
+        new java.rmi.server.Operation("java.lang.Object ping()")
     };
-    
+
     private static final long interfaceHash = -5923540687975666490L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_getPoisonPill_0;
     private static java.lang.reflect.Method $method_passRuntimeExceptionParameter_1;
     private static java.lang.reflect.Method $method_ping_2;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_getPoisonPill_0 = CheckUnmarshal.class.getMethod("getPoisonPill", new java.lang.Class[] {});
-	    $method_passRuntimeExceptionParameter_1 = CheckUnmarshal.class.getMethod("passRuntimeExceptionParameter", new java.lang.Class[] {RuntimeExceptionParameter.class});
-	    $method_ping_2 = CheckUnmarshal.class.getMethod("ping", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_getPoisonPill_0 = CheckUnmarshal.class.getMethod("getPoisonPill", new java.lang.Class[] {});
+            $method_passRuntimeExceptionParameter_1 = CheckUnmarshal.class.getMethod("passRuntimeExceptionParameter", new java.lang.Class[] {RuntimeExceptionParameter.class});
+            $method_ping_2 = CheckUnmarshal.class.getMethod("ping", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public CheckUnmarshalOnStopThread_Stub() {
-	super();
+        super();
     }
     public CheckUnmarshalOnStopThread_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getPoisonPill()
     public PoisonPill getPoisonPill()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getPoisonPill_0, null, 5776441251039617360L);
-		return ((PoisonPill) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		PoisonPill $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (PoisonPill) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getPoisonPill_0, null, 5776441251039617360L);
+                return ((PoisonPill) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                PoisonPill $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (PoisonPill) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of passRuntimeExceptionParameter(RuntimeExceptionParameter)
     public void passRuntimeExceptionParameter(RuntimeExceptionParameter $param_RuntimeExceptionParameter_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_passRuntimeExceptionParameter_1, new java.lang.Object[] {$param_RuntimeExceptionParameter_1}, -4427599990679364365L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		try {
-		    java.io.ObjectOutput out = call.getOutputStream();
-		    out.writeObject($param_RuntimeExceptionParameter_1);
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.MarshalException("error marshalling arguments", e);
-		}
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_passRuntimeExceptionParameter_1, new java.lang.Object[] {$param_RuntimeExceptionParameter_1}, -4427599990679364365L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_RuntimeExceptionParameter_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("error marshalling arguments", e);
+                }
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of ping()
     public java.lang.Object ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_ping_2, null, 7635508643486276040L);
-		return ((java.lang.Object) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
-		ref.invoke(call);
-		java.lang.Object $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.lang.Object) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_ping_2, null, 7635508643486276040L);
+                return ((java.lang.Object) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
+                ref.invoke(call);
+                java.lang.Object $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.lang.Object) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshall.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/CheckUnmarshall.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -20,7 +20,7 @@
  * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
- 
+
 /**
  *
  */
@@ -37,4 +37,3 @@
             RuntimeExceptionParameter rep)
         throws RemoteException;
     }
-
--- a/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/PoisonPill.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/PoisonPill.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -45,7 +45,7 @@
         throws IOException
     {
         if (CheckUnmarshalOnStopThread.typeToThrow !=
-	    CheckUnmarshalOnStopThread.RUNTIME_PILL) {
+            CheckUnmarshalOnStopThread.RUNTIME_PILL) {
 
             throw new Error("Wrote a test object whos readObject " +
                             "method always throws an Error");
--- a/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/RuntimeExceptionParameter.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unmarshal/checkUnmarshalOnStopThread/RuntimeExceptionParameter.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -38,7 +38,6 @@
     {
         throw new RuntimeException("wrote a parameter whos writeObject " +
                                    "method always throws a RuntimeException"
-	);
+        );
     }
 }
-
--- a/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -54,69 +54,69 @@
     private boolean unreferencedInvoked = false;
 
     public void unreferenced() {
-	System.err.println("unreferenced() method invoked");
-	synchronized (lock) {
-	    unreferencedInvoked = true;
-	    lock.notify();
-	}
+        System.err.println("unreferenced() method invoked");
+        synchronized (lock) {
+            unreferencedInvoked = true;
+            lock.notify();
+        }
     }
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4164696\n");
+        System.err.println("\nRegression test for bug 4164696\n");
 
-	/*
-	 * Set the interval that RMI will request for GC latency (before RMI
-	 * gets initialized and this property is read) to an unrealistically
-	 * small value, so that this test shouldn't have to wait too long.
-	 */
-	System.setProperty("sun.rmi.dgc.client.gcInterval",
-	    String.valueOf(GC_INTERVAL));
+        /*
+         * Set the interval that RMI will request for GC latency (before RMI
+         * gets initialized and this property is read) to an unrealistically
+         * small value, so that this test shouldn't have to wait too long.
+         */
+        System.setProperty("sun.rmi.dgc.client.gcInterval",
+            String.valueOf(GC_INTERVAL));
 
-	FiniteGCLatency obj = new FiniteGCLatency();
+        FiniteGCLatency obj = new FiniteGCLatency();
 
-	try {
-	    UnicastRemoteObject.exportObject(obj);
-	    System.err.println("exported remote object");
+        try {
+            UnicastRemoteObject.exportObject(obj);
+            System.err.println("exported remote object");
 
-	    LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
-	    System.err.println("created registry");
+            LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+            System.err.println("created registry");
 
-	    Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
-	    registry.bind(BINDING, obj);
-	    System.err.println("bound remote object in registry");
+            Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+            registry.bind(BINDING, obj);
+            System.err.println("bound remote object in registry");
 
-	    synchronized (obj.lock) {
-		registry.unbind(BINDING);
-		System.err.println("unbound remote object from registry; " +
-		    "waiting for unreferenced() callback...");
-		obj.lock.wait(TIMEOUT);
+            synchronized (obj.lock) {
+                registry.unbind(BINDING);
+                System.err.println("unbound remote object from registry; " +
+                    "waiting for unreferenced() callback...");
+                obj.lock.wait(TIMEOUT);
 
-		if (obj.unreferencedInvoked) {
-		    System.err.println("TEST PASSED: unreferenced() invoked");
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unrefereced() not invoked after " +
-			((double) TIMEOUT / 1000.0) + " seconds");
-		}
-	    }
+                if (obj.unreferencedInvoked) {
+                    System.err.println("TEST PASSED: unreferenced() invoked");
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unrefereced() not invoked after " +
+                        ((double) TIMEOUT / 1000.0) + " seconds");
+                }
+            }
 
-	} catch (Exception e) {
-	    if (e instanceof RuntimeException) {
-		throw (RuntimeException) e;
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: unexpected exception: " + e.toString());
-	    }
-	} finally {
-	    /*
-	     * When all is said and done, try to unexport the remote object
-	     * so that the VM has a chance to exit.
-	     */
-	    try {
-		UnicastRemoteObject.unexportObject(obj, true);
-	    } catch (RemoteException e) {
-	    }
-	}
+        } catch (Exception e) {
+            if (e instanceof RuntimeException) {
+                throw (RuntimeException) e;
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: unexpected exception: " + e.toString());
+            }
+        } finally {
+            /*
+             * When all is said and done, try to unexport the remote object
+             * so that the VM has a chance to exit.
+             */
+            try {
+                UnicastRemoteObject.unexportObject(obj, true);
+            } catch (RemoteException e) {
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public FiniteGCLatency_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -62,71 +62,71 @@
     private boolean unreferencedInvoked = false;
 
     public void unreferenced() {
-	System.err.println("unreferenced() method invoked");
-	synchronized (lock) {
-	    unreferencedInvoked = true;
-	    lock.notify();
-	}
+        System.err.println("unreferenced() method invoked");
+        synchronized (lock) {
+            unreferencedInvoked = true;
+            lock.notify();
+        }
     }
 
     public static void main(String[] args) throws Exception {
 
-	System.err.println("\nRegression test for bug 4285878\n");
+        System.err.println("\nRegression test for bug 4285878\n");
 
-	/*
-	 * Set the duration of leases granted to a very small value, so that
-	 * we can test if expirations are detected in a roughly comparable
-	 * time.
-	 */
-	System.setProperty("java.rmi.dgc.leaseValue",
-			   String.valueOf(LEASE_VALUE));
+        /*
+         * Set the duration of leases granted to a very small value, so that
+         * we can test if expirations are detected in a roughly comparable
+         * time.
+         */
+        System.setProperty("java.rmi.dgc.leaseValue",
+                           String.valueOf(LEASE_VALUE));
 
-	LeaseCheckInterval obj = new LeaseCheckInterval();
+        LeaseCheckInterval obj = new LeaseCheckInterval();
 
-	try {
-	    UnicastRemoteObject.exportObject(obj);
-	    System.err.println("exported remote object");
+        try {
+            UnicastRemoteObject.exportObject(obj);
+            System.err.println("exported remote object");
 
-	    Registry localRegistry =
-		LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
-	    System.err.println("created local registry");
+            Registry localRegistry =
+                LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+            System.err.println("created local registry");
 
-	    localRegistry.bind(BINDING, obj);
-	    System.err.println("bound remote object in local registry");
+            localRegistry.bind(BINDING, obj);
+            System.err.println("bound remote object in local registry");
 
-	    synchronized (obj.lock) {
-		System.err.println("starting remote client VM...");
-		(new JavaVM("SelfTerminator")).start();
+            synchronized (obj.lock) {
+                System.err.println("starting remote client VM...");
+                (new JavaVM("SelfTerminator")).start();
 
-		System.err.println("waiting for unreferenced() callback...");
-		obj.lock.wait(TIMEOUT);
+                System.err.println("waiting for unreferenced() callback...");
+                obj.lock.wait(TIMEOUT);
 
-		if (obj.unreferencedInvoked) {
-		    System.err.println("TEST PASSED: " +
-			"unreferenced() invoked in timely fashion");
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unreferenced() not invoked after " +
-			((double) TIMEOUT / 1000.0) + " seconds");
-		}
-	    }
+                if (obj.unreferencedInvoked) {
+                    System.err.println("TEST PASSED: " +
+                        "unreferenced() invoked in timely fashion");
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unreferenced() not invoked after " +
+                        ((double) TIMEOUT / 1000.0) + " seconds");
+                }
+            }
 
-	} catch (Exception e) {
-	    if (e instanceof RuntimeException) {
-		throw (RuntimeException) e;
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: unexpected exception: " + e.toString());
-	    }
-	} finally {
-	    /*
-	     * When all is said and done, try to unexport the remote object
-	     * so that the VM has a chance to exit.
-	     */
-	    try {
-		UnicastRemoteObject.unexportObject(obj, true);
-	    } catch (RemoteException e) {
-	    }
-	}
+        } catch (Exception e) {
+            if (e instanceof RuntimeException) {
+                throw (RuntimeException) e;
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: unexpected exception: " + e.toString());
+            }
+        } finally {
+            /*
+             * When all is said and done, try to unexport the remote object
+             * so that the VM has a chance to exit.
+             */
+            try {
+                UnicastRemoteObject.unexportObject(obj, true);
+            } catch (RemoteException e) {
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/LeaseCheckInterval_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public LeaseCheckInterval_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/SelfTerminator.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/leaseCheckInterval/SelfTerminator.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,13 +32,13 @@
 public class SelfTerminator {
 
     public static void main(String[] args) {
-	try {
-	    Registry registry =
-		LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
-	    Remote stub = registry.lookup(LeaseCheckInterval.BINDING);
-	    Runtime.getRuntime().halt(0);
-	} catch (Exception e) {
-	    e.printStackTrace();
-	}
+        try {
+            Registry registry =
+                LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+            Remote stub = registry.lookup(LeaseCheckInterval.BINDING);
+            Runtime.getRuntime().halt(0);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2000-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -51,72 +51,72 @@
     private boolean unreferencedInvoked;
 
     public void unreferenced() {
-	System.err.println("unreferenced() method invoked");
-	synchronized (lock) {
-	    unreferencedInvoked = true;
-	    lock.notify();
-	}
+        System.err.println("unreferenced() method invoked");
+        synchronized (lock) {
+            unreferencedInvoked = true;
+            lock.notify();
+        }
     }
 
     public static void main(String[] args) {
 
-	System.err.println(
-	    "\nTest to verify correction interaction of " +
-	    "MarshalledObject.get and DGC registration\n");
+        System.err.println(
+            "\nTest to verify correction interaction of " +
+            "MarshalledObject.get and DGC registration\n");
 
-	/*
-	 * Set the interval that RMI will request for GC latency (before RMI
-	 * gets initialized and this property is read) to an unrealistically
-	 * small value, so that this test shouldn't have to wait too long.
-	 */
-	System.setProperty("sun.rmi.dgc.client.gcInterval",
-	    String.valueOf(GC_INTERVAL));
+        /*
+         * Set the interval that RMI will request for GC latency (before RMI
+         * gets initialized and this property is read) to an unrealistically
+         * small value, so that this test shouldn't have to wait too long.
+         */
+        System.setProperty("sun.rmi.dgc.client.gcInterval",
+            String.valueOf(GC_INTERVAL));
 
-	MarshalledObjectGet obj = new MarshalledObjectGet();
+        MarshalledObjectGet obj = new MarshalledObjectGet();
 
-	try {
-	    Remote stub = UnicastRemoteObject.exportObject(obj);
-	    System.err.println("exported remote object");
+        try {
+            Remote stub = UnicastRemoteObject.exportObject(obj);
+            System.err.println("exported remote object");
 
-	    MarshalledObject mobj = new MarshalledObject(stub);
-	    Remote unmarshalledStub = (Remote) mobj.get();
-	    System.err.println("unmarshalled stub from marshalled object");
+            MarshalledObject mobj = new MarshalledObject(stub);
+            Remote unmarshalledStub = (Remote) mobj.get();
+            System.err.println("unmarshalled stub from marshalled object");
 
-	    synchronized (obj.lock) {
-		obj.unreferencedInvoked = false;
+            synchronized (obj.lock) {
+                obj.unreferencedInvoked = false;
 
-		unmarshalledStub = null;
-		System.gc();
-		System.err.println("cleared unmarshalled stub");
-		System.err.println("waiting for unreferenced() callback " +
-				   "(SHOULD happen)...");
-		obj.lock.wait(TIMEOUT);
+                unmarshalledStub = null;
+                System.gc();
+                System.err.println("cleared unmarshalled stub");
+                System.err.println("waiting for unreferenced() callback " +
+                                   "(SHOULD happen)...");
+                obj.lock.wait(TIMEOUT);
 
-		if (obj.unreferencedInvoked) {
-		    // TEST PASSED
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unrefereced() not invoked after " +
-			((double) TIMEOUT / 1000.0) + " seconds");
-		}
-	    }
+                if (obj.unreferencedInvoked) {
+                    // TEST PASSED
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unrefereced() not invoked after " +
+                        ((double) TIMEOUT / 1000.0) + " seconds");
+                }
+            }
 
-	    System.err.println("TEST PASSED");
+            System.err.println("TEST PASSED");
 
-	} catch (Exception e) {
-	    if (e instanceof RuntimeException) {
-		throw (RuntimeException) e;
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: unexpected exception: " + e.toString());
-	    }
-	} finally {
-	    if (obj != null) {
-		try {
-		    UnicastRemoteObject.unexportObject(obj, true);
-		} catch (Exception e) {
-		}
-	    }
-	}
+        } catch (Exception e) {
+            if (e instanceof RuntimeException) {
+                throw (RuntimeException) e;
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: unexpected exception: " + e.toString());
+            }
+        } finally {
+            if (obj != null) {
+                try {
+                    UnicastRemoteObject.unexportObject(obj, true);
+                } catch (Exception e) {
+                }
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/marshalledObjectGet/MarshalledObjectGet_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public MarshalledObjectGet_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,12 +32,12 @@
  *
  * @bug 4214123
  * @summary Unreferenced.unreferenced(...) threads should run in the nonSystem group.
- *          To complete the fix for, 4182104, RMI unreferenced threads should also 
+ *          To complete the fix for, 4182104, RMI unreferenced threads should also
  *          run in the nonSystem so that they do not need permissions to modify the
  *          system thread group.
  *
  * @author Laird Dornin
- * 
+ *
  * @library ../../../testlibrary
  * @build UnreferencedContext
  * @build UnreferencedContext_Stub
@@ -60,127 +60,127 @@
     private ClassLoader unreferencedContext;
 
     public void run() {
-	System.err.println("unreferenced method created thread succesfully");
+        System.err.println("unreferenced method created thread succesfully");
     }
 
     public void unreferenced() {
-	// turn on security to ensure that the action below will not
-	// require extra permissions
-	System.setSecurityManager(new java.rmi.RMISecurityManager());
+        // turn on security to ensure that the action below will not
+        // require extra permissions
+        System.setSecurityManager(new java.rmi.RMISecurityManager());
 
-	// exercise functionality prohibited by 4214123
-	(new Thread(this)).start();
+        // exercise functionality prohibited by 4214123
+        (new Thread(this)).start();
 
-	System.err.println("unreferenced() method invoked");
-	synchronized (lock) {
-	    unreferencedInvoked = true;
-	    unreferencedContext =
-		Thread.currentThread().getContextClassLoader();
-	    lock.notify();
-	}
+        System.err.println("unreferenced() method invoked");
+        synchronized (lock) {
+            unreferencedInvoked = true;
+            unreferencedContext =
+                Thread.currentThread().getContextClassLoader();
+            lock.notify();
+        }
     }
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4171278\n");
+        System.err.println("\nRegression test for bug 4171278\n");
 
-	/*
-	 * Set the interval that RMI will request for GC latency (before RMI
-	 * gets initialized and this property is read) to an unrealistically
-	 * small value, so that this test shouldn't have to wait too long.
-	 */
-	System.setProperty("sun.rmi.dgc.client.gcInterval",
-	    String.valueOf(GC_INTERVAL));
+        /*
+         * Set the interval that RMI will request for GC latency (before RMI
+         * gets initialized and this property is read) to an unrealistically
+         * small value, so that this test shouldn't have to wait too long.
+         */
+        System.setProperty("sun.rmi.dgc.client.gcInterval",
+            String.valueOf(GC_INTERVAL));
 
-	UnreferencedContext obj = new UnreferencedContext();
+        UnreferencedContext obj = new UnreferencedContext();
 
-	try {
-	    /*
-	     * This little trick is necessary to make sure that the RMI server
-	     * threads for objects created on the default port get created
-	     * before we set our special context class loader, so that they
-	     * don't *accidentally* inherit it when making the unreferenced()
-	     * callback.
-	     */
-	    UnicastRemoteObject.exportObject(obj);
-	    UnicastRemoteObject.unexportObject(obj, true);
+        try {
+            /*
+             * This little trick is necessary to make sure that the RMI server
+             * threads for objects created on the default port get created
+             * before we set our special context class loader, so that they
+             * don't *accidentally* inherit it when making the unreferenced()
+             * callback.
+             */
+            UnicastRemoteObject.exportObject(obj);
+            UnicastRemoteObject.unexportObject(obj, true);
 
-	    /*
-	     * Now create special context class loader before exporting the
-	     * remote object for real, so that it should be set when the
-	     * object's unreferenced() method is called.
-	     */
-	    ClassLoader intendedContext = new URLClassLoader(new URL[0]);
-	    Thread.currentThread().setContextClassLoader(intendedContext);
-	    System.err.println(
-		"created and set intended context class loader: " +
-		intendedContext);
+            /*
+             * Now create special context class loader before exporting the
+             * remote object for real, so that it should be set when the
+             * object's unreferenced() method is called.
+             */
+            ClassLoader intendedContext = new URLClassLoader(new URL[0]);
+            Thread.currentThread().setContextClassLoader(intendedContext);
+            System.err.println(
+                "created and set intended context class loader: " +
+                intendedContext);
 
-	    UnicastRemoteObject.exportObject(obj);
-	    System.err.println("exported remote object");
+            UnicastRemoteObject.exportObject(obj);
+            System.err.println("exported remote object");
 
-	    LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
-	    System.err.println("created registry");
+            LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
+            System.err.println("created registry");
 
-	    Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
-	    registry.bind(BINDING, obj);
-	    System.err.println("bound remote object in registry");
+            Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+            registry.bind(BINDING, obj);
+            System.err.println("bound remote object in registry");
 
-	    synchronized (obj.lock) {
-		registry.unbind(BINDING);
-		System.err.println("unbound remote object from registry; " +
-		    "waiting for unreferenced() callback...");
-		/*
-		 * This incantation seems sufficient to work around the
-		 * ramifications of 4164696, so that this test will actually
-		 * prove something useful about 1.2Beta4 or 1.2FCS before
-		 * 4171278 was fixed.
-		 */
-		for (int i = 0; i < 10; i++) {
-		    System.gc();
-		    obj.lock.wait(TIMEOUT / 10);
-		    if (obj.unreferencedInvoked) {
-			break;
-		    }
-		}
+            synchronized (obj.lock) {
+                registry.unbind(BINDING);
+                System.err.println("unbound remote object from registry; " +
+                    "waiting for unreferenced() callback...");
+                /*
+                 * This incantation seems sufficient to work around the
+                 * ramifications of 4164696, so that this test will actually
+                 * prove something useful about 1.2Beta4 or 1.2FCS before
+                 * 4171278 was fixed.
+                 */
+                for (int i = 0; i < 10; i++) {
+                    System.gc();
+                    obj.lock.wait(TIMEOUT / 10);
+                    if (obj.unreferencedInvoked) {
+                        break;
+                    }
+                }
 
-		if (obj.unreferencedInvoked) {
-		    System.err.println(
-			"invoked with context class loader: " +
-			obj.unreferencedContext);
+                if (obj.unreferencedInvoked) {
+                    System.err.println(
+                        "invoked with context class loader: " +
+                        obj.unreferencedContext);
 
-		    if (obj.unreferencedContext == intendedContext) {
-			System.err.println(
-			    "TEST PASSED: unreferenced() invoked" +
-			    " with intended context class loader");
-		    } else {
-			throw new RuntimeException(
-			    "TEST FAILED: unreferenced() invoked" +
-			    " with incorrect context class loader");
-		    }
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unreferenced() not invoked after " +
-			((double) TIMEOUT / 1000.0) + " seconds or unreferenced failed to create a thread");
-		}
-	    }
+                    if (obj.unreferencedContext == intendedContext) {
+                        System.err.println(
+                            "TEST PASSED: unreferenced() invoked" +
+                            " with intended context class loader");
+                    } else {
+                        throw new RuntimeException(
+                            "TEST FAILED: unreferenced() invoked" +
+                            " with incorrect context class loader");
+                    }
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unreferenced() not invoked after " +
+                        ((double) TIMEOUT / 1000.0) + " seconds or unreferenced failed to create a thread");
+                }
+            }
 
-	} catch (Exception e) {
-	    if (e instanceof RuntimeException) {
-		throw (RuntimeException) e;
-	    } else {
-		throw new RuntimeException(
-		    "TEST FAILED: unexpected exception: " + e.toString());
-	    }
-	} finally {
-	    /*
-	     * When all is said and done, try to unexport the remote object
-	     * so that the VM has a chance to exit.
-	     */
-	    try {
-		UnicastRemoteObject.unexportObject(obj, true);
-	    } catch (RemoteException e) {
-	    }
-	}
+        } catch (Exception e) {
+            if (e instanceof RuntimeException) {
+                throw (RuntimeException) e;
+            } else {
+                throw new RuntimeException(
+                    "TEST FAILED: unexpected exception: " + e.toString());
+            }
+        } finally {
+            /*
+             * When all is said and done, try to unexport the remote object
+             * so that the VM has a chance to exit.
+             */
+            try {
+                UnicastRemoteObject.unexportObject(obj, true);
+            } catch (RemoteException e) {
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public UnreferencedContext_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/java/rmi/transport/acceptLoop/CloseServerSocketOnTermination.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/acceptLoop/CloseServerSocketOnTermination.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -51,75 +51,75 @@
     private static long TIMEOUT = 5000;
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 4924577\n");
+        System.err.println("\nRegression test for bug 4924577\n");
 
-	RMISocketFactory.setFailureHandler(new RMIFailureHandler() {
-	    public boolean failure(Exception e) { return false; }
-	});
+        RMISocketFactory.setFailureHandler(new RMIFailureHandler() {
+            public boolean failure(Exception e) { return false; }
+        });
 
-	tryWith(new IOException());
-	tryWith(new NullPointerException());
-	tryWith(new OutOfMemoryError());
-	tryWith(new NoClassDefFoundError());
-	tryWith(new InternalError());
-	tryWith(new Throwable());
+        tryWith(new IOException());
+        tryWith(new NullPointerException());
+        tryWith(new OutOfMemoryError());
+        tryWith(new NoClassDefFoundError());
+        tryWith(new InternalError());
+        tryWith(new Throwable());
 
-	System.err.println("TEST PASSED");
+        System.err.println("TEST PASSED");
     }
 
     private static void tryWith(Throwable t) throws Exception {
-	Remote impl = new Remote() { };
-	try {
-	    CountDownLatch latch = new CountDownLatch(1);
-	    UnicastRemoteObject.exportObject(impl, 0, null, new SSF(t, latch));
-	    if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
-		throw new Error("server socket not closed");
-	    }
-	} finally {
-	    UnicastRemoteObject.unexportObject(impl, true);
-	}
+        Remote impl = new Remote() { };
+        try {
+            CountDownLatch latch = new CountDownLatch(1);
+            UnicastRemoteObject.exportObject(impl, 0, null, new SSF(t, latch));
+            if (!latch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
+                throw new Error("server socket not closed");
+            }
+        } finally {
+            UnicastRemoteObject.unexportObject(impl, true);
+        }
     }
 
     private static class SSF implements RMIServerSocketFactory {
-	private final Throwable acceptFailure;
-	private final CountDownLatch closedLatch;
-	SSF(Throwable acceptFailure, CountDownLatch closedLatch) {
-	    this.acceptFailure = acceptFailure;
-	    this.closedLatch = closedLatch;
-	}
-	public ServerSocket createServerSocket(int port) throws IOException {
-	    return new ServerSocket(port) {
-		private int acceptInvocations = 0;
-		public synchronized Socket accept() throws IOException {
-		    if (acceptInvocations++ == 0) {
-			throwException(acceptFailure);
-		    }
-		    return super.accept();
-		}
-		public void close() throws IOException {
-		    closedLatch.countDown();
-		    super.close();
-		}
-	    };
-	}
+        private final Throwable acceptFailure;
+        private final CountDownLatch closedLatch;
+        SSF(Throwable acceptFailure, CountDownLatch closedLatch) {
+            this.acceptFailure = acceptFailure;
+            this.closedLatch = closedLatch;
+        }
+        public ServerSocket createServerSocket(int port) throws IOException {
+            return new ServerSocket(port) {
+                private int acceptInvocations = 0;
+                public synchronized Socket accept() throws IOException {
+                    if (acceptInvocations++ == 0) {
+                        throwException(acceptFailure);
+                    }
+                    return super.accept();
+                }
+                public void close() throws IOException {
+                    closedLatch.countDown();
+                    super.close();
+                }
+            };
+        }
 
-	// hack to throw an arbitrary (possibly checked) Throwable
-	private static void throwException(Throwable t) {
-	    try {
-		toThrow.set(t);
-		Thrower.class.newInstance();
-	    } catch (IllegalAccessException e) {
-		throw new AssertionError();
-	    } catch (InstantiationException e) {
-		throw new AssertionError();
-	    } finally {
-		toThrow.remove();
-	    }
-	}
-	private static ThreadLocal<Throwable> toThrow =
-	    new ThreadLocal<Throwable>();
-	private static class Thrower {
-	    Thrower() throws Throwable { throw toThrow.get(); }
-	}
+        // hack to throw an arbitrary (possibly checked) Throwable
+        private static void throwException(Throwable t) {
+            try {
+                toThrow.set(t);
+                Thrower.class.newInstance();
+            } catch (IllegalAccessException e) {
+                throw new AssertionError();
+            } catch (InstantiationException e) {
+                throw new AssertionError();
+            } finally {
+                toThrow.remove();
+            }
+        }
+        private static ThreadLocal<Throwable> toThrow =
+            new ThreadLocal<Throwable>();
+        private static class Thrower {
+            Thrower() throws Throwable { throw toThrow.get(); }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,15 +34,15 @@
  *
  * @library ../../testlibrary
  * @build CheckFQDN CheckFQDNClient CheckFQDN_Stub TellServerName
- * @run main/othervm/timeout=120 CheckFQDN 
+ * @run main/othervm/timeout=120 CheckFQDN
  */
 
-/** 
+/**
  * Get the hostname used by rmi using different rmi properities:
  *
  * if set java.rmi.server.hostname, hostname should equal this
  * property.
- * 
+ *
  * if set java.rmi.server.useLocalHostname, hostname must contain a '.'
  *
  * if set no properties hostname should be an ipaddress.
@@ -58,118 +58,118 @@
 import java.io.*;
 
 /**
- * Export a remote object through which the exec'ed client vm can 
+ * Export a remote object through which the exec'ed client vm can
  * inform the main test what its host name is.
  */
-public class CheckFQDN extends UnicastRemoteObject 
+public class CheckFQDN extends UnicastRemoteObject
     implements TellServerName {
-    
+
     static String propertyBeingTested = null;
     static String propertyBeingTestedValue = null;
 
     public static void main(String args[]) {
 
-	Object dummy = new Object();
-	CheckFQDN checkFQDN = null;
-	try {
-	    checkFQDN = new CheckFQDN();
+        Object dummy = new Object();
+        CheckFQDN checkFQDN = null;
+        try {
+            checkFQDN = new CheckFQDN();
+
+            System.err.println
+                ("\nRegression test for bug/rfe 4115683\n");
+
+            Registry registry = java.rmi.registry.LocateRegistry.
+                createRegistry(TestLibrary.REGISTRY_PORT);
+            registry.bind("CheckFQDN", checkFQDN);
 
-	    System.err.println
-		("\nRegression test for bug/rfe 4115683\n");
-	    
-	    Registry registry = java.rmi.registry.LocateRegistry.
-		createRegistry(TestLibrary.REGISTRY_PORT);
-	    registry.bind("CheckFQDN", checkFQDN);
-	    
-	    /* test the host name scheme in different environments.*/
-	    testProperty("java.rmi.server.useLocalHostname", "true", "");
-	    testProperty("java.rmi.server.hostname", "thisIsJustAnRMITest", "");
-	    testProperty("java.rmi.server.hostname", "thisIsJustAnRMITest",
-			 " -Djava.rmi.server.useLocalHostname=true ");
-	    testProperty("", "", "");
+            /* test the host name scheme in different environments.*/
+            testProperty("java.rmi.server.useLocalHostname", "true", "");
+            testProperty("java.rmi.server.hostname", "thisIsJustAnRMITest", "");
+            testProperty("java.rmi.server.hostname", "thisIsJustAnRMITest",
+                         " -Djava.rmi.server.useLocalHostname=true ");
+            testProperty("", "", "");
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	} finally {
-	    if (checkFQDN != null) {
-		TestLibrary.unexport(checkFQDN);
-	    }
-	}
-	System.err.println("\nTest for bug/ref 4115683 passed.\n");
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        } finally {
+            if (checkFQDN != null) {
+                TestLibrary.unexport(checkFQDN);
+            }
+        }
+        System.err.println("\nTest for bug/ref 4115683 passed.\n");
     }
 
-    /** 
+    /**
      * Spawn a vm and feed it a property which sets the client's rmi
      * hostname.
      */
-    public static void testProperty(String property, 
-				    String propertyValue, 
-				    String extraProp) 
+    public static void testProperty(String property,
+                                    String propertyValue,
+                                    String extraProp)
     {
-	try {
-  	    String propOption = "";
-	    String equal = "";
-	    if (!property.equals("")) {
-		propOption = " -D";
-		equal = "=";
-	    }
+        try {
+            String propOption = "";
+            String equal = "";
+            if (!property.equals("")) {
+                propOption = " -D";
+                equal = "=";
+            }
 
-	    JavaVM jvm = new JavaVM("CheckFQDNClient", 
-				    propOption + property + 
-				    equal + 
-				    propertyValue + extraProp, 
-				    "");
-	    
-	    propertyBeingTested=property;
-	    propertyBeingTestedValue=propertyValue;
+            JavaVM jvm = new JavaVM("CheckFQDNClient",
+                                    propOption + property +
+                                    equal +
+                                    propertyValue + extraProp,
+                                    "");
+
+            propertyBeingTested=property;
+            propertyBeingTestedValue=propertyValue;
 
-	    // create a client to tell checkFQDN what its rmi name is. */
-	    jvm.start();
+            // create a client to tell checkFQDN what its rmi name is. */
+            jvm.start();
 
-	    if (jvm.getVM().waitFor() != 0 ) {
-		TestLibrary.bomb("Test failed, error in client.");
-	    }
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	}
+            if (jvm.getVM().waitFor() != 0 ) {
+                TestLibrary.bomb("Test failed, error in client.");
+            }
+
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        }
     }
 
     CheckFQDN() throws RemoteException { }
 
-    /** 
-     * Remote method to allow client vm to tell the main test what its 
+    /**
+     * Remote method to allow client vm to tell the main test what its
      * host name is .
      */
-    public void tellServerName(String serverName) 
-	throws RemoteException {
+    public void tellServerName(String serverName)
+        throws RemoteException {
 
-	if (propertyBeingTested.equals("java.rmi.server.hostname")) {
-	    if ( !propertyBeingTestedValue.equals(serverName)) {
-		TestLibrary.bomb(propertyBeingTested +
-		     ":\n Client rmi server name does " +
-		     "not equal the one specified " +
-		     "by java.rmi.server.hostname: " +
-		     serverName +" != " + 
-		     propertyBeingTestedValue);
-	    }
+        if (propertyBeingTested.equals("java.rmi.server.hostname")) {
+            if ( !propertyBeingTestedValue.equals(serverName)) {
+                TestLibrary.bomb(propertyBeingTested +
+                     ":\n Client rmi server name does " +
+                     "not equal the one specified " +
+                     "by java.rmi.server.hostname: " +
+                     serverName +" != " +
+                     propertyBeingTestedValue);
+            }
 
-	    /** use local host name, must contain a '.' */
-	} else if (propertyBeingTested.equals
-		   ("java.rmi.server.useLocalHostname")) {
-	    if (serverName.indexOf('.') < 0) {
-		TestLibrary.bomb(propertyBeingTested +
-		     ":\nThe client servername contains no '.'");
-	    }
-	} else {
-	    // no propety set, must be ip address
-	    if ((serverName.indexOf('.') < 0) || 
-		(!Character.isDigit(serverName.charAt(0)))) {
-		TestLibrary.bomb("Default name scheme:\n"+
-		     " The client servername contains no '.'"+
-		     "or is not an ip address");
-	    }
-	}
-	System.err.println("Servername used: " + serverName);
+            /** use local host name, must contain a '.' */
+        } else if (propertyBeingTested.equals
+                   ("java.rmi.server.useLocalHostname")) {
+            if (serverName.indexOf('.') < 0) {
+                TestLibrary.bomb(propertyBeingTested +
+                     ":\nThe client servername contains no '.'");
+            }
+        } else {
+            // no propety set, must be ip address
+            if ((serverName.indexOf('.') < 0) ||
+                (!Character.isDigit(serverName.charAt(0)))) {
+                TestLibrary.bomb("Default name scheme:\n"+
+                     " The client servername contains no '.'"+
+                     "or is not an ip address");
+            }
+        }
+        System.err.println("Servername used: " + serverName);
     }
 }
--- a/jdk/test/java/rmi/transport/checkFQDN/CheckFQDNClient.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkFQDN/CheckFQDNClient.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,7 +25,7 @@
  *
  *
  * Client that will run in its own vm and tell the main CheckFQDN test
- * program what its rmi host name is, name obtained from TCPEndpoint.  
+ * program what its rmi host name is, name obtained from TCPEndpoint.
  */
 
 import java.rmi.*;
@@ -40,72 +40,72 @@
 public class CheckFQDNClient implements Runnable {
 
     final static int NAME_SERVICE_TIME_OUT = 12000;
-    
+
     static TCPEndpoint ep = null;
 
-    /** 
+    /**
      * main, lookup remote object and tell it the rmi
      * hostname of this client vm.
      */
     public static void main (String args[]) {
-	
-	// start a registry and register a copy of this in it.
-	TellServerName tell;
-	String hostname = null;
-	
-	try {
-	    hostname = retrieveServerName();
-	    System.err.println("Client host name: " +
-			       hostname);
+
+        // start a registry and register a copy of this in it.
+        TellServerName tell;
+        String hostname = null;
+
+        try {
+            hostname = retrieveServerName();
+            System.err.println("Client host name: " +
+                               hostname);
 
-	    tell = (TellServerName) Naming.lookup("rmi://:" + 
-						  TestLibrary.REGISTRY_PORT
-						  + "/CheckFQDN");
-	    tell.tellServerName(hostname);
-	    System.err.println("client has exited");
+            tell = (TellServerName) Naming.lookup("rmi://:" +
+                                                  TestLibrary.REGISTRY_PORT
+                                                  + "/CheckFQDN");
+            tell.tellServerName(hostname);
+            System.err.println("client has exited");
 
-	} catch (Exception e ) {
-	    throw new RuntimeException(e.getMessage());
-	}
-	System.exit(0);
+        } catch (Exception e ) {
+            throw new RuntimeException(e.getMessage());
+        }
+        System.exit(0);
     }
-    
+
     /* what is the rmi hostname for this vm? */
     public static String retrieveServerName () {
-	try {
+        try {
+
+            CheckFQDNClient chk = new CheckFQDNClient();
+
+            synchronized(chk) {
+                (new Thread (chk)).start();
+                chk.wait(NAME_SERVICE_TIME_OUT);
+            }
 
-	    CheckFQDNClient chk = new CheckFQDNClient();
-	    
-	    synchronized(chk) {
-		(new Thread (chk)).start();
-		chk.wait(NAME_SERVICE_TIME_OUT);
-	    }
-	    
-	    if (ep == null) {
-		throw new RuntimeException 
-		    ("Timeout getting the local endpoint.");
-	    }
-	    
-	    // this is the name used by rmi for the client hostname
-	    return ep.getHost();
-	    
-	}catch (Exception e){
-	    throw new RuntimeException (e.getMessage());
-	}
+            if (ep == null) {
+                throw new RuntimeException
+                    ("Timeout getting the local endpoint.");
+            }
+
+            // this is the name used by rmi for the client hostname
+            return ep.getHost();
+
+        }catch (Exception e){
+            throw new RuntimeException (e.getMessage());
+        }
     }
 
     /* thread to geth the rmi hostname of this vm */
     public void run () {
-	try {
-	    synchronized(this) {
-		ep = TCPEndpoint.getLocalEndpoint(0);
-	    }
-	} catch (Exception e) {
-	    throw new RuntimeException();
-	} finally {
-	    synchronized(this) {
-		this.notify();
-	    }
-	}
+        try {
+            synchronized(this) {
+                ep = TCPEndpoint.getLocalEndpoint(0);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException();
+        } finally {
+            synchronized(this) {
+                this.notify();
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkFQDN/CheckFQDN_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,66 +29,66 @@
     implements TellServerName, java.rmi.Remote
 {
     private static java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("void tellServerName(java.lang.String)")
+        new java.rmi.server.Operation("void tellServerName(java.lang.String)")
     };
-    
+
     private static final long interfaceHash = 4509625981775855367L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_tellServerName_0;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_tellServerName_0 = TellServerName.class.getMethod("tellServerName", new java.lang.Class[] {java.lang.String.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_tellServerName_0 = TellServerName.class.getMethod("tellServerName", new java.lang.Class[] {java.lang.String.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public CheckFQDN_Stub() {
-	super();
+        super();
     }
     public CheckFQDN_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of tellServerName(String)
     public void tellServerName(java.lang.String $param_String_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_tellServerName_0, new java.lang.Object[] {$param_String_1}, -5180633734615762942L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		try {
-		    java.io.ObjectOutput out = call.getOutputStream();
-		    out.writeObject($param_String_1);
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.MarshalException("error marshalling arguments", e);
-		}
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_tellServerName_0, new java.lang.Object[] {$param_String_1}, -5180633734615762942L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_String_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("error marshalling arguments", e);
+                }
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/checkFQDN/TellServerName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkFQDN/TellServerName.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -24,7 +24,7 @@
 import java.rmi.*;
 import java.rmi.server.*;
 
-/** 
+/**
  * interface to get server name from an execed vm
  * I am using an execed vm because I need to set
  * rmi's hostname serveral times with different properties.
@@ -32,4 +32,3 @@
 interface TellServerName extends Remote {
     void tellServerName (String serverName) throws RemoteException;
 }
-
--- a/jdk/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -44,7 +44,7 @@
  * the remote object.  Each vmid needs a seperate LeaseInfo object in
  * the object table target DGCImpl.leaseTable.  If the leak is fixed,
  * the leaseTable field will contain no objects.  We use reflection to
- * find the number of objects contained in this table.  
+ * find the number of objects contained in this table.
  */
 
 import java.rmi.*;
@@ -57,13 +57,13 @@
 import java.rmi.registry.*;
 
 public class CheckLeaseLeak extends UnicastRemoteObject implements LeaseLeak {
-    
+
     public CheckLeaseLeak() throws RemoteException { }
     public void ping () throws RemoteException { }
 
     /**
      * Id to fake the DGC_ID, so we can later get a reference to the
-     * DGCImpl in the object table.  
+     * DGCImpl in the object table.
      */
     private final static int DGC_ID = 2;
 
@@ -71,148 +71,148 @@
     private final static int numberPingCalls = 0;
     private final static int CHECK_INTERVAL = 400;
     private final static int LEASE_VALUE = 20;
-    
+
     public static void main (String[] args) {
-	CheckLeaseLeak leakServer = null;
-	int numLeft =0;
+        CheckLeaseLeak leakServer = null;
+        int numLeft =0;
 
-	/*
-	 * we want DGC to collect leases *quickly*
-	 * decrease the lease check interval
-	 */
-	TestLibrary.setInteger("sun.rmi.dgc.checkInterval",
-			       CHECK_INTERVAL);
-	TestLibrary.setInteger("java.rmi.dgc.leaseValue",
-			       LEASE_VALUE);
+        /*
+         * we want DGC to collect leases *quickly*
+         * decrease the lease check interval
+         */
+        TestLibrary.setInteger("sun.rmi.dgc.checkInterval",
+                               CHECK_INTERVAL);
+        TestLibrary.setInteger("java.rmi.dgc.leaseValue",
+                               LEASE_VALUE);
 
-	try {
-	    Registry registry = 
-		java.rmi.registry.LocateRegistry.
-		    createRegistry(TestLibrary.REGISTRY_PORT);
+        try {
+            Registry registry =
+                java.rmi.registry.LocateRegistry.
+                    createRegistry(TestLibrary.REGISTRY_PORT);
 
-	    leakServer = new CheckLeaseLeak();
-	    registry.rebind("/LeaseLeak", leakServer);
+            leakServer = new CheckLeaseLeak();
+            registry.rebind("/LeaseLeak", leakServer);
+
+            /* create a bunch of clients in a *different* vm */
+            for (int i = 0 ; i < ITERATIONS ; i ++ ) {
+                System.err.println("Created client: " + i);
 
-	    /* create a bunch of clients in a *different* vm */
-	    for (int i = 0 ; i < ITERATIONS ; i ++ ) {
-		System.err.println("Created client: " + i);
-		
-		JavaVM jvm = new JavaVM("LeaseLeakClient", 
-					" -Djava.security.policy=" + 
-					TestParams.defaultPolicy, "");
-		jvm.start();
+                JavaVM jvm = new JavaVM("LeaseLeakClient",
+                                        " -Djava.security.policy=" +
+                                        TestParams.defaultPolicy, "");
+                jvm.start();
+
+                if (jvm.getVM().waitFor() == 1 ) {
+                    TestLibrary.bomb("Client process failed");
+                }
+            }
+            numLeft = getDGCLeaseTableSize();
+            Thread.sleep(3000);
 
-		if (jvm.getVM().waitFor() == 1 ) {
-		    TestLibrary.bomb("Client process failed");
-		}
-	    }
-	    numLeft = getDGCLeaseTableSize();
-	    Thread.sleep(3000);
-	    
-	} catch(Exception e) {
-	    TestLibrary.bomb("CheckLeaseLeak Error: ", e);
-	} finally {
-	    if (leakServer != null) {
-		TestLibrary.unexport(leakServer);
-		leakServer = null;
-	    }
-	}
+        } catch(Exception e) {
+            TestLibrary.bomb("CheckLeaseLeak Error: ", e);
+        } finally {
+            if (leakServer != null) {
+                TestLibrary.unexport(leakServer);
+                leakServer = null;
+            }
+        }
 
-	/* numLeft should be 2 - if 11 there is a problem. */
-	if (numLeft > 2) {
-	    TestLibrary.bomb("Too many objects in DGCImpl.leaseTable: "+ 
-			    numLeft);
-	} else {
-	    System.err.println("Check leaseInfo leak passed with " + 
-			       numLeft
-				   + " object(s) in the leaseTable");
-	}
+        /* numLeft should be 2 - if 11 there is a problem. */
+        if (numLeft > 2) {
+            TestLibrary.bomb("Too many objects in DGCImpl.leaseTable: "+
+                            numLeft);
+        } else {
+            System.err.println("Check leaseInfo leak passed with " +
+                               numLeft
+                                   + " object(s) in the leaseTable");
+        }
     }
 
     /**
      * Obtain a reference to the main DGCImpl via reflection.  Extract
      * the DGCImpl using the ObjectTable and the well known ID of the
-     * DGCImpl.  
+     * DGCImpl.
      */
     private static int getDGCLeaseTableSize () {
-	int numLeaseInfosLeft = 0;
+        int numLeaseInfosLeft = 0;
+
+        /**
+         * Will eventually be set to point at the leaseTable inside
+         * DGCImpl.
+         */
+        Map leaseTable = null;
+        final Remote[] dgcImpl = new Remote[1];
+        Field f;
+
+        try {
+            f = (Field) java.security.AccessController.doPrivileged
+                (new java.security.PrivilegedExceptionAction() {
+                    public Object run() throws Exception {
 
-	/**
-	 * Will eventually be set to point at the leaseTable inside
-	 * DGCImpl.
-	 */ 
-	Map leaseTable = null;
-	final Remote[] dgcImpl = new Remote[1];
-	Field f;
+                        ObjID dgcID = new ObjID(DGC_ID);
 
-	try {
-	    f = (Field) java.security.AccessController.doPrivileged
-		(new java.security.PrivilegedExceptionAction() {
-		    public Object run() throws Exception {
+                        /*
+                         * Construct an ObjectEndpoint containing DGC's
+                         * ObjID.
+                         */
+                        Class oeClass =
+                            Class.forName("sun.rmi.transport.ObjectEndpoint");
+                        Class[] constrParams =
+                            new Class[]{ ObjID.class, Transport.class };
+                        Constructor oeConstructor =
+                            oeClass.getDeclaredConstructor(constrParams);
+                        oeConstructor.setAccessible(true);
+                        Object oe =
+                            oeConstructor.newInstance(
+                                new Object[]{ dgcID, null });
 
-			ObjID dgcID = new ObjID(DGC_ID);
-			
-			/*
-			 * Construct an ObjectEndpoint containing DGC's
-			 * ObjID.
-			 */
-			Class oeClass =
-			    Class.forName("sun.rmi.transport.ObjectEndpoint");
-			Class[] constrParams =
-			    new Class[]{ ObjID.class, Transport.class };
-			Constructor oeConstructor =
-			    oeClass.getDeclaredConstructor(constrParams);
-			oeConstructor.setAccessible(true);
-			Object oe =
-			    oeConstructor.newInstance(
-				new Object[]{ dgcID, null });
-			
-			/*
-			 * Get Target that contains DGCImpl in ObjectTable
-			 */
-			Class objTableClass =
-			    Class.forName("sun.rmi.transport.ObjectTable");
-			Class getTargetParams[] = new Class[] { oeClass };
-			Method objTableGetTarget = 
-			    objTableClass.getDeclaredMethod("getTarget",
-							    getTargetParams);
-			objTableGetTarget.setAccessible(true);
-			Target dgcTarget = (Target)
-			    objTableGetTarget.invoke(null, new Object[]{ oe });
-	    
-			/* get the DGCImpl from its Target */
-			Method targetGetImpl = 
-			    dgcTarget.getClass().getDeclaredMethod
-			    ("getImpl", null);
-			targetGetImpl.setAccessible(true);
-			dgcImpl[0] =
-			    (Remote) targetGetImpl.invoke(dgcTarget, null);
+                        /*
+                         * Get Target that contains DGCImpl in ObjectTable
+                         */
+                        Class objTableClass =
+                            Class.forName("sun.rmi.transport.ObjectTable");
+                        Class getTargetParams[] = new Class[] { oeClass };
+                        Method objTableGetTarget =
+                            objTableClass.getDeclaredMethod("getTarget",
+                                                            getTargetParams);
+                        objTableGetTarget.setAccessible(true);
+                        Target dgcTarget = (Target)
+                            objTableGetTarget.invoke(null, new Object[]{ oe });
+
+                        /* get the DGCImpl from its Target */
+                        Method targetGetImpl =
+                            dgcTarget.getClass().getDeclaredMethod
+                            ("getImpl", null);
+                        targetGetImpl.setAccessible(true);
+                        dgcImpl[0] =
+                            (Remote) targetGetImpl.invoke(dgcTarget, null);
 
-			/* Get the lease table from the DGCImpl. */
-			Field reflectedLeaseTable =
-			    dgcImpl[0].getClass().getDeclaredField
-			    ("leaseTable");
-			reflectedLeaseTable.setAccessible(true);
+                        /* Get the lease table from the DGCImpl. */
+                        Field reflectedLeaseTable =
+                            dgcImpl[0].getClass().getDeclaredField
+                            ("leaseTable");
+                        reflectedLeaseTable.setAccessible(true);
 
-			return reflectedLeaseTable;
-		    }
-	    });
+                        return reflectedLeaseTable;
+                    }
+            });
 
-	    /**
-	     * This is the leaseTable that will fill up with LeaseInfo
-	     * objects if the LeaseInfo memory leak is not fixed. 
-	     */
-	    leaseTable = (Map) f.get(dgcImpl[0]);
+            /**
+             * This is the leaseTable that will fill up with LeaseInfo
+             * objects if the LeaseInfo memory leak is not fixed.
+             */
+            leaseTable = (Map) f.get(dgcImpl[0]);
 
-	    numLeaseInfosLeft = leaseTable.size();
+            numLeaseInfosLeft = leaseTable.size();
 
-	} catch(Exception e) {
-	    if (e instanceof java.security.PrivilegedActionException)
-		e = ((java.security.PrivilegedActionException) e).
-		    getException();
-	    TestLibrary.bomb(e);
-	}
+        } catch(Exception e) {
+            if (e instanceof java.security.PrivilegedActionException)
+                e = ((java.security.PrivilegedActionException) e).
+                    getException();
+            TestLibrary.bomb(e);
+        }
 
-	return numLeaseInfosLeft;
+        return numLeaseInfosLeft;
     }
 }
--- a/jdk/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,60 +29,60 @@
     implements LeaseLeak, java.rmi.Remote
 {
     private static java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("void ping()")
+        new java.rmi.server.Operation("void ping()")
     };
-    
+
     private static final long interfaceHash = -8409781791984809394L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_ping_0;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_ping_0 = LeaseLeak.class.getMethod("ping", new java.lang.Class[] {});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_ping_0 = LeaseLeak.class.getMethod("ping", new java.lang.Class[] {});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public CheckLeaseLeak_Stub() {
-	super();
+        super();
     }
     public CheckLeaseLeak_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of ping()
     public void ping()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_ping_0, null, 5866401369815527589L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/checkLeaseInfoLeak/LeaseLeak.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkLeaseInfoLeak/LeaseLeak.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/checkLeaseInfoLeak/LeaseLeakClient.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -25,24 +25,24 @@
 import java.rmi.server.*;
 import java.rmi.registry.*;
 
-public class LeaseLeakClient { 
+public class LeaseLeakClient {
     public static void main(String args[]) {
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
-	
-	try {
-	    LeaseLeak leaseLeak = null;
-	    
-	    // put a reference on a remote object.
-	    Registry registry = 
-		java.rmi.registry.LocateRegistry.getRegistry(
-	            TestLibrary.REGISTRY_PORT);
-	    leaseLeak = (LeaseLeak) registry.lookup("/LeaseLeak");
-	    leaseLeak.ping();
-	    
-	} catch(Exception e) {
-	    System.err.println("LeaseLeakClient Error: "+e.getMessage());
-	    e.printStackTrace();
-	    throw new RuntimeException(e.getMessage());
-	}
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+
+        try {
+            LeaseLeak leaseLeak = null;
+
+            // put a reference on a remote object.
+            Registry registry =
+                java.rmi.registry.LocateRegistry.getRegistry(
+                    TestLibrary.REGISTRY_PORT);
+            leaseLeak = (LeaseLeak) registry.lookup("/LeaseLeak");
+            leaseLeak.ping();
+
+        } catch(Exception e) {
+            System.err.println("LeaseLeakClient Error: "+e.getMessage());
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/closeServerSocket/CloseServerSocket.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/closeServerSocket/CloseServerSocket.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -50,80 +50,80 @@
     private CloseServerSocket() { }
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 4457683\n");
+        System.err.println("\nRegression test for bug 4457683\n");
 
-	verifyPortFree(PORT);
-	Registry registry = LocateRegistry.createRegistry(PORT);
-	System.err.println("- exported registry: " + registry);
-	verifyPortInUse(PORT);
-	UnicastRemoteObject.unexportObject(registry, true);
-	System.err.println("- unexported registry");
-	Thread.sleep(1);	// work around BindException (bug?)
-	verifyPortFree(PORT);
+        verifyPortFree(PORT);
+        Registry registry = LocateRegistry.createRegistry(PORT);
+        System.err.println("- exported registry: " + registry);
+        verifyPortInUse(PORT);
+        UnicastRemoteObject.unexportObject(registry, true);
+        System.err.println("- unexported registry");
+        Thread.sleep(1);        // work around BindException (bug?)
+        verifyPortFree(PORT);
 
-	/*
-	 * The follow portion of this test is disabled temporarily
-	 * because 4457683 was partially backed out because of
-	 * 6269166; for now, only server sockets originally opened for
-	 * exports on non-anonymous ports will be closed when all of
-	 * the corresponding remote objects have been exported.  A
-	 * separate bug will be filed to represent the remainder of
-	 * 4457683 for anonymous-port exports.
-	 */
+        /*
+         * The follow portion of this test is disabled temporarily
+         * because 4457683 was partially backed out because of
+         * 6269166; for now, only server sockets originally opened for
+         * exports on non-anonymous ports will be closed when all of
+         * the corresponding remote objects have been exported.  A
+         * separate bug will be filed to represent the remainder of
+         * 4457683 for anonymous-port exports.
+         */
 
-//	SSF ssf = new SSF();
-//	Remote impl = new CloseServerSocket();
-//	Remote stub = UnicastRemoteObject.exportObject(impl, 0, null, ssf);
-//	System.err.println("- exported object: " + stub);
-//	UnicastRemoteObject.unexportObject(impl, true);
-//	System.err.println("- unexported object");
-//	synchronized (ssf) {
-//	    if (!ssf.serverSocketClosed) {
-//		throw new RuntimeException("TEST FAILED: " +
-//					   "server socket not closed");
-//	    }
-//	}
+//      SSF ssf = new SSF();
+//      Remote impl = new CloseServerSocket();
+//      Remote stub = UnicastRemoteObject.exportObject(impl, 0, null, ssf);
+//      System.err.println("- exported object: " + stub);
+//      UnicastRemoteObject.unexportObject(impl, true);
+//      System.err.println("- unexported object");
+//      synchronized (ssf) {
+//          if (!ssf.serverSocketClosed) {
+//              throw new RuntimeException("TEST FAILED: " +
+//                                         "server socket not closed");
+//          }
+//      }
 
-	System.err.println("TEST PASSED");
+        System.err.println("TEST PASSED");
     }
 
     private static void verifyPortFree(int port) throws IOException {
-	ServerSocket ss = new ServerSocket(PORT);
-	ss.close();
-	System.err.println("- port " + port + " is free");
+        ServerSocket ss = new ServerSocket(PORT);
+        ss.close();
+        System.err.println("- port " + port + " is free");
     }
 
     private static void verifyPortInUse(int port) throws IOException {
-	try {
-	    verifyPortFree(port);
-	} catch (BindException e) {
-	    System.err.println("- port " + port + " is in use");
-	    return;
-	}
+        try {
+            verifyPortFree(port);
+        } catch (BindException e) {
+            System.err.println("- port " + port + " is in use");
+            return;
+        }
     }
 
     private static class SSF implements RMIServerSocketFactory {
-	boolean serverSocketClosed = false;
-	SSF() { };
+        boolean serverSocketClosed = false;
+        SSF() { };
 
-	public ServerSocket createServerSocket(int port) throws IOException {
-	    return new SS(port);
-	}
+        public ServerSocket createServerSocket(int port) throws IOException {
+            return new SS(port);
+        }
 
-	private class SS extends ServerSocket {
-	    SS(int port) throws IOException {
-		super(port);
-		System.err.println("- created server socket: " + this);
-	    };
+        private class SS extends ServerSocket {
+            SS(int port) throws IOException {
+                super(port);
+                System.err.println("- created server socket: " + this);
+            };
 
-	    public void close() throws IOException {
-		synchronized (SSF.this) {
-		    serverSocketClosed = true;
-		    SSF.this.notifyAll();
-		}
-		System.err.println("- closing server socket: " + this);
-		super.close();
-	    }
-	}
+            public void close() throws IOException {
+                synchronized (SSF.this) {
+                    serverSocketClosed = true;
+                    SSF.this.notifyAll();
+                }
+                System.err.println("- closing server socket: " + this);
+                super.close();
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/dgcDeadLock/DGCDeadLock.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -46,7 +46,7 @@
  * was attempting to lock.
  *
  * This test causes the above conditions to occur and waits to see if
- * a given set of remote calls finishes "quickly enough."  
+ * a given set of remote calls finishes "quickly enough."
  */
 
 import java.rmi.*;
@@ -60,98 +60,98 @@
     static DGCDeadLock test = new DGCDeadLock();
 
     static {
-	System.setProperty("sun.rmi.transport.cleanInterval", "50");
+        System.setProperty("sun.rmi.transport.cleanInterval", "50");
     }
 
     static public void main(String[] args) {
 
-	JavaVM testImplVM = null;
-    
-	System.err.println("\nregression test for 4118056\n");
-	TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
+        JavaVM testImplVM = null;
+
+        System.err.println("\nregression test for 4118056\n");
+        TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 
         try {
-	    String options = " -Djava.security.policy=" + 
-		TestParams.defaultPolicy +
-		" -Djava.rmi.dgc.leaseValue=500000" + 
-		"  -Dsun.rmi.dgc.checkInterval=" + 
-		(HOLD_TARGET_TIME - 5000) + "";
+            String options = " -Djava.security.policy=" +
+                TestParams.defaultPolicy +
+                " -Djava.rmi.dgc.leaseValue=500000" +
+                "  -Dsun.rmi.dgc.checkInterval=" +
+                (HOLD_TARGET_TIME - 5000) + "";
 
-	    testImplVM = new JavaVM("TestImpl", options, "");
-	    testImplVM.start();
+            testImplVM = new JavaVM("TestImpl", options, "");
+            testImplVM.start();
 
-	    synchronized (test) {
-		Thread t = new Thread(test);
-		t.setDaemon(true);
-		t.start();
+            synchronized (test) {
+                Thread t = new Thread(test);
+                t.setDaemon(true);
+                t.start();
 
-		// wait for the remote calls to take place
-		test.wait(TEST_FAIL_TIME);
-	    }
+                // wait for the remote calls to take place
+                test.wait(TEST_FAIL_TIME);
+            }
 
-	    if (!finished) {
-		TestLibrary.bomb("Test failed, had exception or exercise" + 
-					   " routines took too long to " + 
-					   "execute");
-	    }
-	    System.err.println("Test passed, exercises " + 
-			       "finished in time.");
+            if (!finished) {
+                TestLibrary.bomb("Test failed, had exception or exercise" +
+                                           " routines took too long to " +
+                                           "execute");
+            }
+            System.err.println("Test passed, exercises " +
+                               "finished in time.");
 
         } catch (Exception e) {
-	    testImplVM = null;
-	    TestLibrary.bomb("test failed", e);
+            testImplVM = null;
+            TestLibrary.bomb("test failed", e);
         }
     }
 
     public void run() {
-	try {
-	    String echo = null;
+        try {
+            String echo = null;
 
-	    // give the test remote object time to initialize.
-	    Thread.currentThread().sleep(8000);
+            // give the test remote object time to initialize.
+            Thread.currentThread().sleep(8000);
 
-	    // create a test client
-	    Test foo = (Test) Naming.lookup("rmi://:" + 
-					    TestLibrary.REGISTRY_PORT + 
-					    "/Foo");
-	    echo = foo.echo("Hello world");
-	    System.err.println("Test object created.");
+            // create a test client
+            Test foo = (Test) Naming.lookup("rmi://:" +
+                                            TestLibrary.REGISTRY_PORT +
+                                            "/Foo");
+            echo = foo.echo("Hello world");
+            System.err.println("Test object created.");
 
-	    /* give TestImpl time to lock the target in the 
-	     * object table and any dirtys finish.
-	     */
-	    Thread.currentThread().sleep(5000);
+            /* give TestImpl time to lock the target in the
+             * object table and any dirtys finish.
+             */
+            Thread.currentThread().sleep(5000);
 
-	    //unreference "Foo"
-	    foo = null;
+            //unreference "Foo"
+            foo = null;
+
+            //garbage collect and finalize foo
+            Runtime.getRuntime().gc();
+            Runtime.getRuntime().runFinalization();
 
-	    //garbage collect and finalize foo
-	    Runtime.getRuntime().gc();  
-	    Runtime.getRuntime().runFinalization();  
-	    
-	    //import "Bar"
-	    Test bar = (Test) Naming.lookup("rmi://:" + 
-					    TestLibrary.REGISTRY_PORT + 
-					    "/Bar");
-	    
-	    /* infinite loop to show the liveness of Client,
-	     * if we have deadlock remote call will not return
-	     */
-	    try {
-		for (int i = 0; i < 500; i++) {  
-		    echo = bar.echo("Remote call" + i);
-		    Thread.sleep(10);
-		}
+            //import "Bar"
+            Test bar = (Test) Naming.lookup("rmi://:" +
+                                            TestLibrary.REGISTRY_PORT +
+                                            "/Bar");
 
-		// flag exercises finished
-		finished = true;
+            /* infinite loop to show the liveness of Client,
+             * if we have deadlock remote call will not return
+             */
+            try {
+                for (int i = 0; i < 500; i++) {
+                    echo = bar.echo("Remote call" + i);
+                    Thread.sleep(10);
+                }
 
-	    } catch (RemoteException e) {
-	    }
-	    
-	} catch (Exception e) {
-	    TestLibrary.bomb("test failed", e);
-	} finally {
-	}
+                // flag exercises finished
+                finished = true;
+
+            } catch (RemoteException e) {
+            }
+
+        } catch (Exception e) {
+            TestLibrary.bomb("test failed", e);
+        } finally {
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/dgcDeadLock/Test.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/dgcDeadLock/Test.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/rmi/transport/dgcDeadLock/TestImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/dgcDeadLock/TestImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -34,7 +34,7 @@
 import java.rmi.registry.*;
 import java.rmi.server.*;
 
-public class TestImpl extends UnicastRemoteObject 
+public class TestImpl extends UnicastRemoteObject
     implements Test {
 
     static Thread locker = null;
@@ -46,197 +46,197 @@
 
     public String echo(String msg) throws RemoteException {
 
-	if (locker == null) {
-	    // hold the target if not already held
-	    locker = lockTargetExpireLeases(foo, DGCDeadLock.HOLD_TARGET_TIME);
-	}
+        if (locker == null) {
+            // hold the target if not already held
+            locker = lockTargetExpireLeases(foo, DGCDeadLock.HOLD_TARGET_TIME);
+        }
         return "Message received: " + msg;
     }
 
     static public void main(String[] args) {
-	Registry registry = null;
+        Registry registry = null;
 
         try {
-	    registry = java.rmi.registry.LocateRegistry.
-		createRegistry(TestLibrary.REGISTRY_PORT);
+            registry = java.rmi.registry.LocateRegistry.
+                createRegistry(TestLibrary.REGISTRY_PORT);
 
-	    //export "Foo"
-	    foo = new TestImpl();
-            Naming.rebind("rmi://:" + 
-			  TestLibrary.REGISTRY_PORT
-			  + "/Foo", foo);  
+            //export "Foo"
+            foo = new TestImpl();
+            Naming.rebind("rmi://:" +
+                          TestLibrary.REGISTRY_PORT
+                          + "/Foo", foo);
 
-	    try {
-		//export "Bar" after leases have been expired.
-		bar = new TestImpl();
-		Naming.rebind("rmi://localhost:" + 
-			      TestLibrary.REGISTRY_PORT
-			      + "/Bar", bar);  
-	    } catch (Exception e) {
-		throw new RemoteException(e.getMessage());
-	    }
-	    Thread.sleep(DGCDeadLock.TEST_FAIL_TIME);
-	    System.err.println("object vm exiting...");
-	    System.exit(0);
+            try {
+                //export "Bar" after leases have been expired.
+                bar = new TestImpl();
+                Naming.rebind("rmi://localhost:" +
+                              TestLibrary.REGISTRY_PORT
+                              + "/Bar", bar);
+            } catch (Exception e) {
+                throw new RemoteException(e.getMessage());
+            }
+            Thread.sleep(DGCDeadLock.TEST_FAIL_TIME);
+            System.err.println("object vm exiting...");
+            System.exit(0);
 
         } catch (Exception e) {
-	    System.err.println(e.getMessage());
-	    e.printStackTrace();
+            System.err.println(e.getMessage());
+            e.printStackTrace();
         } finally {
-	    TestLibrary.unexport(registry);
-	    registry = null;
-	}
+            TestLibrary.unexport(registry);
+            registry = null;
+        }
     }
 
     static Thread lockTargetExpireLeases(Remote toLock, int timeOut) {
-	Thread t = new Thread((Runnable) new TargetLocker(toLock, timeOut));
-	t.start();
-	return t;
+        Thread t = new Thread((Runnable) new TargetLocker(toLock, timeOut));
+        t.start();
+        return t;
     }
 
     static class TargetLocker implements Runnable {
 
-	Remote toLock = null;
-	int timeOut = 0;
+        Remote toLock = null;
+        int timeOut = 0;
 
-	TargetLocker(Remote toLock, int timeOut) {
-	    this.toLock = toLock;
-	    this.timeOut = timeOut;
-	}
+        TargetLocker(Remote toLock, int timeOut) {
+            this.toLock = toLock;
+            this.timeOut = timeOut;
+        }
 
-	public void run() {
-	    try {
-		// give dgc dirty calls time to finish.
-		Thread.currentThread().sleep(4000);
+        public void run() {
+            try {
+                // give dgc dirty calls time to finish.
+                Thread.currentThread().sleep(4000);
 
-		java.security.AccessController.
-		    doPrivileged(new LockTargetCheckLeases(toLock, 
-							   timeOut));
+                java.security.AccessController.
+                    doPrivileged(new LockTargetCheckLeases(toLock,
+                                                           timeOut));
 
-	    } catch (Exception e) {
-		System.err.println(e.getMessage());
-		e.printStackTrace();
-		System.exit(1);
-	    }
-	}
+            } catch (Exception e) {
+                System.err.println(e.getMessage());
+                e.printStackTrace();
+                System.exit(1);
+            }
+        }
     }
 
-    static class LockTargetCheckLeases 
-	implements java.security.PrivilegedAction {
+    static class LockTargetCheckLeases
+        implements java.security.PrivilegedAction {
+
+        Remote toLock = null;
+        int timeOut = 0;
 
-	Remote toLock = null;
-	int timeOut = 0;
+        LockTargetCheckLeases(Remote toLock, int timeOut) {
+            this.toLock = toLock;
+            this.timeOut = timeOut;
+        }
 
-	LockTargetCheckLeases(Remote toLock, int timeOut) {
-	    this.toLock = toLock;
-	    this.timeOut = timeOut;
-	}
+        public Object run() {
+            try {
+
+                Class args[] = new Class[1];
+
+                Class objTableClass = Class.forName
+                    ("sun.rmi.transport.ObjectTable");
 
-	public Object run() {
-	    try {
-		
-		Class args[] = new Class[1];
-		
-		Class objTableClass = Class.forName
-		    ("sun.rmi.transport.ObjectTable");
-		
-		/* get the Target that corresponds to toLock from the
-		 * ObjectTable 
-		 */
-		args[0] = Class.forName("java.rmi.Remote");
-		Method objTableGetTarget = 
-		    objTableClass.getDeclaredMethod("getTarget", args );
-		objTableGetTarget.setAccessible(true);
-		
-		Target lockTarget = 
-		    ((Target) objTableGetTarget.invoke
-		     (null , new Object [] {toLock} ));
-		
-		// make sure the lease on this object has expired.
-		expireLeases(lockTarget);
-		
-		// stop other threads from using the target for toLock.
-		synchronized (lockTarget) {
-		    System.err.println("Locked the relevant target, sleeping " + 
-				       timeOut/1000 + " seconds");
-		    Thread.currentThread().sleep(timeOut);
-		    System.err.println("Target unlocked");
-		}
+                /* get the Target that corresponds to toLock from the
+                 * ObjectTable
+                 */
+                args[0] = Class.forName("java.rmi.Remote");
+                Method objTableGetTarget =
+                    objTableClass.getDeclaredMethod("getTarget", args );
+                objTableGetTarget.setAccessible(true);
+
+                Target lockTarget =
+                    ((Target) objTableGetTarget.invoke
+                     (null , new Object [] {toLock} ));
+
+                // make sure the lease on this object has expired.
+                expireLeases(lockTarget);
 
-	    } catch (Exception e) {
-		System.err.println(e.getMessage());
-		e.printStackTrace();
-		System.exit(1);
-	    }
-	    return null;
-	}
+                // stop other threads from using the target for toLock.
+                synchronized (lockTarget) {
+                    System.err.println("Locked the relevant target, sleeping " +
+                                       timeOut/1000 + " seconds");
+                    Thread.currentThread().sleep(timeOut);
+                    System.err.println("Target unlocked");
+                }
+
+            } catch (Exception e) {
+                System.err.println(e.getMessage());
+                e.printStackTrace();
+                System.exit(1);
+            }
+            return null;
+        }
     }
 
     /* leases have long values, so no dirty calls which would lock out
      * a clean call, but the leases need to expire anyway, so we do it
-     * explicitly. 
+     * explicitly.
      */
     static void expireLeases(Target t) throws Exception {
 
-	final Target target = t;
+        final Target target = t;
+
+        java.security.AccessController.doPrivileged(
 
-	java.security.AccessController.doPrivileged(
+            //  put this into another class?
+            new java.security.PrivilegedAction() {
+            public Object run() {
+                try {
+
+                    Class DGCClass = Class.forName("sun.rmi.transport.DGCImpl");
+                    Method getDGCImpl =
+                        DGCClass.getDeclaredMethod("getDGCImpl", null );
+                    getDGCImpl.setAccessible(true);
 
-	    //  put this into another class?
-	    new java.security.PrivilegedAction() {
-	    public Object run() {
-		try {
+                    // make sure the lease on this object has expired.
+                    DGC dgcImpl = ((DGC) getDGCImpl.invoke(null, null));
+
+                    /* Get the lease table from the DGCImpl. */
+                    Field reflectedLeaseTable =
+                        dgcImpl.getClass().getDeclaredField("leaseTable");
+                    reflectedLeaseTable.setAccessible(true);
+
+                    Map leaseTable = (Map) reflectedLeaseTable.get(dgcImpl);
+
+                    // dont really need this synchronization...
+                    synchronized (leaseTable) {
+                        Iterator en = leaseTable.values().iterator();
+                        while (en.hasNext()) {
+                            Object info = en.next();
 
-		    Class DGCClass = Class.forName("sun.rmi.transport.DGCImpl");
-		    Method getDGCImpl = 
-			DGCClass.getDeclaredMethod("getDGCImpl", null );
-		    getDGCImpl.setAccessible(true);
-		    
-		    // make sure the lease on this object has expired.
-		    DGC dgcImpl = ((DGC) getDGCImpl.invoke(null, null));
-		    
-		    /* Get the lease table from the DGCImpl. */
-		    Field reflectedLeaseTable = 
-			dgcImpl.getClass().getDeclaredField("leaseTable");
-		    reflectedLeaseTable.setAccessible(true);
-		    
-		    Map leaseTable = (Map) reflectedLeaseTable.get(dgcImpl);
-		    
-		    // dont really need this synchronization...
-		    synchronized (leaseTable) {
-			Iterator en = leaseTable.values().iterator();
-			while (en.hasNext()) {
-			    Object info = en.next();
-			    
-			    /* Get the notifySet in the leaseInfo object. */
-			    Field notifySetField = 
-				info.getClass().getDeclaredField("notifySet");
-			    notifySetField.setAccessible(true);
-			    HashSet notifySet = (HashSet) notifySetField.get(info);
-			    
-			    Iterator iter = notifySet.iterator();
-			    while (iter.hasNext()) {
-				Target notified = (Target) iter.next();
-				
-				if (notified == target) {
-				    
-				/* Get and set the expiration field from the info object. */
-				    Field expirationField = info.getClass().
-					getDeclaredField("expiration");
-				    expirationField.setAccessible(true);
-				    expirationField.setLong(info, 0);
-				}
-			    }
-			}
-		    }
-		} catch (Exception e) {
-		    System.err.println(e.getMessage());
-		    e.printStackTrace();
-		    System.exit(1);
-		}
-		// no interesting return value for this privileged action
-		return null;
-	    }
-	});
+                            /* Get the notifySet in the leaseInfo object. */
+                            Field notifySetField =
+                                info.getClass().getDeclaredField("notifySet");
+                            notifySetField.setAccessible(true);
+                            HashSet notifySet = (HashSet) notifySetField.get(info);
+
+                            Iterator iter = notifySet.iterator();
+                            while (iter.hasNext()) {
+                                Target notified = (Target) iter.next();
+
+                                if (notified == target) {
+
+                                /* Get and set the expiration field from the info object. */
+                                    Field expirationField = info.getClass().
+                                        getDeclaredField("expiration");
+                                    expirationField.setAccessible(true);
+                                    expirationField.setLong(info, 0);
+                                }
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+                    System.err.println(e.getMessage());
+                    e.printStackTrace();
+                    System.exit(1);
+                }
+                // no interesting return value for this privileged action
+                return null;
+            }
+        });
     }
 }
--- a/jdk/test/java/rmi/transport/dgcDeadLock/TestImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/dgcDeadLock/TestImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,78 +29,78 @@
     implements Test, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("java.lang.String echo(java.lang.String)")
+        new java.rmi.server.Operation("java.lang.String echo(java.lang.String)")
     };
-    
+
     private static final long interfaceHash = 8975711176019764637L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_echo_0;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_echo_0 = Test.class.getMethod("echo", new java.lang.Class[] {java.lang.String.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_echo_0 = Test.class.getMethod("echo", new java.lang.Class[] {java.lang.String.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public TestImpl_Stub() {
-	super();
+        super();
     }
     public TestImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of echo(String)
     public java.lang.String echo(java.lang.String $param_String_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_echo_0, new java.lang.Object[] {$param_String_1}, 5525131960618330777L);
-		return ((java.lang.String) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		try {
-		    java.io.ObjectOutput out = call.getOutputStream();
-		    out.writeObject($param_String_1);
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.MarshalException("error marshalling arguments", e);
-		}
-		ref.invoke(call);
-		java.lang.String $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.lang.String) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_echo_0, new java.lang.Object[] {$param_String_1}, 5525131960618330777L);
+                return ((java.lang.String) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_String_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("error marshalling arguments", e);
+                }
+                ref.invoke(call);
+                java.lang.String $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.lang.String) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/handshakeFailure/HandshakeFailure.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/handshakeFailure/HandshakeFailure.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -49,85 +49,85 @@
 
     public static void main(String[] args) throws Exception {
 
-	/*
-	 * Listen on port...
-	 */
-	ServerSocket serverSocket = new ServerSocket(PORT);
+        /*
+         * Listen on port...
+         */
+        ServerSocket serverSocket = new ServerSocket(PORT);
 
-	/*
-	 * (Attempt RMI call to port in separate thread.)
-	 */
-	Registry registry = LocateRegistry.getRegistry(PORT);
-	Connector connector = new Connector(registry);
-	Thread t = new Thread(connector);
-	t.setDaemon(true);
-	t.start();
+        /*
+         * (Attempt RMI call to port in separate thread.)
+         */
+        Registry registry = LocateRegistry.getRegistry(PORT);
+        Connector connector = new Connector(registry);
+        Thread t = new Thread(connector);
+        t.setDaemon(true);
+        t.start();
 
-	/*
-	 * ...accept one connection from port and send non-JRMP data.
-	 */
-	Socket socket = serverSocket.accept();
-	socket.getOutputStream().write("Wrong way".getBytes());
-	socket.close();
+        /*
+         * ...accept one connection from port and send non-JRMP data.
+         */
+        Socket socket = serverSocket.accept();
+        socket.getOutputStream().write("Wrong way".getBytes());
+        socket.close();
 
-	/*
-	 * Wait for call attempt to finish, and analyze result.
-	 */
-	t.join(TIMEOUT);
-	synchronized (connector) {
-	    if (connector.success) {
-		throw new RuntimeException(
-		    "TEST FAILED: remote call succeeded??");
-	    }
-	    if (connector.exception == null) {
-		throw new RuntimeException(
-		    "TEST FAILED: remote call did not time out");
-	    } else {
-		System.err.println("remote call failed with exception:");
-		connector.exception.printStackTrace();
-		System.err.println();
+        /*
+         * Wait for call attempt to finish, and analyze result.
+         */
+        t.join(TIMEOUT);
+        synchronized (connector) {
+            if (connector.success) {
+                throw new RuntimeException(
+                    "TEST FAILED: remote call succeeded??");
+            }
+            if (connector.exception == null) {
+                throw new RuntimeException(
+                    "TEST FAILED: remote call did not time out");
+            } else {
+                System.err.println("remote call failed with exception:");
+                connector.exception.printStackTrace();
+                System.err.println();
 
-		if (connector.exception instanceof MarshalException) {
-		    System.err.println(
-			"TEST FAILED: MarshalException thrown, expecting " +
-			"java.rmi.ConnectException or ConnectIOException");
-		} else if (connector.exception instanceof ConnectException ||
-			   connector.exception instanceof ConnectIOException)
-		{
-		    System.err.println(
-			"TEST PASSED: java.rmi.ConnectException or " +
-			"ConnectIOException thrown");
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unexpected Exception thrown",
-			connector.exception);
-		}
-	    }
-	}
+                if (connector.exception instanceof MarshalException) {
+                    System.err.println(
+                        "TEST FAILED: MarshalException thrown, expecting " +
+                        "java.rmi.ConnectException or ConnectIOException");
+                } else if (connector.exception instanceof ConnectException ||
+                           connector.exception instanceof ConnectIOException)
+                {
+                    System.err.println(
+                        "TEST PASSED: java.rmi.ConnectException or " +
+                        "ConnectIOException thrown");
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unexpected Exception thrown",
+                        connector.exception);
+                }
+            }
+        }
     }
 
     private static class Connector implements Runnable {
 
-	private final Registry registry;
+        private final Registry registry;
 
-	boolean success = false;
+        boolean success = false;
         Exception exception = null;
 
-	Connector(Registry registry) {
-	    this.registry = registry;
-	}
+        Connector(Registry registry) {
+            this.registry = registry;
+        }
 
-	public void run() {
-	    try {
-		registry.lookup("Dale Cooper");
-		synchronized (this) {
-		    success = true;
-		}
-	    } catch (Exception e) {
-		synchronized (this) {
-		    exception = e;
-		}
-	    }
-	}
+        public void run() {
+            try {
+                registry.lookup("Dale Cooper");
+                synchronized (this) {
+                    success = true;
+                }
+            } catch (Exception e) {
+                synchronized (this) {
+                    exception = e;
+                }
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/handshakeTimeout/HandshakeTimeout.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -51,81 +51,81 @@
 
     public static void main(String[] args) throws Exception {
 
-	System.setProperty("sun.rmi.transport.tcp.handshakeTimeout",
-			   String.valueOf(TIMEOUT / 2));
+        System.setProperty("sun.rmi.transport.tcp.handshakeTimeout",
+                           String.valueOf(TIMEOUT / 2));
 
-	/*
-	 * Listen on port, but never process connections made to it.
-	 */
-	ServerSocket serverSocket = new ServerSocket(PORT);
+        /*
+         * Listen on port, but never process connections made to it.
+         */
+        ServerSocket serverSocket = new ServerSocket(PORT);
 
-	/*
-	 * Attempt RMI call to port in separate thread.
-	 */
-	Registry registry = LocateRegistry.getRegistry(PORT);
-	Connector connector = new Connector(registry);
-	Thread t = new Thread(connector);
-	t.setDaemon(true);
-	t.start();
+        /*
+         * Attempt RMI call to port in separate thread.
+         */
+        Registry registry = LocateRegistry.getRegistry(PORT);
+        Connector connector = new Connector(registry);
+        Thread t = new Thread(connector);
+        t.setDaemon(true);
+        t.start();
 
-	/*
-	 * Wait for call attempt to finished, and analyze result.
-	 */
-	t.join(TIMEOUT);
-	synchronized (connector) {
-	    if (connector.success) {
-		throw new RuntimeException(
-		    "TEST FAILED: remote call succeeded??");
-	    }
-	    if (connector.exception == null) {
-		throw new RuntimeException(
-		    "TEST FAILED: remote call did not time out");
-	    } else {
-		System.err.println("remote call failed with exception:");
-		connector.exception.printStackTrace();
-		System.err.println();
+        /*
+         * Wait for call attempt to finished, and analyze result.
+         */
+        t.join(TIMEOUT);
+        synchronized (connector) {
+            if (connector.success) {
+                throw new RuntimeException(
+                    "TEST FAILED: remote call succeeded??");
+            }
+            if (connector.exception == null) {
+                throw new RuntimeException(
+                    "TEST FAILED: remote call did not time out");
+            } else {
+                System.err.println("remote call failed with exception:");
+                connector.exception.printStackTrace();
+                System.err.println();
 
-		if (connector.exception instanceof MarshalException) {
-		    System.err.println(
-			"TEST FAILED: MarshalException thrown, expecting " +
-			"java.rmi.ConnectException or ConnectIOException");
-		} else if (connector.exception instanceof ConnectException ||
-			   connector.exception instanceof ConnectIOException)
-		{
-		    System.err.println(
-			"TEST PASSED: java.rmi.ConnectException or " +
-			"ConnectIOException thrown");
-		} else {
-		    throw new RuntimeException(
-			"TEST FAILED: unexpected Exception thrown",
-			connector.exception);
-		}
-	    }
-	}
+                if (connector.exception instanceof MarshalException) {
+                    System.err.println(
+                        "TEST FAILED: MarshalException thrown, expecting " +
+                        "java.rmi.ConnectException or ConnectIOException");
+                } else if (connector.exception instanceof ConnectException ||
+                           connector.exception instanceof ConnectIOException)
+                {
+                    System.err.println(
+                        "TEST PASSED: java.rmi.ConnectException or " +
+                        "ConnectIOException thrown");
+                } else {
+                    throw new RuntimeException(
+                        "TEST FAILED: unexpected Exception thrown",
+                        connector.exception);
+                }
+            }
+        }
     }
 
     private static class Connector implements Runnable {
 
-	private final Registry registry;
+        private final Registry registry;
 
-	boolean success = false;
+        boolean success = false;
         Exception exception = null;
 
-	Connector(Registry registry) {
-	    this.registry = registry;
-	}
+        Connector(Registry registry) {
+            this.registry = registry;
+        }
 
-	public void run() {
-	    try {
-		registry.lookup("Dale Cooper");
-		synchronized (this) {
-		    success = true;
-		}
-	    } catch (Exception e) {
-		synchronized (this) {
-		    exception = e;
-		}
-	    }
-	}
+        public void run() {
+            try {
+                registry.lookup("Dale Cooper");
+                synchronized (this) {
+                    success = true;
+                }
+            } catch (Exception e) {
+                synchronized (this) {
+                    exception = e;
+                }
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/httpSocket/HttpSocketTest.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/httpSocket/HttpSocketTest.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -53,65 +53,60 @@
     Remote getRemoteObject() throws RemoteException;
 }
 
-public class HttpSocketTest extends UnicastRemoteObject 
+public class HttpSocketTest extends UnicastRemoteObject
     implements MyRemoteInterface
 {
 
     private static final String NAME = "HttpSocketTest";
     private static final String REGNAME =
-	"//:" + TestLibrary.REGISTRY_PORT + "/" + NAME;
+        "//:" + TestLibrary.REGISTRY_PORT + "/" + NAME;
 
     public HttpSocketTest() throws RemoteException{}
 
     private Remote ro;
 
     public static void main(String[] args)
-	throws Exception
+        throws Exception
     {
-	
-	Registry registry = null;
+
+        Registry registry = null;
 
-	TestLibrary.suggestSecurityManager(null);
-	
-	// Set the socket factory.
-	System.err.println("installing socket factory");
-	RMISocketFactory.setSocketFactory(new RMIHttpToPortSocketFactory());
+        TestLibrary.suggestSecurityManager(null);
 
-	try {
+        // Set the socket factory.
+        System.err.println("installing socket factory");
+        RMISocketFactory.setSocketFactory(new RMIHttpToPortSocketFactory());
+
+        try {
 
             System.err.println("Starting registry");
             registry = LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT);
 
         } catch (Exception e) {
-	    TestLibrary.bomb(e);
-	}
+            TestLibrary.bomb(e);
+        }
 
-	try {
+        try {
 
-	    registry.rebind( NAME, new HttpSocketTest() );
-	    MyRemoteInterface httpTest =
-		(MyRemoteInterface)Naming.lookup( REGNAME );
-	    httpTest.setRemoteObject( new HttpSocketTest() );
-	    Remote r = httpTest.getRemoteObject();
+            registry.rebind( NAME, new HttpSocketTest() );
+            MyRemoteInterface httpTest =
+                (MyRemoteInterface)Naming.lookup( REGNAME );
+            httpTest.setRemoteObject( new HttpSocketTest() );
+            Remote r = httpTest.getRemoteObject();
 
-	} catch (Exception e) {
-	    TestLibrary.bomb(e);
-	}
+        } catch (Exception e) {
+            TestLibrary.bomb(e);
+        }
 
 
     }
 
     public void setRemoteObject( Remote ro ) throws RemoteException {
-	this.ro = ro;
+        this.ro = ro;
     }
 
     public Remote getRemoteObject() throws RemoteException {
-	return( this.ro );
+        return( this.ro );
     }
 
 }
-
-
-
-
-
--- a/jdk/test/java/rmi/transport/httpSocket/HttpSocketTest_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/httpSocket/HttpSocketTest_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,102 +29,102 @@
     implements MyRemoteInterface, java.rmi.Remote
 {
     private static final java.rmi.server.Operation[] operations = {
-	new java.rmi.server.Operation("java.rmi.Remote getRemoteObject()"),
-	new java.rmi.server.Operation("void setRemoteObject(java.rmi.Remote)")
+        new java.rmi.server.Operation("java.rmi.Remote getRemoteObject()"),
+        new java.rmi.server.Operation("void setRemoteObject(java.rmi.Remote)")
     };
-    
+
     private static final long interfaceHash = 3775375480010579665L;
-    
+
     private static final long serialVersionUID = 2;
-    
+
     private static boolean useNewInvoke;
     private static java.lang.reflect.Method $method_getRemoteObject_0;
     private static java.lang.reflect.Method $method_setRemoteObject_1;
-    
+
     static {
-	try {
-	    java.rmi.server.RemoteRef.class.getMethod("invoke",
-		new java.lang.Class[] {
-		    java.rmi.Remote.class,
-		    java.lang.reflect.Method.class,
-		    java.lang.Object[].class,
-		    long.class
-		});
-	    useNewInvoke = true;
-	    $method_getRemoteObject_0 = MyRemoteInterface.class.getMethod("getRemoteObject", new java.lang.Class[] {});
-	    $method_setRemoteObject_1 = MyRemoteInterface.class.getMethod("setRemoteObject", new java.lang.Class[] {java.rmi.Remote.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    useNewInvoke = false;
-	}
+        try {
+            java.rmi.server.RemoteRef.class.getMethod("invoke",
+                new java.lang.Class[] {
+                    java.rmi.Remote.class,
+                    java.lang.reflect.Method.class,
+                    java.lang.Object[].class,
+                    long.class
+                });
+            useNewInvoke = true;
+            $method_getRemoteObject_0 = MyRemoteInterface.class.getMethod("getRemoteObject", new java.lang.Class[] {});
+            $method_setRemoteObject_1 = MyRemoteInterface.class.getMethod("setRemoteObject", new java.lang.Class[] {java.rmi.Remote.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            useNewInvoke = false;
+        }
     }
-    
+
     // constructors
     public HttpSocketTest_Stub() {
-	super();
+        super();
     }
     public HttpSocketTest_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of getRemoteObject()
     public java.rmi.Remote getRemoteObject()
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		Object $result = ref.invoke(this, $method_getRemoteObject_0, null, -2578437860804964265L);
-		return ((java.rmi.Remote) $result);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
-		ref.invoke(call);
-		java.rmi.Remote $result;
-		try {
-		    java.io.ObjectInput in = call.getInputStream();
-		    $result = (java.rmi.Remote) in.readObject();
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} catch (java.lang.ClassNotFoundException e) {
-		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
-		} finally {
-		    ref.done(call);
-		}
-		return $result;
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                Object $result = ref.invoke(this, $method_getRemoteObject_0, null, -2578437860804964265L);
+                return ((java.rmi.Remote) $result);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
+                ref.invoke(call);
+                java.rmi.Remote $result;
+                try {
+                    java.io.ObjectInput in = call.getInputStream();
+                    $result = (java.rmi.Remote) in.readObject();
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } catch (java.lang.ClassNotFoundException e) {
+                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
+                } finally {
+                    ref.done(call);
+                }
+                return $result;
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
-    
+
     // implementation of setRemoteObject(Remote)
     public void setRemoteObject(java.rmi.Remote $param_Remote_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    if (useNewInvoke) {
-		ref.invoke(this, $method_setRemoteObject_1, new java.lang.Object[] {$param_Remote_1}, -7518632118115022871L);
-	    } else {
-		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
-		try {
-		    java.io.ObjectOutput out = call.getOutputStream();
-		    out.writeObject($param_Remote_1);
-		} catch (java.io.IOException e) {
-		    throw new java.rmi.MarshalException("error marshalling arguments", e);
-		}
-		ref.invoke(call);
-		ref.done(call);
-	    }
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            if (useNewInvoke) {
+                ref.invoke(this, $method_setRemoteObject_1, new java.lang.Object[] {$param_Remote_1}, -7518632118115022871L);
+            } else {
+                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
+                try {
+                    java.io.ObjectOutput out = call.getOutputStream();
+                    out.writeObject($param_Remote_1);
+                } catch (java.io.IOException e) {
+                    throw new java.rmi.MarshalException("error marshalling arguments", e);
+                }
+                ref.invoke(call);
+                ref.done(call);
+            }
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -60,109 +60,109 @@
     private static final int SESSIONS = 50;
 
     public interface Factory extends Remote {
-	Session getSession() throws RemoteException;
+        Session getSession() throws RemoteException;
     }
 
     public interface Session extends Remote {
-	void ping() throws RemoteException;
+        void ping() throws RemoteException;
     }
 
     private static class FactoryImpl implements Factory {
-	FactoryImpl() { }
-	public Session getSession() throws RemoteException {
-	    Session impl = new SessionImpl();
-	    UnicastRemoteObject.exportObject(impl, 0, new CSF(), new SSF());
-	    // return impl instead of stub to work around 4114579
-	    return impl;
-	}
+        FactoryImpl() { }
+        public Session getSession() throws RemoteException {
+            Session impl = new SessionImpl();
+            UnicastRemoteObject.exportObject(impl, 0, new CSF(), new SSF());
+            // return impl instead of stub to work around 4114579
+            return impl;
+        }
     }
 
     private static class SessionImpl implements Session {
-	SessionImpl() { }
-	public void ping() { }
+        SessionImpl() { }
+        public void ping() { }
     }
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 4486732\n");
+        System.err.println("\nRegression test for bug 4486732\n");
 
-	Factory factoryImpl = new FactoryImpl();
-	Factory factoryStub =
-	    (Factory) UnicastRemoteObject.exportObject(factoryImpl, 0);
-	for (int i = 0; i < SESSIONS; i++) {
-	    Session session = factoryStub.getSession();
-	    session.ping();
-	}
-	UnicastRemoteObject.unexportObject(factoryImpl, true);
+        Factory factoryImpl = new FactoryImpl();
+        Factory factoryStub =
+            (Factory) UnicastRemoteObject.exportObject(factoryImpl, 0);
+        for (int i = 0; i < SESSIONS; i++) {
+            Session session = factoryStub.getSession();
+            session.ping();
+        }
+        UnicastRemoteObject.unexportObject(factoryImpl, true);
 
-	Registry registryImpl = LocateRegistry.createRegistry(PORT);
-	CSF csf = new CSF();
-	Reference<CSF> registryRef = new WeakReference<CSF>(csf);
-	Registry registryStub = LocateRegistry.getRegistry("", PORT, csf);
-	csf = null;
-	registryStub.list();
-	registryStub = null;
-	UnicastRemoteObject.unexportObject(registryImpl, true);
+        Registry registryImpl = LocateRegistry.createRegistry(PORT);
+        CSF csf = new CSF();
+        Reference<CSF> registryRef = new WeakReference<CSF>(csf);
+        Registry registryStub = LocateRegistry.getRegistry("", PORT, csf);
+        csf = null;
+        registryStub.list();
+        registryStub = null;
+        UnicastRemoteObject.unexportObject(registryImpl, true);
 
-	System.gc();
-	// allow connections to time out
-	Thread.sleep(3 * Long.getLong("sun.rmi.transport.connectionTimeout",
-				      15000));
-	System.gc();
+        System.gc();
+        // allow connections to time out
+        Thread.sleep(3 * Long.getLong("sun.rmi.transport.connectionTimeout",
+                                      15000));
+        System.gc();
 
-	if (CSF.deserializedInstances.size() != SESSIONS) {
-	    throw new Error("unexpected number of deserialized instances: " +
-			    CSF.deserializedInstances.size());
-	}
+        if (CSF.deserializedInstances.size() != SESSIONS) {
+            throw new Error("unexpected number of deserialized instances: " +
+                            CSF.deserializedInstances.size());
+        }
 
-	int nonNullCount = 0;
-	for (Reference<CSF> ref : CSF.deserializedInstances) {
-	    csf = ref.get();
-	    if (csf != null) {
-		System.err.println("non-null deserialized instance: " + csf);
-		nonNullCount++;
-	    }
-	}
-	if (nonNullCount > 0) {
-	    throw new Error("TEST FAILED: " +
-			    nonNullCount + " non-null deserialized instances");
-	}
+        int nonNullCount = 0;
+        for (Reference<CSF> ref : CSF.deserializedInstances) {
+            csf = ref.get();
+            if (csf != null) {
+                System.err.println("non-null deserialized instance: " + csf);
+                nonNullCount++;
+            }
+        }
+        if (nonNullCount > 0) {
+            throw new Error("TEST FAILED: " +
+                            nonNullCount + " non-null deserialized instances");
+        }
 
-	csf = registryRef.get();
-	if (csf != null) {
-	    System.err.println("non-null registry instance: " + csf);
-	    throw new Error("TEST FAILED: non-null registry instance");
-	}
+        csf = registryRef.get();
+        if (csf != null) {
+            System.err.println("non-null registry instance: " + csf);
+            throw new Error("TEST FAILED: non-null registry instance");
+        }
 
-	System.err.println("TEST PASSED");
+        System.err.println("TEST PASSED");
     }
 
     private static class CSF implements RMIClientSocketFactory, Serializable {
-	static final List<Reference<CSF>> deserializedInstances =
-	    Collections.synchronizedList(new ArrayList<Reference<CSF>>());
-	private static final AtomicInteger count = new AtomicInteger(0);
-	private int num = count.incrementAndGet();
-	CSF() { }
-	public Socket createSocket(String host, int port) throws IOException {
-	    return new Socket(host, port);
-	}
-	public int hashCode() {
-	    return num;
-	}
-	public boolean equals(Object obj) {
-	    return obj instanceof CSF && ((CSF) obj).num == num;
-	}
-	private void readObject(ObjectInputStream in)
-	    throws IOException, ClassNotFoundException
-	{
-	    in.defaultReadObject();
-	    deserializedInstances.add(new WeakReference<CSF>(this));
-	}
+        static final List<Reference<CSF>> deserializedInstances =
+            Collections.synchronizedList(new ArrayList<Reference<CSF>>());
+        private static final AtomicInteger count = new AtomicInteger(0);
+        private int num = count.incrementAndGet();
+        CSF() { }
+        public Socket createSocket(String host, int port) throws IOException {
+            return new Socket(host, port);
+        }
+        public int hashCode() {
+            return num;
+        }
+        public boolean equals(Object obj) {
+            return obj instanceof CSF && ((CSF) obj).num == num;
+        }
+        private void readObject(ObjectInputStream in)
+            throws IOException, ClassNotFoundException
+        {
+            in.defaultReadObject();
+            deserializedInstances.add(new WeakReference<CSF>(this));
+        }
     }
 
     private static class SSF implements RMIServerSocketFactory {
-	SSF() { }
-	public ServerSocket createServerSocket(int port) throws IOException {
-	    return new ServerSocket(port);
-	}
+        SSF() { }
+        public ServerSocket createServerSocket(int port) throws IOException {
+            return new ServerSocket(port);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/pinLastArguments/PinLastArguments.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -45,45 +45,45 @@
 public class PinLastArguments {
 
     public interface Ping extends Remote {
-	void ping(Object first, Object second) throws RemoteException;
+        void ping(Object first, Object second) throws RemoteException;
     }
 
     private static class PingImpl implements Ping {
-	PingImpl() { }
-	public void ping(Object first, Object second) {
-	    System.err.println("ping invoked: " + first + ", " + second);
-	}
+        PingImpl() { }
+        public void ping(Object first, Object second) {
+            System.err.println("ping invoked: " + first + ", " + second);
+        }
     }
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 6332349\n");
+        System.err.println("\nRegression test for bug 6332349\n");
 
-	Ping impl = new PingImpl();
-	Reference<?> ref = new WeakReference<Ping>(impl);
-	try {
-	    Ping stub = (Ping) UnicastRemoteObject.exportObject(impl, 0);
-	    Object notSerializable = new Object();
-	    stub.ping(impl, null);
-	    try {
-		stub.ping(impl, notSerializable);
-	    } catch (MarshalException e) {
-		if (e.getCause() instanceof NotSerializableException) {
-		    System.err.println("ping invocation failed as expected");
-		} else {
-		    throw e;
-		}
-	    }
-	} finally {
-	    UnicastRemoteObject.unexportObject(impl, true);
-	}
-	impl = null;
+        Ping impl = new PingImpl();
+        Reference<?> ref = new WeakReference<Ping>(impl);
+        try {
+            Ping stub = (Ping) UnicastRemoteObject.exportObject(impl, 0);
+            Object notSerializable = new Object();
+            stub.ping(impl, null);
+            try {
+                stub.ping(impl, notSerializable);
+            } catch (MarshalException e) {
+                if (e.getCause() instanceof NotSerializableException) {
+                    System.err.println("ping invocation failed as expected");
+                } else {
+                    throw e;
+                }
+            }
+        } finally {
+            UnicastRemoteObject.unexportObject(impl, true);
+        }
+        impl = null;
 
-	System.gc();
+        System.gc();
 
-	if (ref.get() != null) {
-	    throw new Error("TEST FAILED: impl not garbage collected");
-	}
+        if (ref.get() != null) {
+            throw new Error("TEST FAILED: impl not garbage collected");
+        }
 
-	System.err.println("TEST PASSED");
+        System.err.println("TEST PASSED");
     }
 }
--- a/jdk/test/java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -46,22 +46,22 @@
     private static final long TIMEOUT = 60000;
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 6275081\n");
+        System.err.println("\nRegression test for bug 6275081\n");
 
-	Remote impl = new Remote() { };
-	long start = System.currentTimeMillis();
-	for (int i = 0; i < REPS; i++) {
-	    System.err.println(i);
-	    UnicastRemoteObject.exportObject(impl, PORT);
-	    UnicastRemoteObject.unexportObject(impl, true);
-	    Thread.sleep(1);	// work around BindException (bug?)
-	}
-	long delta = System.currentTimeMillis() - start;
-	System.err.println(REPS + " export/unexport operations took " +
-			   delta + "ms");
-	if (delta > TIMEOUT) {
-	    throw new Error("TEST FAILED: took over " + TIMEOUT + "ms");
-	}
-	System.err.println("TEST PASSED");
+        Remote impl = new Remote() { };
+        long start = System.currentTimeMillis();
+        for (int i = 0; i < REPS; i++) {
+            System.err.println(i);
+            UnicastRemoteObject.exportObject(impl, PORT);
+            UnicastRemoteObject.unexportObject(impl, true);
+            Thread.sleep(1);    // work around BindException (bug?)
+        }
+        long delta = System.currentTimeMillis() - start;
+        System.err.println(REPS + " export/unexport operations took " +
+                           delta + "ms");
+        if (delta > TIMEOUT) {
+            throw new Error("TEST FAILED: took over " + TIMEOUT + "ms");
+        }
+        System.err.println("TEST PASSED");
     }
 }
--- a/jdk/test/java/rmi/transport/readTimeout/ReadTimeoutTest.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/readTimeout/ReadTimeoutTest.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -50,134 +50,134 @@
 
 public class ReadTimeoutTest
 {
-    private static final int DELAY = 5000;	// milliseconds
+    private static final int DELAY = 5000;      // milliseconds
 
     public static void main(String[] args)
-	throws Exception
+        throws Exception
     {
-	// Make trouble for ourselves
-	if (System.getSecurityManager() == null)
-	    System.setSecurityManager(new RMISecurityManager());
-	
-	// Flaky code alert - hope this is executed before TCPTransport.<clinit>
-	System.setProperty("sun.rmi.transport.tcp.readTimeout", Integer.toString(DELAY));
+        // Make trouble for ourselves
+        if (System.getSecurityManager() == null)
+            System.setSecurityManager(new RMISecurityManager());
+
+        // Flaky code alert - hope this is executed before TCPTransport.<clinit>
+        System.setProperty("sun.rmi.transport.tcp.readTimeout", Integer.toString(DELAY));
+
+        // Set the socket factory.
+        System.err.println("(installing socket factory)");
+        SomeFactory fac = new SomeFactory();
+        RMISocketFactory.setSocketFactory(fac);
 
-	// Set the socket factory.
-	System.err.println("(installing socket factory)");
-	SomeFactory fac = new SomeFactory();
-	RMISocketFactory.setSocketFactory(fac);
+        // Create remote object
+        TestImpl impl = new TestImpl();
 
-	// Create remote object
-	TestImpl impl = new TestImpl();
+        // Export and get which port.
+        System.err.println("(exporting remote object)");
+        TestIface stub = impl.export();
+        Socket DoS = null;
+        try {
+            int port = fac.whichPort();
 
-	// Export and get which port.
-	System.err.println("(exporting remote object)");
-	TestIface stub = impl.export();
-	Socket DoS = null;
-	try {
-	    int port = fac.whichPort();
+            // Sanity
+            if (port == 0)
+                throw new Error("TEST FAILED: export didn't reserve a port(?)");
 
-	    // Sanity
-	    if (port == 0)
-		throw new Error("TEST FAILED: export didn't reserve a port(?)");
-	
-	    // Now, connect to that port
-	    //Thread.sleep(2000);
-	    System.err.println("(connecting to listening port on 127.0.0.1:" +
-			       port + ")");
-	    DoS = new Socket("127.0.0.1", port);
-	    InputStream stream = DoS.getInputStream();
+            // Now, connect to that port
+            //Thread.sleep(2000);
+            System.err.println("(connecting to listening port on 127.0.0.1:" +
+                               port + ")");
+            DoS = new Socket("127.0.0.1", port);
+            InputStream stream = DoS.getInputStream();
 
-	    // Read on the socket in the background
-	    boolean[] successful = new boolean[] { false };
-	    (new SomeReader(stream, successful)).start();
+            // Read on the socket in the background
+            boolean[] successful = new boolean[] { false };
+            (new SomeReader(stream, successful)).start();
 
-	    // Wait for completion
-	    int nretries = 4;
-	    while (nretries-- > 0) {
-		if (successful[0])
-		    break;
-		Thread.sleep(DELAY);
-	    }
+            // Wait for completion
+            int nretries = 4;
+            while (nretries-- > 0) {
+                if (successful[0])
+                    break;
+                Thread.sleep(DELAY);
+            }
 
-	    if (successful[0]) {
-		System.err.println("TEST PASSED.");
-	    } else {
-		throw new Error("TEST FAILED.");
-	    }
+            if (successful[0]) {
+                System.err.println("TEST PASSED.");
+            } else {
+                throw new Error("TEST FAILED.");
+            }
 
-	} finally {
-	    try {
-		if (DoS != null)
-		    DoS.close();	// aborts the reader if still blocked
-		impl.unexport();
-	    } catch (Throwable unmatter) {
-	    }
-	}
+        } finally {
+            try {
+                if (DoS != null)
+                    DoS.close();        // aborts the reader if still blocked
+                impl.unexport();
+            } catch (Throwable unmatter) {
+            }
+        }
 
-	// Should exit here
+        // Should exit here
     }
 
     private static class SomeFactory
-	extends RMISocketFactory
+        extends RMISocketFactory
     {
-	private int servport = 0;
+        private int servport = 0;
 
-	public Socket createSocket(String h, int p)
-	    throws IOException
-	{
-	    return (new Socket(h, p));
-	}
+        public Socket createSocket(String h, int p)
+            throws IOException
+        {
+            return (new Socket(h, p));
+        }
 
-	/** Create a server socket and remember which port it's on.
-	 * Aborts if createServerSocket(0) is called twice, because then
-	 * it doesn't know whether to remember the first or second port.
-	 */
-	public ServerSocket createServerSocket(int p)
-	    throws IOException
-	{
-	    ServerSocket ss;
-	    ss = new ServerSocket(p);
-	    if (p == 0) {
-		if (servport != 0) {
-		    System.err.println("TEST FAILED: " +
-				       "Duplicate createServerSocket(0)");
-		    throw new Error("Test aborted (createServerSocket)");
-		}
-		servport = ss.getLocalPort();
-	    }
-	    return (ss);
-	}
+        /** Create a server socket and remember which port it's on.
+         * Aborts if createServerSocket(0) is called twice, because then
+         * it doesn't know whether to remember the first or second port.
+         */
+        public ServerSocket createServerSocket(int p)
+            throws IOException
+        {
+            ServerSocket ss;
+            ss = new ServerSocket(p);
+            if (p == 0) {
+                if (servport != 0) {
+                    System.err.println("TEST FAILED: " +
+                                       "Duplicate createServerSocket(0)");
+                    throw new Error("Test aborted (createServerSocket)");
+                }
+                servport = ss.getLocalPort();
+            }
+            return (ss);
+        }
 
-	/** Return which port was reserved by createServerSocket(0).
-	 * If the return value was 0, createServerSocket(0) wasn't called.
-	 */
-	public int whichPort() {
-	    return (servport);
-	}
+        /** Return which port was reserved by createServerSocket(0).
+         * If the return value was 0, createServerSocket(0) wasn't called.
+         */
+        public int whichPort() {
+            return (servport);
+        }
     } // end class SomeFactory
 
     protected static class SomeReader extends Thread {
-	private InputStream readon;
-	private boolean[] vec;
+        private InputStream readon;
+        private boolean[] vec;
 
-	public SomeReader(InputStream s, boolean[] successvec) {
-	    super();
-	    this.setDaemon(true);
-	    this.readon = s;
-	    this.vec = successvec;
-	}
+        public SomeReader(InputStream s, boolean[] successvec) {
+            super();
+            this.setDaemon(true);
+            this.readon = s;
+            this.vec = successvec;
+        }
 
-	public void run() {
-	    try {
-		int c = this.readon.read();
-		if (c != -1)
-		    throw new Error ("Server returned " + c);
-		this.vec[0] = true;
+        public void run() {
+            try {
+                int c = this.readon.read();
+                if (c != -1)
+                    throw new Error ("Server returned " + c);
+                this.vec[0] = true;
 
-	    } catch (IOException e) {
-		e.printStackTrace();
-	    }
-	}
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
     } // end class SomeReader
 }
--- a/jdk/test/java/rmi/transport/readTimeout/TestIface.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/readTimeout/TestIface.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -27,5 +27,5 @@
     extends Remote
 {
     public String testCall(String ign)
-	throws RemoteException;
+        throws RemoteException;
 }
--- a/jdk/test/java/rmi/transport/readTimeout/TestImpl.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/readTimeout/TestImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -32,19 +32,18 @@
     }
 
     public TestIface export()
-	throws RemoteException
+        throws RemoteException
     {
-	return (TestIface)UnicastRemoteObject.exportObject(this);
+        return (TestIface)UnicastRemoteObject.exportObject(this);
     }
 
     public void unexport()
-	throws NoSuchObjectException
+        throws NoSuchObjectException
     {
-	UnicastRemoteObject.unexportObject(this, true);
+        UnicastRemoteObject.unexportObject(this, true);
     }
 
     public String testCall(String ign) {
-	return ("OK");
+        return ("OK");
     }
 }
-
--- a/jdk/test/java/rmi/transport/readTimeout/TestImpl_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/readTimeout/TestImpl_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,38 +29,38 @@
     implements TestIface
 {
     private static final long serialVersionUID = 2;
-    
+
     private static java.lang.reflect.Method $method_testCall_0;
-    
+
     static {
-	try {
-	    $method_testCall_0 = TestIface.class.getMethod("testCall", new java.lang.Class[] {java.lang.String.class});
-	} catch (java.lang.NoSuchMethodException e) {
-	    throw new java.lang.NoSuchMethodError(
-		"stub class initialization failed");
-	}
+        try {
+            $method_testCall_0 = TestIface.class.getMethod("testCall", new java.lang.Class[] {java.lang.String.class});
+        } catch (java.lang.NoSuchMethodException e) {
+            throw new java.lang.NoSuchMethodError(
+                "stub class initialization failed");
+        }
     }
-    
+
     // constructors
     public TestImpl_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
     // methods from remote interfaces
-    
+
     // implementation of testCall(String)
     public java.lang.String testCall(java.lang.String $param_String_1)
-	throws java.rmi.RemoteException
+        throws java.rmi.RemoteException
     {
-	try {
-	    Object $result = ref.invoke(this, $method_testCall_0, new java.lang.Object[] {$param_String_1}, -4495720265115653109L);
-	    return ((java.lang.String) $result);
-	} catch (java.lang.RuntimeException e) {
-	    throw e;
-	} catch (java.rmi.RemoteException e) {
-	    throw e;
-	} catch (java.lang.Exception e) {
-	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
-	}
+        try {
+            Object $result = ref.invoke(this, $method_testCall_0, new java.lang.Object[] {$param_String_1}, -4495720265115653109L);
+            return ((java.lang.String) $result);
+        } catch (java.lang.RuntimeException e) {
+            throw e;
+        } catch (java.rmi.RemoteException e) {
+            throw e;
+        } catch (java.lang.Exception e) {
+            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/reuseDefaultPort/ReuseDefaultPort.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/reuseDefaultPort/ReuseDefaultPort.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -53,32 +53,32 @@
     private ReuseDefaultPort() { }
 
     public static void main(String[] args) throws Exception {
-	System.err.println("\nRegression test for bug 6269166\n");
-	RMISocketFactory.setSocketFactory(new SF());
-	Remote impl = new ReuseDefaultPort();
-	Remote stub = UnicastRemoteObject.exportObject(impl, 0);
-	System.err.println("- exported object: " + stub);
-	try {
-	    Registry registry = LocateRegistry.createRegistry(PORT);
-	    System.err.println("- exported registry: " + registry);
-	    System.err.println("TEST PASSED");
-	} finally {
-	    UnicastRemoteObject.unexportObject(impl, true);
-	}
+        System.err.println("\nRegression test for bug 6269166\n");
+        RMISocketFactory.setSocketFactory(new SF());
+        Remote impl = new ReuseDefaultPort();
+        Remote stub = UnicastRemoteObject.exportObject(impl, 0);
+        System.err.println("- exported object: " + stub);
+        try {
+            Registry registry = LocateRegistry.createRegistry(PORT);
+            System.err.println("- exported registry: " + registry);
+            System.err.println("TEST PASSED");
+        } finally {
+            UnicastRemoteObject.unexportObject(impl, true);
+        }
     }
 
     private static class SF extends RMISocketFactory {
-	private static RMISocketFactory defaultFactory =
-	    RMISocketFactory.getDefaultSocketFactory();
-	SF() { }
-	public Socket createSocket(String host, int port) throws IOException {
-	    return defaultFactory.createSocket(host, port);
-	}
-	public ServerSocket createServerSocket(int port) throws IOException {
-	    if (port == 0) {
-		port = PORT;
-	    }
-	    return defaultFactory.createServerSocket(port);
-	}
+        private static RMISocketFactory defaultFactory =
+            RMISocketFactory.getDefaultSocketFactory();
+        SF() { }
+        public Socket createSocket(String host, int port) throws IOException {
+            return defaultFactory.createSocket(host, port);
+        }
+        public ServerSocket createServerSocket(int port) throws IOException {
+            if (port == 0) {
+                port = PORT;
+            }
+            return defaultFactory.createServerSocket(port);
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -60,80 +60,80 @@
 
     public static void main(String[] args) {
 
-	System.err.println("\nRegression test for bug 4404702\n");
+        System.err.println("\nRegression test for bug 4404702\n");
 
-	/*
-	 * HACK: Work around the fact that java.util.logging.LogManager's
-	 * (singleton) construction also has this bug-- it will register a
-	 * "shutdown hook", i.e. a thread, which will inherit and pin the
-	 * current thread's context class loader for the lifetime of the VM--
-	 * by causing the LogManager to be initialized now, instead of by
-	 * RMI when our special context class loader is set.
-	 */
-	java.util.logging.LogManager.getLogManager();
+        /*
+         * HACK: Work around the fact that java.util.logging.LogManager's
+         * (singleton) construction also has this bug-- it will register a
+         * "shutdown hook", i.e. a thread, which will inherit and pin the
+         * current thread's context class loader for the lifetime of the VM--
+         * by causing the LogManager to be initialized now, instead of by
+         * RMI when our special context class loader is set.
+         */
+        java.util.logging.LogManager.getLogManager();
 
-	/*
-	 * HACK: Work around the fact that the non-native, thread-based
-	 * SecureRandom seed generator (ThreadedSeedGenerator) seems to
-	 * have this bug too (which had been causing this test to fail
-	 * when run with jtreg on Windows XP-- see 4910382).
-	 */
-	(new java.security.SecureRandom()).nextInt();
+        /*
+         * HACK: Work around the fact that the non-native, thread-based
+         * SecureRandom seed generator (ThreadedSeedGenerator) seems to
+         * have this bug too (which had been causing this test to fail
+         * when run with jtreg on Windows XP-- see 4910382).
+         */
+        (new java.security.SecureRandom()).nextInt();
 
-	RuntimeThreadInheritanceLeak obj = new RuntimeThreadInheritanceLeak();
+        RuntimeThreadInheritanceLeak obj = new RuntimeThreadInheritanceLeak();
 
-	try {
-	    ClassLoader loader = URLClassLoader.newInstance(new URL[0]);
-	    ReferenceQueue refQueue = new ReferenceQueue();
-	    Reference loaderRef = new WeakReference(loader, refQueue);
-	    System.err.println("created loader: " + loader);
+        try {
+            ClassLoader loader = URLClassLoader.newInstance(new URL[0]);
+            ReferenceQueue refQueue = new ReferenceQueue();
+            Reference loaderRef = new WeakReference(loader, refQueue);
+            System.err.println("created loader: " + loader);
 
-	    Thread.currentThread().setContextClassLoader(loader);
-	    UnicastRemoteObject.exportObject(obj);
-	    Thread.currentThread().setContextClassLoader(
-		ClassLoader.getSystemClassLoader());
-	    System.err.println(
-		"exported remote object with loader as context class loader");
+            Thread.currentThread().setContextClassLoader(loader);
+            UnicastRemoteObject.exportObject(obj);
+            Thread.currentThread().setContextClassLoader(
+                ClassLoader.getSystemClassLoader());
+            System.err.println(
+                "exported remote object with loader as context class loader");
 
-	    loader = null;
-	    System.err.println("nulled strong reference to loader");
+            loader = null;
+            System.err.println("nulled strong reference to loader");
 
-	    UnicastRemoteObject.unexportObject(obj, true);
-	    System.err.println("unexported remote object");
+            UnicastRemoteObject.unexportObject(obj, true);
+            System.err.println("unexported remote object");
 
-	    /*
-	     * HACK: Work around the fact that the sun.misc.GC daemon thread
-	     * also has this bug-- it will have inherited our loader as its
-	     * context class loader-- by giving it a chance to pass away.
-	     */
-	    Thread.sleep(2000);
-	    System.gc();
+            /*
+             * HACK: Work around the fact that the sun.misc.GC daemon thread
+             * also has this bug-- it will have inherited our loader as its
+             * context class loader-- by giving it a chance to pass away.
+             */
+            Thread.sleep(2000);
+            System.gc();
 
-	    System.err.println(
-		"waiting to be notified of loader being weakly reachable...");
-	    Reference dequeued = refQueue.remove(TIMEOUT);
-	    if (dequeued == null) {
-		System.err.println(
-		    "TEST FAILED: loader not deteced weakly reachable");
-		dumpThreads();
-		throw new RuntimeException(
-		    "TEST FAILED: loader not detected weakly reachable");
-	    }
+            System.err.println(
+                "waiting to be notified of loader being weakly reachable...");
+            Reference dequeued = refQueue.remove(TIMEOUT);
+            if (dequeued == null) {
+                System.err.println(
+                    "TEST FAILED: loader not deteced weakly reachable");
+                dumpThreads();
+                throw new RuntimeException(
+                    "TEST FAILED: loader not detected weakly reachable");
+            }
 
-	    System.err.println(
-		"TEST PASSED: loader detected weakly reachable");
-	    dumpThreads();
+            System.err.println(
+                "TEST PASSED: loader detected weakly reachable");
+            dumpThreads();
 
-	} catch (RuntimeException e) {
-	    throw e;
-	} catch (Exception e) {
-	    throw new RuntimeException("TEST FAILED: unexpected exception", e);
-	} finally {
-	    try {
-		UnicastRemoteObject.unexportObject(obj, true);
-	    } catch (RemoteException e) {
-	    }
-	}
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new RuntimeException("TEST FAILED: unexpected exception", e);
+        } finally {
+            try {
+                UnicastRemoteObject.unexportObject(obj, true);
+            } catch (RemoteException e) {
+            }
+        }
     }
 
     /**
@@ -141,19 +141,19 @@
      * including their context class loaders.
      **/
     private static void dumpThreads() {
-	System.err.println(
-	    "current live threads and their context class loaders:");
-	Map threads = Thread.getAllStackTraces();
-	for (Iterator iter = threads.entrySet().iterator(); iter.hasNext();) {
-	    Map.Entry e = (Map.Entry) iter.next();
-	    Thread t = (Thread) e.getKey();
-	    System.err.println("  thread: " + t);
-	    System.err.println("  context class loader: " +
-			       t.getContextClassLoader());	    
-	    StackTraceElement[] trace = (StackTraceElement[]) e.getValue();
-	    for (int i = 0; i < trace.length; i++) {
-		System.err.println("    " + trace[i]);
-	    }
-	}
+        System.err.println(
+            "current live threads and their context class loaders:");
+        Map threads = Thread.getAllStackTraces();
+        for (Iterator iter = threads.entrySet().iterator(); iter.hasNext();) {
+            Map.Entry e = (Map.Entry) iter.next();
+            Thread t = (Thread) e.getKey();
+            System.err.println("  thread: " + t);
+            System.err.println("  context class loader: " +
+                               t.getContextClassLoader());
+            StackTraceElement[] trace = (StackTraceElement[]) e.getValue();
+            for (int i = 0; i < trace.length; i++) {
+                System.err.println("    " + trace[i]);
+            }
+        }
     }
 }
--- a/jdk/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak_Stub.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/java/rmi/transport/runtimeThreadInheritanceLeak/RuntimeThreadInheritanceLeak_Stub.java	Sun May 04 07:05:42 2008 -0700
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -29,10 +29,10 @@
     implements java.rmi.Remote
 {
     private static final long serialVersionUID = 2;
-    
+
     // constructors
     public RuntimeThreadInheritanceLeak_Stub(java.rmi.server.RemoteRef ref) {
-	super(ref);
+        super(ref);
     }
-    
+
 }
--- a/jdk/test/javax/crypto/Cipher/TestGetInstance.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/javax/crypto/Cipher/TestGetInstance.java	Sun May 04 07:05:42 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2003-2008 Sun Microsystems, Inc.  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
@@ -46,9 +46,7 @@
 
         Cipher c;
 
-        c = Cipher.getInstance("des");
-        same(p, c.getProvider());
-        c = Cipher.getInstance("des/cbc/pkcs5padding");
+        c = Cipher.getInstance("PBEWithMD5AndTripleDES");
         same(p, c.getProvider());
 
         c = Cipher.getInstance("des", "SunJCE");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/management/modelmbean/LoggingExceptionTest.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,81 @@
+/*
+ * @test
+ * @bug 6471865 6675768
+ * @summary DescriptorSupport constructors throw IAE when traces are enabled;
+ * RequiredModelMBean.addAttributeChangeNotificationListener throws exception
+ * when traces enabled and no attributes.
+ * @author Luis-Miguel Alventosa
+ * @author Paul Cheeseman
+ */
+
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.management.Notification;
+import javax.management.NotificationListener;
+import javax.management.modelmbean.DescriptorSupport;
+import javax.management.modelmbean.RequiredModelMBean;
+
+public class LoggingExceptionTest {
+    private static final String tests[] = new String[] {
+        "DescriptorSupport()",
+        "DescriptorSupport(int)",
+        "DescriptorSupport(String)",
+        "DescriptorSupport(String...)",
+        "DescriptorSupport(String[], Object[])",
+        "DescriptorSupport(DescriptorSupport)",
+        "RequiredModelMBean.addAttributeChangeNotificationListener",
+    };
+    public static void main(String[] args) {
+        Handler handler = new ConsoleHandler();
+        Logger logger = Logger.getLogger("javax.management.modelmbean");
+        logger.addHandler(handler);
+        logger.setLevel(Level.FINEST);
+        try {
+            for (int i = 0; i < tests.length; i++) {
+                System.out.println(">>> DescriptorSupportLoggingTest: Test Case " + i);
+                DescriptorSupport ds;
+                String msg = "Instantiate " + tests[i];
+                System.out.println(msg);
+                switch (i) {
+                    case 0:
+                        ds = new DescriptorSupport();
+                        break;
+                    case 1:
+                        ds = new DescriptorSupport(10);
+                        break;
+                    case 2:
+                        ds = new DescriptorSupport(new DescriptorSupport().toXMLString());
+                        break;
+                    case 3:
+                        ds = new DescriptorSupport("name1=value1", "name2=value2");
+                        break;
+                    case 4:
+                        ds = new DescriptorSupport(new String[] {"name"}, new Object[] {"value"});
+                        break;
+                    case 5:
+                        ds = new DescriptorSupport(new DescriptorSupport());
+                        break;
+                    case 6:
+                        RequiredModelMBean mbean = new RequiredModelMBean();
+                        NotificationListener nl = new NotificationListener() {
+                            public void handleNotification(Notification notification,
+                                                           Object handback) {}
+                        };
+                        mbean.addAttributeChangeNotificationListener(nl, null, null);
+                        break;
+                    default:
+                        throw new AssertionError();
+                }
+                System.out.println(msg + " OK");
+            }
+        } catch (Exception e) {
+            System.out.println("Got unexpected exception = " + e);
+            String msg = "Test FAILED!";
+            System.out.println(msg);
+            throw new IllegalArgumentException(msg);
+        }
+        System.out.println("Test PASSED!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/management/query/QueryNotifFilterTest.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,347 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test QueryNotifFilterTest
+ * @bug 6610917
+ * @summary Test the QueryNotificationFilter class
+ * @author Eamonn McManus
+ */
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.management.Attribute;
+import javax.management.AttributeChangeNotification;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.Notification;
+import javax.management.NotificationFilter;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryEval;
+import javax.management.QueryExp;
+import javax.management.QueryNotificationFilter;
+
+public class QueryNotifFilterTest {
+    private static class Case {
+        final Notification notif;
+        final QueryExp query;
+        final boolean expect;
+        final Class<? extends Notification> notifClass;
+        Case(Notification notif, String query, boolean expect) {
+            this(notif, query, notif.getClass(), expect);
+        }
+        Case(Notification notif, String query,
+                Class<? extends Notification> notifClass, boolean expect) {
+            this(notif, Query.fromString(query), notifClass, expect);
+        }
+        Case(Notification notif, QueryExp query, boolean expect) {
+            this(notif, query, notif.getClass(), expect);
+        }
+        Case(Notification notif, QueryExp query,
+                Class<? extends Notification> notifClass, boolean expect) {
+            this.notif = notif;
+            this.query = query;
+            this.expect = expect;
+            this.notifClass = notifClass;
+        }
+    }
+
+    /* In principle users can create their own implementations of QueryExp
+     * and use them with QueryNotificationFilter.  If they do so, then
+     * they can call any MBeanServer method.  Not all of those methods
+     * will work with the special MBeanServer we concoct to analyze a
+     * Notification, but some will, including some that are not called
+     * by the standard queries.  So we check each of those cases too.
+     */
+    private static class ExoticCase {
+        final Notification trueNotif;
+        final Notification falseNotif;
+        final QueryExp query;
+        ExoticCase(Notification trueNotif, Notification falseNotif, QueryExp query) {
+            this.trueNotif = trueNotif;
+            this.falseNotif = falseNotif;
+            this.query = query;
+        }
+    }
+
+    private static abstract class ExoticQuery
+            extends QueryEval implements QueryExp {
+        private final String queryString;
+        ExoticQuery(String queryString) {
+            this.queryString = queryString;
+        }
+        abstract boolean apply(MBeanServer mbs, ObjectName name) throws Exception;
+        @Override
+        public boolean apply(ObjectName name) {
+            try {
+                return apply(getMBeanServer(), name);
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                return false;
+            }
+        }
+        @Override
+        public String toString() {
+            return queryString;
+        }
+    }
+
+    private static ObjectName makeObjectName(String s) {
+        try {
+            return new ObjectName(s);
+        } catch (MalformedObjectNameException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static class CustomNotification extends Notification {
+        public CustomNotification(String type, Object source, long seqNo) {
+            super(type, source, seqNo);
+        }
+
+        public String getName() {
+            return "claude";
+        }
+
+        public boolean isInteresting() {
+            return true;
+        }
+    }
+
+    private static final Notification simpleNotif =
+            new Notification("mytype", "source", 0L);
+    private static final Notification attrChangeNotif =
+            new AttributeChangeNotification(
+                    "x", 0L, 0L, "msg", "AttrName", "int", 2, 3);
+    private static final ObjectName testObjectName = makeObjectName("a:b=c");
+    private static final Notification sourcedNotif =
+            new Notification("mytype", testObjectName, 0L);
+    private static final Notification customNotif =
+            new CustomNotification("mytype", testObjectName, 0L);
+
+    private static final Case[] testCases = {
+        new Case(simpleNotif, "Type = 'mytype'", true),
+        new Case(simpleNotif, "Type = 'mytype'",
+                Notification.class, true),
+        new Case(simpleNotif, "Type = 'mytype'",
+                AttributeChangeNotification.class, false),
+        new Case(simpleNotif, "Type != 'mytype'", false),
+        new Case(simpleNotif, "Type = 'somethingelse'", false),
+        new Case(attrChangeNotif, "AttributeName = 'AttrName'", true),
+        new Case(attrChangeNotif,
+                "instanceof 'javax.management.AttributeChangeNotification'",
+                true),
+        new Case(attrChangeNotif,
+                "instanceof 'javax.management.Notification'",
+                true),
+        new Case(attrChangeNotif,
+                "instanceof 'javax.management.relation.MBeanServerNotification'",
+                false),
+        new Case(attrChangeNotif,
+                "class = 'javax.management.AttributeChangeNotification'",
+                true),
+        new Case(attrChangeNotif,
+                "javax.management.AttributeChangeNotification#AttributeName = 'AttrName'",
+                true),
+        new Case(sourcedNotif,
+                testObjectName,
+                true),
+        new Case(sourcedNotif,
+                makeObjectName("a*:b=*"),
+                true),
+        new Case(sourcedNotif,
+                makeObjectName("a*:c=*"),
+                false),
+        new Case(customNotif, "Name = 'claude'", true),
+        new Case(customNotif, "Name = 'tiddly'", false),
+        new Case(customNotif, "Interesting = true", true),
+        new Case(customNotif, "Interesting = false", false),
+    };
+
+    private static final ExoticCase[] exoticTestCases = {
+        new ExoticCase(
+                simpleNotif, new Notification("notmytype", "source", 0L),
+                new ExoticQuery("getAttributes") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        List<Attribute> attrs = mbs.getAttributes(
+                                name, new String[] {"Type", "Source"}).asList();
+                        return (attrs.get(0).equals(new Attribute("Type", "mytype")) &&
+                                attrs.get(1).equals(new Attribute("Source", "source")));
+                    }
+                }),
+        new ExoticCase(
+                new Notification("mytype", "source", 0L) {},
+                simpleNotif,
+                new ExoticQuery("getClassLoaderFor") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        return (mbs.getClassLoaderFor(name) ==
+                                this.getClass().getClassLoader());
+                    }
+                }),
+        new ExoticCase(
+                sourcedNotif, simpleNotif,
+                new ExoticQuery("getDomains") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        return Arrays.equals(mbs.getDomains(),
+                                new String[] {testObjectName.getDomain()});
+                    }
+                }),
+        new ExoticCase(
+                simpleNotif, attrChangeNotif,
+                new ExoticQuery("getMBeanInfo") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        MBeanInfo mbi = mbs.getMBeanInfo(name);
+                        // If we ever add a constructor to Notification then
+                        // we will have to change the 4 below.
+                        if (mbi.getOperations().length > 0 ||
+                                mbi.getConstructors().length != 4 ||
+                                mbi.getNotifications().length > 0)
+                            return false;
+                        Set<String> expect = new HashSet<String>(
+                            Arrays.asList(
+                                "Class", "Message", "SequenceNumber", "Source",
+                                "TimeStamp", "Type", "UserData"));
+                        Set<String> actual = new HashSet<String>();
+                        for (MBeanAttributeInfo mbai : mbi.getAttributes())
+                            actual.add(mbai.getName());
+                        return actual.equals(expect);
+                    }
+                }),
+        new ExoticCase(
+                simpleNotif, attrChangeNotif,
+                new ExoticQuery("getObjectInstance") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        ObjectInstance oi = mbs.getObjectInstance(name);
+                        return oi.getClassName().equals(Notification.class.getName());
+                    }
+                }),
+        new ExoticCase(
+                sourcedNotif, simpleNotif,
+                new ExoticQuery("queryNames") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        Set<ObjectName> names = mbs.queryNames(null,
+                                Query.eq(Query.attr("Type"), Query.value("mytype")));
+                        return names.equals(Collections.singleton(testObjectName));
+                    }
+                }),
+        new ExoticCase(
+                sourcedNotif, simpleNotif,
+                new ExoticQuery("queryMBeans") {
+                    boolean apply(MBeanServer mbs, ObjectName name)
+                            throws Exception {
+                        Set<ObjectInstance> insts = mbs.queryMBeans(null,
+                                Query.eq(Query.attr("Type"), Query.value("mytype")));
+                        if (insts.size() != 1)
+                            return false;
+                        ObjectInstance inst = insts.iterator().next();
+                        return (inst.getObjectName().equals(testObjectName) &&
+                                inst.getClassName().equals(Notification.class.getName()));
+                    }
+                }),
+    };
+
+    private static enum Test {
+        QUERY_EXP("query"), STRING("string"), STRING_PLUS_CLASS("string with class");
+        private final String name;
+        Test(String name) {
+            this.name = name;
+        }
+        @Override
+        public String toString() {
+            return name;
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        boolean allok = true;
+        for (Case testCase : testCases) {
+            for (Test test : Test.values()) {
+                QueryNotificationFilter nf;
+                String queryString;
+                switch (test) {
+                case QUERY_EXP: {
+                    QueryExp inst = Query.isInstanceOf(
+                            Query.value(testCase.notifClass.getName()));
+                    QueryExp and = Query.and(inst, testCase.query);
+                    queryString = Query.toString(and);
+                    nf = new QueryNotificationFilter(and);
+                    break;
+                }
+                case STRING: {
+                    String s = "instanceof '" + testCase.notifClass.getName() + "'";
+                    queryString = s + " and " + Query.toString(testCase.query);
+                    nf = new QueryNotificationFilter(queryString);
+                    break;
+                }
+                case STRING_PLUS_CLASS:
+                    queryString = null;
+                    nf = new QueryNotificationFilter(
+                            testCase.notifClass, Query.toString(testCase.query));
+                    break;
+                default:
+                    throw new AssertionError();
+                }
+                boolean accept = nf.isNotificationEnabled(testCase.notif);
+                if (queryString != null) {
+                    queryString = Query.toString(Query.fromString(queryString));
+                    if (!queryString.equals(Query.toString(nf.getQuery()))) {
+                        System.out.println("FAIL: query string mismatch: expected " +
+                                "\"" + queryString + "\", got \"" +
+                                Query.toString(nf.getQuery()));
+                        allok = false;
+                    }
+                }
+                boolean ok = (accept == testCase.expect);
+                System.out.println((ok ? "pass" : "FAIL") + ": " +
+                        testCase.query + " (" + test + ")");
+                allok &= ok;
+            }
+        }
+        for (ExoticCase testCase : exoticTestCases) {
+            NotificationFilter nf = new QueryNotificationFilter(testCase.query);
+            for (boolean expect : new boolean[] {true, false}) {
+                Notification n = expect ? testCase.trueNotif : testCase.falseNotif;
+                boolean accept = nf.isNotificationEnabled(n);
+                boolean ok = (accept == expect);
+                System.out.println((ok ? "pass" : "FAIL") + ": " +
+                        testCase.query + ": " + n);
+                allok &= ok;
+            }
+        }
+        if (!allok)
+            throw new Exception("TEST FAILED");
+    }
+}
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetClassInitializationTime {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_TIME_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java	Sun May 04 07:05:42 2008 -0700
@@ -39,7 +39,7 @@
 public class GetClassLoadingTime {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_TIME_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetInitializedClassCount {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetLoadedClassSize {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetMethodDataSize {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetUnloadedClassSize {
 
     private static HotspotClassLoadingMBean mbean =
-        (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
 
     // Careful with these values.
     private static final long MIN_VALUE_FOR_PASS = 0;
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetSafepointCount {
 
     private static HotspotRuntimeMBean mbean =
-        (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+        (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
 
     private static final long NUM_THREAD_DUMPS = 5;
 
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetSafepointSyncTime {
 
     private static HotspotRuntimeMBean mbean =
-        (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+        (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
 
     private static final long NUM_THREAD_DUMPS = 300;
 
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java	Sun May 04 07:05:42 2008 -0700
@@ -37,7 +37,7 @@
 public class GetTotalSafepointTime {
 
     private static HotspotRuntimeMBean mbean =
-        (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+        (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
 
     private static final long NUM_THREAD_DUMPS = 100;
 
--- a/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java	Sun May 04 07:05:42 2008 -0700
@@ -32,10 +32,11 @@
 import sun.management.*;
 import java.util.*;
 import java.lang.management.ThreadMXBean;
+import java.lang.management.ManagementFactory;
 
 public class GetInternalThreads {
     private static HotspotThreadMBean mbean =
-        ManagementFactory.getHotspotThreadMBean();
+        ManagementFactoryHelper.getHotspotThreadMBean();
 
     // Minimum number of VM internal threads
     //   VM thread, watcher thread, Low memory detector, compiler thread
@@ -55,7 +56,7 @@
         System.out.println("Internal Thread Count = " + value);
 
         ThreadMXBean thread =
-            java.lang.management.ManagementFactory.getThreadMXBean();
+            ManagementFactory.getThreadMXBean();
         if (!thread.isThreadCpuTimeSupported()) {
             System.out.println("Thread Cpu Time is not supported.");
             return;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipherWrap.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6572331
+ * @summary basic test for RSA cipher key wrapping functionality
+ * @author Valerie Peng
+ * @library ..
+ */
+import java.io.*;
+import java.util.*;
+
+import java.security.*;
+
+import javax.crypto.*;
+import javax.crypto.spec.SecretKeySpec;
+
+public class TestRSACipherWrap extends PKCS11Test {
+
+    private static final String RSA_ALGO = "RSA/ECB/PKCS1Padding";
+
+    public void main(Provider p) throws Exception {
+        try {
+            Cipher.getInstance(RSA_ALGO, p);
+        } catch (GeneralSecurityException e) {
+            System.out.println("Not supported by provider, skipping");
+            return;
+        }
+        KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p);
+        kpg.initialize(1024);
+        KeyPair kp = kpg.generateKeyPair();
+        PublicKey publicKey = kp.getPublic();
+        PrivateKey privateKey = kp.getPrivate();
+
+        Cipher cipherPKCS11 = Cipher.getInstance(RSA_ALGO, p);
+        Cipher cipherJce = Cipher.getInstance(RSA_ALGO, "SunJCE");
+
+        String algos[] = {"AES", "RC2", "Blowfish"};
+        int keySizes[] = {128, 256};
+
+        for (int j = 0; j < algos.length; j++) {
+            String algorithm = algos[j];
+            KeyGenerator keygen =
+                    KeyGenerator.getInstance(algorithm);
+
+            for (int i = 0; i < keySizes.length; i++) {
+                SecretKey secretKey = null;
+                System.out.print("Generate " + keySizes[i] + "-bit " +
+                        algorithm + " key using ");
+                try {
+                    keygen.init(keySizes[i]);
+                    secretKey = keygen.generateKey();
+                    System.out.println(keygen.getProvider().getName());
+                } catch (InvalidParameterException ipe) {
+                    secretKey = new SecretKeySpec(new byte[32], algorithm);
+                    System.out.println("SecretKeySpec class");
+                }
+                test(kp, secretKey, cipherPKCS11, cipherJce);
+                test(kp, secretKey, cipherPKCS11, cipherPKCS11);
+                test(kp, secretKey, cipherJce, cipherPKCS11);
+            }
+        }
+    }
+
+    private static void test(KeyPair kp, SecretKey secretKey,
+            Cipher wrapCipher, Cipher unwrapCipher)
+            throws Exception {
+        String algo = secretKey.getAlgorithm();
+        wrapCipher.init(Cipher.WRAP_MODE, kp.getPublic());
+        byte[] wrappedKey = wrapCipher.wrap(secretKey);
+        unwrapCipher.init(Cipher.UNWRAP_MODE, kp.getPrivate());
+        Key unwrappedKey =
+                unwrapCipher.unwrap(wrappedKey, algo, Cipher.SECRET_KEY);
+
+        System.out.println("Test " + wrapCipher.getProvider().getName() +
+                "/" + unwrapCipher.getProvider().getName() + ": ");
+        if (!Arrays.equals(secretKey.getEncoded(),
+                unwrappedKey.getEncoded())) {
+            throw new Exception("Test Failed!");
+        }
+        System.out.println("Passed");
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestRSACipherWrap());
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,282 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 modi
+fy it
+ * under the terms of the GNU General Public License version 2 onl
+y, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, bu
+t WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABIL
+ITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public L
+icense
+ * version 2 for more details (a copy is included in the LICENSE f
+ile that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public Licen
+se version
+ * 2 along with this work; if not, write to the Free Software Foun
+dation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, San
+ta Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional inform
+ation or
+ * have any questions.
+ */
+
+/**
+ * @test %I% %E%
+ * @bug 4898461
+ * @summary basic test for symmetric ciphers with padding
+ * @author Valerie Peng
+ * @library ..
+ */
+import java.io.*;
+import java.nio.*;
+import java.util.*;
+
+import java.security.*;
+import java.security.spec.AlgorithmParameterSpec;
+
+import javax.crypto.*;
+import javax.crypto.spec.IvParameterSpec;
+
+public class TestSymmCiphers extends PKCS11Test {
+
+    private static class CI { // class for holding Cipher Information
+
+        String transformation;
+        String keyAlgo;
+        int dataSize;
+
+        CI(String transformation, String keyAlgo, int dataSize) {
+            this.transformation = transformation;
+            this.keyAlgo = keyAlgo;
+            this.dataSize = dataSize;
+        }
+    }
+    private static final CI[] TEST_LIST = {
+        new CI("ARCFOUR", "ARCFOUR", 400),
+        new CI("RC4", "RC4", 401),
+        new CI("DES/CBC/NoPadding", "DES", 400),
+        new CI("DESede/CBC/NoPadding", "DESede", 160),
+        new CI("AES/CBC/NoPadding", "AES", 4800),
+        new CI("Blowfish/CBC/NoPadding", "Blowfish", 24),
+        new CI("DES/cbc/PKCS5Padding", "DES", 6401),
+        new CI("DESede/CBC/PKCS5Padding", "DESede", 402),
+        new CI("AES/CBC/PKCS5Padding", "AES", 30),
+        new CI("Blowfish/CBC/PKCS5Padding", "Blowfish", 19),
+        new CI("DES/ECB/NoPadding", "DES", 400),
+        new CI("DESede/ECB/NoPadding", "DESede", 160),
+        new CI("AES/ECB/NoPadding", "AES", 4800),
+        new CI("DES/ECB/PKCS5Padding", "DES", 32),
+        new CI("DES/ECB/PKCS5Padding", "DES", 6400),
+        new CI("DESede/ECB/PKCS5Padding", "DESede", 400),
+        new CI("AES/ECB/PKCS5Padding", "AES", 64),
+        new CI("DES", "DES", 6400),
+        new CI("DESede", "DESede", 408),
+        new CI("AES", "AES", 128)
+    };
+    private static StringBuffer debugBuf = new StringBuffer();
+
+    public void main(Provider p) throws Exception {
+        // NSS reports CKR_DEVICE_ERROR when the data passed to
+        // its EncryptUpdate/DecryptUpdate is not multiple of blocks
+        int firstBlkSize = 16;
+        boolean status = true;
+        Random random = new Random();
+        try {
+            for (int i = 0; i < TEST_LIST.length; i++) {
+                CI currTest = TEST_LIST[i];
+                System.out.println("===" + currTest.transformation + "===");
+                try {
+                    KeyGenerator kg =
+                            KeyGenerator.getInstance(currTest.keyAlgo, p);
+                    SecretKey key = kg.generateKey();
+                    Cipher c1 = Cipher.getInstance(currTest.transformation, p);
+                    Cipher c2 = Cipher.getInstance(currTest.transformation,
+                            "SunJCE");
+
+                    byte[] plainTxt = new byte[currTest.dataSize];
+                    random.nextBytes(plainTxt);
+                    System.out.println("Testing inLen = " + plainTxt.length);
+
+                    c2.init(Cipher.ENCRYPT_MODE, key);
+                    AlgorithmParameters params = c2.getParameters();
+                    byte[] answer = c2.doFinal(plainTxt);
+                    System.out.println("Encryption tests: START");
+                    test(c1, Cipher.ENCRYPT_MODE, key, params, firstBlkSize,
+                            plainTxt, answer);
+                    System.out.println("Encryption tests: DONE");
+                    c2.init(Cipher.DECRYPT_MODE, key, params);
+                    byte[] answer2 = c2.doFinal(answer);
+                    System.out.println("Decryption tests: START");
+                    test(c1, Cipher.DECRYPT_MODE, key, params, firstBlkSize,
+                            answer, answer2);
+                    System.out.println("Decryption tests: DONE");
+                } catch (NoSuchAlgorithmException nsae) {
+                    System.out.println("Skipping unsupported algorithm: " +
+                            nsae);
+                }
+            }
+        } catch (Exception ex) {
+            // print out debug info when exception is encountered
+            if (debugBuf != null) {
+                System.out.println(debugBuf.toString());
+                debugBuf = new StringBuffer();
+            }
+            throw ex;
+        }
+    }
+
+    private static void test(Cipher cipher, int mode, SecretKey key,
+            AlgorithmParameters params, int firstBlkSize,
+            byte[] in, byte[] answer) throws Exception {
+        // test setup
+        long startTime, endTime;
+        cipher.init(mode, key, params);
+        int outLen = cipher.getOutputSize(in.length);
+        //debugOut("Estimated output size = " + outLen + "\n");
+
+        // test data preparation
+        ByteBuffer inBuf = ByteBuffer.allocate(in.length);
+        inBuf.put(in);
+        inBuf.position(0);
+        ByteBuffer inDirectBuf = ByteBuffer.allocateDirect(in.length);
+        inDirectBuf.put(in);
+        inDirectBuf.position(0);
+        ByteBuffer outBuf = ByteBuffer.allocate(outLen);
+        ByteBuffer outDirectBuf = ByteBuffer.allocateDirect(outLen);
+
+        // test#1: byte[] in + byte[] out
+        //debugOut("Test#1:\n");
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        startTime = System.nanoTime();
+        byte[] temp = cipher.update(in, 0, firstBlkSize);
+        if (temp != null && temp.length > 0) {
+            baos.write(temp, 0, temp.length);
+        }
+        temp = cipher.doFinal(in, firstBlkSize, in.length - firstBlkSize);
+        if (temp != null && temp.length > 0) {
+            baos.write(temp, 0, temp.length);
+        }
+        byte[] testOut1 = baos.toByteArray();
+        endTime = System.nanoTime();
+        perfOut("stream InBuf + stream OutBuf: " +
+                (endTime - startTime));
+        match(testOut1, answer);
+
+        // test#2: Non-direct Buffer in + non-direct Buffer out
+        //debugOut("Test#2:\n");
+        //debugOut("inputBuf: " + inBuf + "\n");
+        //debugOut("outputBuf: " + outBuf + "\n");
+
+        startTime = System.nanoTime();
+        cipher.update(inBuf, outBuf);
+        cipher.doFinal(inBuf, outBuf);
+        endTime = System.nanoTime();
+        perfOut("non-direct InBuf + non-direct OutBuf: " +
+                (endTime - startTime));
+        match(outBuf, answer);
+
+        // test#3: Direct Buffer in + direc Buffer out
+        //debugOut("Test#3:\n");
+        //debugOut("(pre) inputBuf: " + inDirectBuf + "\n");
+        //debugOut("(pre) outputBuf: " + outDirectBuf + "\n");
+
+        startTime = System.nanoTime();
+        cipher.update(inDirectBuf, outDirectBuf);
+        cipher.doFinal(inDirectBuf, outDirectBuf);
+        endTime = System.nanoTime();
+        perfOut("direct InBuf + direct OutBuf: " +
+                (endTime - startTime));
+
+        //debugOut("(post) inputBuf: " + inDirectBuf + "\n");
+        //debugOut("(post) outputBuf: " + outDirectBuf + "\n");
+        match(outDirectBuf, answer);
+
+        // test#4: Direct Buffer in + non-direct Buffer out
+        //debugOut("Test#4:\n");
+        inDirectBuf.position(0);
+        outBuf.position(0);
+        //debugOut("inputBuf: " + inDirectBuf + "\n");
+        //debugOut("outputBuf: " + outBuf + "\n");
+
+        startTime = System.nanoTime();
+        cipher.update(inDirectBuf, outBuf);
+        cipher.doFinal(inDirectBuf, outBuf);
+        endTime = System.nanoTime();
+        perfOut("direct InBuf + non-direct OutBuf: " +
+                (endTime - startTime));
+        match(outBuf, answer);
+
+        // test#5: Non-direct Buffer in + direct Buffer out
+        //debugOut("Test#5:\n");
+        inBuf.position(0);
+        outDirectBuf.position(0);
+
+        //debugOut("(pre) inputBuf: " + inBuf + "\n");
+        //debugOut("(pre) outputBuf: " + outDirectBuf + "\n");
+
+        startTime = System.nanoTime();
+        cipher.update(inBuf, outDirectBuf);
+        cipher.doFinal(inBuf, outDirectBuf);
+        endTime = System.nanoTime();
+        perfOut("non-direct InBuf + direct OutBuf: " +
+                (endTime - startTime));
+
+        //debugOut("(post) inputBuf: " + inBuf + "\n");
+        //debugOut("(post) outputBuf: " + outDirectBuf + "\n");
+        match(outDirectBuf, answer);
+
+        debugBuf = null;
+    }
+
+    private static void perfOut(String msg) {
+        if (debugBuf != null) {
+            debugBuf.append("PERF>" + msg);
+        }
+    }
+
+    private static void debugOut(String msg) {
+        if (debugBuf != null) {
+            debugBuf.append(msg);
+        }
+    }
+
+    private static void match(byte[] b1, byte[] b2) throws Exception {
+        if (b1.length != b2.length) {
+            debugOut("got len   : " + b1.length + "\n");
+            debugOut("expect len: " + b2.length + "\n");
+            throw new Exception("mismatch - different length! got: " + b1.length + ", expect: " + b2.length + "\n");
+        } else {
+            for (int i = 0; i < b1.length; i++) {
+                if (b1[i] != b2[i]) {
+                    debugOut("got   : " + toString(b1) + "\n");
+                    debugOut("expect: " + toString(b2) + "\n");
+                    throw new Exception("mismatch");
+                }
+            }
+        }
+    }
+
+    private static void match(ByteBuffer bb, byte[] answer) throws Exception {
+        byte[] bbTemp = new byte[bb.position()];
+        bb.position(0);
+        bb.get(bbTemp, 0, bbTemp.length);
+        match(bbTemp, answer);
+    }
+
+    public static void main(String[] args) throws Exception {
+        main(new TestSymmCiphers());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.io.*;
+import java.util.*;
+import java.lang.reflect.*;
+
+import java.security.*;
+import java.security.cert.*;
+import java.security.spec.*;
+import java.security.interfaces.*;
+import java.math.BigInteger;
+
+import javax.crypto.*;
+import javax.crypto.spec.*;
+
+public class SecretKeysBasic extends PKCS11Test {
+
+    private static final char SEP = File.separatorChar;
+    private static char[] tokenPwd;
+    private static final char[] nssPwd =
+            new char[]{'t', 'e', 's', 't', '1', '2'};
+    private static final char[] solarisPwd =
+            new char[]{'p', 'i', 'n'};
+    private static SecretKey sk1;
+    private static SecretKey sk2;
+    private static SecretKey softkey;
+    private static KeyStore ks;
+    private static final String KS_TYPE = "PKCS11";
+    private static Provider provider;
+
+    public static void main(String[] args) throws Exception {
+        main(new SecretKeysBasic());
+    }
+
+    public void main(Provider p) throws Exception {
+        this.provider = p;
+
+        // create secret key
+        byte[] keyVal = new byte[16];
+        (new SecureRandom()).nextBytes(keyVal);
+        // NSS will throw CKR_HOST_MEMORY if calling C_DecryptInit w/
+        // (keyVal[0] == 0)
+        if (keyVal[0] == 0) {
+            keyVal[0] = 1;
+        }
+        softkey = new SecretKeySpec(keyVal, "AES");
+        dumpKey("softkey", softkey);
+
+        KeyGenerator kg = KeyGenerator.getInstance("DESede", provider);
+        sk1 = kg.generateKey();
+        dumpKey("skey1", sk1);
+        sk2 = kg.generateKey();
+        dumpKey("skey2", sk2);
+
+        String token = System.getProperty("TOKEN");
+
+        if (token == null || token.length() == 0) {
+            System.out.println("Error: missing TOKEN system property");
+            throw new Exception("token arg required");
+        }
+
+        if ("nss".equals(token)) {
+            tokenPwd = nssPwd;
+        } else if ("solaris".equals(token)) {
+            tokenPwd = solarisPwd;
+        }
+
+        int testnum = 1;
+        doTest();
+    }
+
+    private static boolean checkSecretKeyEntry(String alias,
+            SecretKey expected,
+            boolean saveBeforeCheck)
+            throws Exception {
+        if (saveBeforeCheck) {
+            ks.setKeyEntry(alias, expected, null, null);
+        }
+        SecretKey result = (SecretKey) (ks.getKey(alias, null));
+        String keyEncFormat = result.getFormat();
+        if (keyEncFormat == null) {
+            // sensitive or un-extractable keys - verify by encrypt/decrypt
+            byte[] data = new byte[64];
+            Cipher c =
+                    Cipher.getInstance(result.getAlgorithm() + "/CBC/NoPadding",
+                    provider);
+            c.init(Cipher.ENCRYPT_MODE, expected);
+            byte[] encOut = c.doFinal(data);
+            c.init(Cipher.DECRYPT_MODE, result, c.getParameters());
+            byte[] decOut = c.doFinal(encOut);
+            if (!Arrays.equals(data, decOut)) {
+                return false;
+            }
+        } else if (keyEncFormat.toUpperCase().equals("RAW")) {
+            if (!Arrays.equals(result.getEncoded(), expected.getEncoded())) {
+                dumpKey("\texpected:", expected);
+                dumpKey("\treturns:", result);
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private static void dumpKey(String info, SecretKey key) {
+        System.out.println(info + "> " + key);
+        System.out.println("\tALGO=" + key.getAlgorithm());
+        if (key.getFormat() != null) {
+            System.out.println("\t[" + key.getFormat() + "] VALUE=" +
+                    new BigInteger(key.getEncoded()));
+        } else {
+            System.out.println("\tVALUE=n/a");
+        }
+    }
+
+    private static void doTest() throws Exception {
+        if (ks == null) {
+            ks = KeyStore.getInstance(KS_TYPE, provider);
+            ks.load(null, tokenPwd);
+        }
+
+        System.out.println("Number of entries: " + ks.size());
+        if (ks.size() != 0) {
+            System.out.println("Deleting entries under aliases: ");
+            for (Enumeration<String> aliases = ks.aliases();
+                    aliases.hasMoreElements();) {
+                String alias = aliases.nextElement();
+                System.out.println("\t" + alias);
+                ks.deleteEntry(alias);
+            }
+        }
+
+        String alias = "testSKey";
+
+        boolean testResult = checkSecretKeyEntry(alias, softkey, true);
+        if (!testResult) {
+            System.out.println("FAILURE: setKey() w/ softSecretKey failed");
+        }
+
+        if (!checkSecretKeyEntry(alias, sk1, true)) {
+            testResult = false;
+            System.out.println("FAILURE: setKey() w/ skey1 failed");
+        }
+        if (!checkSecretKeyEntry(alias, sk2, true)) {
+            testResult = false;
+            System.out.println("FAILURE: setKey() w/ skey2 failed");
+        }
+
+        ks.store(null);
+        System.out.println("Reloading keystore...");
+
+        ks.load(null, "whatever".toCharArray());
+        if (ks.size() != 1) {
+            System.out.println("FAILURE: reload#1 ks.size() != 1");
+        }
+        if (!checkSecretKeyEntry(alias, sk2, false)) {
+            testResult = false;
+            System.out.println("FAILURE: reload#1 ks entry check failed");
+        }
+
+        ks.deleteEntry(alias);
+        ks.store(null);
+
+        System.out.println("Reloading keystore...");
+        ks.load(null, "whatever".toCharArray());
+        if (ks.size() != 0) {
+            testResult = false;
+            System.out.println("FAILURE: reload#2 ks.size() != 0");
+        }
+        if (!testResult) {
+            throw new Exception("One or more test failed!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,164 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+
+# @test
+# @bug 6599979
+# @summary Ensure that re-assigning the alias works
+#
+# @run shell SecretKeysBasic.sh
+#
+# To run by hand:
+#    %sh SecretKeysBasic.sh
+#
+# Note:
+#    . test only runs on solaris at the moment
+
+# set a few environment variables so that the shell-script can run stand-alone
+# in the source directory
+
+# if running by hand on windows, change TESTSRC and TESTCLASSES to "."
+if [ "${TESTSRC}" = "" ] ; then
+    TESTSRC=`pwd`
+fi
+if [ "${TESTCLASSES}" = "" ] ; then
+    TESTCLASSES=`pwd`
+fi
+
+# if running by hand on windows, change this to appropriate value
+if [ "${TESTJAVA}" = "" ] ; then
+    TESTJAVA="/net/shimmer/export/valeriep/jdk7/build/solaris-sparc"
+fi
+echo TESTSRC=${TESTSRC}
+echo TESTCLASSES=${TESTCLASSES}
+echo TESTJAVA=${TESTJAVA}
+echo ""
+
+#DEBUG=sunpkcs11,pkcs11keystore
+
+echo DEBUG=${DEBUG}
+echo ""
+
+OS=`uname -s`
+case "$OS" in
+  SunOS )
+    FS="/"
+    PS=":"
+    SCCS="${FS}usr${FS}ccs${FS}bin${FS}sccs"
+    CP="${FS}bin${FS}cp -f"
+    RM="${FS}bin${FS}rm -rf"
+    MKDIR="${FS}bin${FS}mkdir -p"
+    CHMOD="${FS}bin${FS}chmod"
+    ;;
+  * )
+    echo "Unsupported System ${OS} - Test only runs on Solaris"
+    exit 0;
+    ;;
+esac
+
+TOKENS="nss solaris"
+STATUS=0
+for token in ${TOKENS}
+do
+
+if [ ${token} = "nss" ]
+then
+    # make cert/key DBs writable if token is NSS
+    ${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}cert8.db ${TESTCLASSES}
+    ${CHMOD} +w ${TESTCLASSES}${FS}cert8.db
+
+    ${CP} ${TESTSRC}${FS}..${FS}nss${FS}db${FS}key3.db ${TESTCLASSES}
+    ${CHMOD} +w ${TESTCLASSES}${FS}key3.db
+    USED_FILE_LIST="${TESTCLASSES}${FS}cert8.db ${TESTCLASSES}${FS}key3.db"
+elif [ ${token} = "solaris" ]
+then
+    OS_VERSION=`uname -r`
+    case "${OS_VERSION}" in
+      5.1* )
+        SOFTTOKEN_DIR=${TESTCLASSES}
+        export SOFTTOKEN_DIR
+        ;;
+      * )
+        echo "Unsupported Version ${OS_VERSION} - Test only runs on Solaris"
+        exit 0;
+        ;;
+    esac
+
+    # copy keystore into write-able location
+    if [ -d ${TESTCLASSES}${FS}pkcs11_softtoken ]
+    then
+        echo "Removing old pkcs11_keystore, creating new pkcs11_keystore"
+
+        echo ${RM} ${TESTCLASSES}${FS}pkcs11_softtoken
+        ${RM} ${TESTCLASSES}${FS}pkcs11_softtoken
+    fi
+    echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}private
+    ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}private
+
+    echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
+    ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
+
+    echo ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
+	${TESTCLASSES}${FS}pkcs11_softtoken
+    ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
+	${TESTCLASSES}${FS}pkcs11_softtoken
+
+    echo ${CHMOD} +w ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
+    ${CHMOD} 600 ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
+    USED_FILE_LIST="${TESTCLASSES}${FS}pkcs11_softtoken"
+fi
+
+cd ${TESTCLASSES}
+${TESTJAVA}${FS}bin${FS}javac \
+        -classpath ${TESTCLASSES} \
+        -d ${TESTCLASSES} \
+        ${TESTSRC}${FS}SecretKeysBasic.java
+
+# run test
+cd ${TESTSRC}
+${TESTJAVA}${FS}bin${FS}java \
+	-DDIR=${TESTSRC}${FS}BasicData${FS} \
+        -classpath ${TESTCLASSES}${PS}${TESTSRC}${FS}loader.jar \
+        -DCUSTOM_DB_DIR=${TESTCLASSES} \
+        -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
+	-DNO_DEFAULT=true \
+	-DNO_DEIMOS=true \
+	-DTOKEN=${token} \
+	-Djava.security.debug=${DEBUG} \
+	SecretKeysBasic
+
+#	-DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
+
+# save error status
+if [ $? != 0 ]
+then
+    echo "Test against " ${token} " Failed!"
+    STATUS=1
+fi
+
+# clean up
+${RM} ${USED_FILE_LIST}
+
+done
+
+# return
+exit ${STATUS}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/CriticalSubjectAltName.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2001-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6668231
+ * @summary Presence of a critical subjectAltName causes JSSE's SunX509 to
+ *          fail trusted checks
+ * @author Xuelei Fan
+ *
+ * This test depends on binary keystore, crisubn.jks and trusted.jks. Because
+ * JAVA keytool cannot generate X509 certificate with SubjectAltName extension,
+ * the certificates are generated with openssl toolkits and then imported into
+ * JAVA keystore.
+ *
+ * The crisubn.jks holds a private key entry and the corresponding X509
+ * certificate issued with an empty Subject field, and a critical
+ * SubjectAltName extension.
+ *
+ * The trusted.jks holds the trusted certificate.
+ */
+import java.io.*;
+import java.net.*;
+import javax.net.ssl.*;
+import java.security.cert.Certificate;
+
+public class CriticalSubjectAltName implements HostnameVerifier {
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = true;
+
+    /*
+     * Where do we find the keystores?
+     */
+    static String pathToStores = "./";
+    static String keyStoreFile = "crisubn.jks";
+    static String trustStoreFile = "trusted.jks";
+    static String passwd = "passphrase";
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+
+    /*
+     * Turn on SSL debugging?
+     */
+    static boolean debug = false;
+
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide() throws Exception {
+        SSLServerSocketFactory sslssf =
+            (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+        serverPort = sslServerSocket.getLocalPort();
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+        OutputStream sslOS = sslSocket.getOutputStream();
+        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(sslOS));
+        bw.write("HTTP/1.1 200 OK\r\n\r\n\r\n");
+        bw.flush();
+        Thread.sleep(5000);
+        sslSocket.close();
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide() throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        URL url = new URL("https://localhost:"+serverPort+"/index.html");
+        HttpsURLConnection urlc = (HttpsURLConnection)url.openConnection();
+        urlc.setHostnameVerifier(this);
+        urlc.getInputStream();
+
+        if (urlc.getResponseCode() == -1) {
+            throw new RuntimeException("getResponseCode() returns -1");
+        }
+    }
+
+    /*
+     * =============================================================
+     * The remainder is just support stuff
+     */
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    public static void main(String[] args) throws Exception {
+        String keyFilename =
+            System.getProperty("test.src", "./") + "/" + pathToStores +
+                "/" + keyStoreFile;
+        String trustFilename =
+            System.getProperty("test.src", "./") + "/" + pathToStores +
+                "/" + trustStoreFile;
+
+        System.setProperty("javax.net.ssl.keyStore", keyFilename);
+        System.setProperty("javax.net.ssl.keyStorePassword", passwd);
+        System.setProperty("javax.net.ssl.trustStore", trustFilename);
+        System.setProperty("javax.net.ssl.trustStorePassword", passwd);
+
+        if (debug)
+            System.setProperty("javax.net.debug", "all");
+
+        /*
+         * Start the tests.
+         */
+        new CriticalSubjectAltName();
+    }
+
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    CriticalSubjectAltName() throws Exception {
+        if (separateServerThread) {
+            startServer(true);
+            startClient(false);
+        } else {
+            startClient(true);
+            startServer(false);
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            serverThread.join();
+        } else {
+            clientThread.join();
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         *
+         * If the main thread excepted, that propagates back
+         * immediately.  If the other thread threw an exception, we
+         * should report back.
+         */
+        if (serverException != null)
+            throw serverException;
+        if (clientException != null)
+            throw clientException;
+    }
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            doServerSide();
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            doClientSide();
+        }
+    }
+
+    // Simple test method to blindly agree that hostname and certname match
+    public boolean verify(String hostname, SSLSession session) {
+        return true;
+    }
+
+}
Binary file jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/crisubn.jks has changed
Binary file jdk/test/sun/security/ssl/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnection/trusted.jks has changed
--- a/jdk/test/tools/launcher/Arrrghs.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/tools/launcher/Arrrghs.java	Sun May 04 07:05:42 2008 -0700
@@ -1,17 +1,5 @@
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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,8 +21,19 @@
  * have any questions.
  */
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
 
-public class Arrrghs{
+public class Arrrghs {
 
     /**
      * A group of tests to ensure that arguments are passed correctly to
@@ -113,12 +112,10 @@
         return retval;
     }
 
-
-
     private static boolean doExec0(ProcessBuilder pb, String expectedArguments) {
         boolean retval = false;
         try {
-            pb.redirectErrorStream(_debug);
+            pb.redirectErrorStream(true);
             Process p = pb.start();
             retval = detectCookie(p.getInputStream(), expectedArguments);
             p.waitFor();
@@ -167,7 +164,6 @@
             }
         }
 
-
         if (_debug) System.out.println("Starting Arrrghs tests");
         // Basic test
         if (!doExec("-a -b -c -d")) exitValue++;
--- a/jdk/test/tools/launcher/Arrrghs.sh	Wed Apr 23 14:35:26 2008 +0400
+++ b/jdk/test/tools/launcher/Arrrghs.sh	Sun May 04 07:05:42 2008 -0700
@@ -1,13 +1,13 @@
 #!/bin/sh
 # @test Arrrghs.sh
-# @bug 5030233 6214916 6356475 6571029
+# @bug 5030233 6214916 6356475 6571029 6684582
 # @build Arrrghs
 # @run shell Arrrghs.sh
 # @summary Argument parsing validation.
 # @author Joseph E. Kowalski
 
 #
-# Copyright 2004-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2004-2008 Sun Microsystems, Inc.  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
@@ -104,6 +104,44 @@
 }
 
 #
+# Test to ensure that a missing main class is indicated in the error message
+#
+TestMissingMainClass() {
+	# First create a small jar file with no main
+        printf "public class Foo {}\n" > Foo.java
+	$TESTJAVA/bin/javac Foo.java
+	if [ $? -ne 0 ]; then
+		printf "Error: compilation of Foo.java failed\n" 
+ 		exit 1
+	fi
+	printf "Main-Class: Bar\n" > manifest
+	$TESTJAVA/bin/jar -cvfm some.jar manifest Foo.class
+	if [ ! -f some.jar ]; then
+		printf "Error: did not find some.jar\n" 
+ 		exit 1
+	fi
+
+	# test a non-existence main-class using -jar 
+	mess="`$TESTJAVA/bin/java -jar some.jar 2>&1 1>/dev/null`"
+	echo $mess | grep 'Bar' 2>&1 > /dev/null
+	if [ $? -ne 0 ]; then
+		printf "Error: did not find main class missing message\n"
+		exit 1
+	fi
+
+	# test a non-existent main-class using classpath
+	mess="`$TESTJAVA/bin/java -cp some.jar Bar 2>&1 1>/dev/null`"
+	echo $mess | grep 'Bar' 2>&1 > /dev/null
+	if [ $? -ne 0 ]; then
+		printf "Error: did not find main class missing message\n"
+		exit 1
+	fi
+
+	# cleanup
+	rm -f some.jar Foo.* manifest
+}
+
+#
 # Main processing:
 #
 
@@ -117,6 +155,7 @@
 TestCP javac -classpath
 TestXUsage
 TestHelp
+TestMissingMainClass
 
 #
 # Tests for 6214916
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/.hgtags	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,2 @@
+9a66ca7c79fab293c1bb0534e0d208c7e4f58b01 jdk7-b24
+58039502942e52f4144a33f36290a2bd2f3581e6 jdk7-b25
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/.jcheck/conf	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+project=jdk7
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java	Sun May 04 07:05:42 2008 -0700
@@ -194,7 +194,7 @@
             return map.get(option);
         }
 
-        private final String option;
+        public final String option;
     };
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Sun May 04 07:05:42 2008 -0700
@@ -25,13 +25,9 @@
 
 package com.sun.tools.javac.code;
 
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Set;
 import java.util.concurrent.Callable;
 import javax.lang.model.element.*;
-import javax.lang.model.type.ReferenceType;
-import javax.lang.model.type.TypeMirror;
 import javax.tools.JavaFileObject;
 
 import com.sun.tools.javac.util.*;
@@ -1272,8 +1268,14 @@
         private static final long serialVersionUID = 0;
         public Symbol sym;
 
+        /** A diagnostic object describing the failure
+         */
+        public JCDiagnostic diag;
+
         /** A localized string describing the failure.
+         * @deprecated Use {@code getDetail()} or {@code getMessage()}
          */
+        @Deprecated
         public String errmsg;
 
         public CompletionFailure(Symbol sym, String errmsg) {
@@ -1282,8 +1284,26 @@
 //          this.printStackTrace();//DEBUG
         }
 
+        public CompletionFailure(Symbol sym, JCDiagnostic diag) {
+            this.sym = sym;
+            this.diag = diag;
+//          this.printStackTrace();//DEBUG
+        }
+
+        public JCDiagnostic getDiagnostic() {
+            return diag;
+        }
+
+        @Override
         public String getMessage() {
-            return errmsg;
+            if (diag != null)
+                return diag.getMessage(null);
+            else
+                return errmsg;
+        }
+
+        public Object getDetailValue() {
+            return (diag != null ? diag : errmsg);
         }
 
         @Override
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Sun May 04 07:05:42 2008 -0700
@@ -1298,7 +1298,7 @@
                     return t;
 
                 Type st = supertype(t);
-                if (st.tag == CLASS || st.tag == ERROR) {
+                if (st.tag == CLASS || st.tag == TYPEVAR || st.tag == ERROR) {
                     Type x = asSuper(st, sym);
                     if (x != null)
                         return x;
@@ -1320,7 +1320,10 @@
 
             @Override
             public Type visitTypeVar(TypeVar t, Symbol sym) {
-                return asSuper(t.bound, sym);
+                if (t.tsym == sym)
+                    return t;
+                else
+                    return asSuper(t.bound, sym);
             }
 
             @Override
@@ -2483,7 +2486,7 @@
                 break;
             default:
                 if (t.isPrimitive())
-                    return syms.botType;
+                    return syms.errType;
             }
         }
         switch (boundkind) {
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Sun May 04 07:05:42 2008 -0700
@@ -465,12 +465,12 @@
                 types.setBounds(a, List.of(syms.objectType));
             }
         }
+    }
+
+    void attribBounds(List<JCTypeParameter> typarams, Env<AttrContext> env) {
         for (JCTypeParameter tvar : typarams)
             chk.checkNonCyclic(tvar.pos(), (TypeVar)tvar.type);
         attribStats(typarams, env);
-    }
-
-    void attribBounds(List<JCTypeParameter> typarams) {
         for (JCTypeParameter typaram : typarams) {
             Type bound = typaram.type.getUpperBound();
             if (bound != null && bound.tsym instanceof ClassSymbol) {
@@ -581,7 +581,7 @@
         try {
             chk.checkDeprecatedAnnotation(tree.pos(), m);
 
-            attribBounds(tree.typarams);
+            attribBounds(tree.typarams, env);
 
             // If we override any other methods, check that we do so properly.
             // JLS ???
@@ -1609,17 +1609,10 @@
                               tree.getTag() - JCTree.ASGOffset,
                               owntype,
                               operand);
-            if (types.isSameType(operator.type.getReturnType(), syms.stringType)) {
-                // String assignment; make sure the lhs is a string
-                chk.checkType(tree.lhs.pos(),
-                              owntype,
-                              syms.stringType);
-            } else {
-                chk.checkDivZero(tree.rhs.pos(), operator, operand);
-                chk.checkCastable(tree.rhs.pos(),
-                                  operator.type.getReturnType(),
-                                  owntype);
-            }
+            chk.checkDivZero(tree.rhs.pos(), operator, operand);
+            chk.checkCastable(tree.rhs.pos(),
+                              operator.type.getReturnType(),
+                              owntype);
         }
         result = check(tree, owntype, VAL, pkind, pt);
     }
@@ -2206,7 +2199,7 @@
                 (env.tree.getTag() != JCTree.ASSIGN ||
                  TreeInfo.skipParens(((JCAssign) env.tree).lhs) != tree)) {
 
-                if (!onlyWarning || isNonStaticEnumField(v)) {
+                if (!onlyWarning || isStaticEnumField(v)) {
                     log.error(tree.pos(), "illegal.forward.ref");
                 } else if (useBeforeDeclarationWarning) {
                     log.warning(tree.pos(), "forward.ref", v);
@@ -2240,7 +2233,7 @@
             // initializer expressions of an enum constant e to refer
             // to itself or to an enum constant of the same type that
             // is declared to the right of e."
-            if (isNonStaticEnumField(v)) {
+            if (isStaticEnumField(v)) {
                 ClassSymbol enclClass = env.info.scope.owner.enclClass();
 
                 if (enclClass == null || enclClass.owner == null)
@@ -2261,8 +2254,14 @@
             }
         }
 
-        private boolean isNonStaticEnumField(VarSymbol v) {
-            return Flags.isEnum(v.owner) && Flags.isStatic(v) && !Flags.isConstant(v);
+        /** Is the given symbol a static, non-constant field of an Enum?
+         *  Note: enum literals should not be regarded as such
+         */
+        private boolean isStaticEnumField(VarSymbol v) {
+            return Flags.isEnum(v.owner) &&
+                   Flags.isStatic(v) &&
+                   !Flags.isConstant(v) &&
+                   v.name != names._class;
         }
 
         /** Can the given symbol be the owner of code which forms part
@@ -2514,6 +2513,7 @@
                     log.error(tree.bounds.tail.head.pos(),
                               "type.var.may.not.be.followed.by.other.bounds");
                     tree.bounds = List.of(tree.bounds.head);
+                    a.bound = bs.head;
                 }
             } else {
                 // if first bound was a class or interface, accept only interfaces
@@ -2687,7 +2687,7 @@
         chk.validateAnnotations(tree.mods.annotations, c);
 
         // Validate type parameters, supertype and interfaces.
-        attribBounds(tree.typarams);
+        attribBounds(tree.typarams, env);
         chk.validateTypeParams(tree.typarams);
         chk.validate(tree.extending);
         chk.validate(tree.implementing);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Sun May 04 07:05:42 2008 -0700
@@ -173,7 +173,7 @@
      *  @param ex         The failure to report.
      */
     public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
-        log.error(pos, "cant.access", ex.sym, ex.errmsg);
+        log.error(pos, "cant.access", ex.sym, ex.getDetailValue());
         if (ex instanceof ClassReader.BadClassFile) throw new Abort();
         else return syms.errType;
     }
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Sun May 04 07:05:42 2008 -0700
@@ -157,6 +157,19 @@
                     if (isSubClass(bs.head, that.hibounds))
                         that.inst = types.fromUnknownFun.apply(bs.head);
                 }
+                if (that.inst == null) {
+                    int classCount = 0, interfaceCount = 0;
+                    for (Type t : that.hibounds) {
+                        if (t.tag == CLASS) {
+                            if (t.isInterface())
+                                interfaceCount++;
+                            else
+                                classCount++;
+                        }
+                    }
+                    if ((that.hibounds.size() == classCount + interfaceCount) && classCount == 1)
+                        that.inst = types.makeCompoundType(that.hibounds);
+                }
                 if (that.inst == null || !types.isSubtypeUnchecked(that.inst, that.hibounds, warn))
                     throw ambiguousNoInstanceException
                         .setMessage("no.unique.maximal.instance.exists",
@@ -194,14 +207,14 @@
             if (that.lobounds.isEmpty())
                 that.inst = syms.botType;
             else if (that.lobounds.tail.isEmpty())
-                that.inst = that.lobounds.head;
+                that.inst = that.lobounds.head.isPrimitive() ? syms.errType : that.lobounds.head;
             else {
                 that.inst = types.lub(that.lobounds);
-                if (that.inst == null)
+            }
+            if (that.inst == null || that.inst == syms.errType)
                     throw ambiguousNoInstanceException
                         .setMessage("no.unique.minimal.instance.exists",
                                     that.qtype, that.lobounds);
-            }
             // VGJ: sort of inlined maximizeInst() below.  Adding
             // bounds can cause lobounds that are above hibounds.
             if (that.hibounds.isEmpty())
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Sun May 04 07:05:42 2008 -0700
@@ -1835,6 +1835,7 @@
                                           + "" + rval.hashCode()),
                                       type,
                                       currentMethodSym);
+        rval = convert(rval,type);
         JCVariableDecl def = make.VarDef(var, (JCExpression)rval); // XXX cast
         JCTree built = builder.build(make.Ident(var));
         JCTree res = make.LetExpr(def, built);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Sun May 04 07:05:42 2008 -0700
@@ -901,9 +901,9 @@
                 c.flags_field |= DEPRECATED;
             annotateLater(tree.mods.annotations, baseEnv, c);
 
-            attr.attribTypeVariables(tree.typarams, baseEnv);
+            chk.checkNonCyclic(tree.pos(), c.type);
 
-            chk.checkNonCyclic(tree.pos(), c.type);
+            attr.attribTypeVariables(tree.typarams, baseEnv);
 
             // Add default constructor if needed.
             if ((c.flags() & INTERFACE) == 0 &&
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Sun May 04 07:05:42 2008 -0700
@@ -407,6 +407,8 @@
                      Type site,
                      Name name,
                      TypeSymbol c) {
+        while (c.type.tag == TYPEVAR)
+            c = c.type.getUpperBound().tsym;
         Symbol bestSoFar = varNotFound;
         Symbol sym;
         Scope.Entry e = c.members().lookup(name);
@@ -418,7 +420,7 @@
             e = e.next();
         }
         Type st = types.supertype(c.type);
-        if (st != null && st.tag == CLASS) {
+        if (st != null && (st.tag == CLASS || st.tag == TYPEVAR)) {
             sym = findField(env, site, name, st.tsym);
             if (sym.kind < bestSoFar.kind) bestSoFar = sym;
         }
@@ -733,7 +735,9 @@
                               boolean allowBoxing,
                               boolean useVarargs,
                               boolean operator) {
-        for (Type ct = intype; ct.tag == CLASS; ct = types.supertype(ct)) {
+        for (Type ct = intype; ct.tag == CLASS || ct.tag == TYPEVAR; ct = types.supertype(ct)) {
+            while (ct.tag == TYPEVAR)
+                ct = ct.getUpperBound();
             ClassSymbol c = (ClassSymbol)ct.tsym;
             if ((c.flags() & (ABSTRACT | INTERFACE)) == 0)
                 abstractok = false;
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Sun May 04 07:05:42 2008 -0700
@@ -131,6 +131,10 @@
      */
     private final JavaFileManager fileManager;
 
+    /** Factory for diagnostics
+     */
+    JCDiagnostic.Factory diagFactory;
+
     /** Can be reassigned from outside:
      *  the completer to be used for ".java" files. If this remains unassigned
      *  ".java" files will not be loaded.
@@ -221,6 +225,7 @@
         fileManager = context.get(JavaFileManager.class);
         if (fileManager == null)
             throw new AssertionError("FileManager initialization error");
+        diagFactory = JCDiagnostic.Factory.instance(context);
 
         init(syms, definitive);
         log = Log.instance(context);
@@ -256,23 +261,26 @@
  * Error Diagnoses
  ***********************************************************************/
 
-    public static class BadClassFile extends CompletionFailure {
+
+    public class BadClassFile extends CompletionFailure {
         private static final long serialVersionUID = 0;
 
-        /**
-         * @param msg A localized message.
-         */
-        public BadClassFile(ClassSymbol c, Object cname, Object msg) {
-            super(c, Log.getLocalizedString("bad.class.file.header",
-                                            cname, msg));
+        public BadClassFile(TypeSymbol sym, JavaFileObject file, JCDiagnostic diag) {
+            super(sym, createBadClassFileDiagnostic(file, diag));
         }
     }
+    // where
+    private JCDiagnostic createBadClassFileDiagnostic(JavaFileObject file, JCDiagnostic diag) {
+        String key = (file.getKind() == JavaFileObject.Kind.SOURCE
+                    ? "bad.source.file.header" : "bad.class.file.header");
+        return diagFactory.fragment(key, file, diag);
+    }
 
     public BadClassFile badClassFile(String key, Object... args) {
         return new BadClassFile (
             currentOwner.enclClass(),
             currentClassFile,
-            Log.getLocalizedString(key, args));
+            diagFactory.fragment(key, args));
     }
 
 /************************************************************************
@@ -1893,10 +1901,10 @@
                 currentClassFile = previousClassFile;
             }
         } else {
+            JCDiagnostic diag =
+                diagFactory.fragment("class.file.not.found", c.flatname);
             throw
-                newCompletionFailure(c,
-                                     Log.getLocalizedString("class.file.not.found",
-                                                            c.flatname));
+                newCompletionFailure(c, diag);
         }
     }
     // where
@@ -1934,22 +1942,22 @@
          *  In practice, only one can be used at a time, so we share one
          *  to reduce the expense of allocating new exception objects.
          */
-        private CompletionFailure newCompletionFailure(ClassSymbol c,
-                                                       String localized) {
+        private CompletionFailure newCompletionFailure(TypeSymbol c,
+                                                       JCDiagnostic diag) {
             if (!cacheCompletionFailure) {
                 // log.warning("proc.messager",
                 //             Log.getLocalizedString("class.file.not.found", c.flatname));
                 // c.debug.printStackTrace();
-                return new CompletionFailure(c, localized);
+                return new CompletionFailure(c, diag);
             } else {
                 CompletionFailure result = cachedCompletionFailure;
                 result.sym = c;
-                result.errmsg = localized;
+                result.diag = diag;
                 return result;
             }
         }
         private CompletionFailure cachedCompletionFailure =
-            new CompletionFailure(null, null);
+            new CompletionFailure(null, (JCDiagnostic) null);
         {
             cachedCompletionFailure.setStackTrace(new StackTraceElement[0]);
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Sun May 04 07:05:42 2008 -0700
@@ -198,6 +198,10 @@
      */
     public Log log;
 
+    /** Factory for creating diagnostic objects
+     */
+    JCDiagnostic.Factory diagFactory;
+
     /** The tree factory module.
      */
     protected TreeMaker make;
@@ -304,6 +308,7 @@
 
         names = Name.Table.instance(context);
         log = Log.instance(context);
+        diagFactory = JCDiagnostic.Factory.instance(context);
         reader = ClassReader.instance(context);
         make = TreeMaker.instance(context);
         writer = ClassWriter.instance(context);
@@ -318,7 +323,7 @@
             syms = Symtab.instance(context);
         } catch (CompletionFailure ex) {
             // inlined Check.completionError as it is not initialized yet
-            log.error("cant.access", ex.sym, ex.errmsg);
+            log.error("cant.access", ex.sym, ex.getDetailValue());
             if (ex instanceof ClassReader.BadClassFile)
                 throw new Abort();
         }
@@ -683,16 +688,16 @@
                                                  JavaFileObject.Kind.SOURCE);
             if (isPkgInfo) {
                 if (enter.getEnv(tree.packge) == null) {
-                    String msg
-                        = log.getLocalizedString("file.does.not.contain.package",
+                    JCDiagnostic diag =
+                        diagFactory.fragment("file.does.not.contain.package",
                                                  c.location());
-                    throw new ClassReader.BadClassFile(c, filename, msg);
+                    throw reader.new BadClassFile(c, filename, diag);
                 }
             } else {
-                throw new
-                    ClassReader.BadClassFile(c, filename, log.
-                                             getLocalizedString("file.doesnt.contain.class",
-                                                                c.fullname));
+                JCDiagnostic diag =
+                        diagFactory.fragment("file.doesnt.contain.class",
+                                            c.getQualifiedName());
+                throw reader.new BadClassFile(c, filename, diag);
             }
         }
 
@@ -997,7 +1002,7 @@
                 annotationProcessingOccurred = c.annotationProcessingOccurred = true;
             return c;
         } catch (CompletionFailure ex) {
-            log.error("cant.access", ex.sym, ex.errmsg);
+            log.error("cant.access", ex.sym, ex.getDetailValue());
             return this;
 
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java	Sun May 04 07:05:42 2008 -0700
@@ -28,6 +28,8 @@
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Options;
 import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Collection;
 
 /**
  * TODO: describe com.sun.tools.javac.main.JavacOption
@@ -41,19 +43,29 @@
 
     OptionKind getKind();
 
-    /** Does this option take a (separate) operand? */
+    /** Does this option take a (separate) operand?
+     *  @return true if this option takes a separate operand
+     */
     boolean hasArg();
 
     /** Does argument string match option pattern?
-     *  @param arg        The command line argument string.
+     *  @param arg   the command line argument string
+     *  @return true if {@code arg} matches this option
      */
     boolean matches(String arg);
 
-    /** Process the option (with arg). Return true if error detected.
+    /** Process an option with an argument.
+     *  @param options the accumulated set of analyzed options
+     *  @param option  the option to be processed
+     *  @param arg     the arg for the option to be processed
+     *  @return true if an error was detected
      */
     boolean process(Options options, String option, String arg);
 
-    /** Process the option (without arg). Return true if error detected.
+    /** Process the option with no argument.
+     *  @param options the accumulated set of analyzed options
+     *  @param option  the option to be processed
+     *  @return true if an error was detected
      */
     boolean process(Options options, String option);
 
@@ -65,6 +77,11 @@
         HIDDEN,
     }
 
+    enum ChoiceKind {
+        ONEOF,
+        ANYOF
+    }
+
     /** This class represents an option recognized by the main program
      */
     static class Option implements JavacOption {
@@ -85,6 +102,14 @@
          */
         boolean hasSuffix;
 
+        /** The kind of choices for this option, if any.
+         */
+        ChoiceKind choiceKind;
+
+        /** The choices for this option, if any.
+         */
+        Collection<String> choices;
+
         Option(OptionName name, String argsNameKey, String descrKey) {
             this.name = name;
             this.argsNameKey = argsNameKey;
@@ -92,51 +117,116 @@
             char lastChar = name.optionName.charAt(name.optionName.length()-1);
             hasSuffix = lastChar == ':' || lastChar == '=';
         }
+
         Option(OptionName name, String descrKey) {
             this(name, null, descrKey);
         }
 
+        Option(OptionName name, String descrKey, ChoiceKind choiceKind, String... choices) {
+            this(name, descrKey, choiceKind, Arrays.asList(choices));
+        }
+
+        Option(OptionName name, String descrKey, ChoiceKind choiceKind, Collection<String> choices) {
+            this(name, null, descrKey);
+            if (choiceKind == null || choices == null)
+                throw new NullPointerException();
+            this.choiceKind = choiceKind;
+            this.choices = choices;
+        }
+
+        @Override
         public String toString() {
             return name.optionName;
         }
 
-        /** Does this option take a (separate) operand?
-         */
         public boolean hasArg() {
             return argsNameKey != null && !hasSuffix;
         }
 
-        /** Does argument string match option pattern?
-         *  @param arg        The command line argument string.
-         */
-        public boolean matches(String arg) {
-            return hasSuffix ? arg.startsWith(name.optionName) : arg.equals(name.optionName);
+        public boolean matches(String option) {
+            if (!hasSuffix)
+                return option.equals(name.optionName);
+
+            if (!option.startsWith(name.optionName))
+                return false;
+
+            if (choices != null) {
+                String arg = option.substring(name.optionName.length());
+                if (choiceKind == ChoiceKind.ONEOF)
+                    return choices.contains(arg);
+                else {
+                    for (String a: arg.split(",+")) {
+                        if (!choices.contains(a))
+                            return false;
+                    }
+                }
+            }
+
+            return true;
         }
 
         /** Print a line of documentation describing this option, if standard.
+         * @param out the stream to which to write the documentation
          */
         void help(PrintWriter out) {
             String s = "  " + helpSynopsis();
             out.print(s);
-            for (int j = s.length(); j < 29; j++) out.print(" ");
+            for (int j = Math.min(s.length(), 28); j < 29; j++) out.print(" ");
             Log.printLines(out, Main.getLocalizedString(descrKey));
         }
+
         String helpSynopsis() {
-            return name +
-                (argsNameKey == null ? "" :
-                 ((hasSuffix ? "" : " ") +
-                  Main.getLocalizedString(argsNameKey)));
+            StringBuilder sb = new StringBuilder();
+            sb.append(name);
+            if (argsNameKey == null) {
+                if (choices != null) {
+                    String sep = "{";
+                    for (String c: choices) {
+                        sb.append(sep);
+                        sb.append(c);
+                        sep = ",";
+                    }
+                    sb.append("}");
+                }
+            } else {
+                if (!hasSuffix)
+                    sb.append(" ");
+                sb.append(Main.getLocalizedString(argsNameKey));
+            }
+
+            return sb.toString();
         }
 
         /** Print a line of documentation describing this option, if non-standard.
+         *  @param out the stream to which to write the documentation
          */
         void xhelp(PrintWriter out) {}
 
         /** Process the option (with arg). Return true if error detected.
          */
         public boolean process(Options options, String option, String arg) {
-            if (options != null)
+            if (options != null) {
+                if (choices != null) {
+                    if (choiceKind == ChoiceKind.ONEOF) {
+                        // some clients like to see just one of option+choice set
+                        for (String c: choices)
+                            options.remove(option + c);
+                        String opt = option + arg;
+                        options.put(opt, opt);
+                        // some clients like to see option (without trailing ":")
+                        // set to arg
+                        String nm = option.substring(0, option.length() - 1);
+                        options.put(nm, arg);
+                    } else {
+                        // set option+word for each word in arg
+                        for (String a: arg.split(",+")) {
+                            String opt = option + a;
+                            options.put(opt, opt);
+                        }
+                    }
+                }
                 options.put(option, arg);
+            }
             return false;
         }
 
@@ -163,8 +253,17 @@
         XOption(OptionName name, String descrKey) {
             this(name, null, descrKey);
         }
+        XOption(OptionName name, String descrKey, ChoiceKind kind, String... choices) {
+            super(name, descrKey, kind, choices);
+        }
+        XOption(OptionName name, String descrKey, ChoiceKind kind, Collection<String> choices) {
+            super(name, descrKey, kind, choices);
+        }
+        @Override
         void help(PrintWriter out) {}
+        @Override
         void xhelp(PrintWriter out) { super.help(out); }
+        @Override
         public OptionKind getKind() { return OptionKind.EXTENDED; }
     };
 
@@ -177,8 +276,11 @@
         HiddenOption(OptionName name, String argsNameKey) {
             super(name, argsNameKey, null);
         }
+        @Override
         void help(PrintWriter out) {}
+        @Override
         void xhelp(PrintWriter out) {}
+        @Override
         public OptionKind getKind() { return OptionKind.HIDDEN; }
     };
 
--- a/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java	Sun May 04 07:05:42 2008 -0700
@@ -37,13 +37,9 @@
 public enum OptionName {
     G("-g"),
     G_NONE("-g:none"),
-    G_CUSTOM("-g:{lines,vars,source}"),
+    G_CUSTOM("-g:"),
     XLINT("-Xlint"),
-    XLINT_CUSTOM("-Xlint:{"
-                 + "all,"
-                 + "cast,deprecation,divzero,empty,unchecked,fallthrough,path,serial,finally,overrides,"
-                 + "-cast,-deprecation,-divzero,-empty,-unchecked,-fallthrough,-path,-serial,-finally,-overrides,"
-                 + "none}"),
+    XLINT_CUSTOM("-Xlint:"),
     NOWARN("-nowarn"),
     VERBOSE("-verbose"),
     DEPRECATION("-deprecation"),
@@ -58,12 +54,12 @@
     DJAVA_EXT_DIRS("-Djava.ext.dirs="),
     ENDORSEDDIRS("-endorseddirs"),
     DJAVA_ENDORSED_DIRS("-Djava.endorsed.dirs="),
-    PROC_CUSTOM("-proc:{none,only}"),
+    PROC("-proc:"),
     PROCESSOR("-processor"),
     PROCESSORPATH("-processorpath"),
     D("-d"),
     S("-s"),
-    IMPLICIT("-implicit:{none,class}"),
+    IMPLICIT("-implicit:"),
     ENCODING("-encoding"),
     SOURCE("-source"),
     TARGET("-target"),
@@ -86,7 +82,7 @@
     XPRINT("-Xprint"),
     XPRINTROUNDS("-XprintRounds"),
     XPRINTPROCESSORINFO("-XprintProcessorInfo"),
-    XPREFER("-Xprefer:{source,newer}"),
+    XPREFER("-Xprefer:"),
     O("-O"),
     XJCOV("-Xjcov"),
     XD("-XD"),
--- a/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java	Sun May 04 07:05:42 2008 -0700
@@ -25,21 +25,23 @@
 
 package com.sun.tools.javac.main;
 
+import com.sun.tools.javac.code.Lint;
 import com.sun.tools.javac.code.Source;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.jvm.Target;
 import com.sun.tools.javac.main.JavacOption.HiddenOption;
 import com.sun.tools.javac.main.JavacOption.Option;
 import com.sun.tools.javac.main.JavacOption.XOption;
-import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
-import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Options;
 import com.sun.tools.javac.processing.JavacProcessingEnvironment;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.EnumSet;
+import java.util.LinkedHashSet;
 import java.util.Set;
 import java.util.StringTokenizer;
 import javax.lang.model.SourceVersion;
@@ -134,7 +136,7 @@
         DJAVA_EXT_DIRS,
         ENDORSEDDIRS,
         DJAVA_ENDORSED_DIRS,
-        PROC_CUSTOM,
+        PROC,
         PROCESSOR,
         PROCESSORPATH,
         D,
@@ -195,7 +197,7 @@
         NOWARN,
         VERBOSE,
         DEPRECATION,
-        PROC_CUSTOM,
+        PROC,
         PROCESSOR,
         IMPLICIT,
         SOURCE,
@@ -245,79 +247,58 @@
     }
 
     /**
-     * @param out the writer to use for diagnostic output
+     * Get all the recognized options.
+     * @param helper an {@code OptionHelper} to help when processing options
+     * @return an array of options
      */
     public static Option[] getAll(final OptionHelper helper) {
-        return new Option[]{
+        return new Option[] {
         new Option(G,                                           "opt.g"),
         new Option(G_NONE,                                      "opt.g.none") {
+            @Override
             public boolean process(Options options, String option) {
                 options.put("-g:", "none");
                 return false;
             }
         },
 
-        new Option(G_CUSTOM,                                    "opt.g.lines.vars.source") {
-            public boolean matches(String s) {
-                return s.startsWith("-g:");
-            }
+        new Option(G_CUSTOM,                                    "opt.g.lines.vars.source",
+                Option.ChoiceKind.ANYOF, "lines", "vars", "source"),
+
+        new XOption(XLINT,                                      "opt.Xlint"),
+        new XOption(XLINT_CUSTOM,                               "opt.Xlint.suboptlist",
+                Option.ChoiceKind.ANYOF, getXLintChoices()),
+
+        // -nowarn is retained for command-line backward compatibility
+        new Option(NOWARN,                                      "opt.nowarn") {
+            @Override
             public boolean process(Options options, String option) {
-                String suboptions = option.substring(3);
-                options.put("-g:", suboptions);
-                // enter all the -g suboptions as "-g:suboption"
-                for (StringTokenizer t = new StringTokenizer(suboptions, ","); t.hasMoreTokens(); ) {
-                    String tok = t.nextToken();
-                    String opt = "-g:" + tok;
-                    options.put(opt, opt);
-                }
+                options.put("-Xlint:none", option);
                 return false;
             }
         },
 
-        new XOption(XLINT,                                      "opt.Xlint"),
-        new XOption(XLINT_CUSTOM,                               "opt.Xlint.suboptlist") {
-            public boolean matches(String s) {
-                return s.startsWith("-Xlint:");
-            }
-            public boolean process(Options options, String option) {
-                String suboptions = option.substring(7);
-                options.put("-Xlint:", suboptions);
-                // enter all the -Xlint suboptions as "-Xlint:suboption"
-                for (StringTokenizer t = new StringTokenizer(suboptions, ","); t.hasMoreTokens(); ) {
-                    String tok = t.nextToken();
-                    String opt = "-Xlint:" + tok;
-                    options.put(opt, opt);
-                }
-                return false;
-            }
-        },
-
-        // -nowarn is retained for command-line backward compatibility
-        new Option(NOWARN,                                      "opt.nowarn") {
-                public boolean process(Options options, String option) {
-                    options.put("-Xlint:none", option);
-                    return false;
-                }
-            },
-
         new Option(VERBOSE,                                     "opt.verbose"),
 
         // -deprecation is retained for command-line backward compatibility
         new Option(DEPRECATION,                                 "opt.deprecation") {
-                public boolean process(Options options, String option) {
-                    options.put("-Xlint:deprecation", option);
-                    return false;
-                }
-            },
+            @Override
+            public boolean process(Options options, String option) {
+                options.put("-Xlint:deprecation", option);
+                return false;
+            }
+        },
 
         new Option(CLASSPATH,              "opt.arg.path",      "opt.classpath"),
         new Option(CP,                     "opt.arg.path",      "opt.classpath") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 return super.process(options, "-classpath", arg);
             }
         },
         new Option(SOURCEPATH,             "opt.arg.path",      "opt.sourcepath"),
         new Option(BOOTCLASSPATH,          "opt.arg.path",      "opt.bootclasspath") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 options.remove("-Xbootclasspath/p:");
                 options.remove("-Xbootclasspath/a:");
@@ -327,6 +308,7 @@
         new XOption(XBOOTCLASSPATH_PREPEND,"opt.arg.path", "opt.Xbootclasspath.p"),
         new XOption(XBOOTCLASSPATH_APPEND, "opt.arg.path", "opt.Xbootclasspath.a"),
         new XOption(XBOOTCLASSPATH,        "opt.arg.path", "opt.bootclasspath") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 options.remove("-Xbootclasspath/p:");
                 options.remove("-Xbootclasspath/a:");
@@ -335,48 +317,29 @@
         },
         new Option(EXTDIRS,                "opt.arg.dirs",      "opt.extdirs"),
         new XOption(DJAVA_EXT_DIRS,        "opt.arg.dirs",      "opt.extdirs") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 return super.process(options, "-extdirs", arg);
             }
         },
         new Option(ENDORSEDDIRS,            "opt.arg.dirs",     "opt.endorseddirs"),
         new XOption(DJAVA_ENDORSED_DIRS,    "opt.arg.dirs",     "opt.endorseddirs") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 return super.process(options, "-endorseddirs", arg);
             }
         },
-        new Option(PROC_CUSTOM,                                 "opt.proc.none.only") {
-            public boolean matches(String s) {
-                return s.equals("-proc:none") || s.equals("-proc:only");
-            }
-
-            public boolean process(Options options, String option) {
-                if (option.equals("-proc:none")) {
-                    options.remove("-proc:only");
-                } else {
-                    options.remove("-proc:none");
-                }
-                options.put(option, option);
-                return false;
-            }
-        },
+        new Option(PROC,                                 "opt.proc.none.only",
+                Option.ChoiceKind.ONEOF, "none", "only"),
         new Option(PROCESSOR,           "opt.arg.class.list",   "opt.processor"),
         new Option(PROCESSORPATH,       "opt.arg.path",         "opt.processorpath"),
         new Option(D,                   "opt.arg.directory",    "opt.d"),
         new Option(S,                   "opt.arg.directory",    "opt.sourceDest"),
-        new Option(IMPLICIT,                                    "opt.implicit") {
-            public boolean matches(String s) {
-                return s.equals("-implicit:none") || s.equals("-implicit:class");
-            }
-            public boolean process(Options options, String option, String operand) {
-                int sep = option.indexOf(":");
-                options.put(option.substring(0, sep), option.substring(sep+1));
-                options.put(option,option);
-                return false;
-            }
-        },
+        new Option(IMPLICIT,                                    "opt.implicit",
+                Option.ChoiceKind.ONEOF, "none", "class"),
         new Option(ENCODING,            "opt.arg.encoding",     "opt.encoding"),
         new Option(SOURCE,              "opt.arg.release",      "opt.source") {
+            @Override
             public boolean process(Options options, String option, String operand) {
                 Source source = Source.lookup(operand);
                 if (source == null) {
@@ -387,6 +350,7 @@
             }
         },
         new Option(TARGET,              "opt.arg.release",      "opt.target") {
+            @Override
             public boolean process(Options options, String option, String operand) {
                 Target target = Target.lookup(operand);
                 if (target == null) {
@@ -397,54 +361,62 @@
             }
         },
         new Option(VERSION,                                     "opt.version") {
+            @Override
             public boolean process(Options options, String option) {
                 helper.printVersion();
                 return super.process(options, option);
             }
         },
         new HiddenOption(FULLVERSION) {
+            @Override
             public boolean process(Options options, String option) {
                 helper.printFullVersion();
                 return super.process(options, option);
             }
         },
         new Option(HELP,                                        "opt.help") {
+            @Override
             public boolean process(Options options, String option) {
                 helper.printHelp();
                 return super.process(options, option);
             }
         },
         new Option(A,                "opt.arg.key.equals.value","opt.A") {
-                String helpSynopsis() {
-                    hasSuffix = true;
-                    return super.helpSynopsis();
-                }
+            @Override
+            String helpSynopsis() {
+                hasSuffix = true;
+                return super.helpSynopsis();
+            }
+
+            @Override
+            public boolean matches(String arg) {
+                return arg.startsWith("-A");
+            }
 
-                public boolean matches(String arg) {
-                    return arg.startsWith("-A");
-                }
-
-                public boolean hasArg() {
-                    return false;
+            @Override
+            public boolean hasArg() {
+                return false;
+            }
+            // Mapping for processor options created in
+            // JavacProcessingEnvironment
+            @Override
+            public boolean process(Options options, String option) {
+                int argLength = option.length();
+                if (argLength == 2) {
+                    helper.error("err.empty.A.argument");
+                    return true;
                 }
-                // Mapping for processor options created in
-                // JavacProcessingEnvironment
-                public boolean process(Options options, String option) {
-                    int argLength = option.length();
-                    if (argLength == 2) {
-                        helper.error("err.empty.A.argument");
-                        return true;
-                    }
-                    int sepIndex = option.indexOf('=');
-                    String key = option.substring(2, (sepIndex != -1 ? sepIndex : argLength) );
-                    if (!JavacProcessingEnvironment.isValidOptionName(key)) {
-                        helper.error("err.invalid.A.key", option);
-                        return true;
-                    }
-                    return process(options, option, option);
+                int sepIndex = option.indexOf('=');
+                String key = option.substring(2, (sepIndex != -1 ? sepIndex : argLength) );
+                if (!JavacProcessingEnvironment.isValidOptionName(key)) {
+                    helper.error("err.invalid.A.key", option);
+                    return true;
                 }
+                return process(options, option, option);
+            }
         },
         new Option(X,                                           "opt.X") {
+            @Override
             public boolean process(Options options, String option) {
                 helper.printXhelp();
                 return super.process(options, option);
@@ -454,10 +426,12 @@
         // This option exists only for the purpose of documenting itself.
         // It's actually implemented by the launcher.
         new Option(J,                   "opt.arg.flag",         "opt.J") {
+            @Override
             String helpSynopsis() {
                 hasSuffix = true;
                 return super.helpSynopsis();
             }
+            @Override
             public boolean process(Options options, String option) {
                 throw new AssertionError
                     ("the -J flag should be caught by the launcher.");
@@ -469,6 +443,7 @@
 
         // new Option("-moreinfo",                                      "opt.moreinfo") {
         new HiddenOption(MOREINFO) {
+            @Override
             public boolean process(Options options, String option) {
                 Type.moreInfo = true;
                 return super.process(options, option);
@@ -512,6 +487,7 @@
 
         // display warnings for generic unchecked operations
         new HiddenOption(WARNUNCHECKED) {
+            @Override
             public boolean process(Options options, String option) {
                 options.put("-Xlint:unchecked", option);
                 return false;
@@ -521,6 +497,7 @@
         new XOption(XMAXERRS,           "opt.arg.number",       "opt.maxerrs"),
         new XOption(XMAXWARNS,          "opt.arg.number",       "opt.maxwarns"),
         new XOption(XSTDOUT,            "opt.arg.file",         "opt.Xstdout") {
+            @Override
             public boolean process(Options options, String option, String arg) {
                 try {
                     helper.setOut(new PrintWriter(new FileWriter(arg), true));
@@ -538,17 +515,8 @@
 
         new XOption(XPRINTPROCESSORINFO,                        "opt.printProcessorInfo"),
 
-        new XOption(XPREFER,                                     "opt.prefer") {
-            public boolean matches(String s) {
-                return s.equals("-Xprefer:source") || s.equals("-Xprefer:newer");
-            }
-            public boolean process(Options options, String option, String operand) {
-                int sep = option.indexOf(":");
-                options.put(option.substring(0, sep), option.substring(sep+1));
-                options.put(option,option);
-                return false;
-            }
-        },
+        new XOption(XPREFER,                                    "opt.prefer",
+                Option.ChoiceKind.ONEOF, "source", "newer"),
 
         /* -O is a no-op, accepted for backward compatibility. */
         new HiddenOption(O),
@@ -562,10 +530,12 @@
          */
         new HiddenOption(XD) {
             String s;
+            @Override
             public boolean matches(String s) {
                 this.s = s;
                 return s.startsWith(name.optionName);
             }
+            @Override
             public boolean process(Options options, String option) {
                 s = s.substring(name.optionName.length());
                 int eq = s.indexOf('=');
@@ -586,11 +556,13 @@
          */
         new HiddenOption(SOURCEFILE) {
             String s;
+            @Override
             public boolean matches(String s) {
                 this.s = s;
                 return s.endsWith(".java")  // Java source file
                     || SourceVersion.isName(s);   // Legal type name
             }
+            @Override
             public boolean process(Options options, String option) {
                 if (s.endsWith(".java") ) {
                     File f = new File(s);
@@ -612,4 +584,15 @@
     };
     }
 
+    private static Collection<String> getXLintChoices() {
+        Collection<String> choices = new LinkedHashSet<String>();
+        choices.add("all");
+        for (Lint.LintCategory c : Lint.LintCategory.values())
+            choices.add(c.option);
+        for (Lint.LintCategory c : Lint.LintCategory.values())
+            choices.add("-" + c.option);
+        choices.add("none");
+        return choices;
+    }
+
 }
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Sun May 04 07:05:42 2008 -0700
@@ -734,7 +734,7 @@
         } catch (CompletionFailure ex) {
             StringWriter out = new StringWriter();
             ex.printStackTrace(new PrintWriter(out));
-            log.error("proc.cant.access", ex.sym, ex.errmsg, out.toString());
+            log.error("proc.cant.access", ex.sym, ex.getDetailValue(), out.toString());
             return false;
         } catch (Throwable t) {
             throw new AnnotationProcessingError(t);
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Sun May 04 07:05:42 2008 -0700
@@ -827,6 +827,10 @@
 bad class file: {0}\n\
 {1}\n\
 Please remove or make sure it appears in the correct subdirectory of the classpath.
+compiler.misc.bad.source.file.header=\
+bad source file: {0}\n\
+{1}\n\
+Please remove or make sure it appears in the correct subdirectory of the sourcepath.
 
 ## The following are all possible strings for the second argument ({1}) of the
 ## above strings.
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java	Sun May 04 07:05:42 2008 -0700
@@ -203,6 +203,10 @@
      */
     private char[] buf = null;
 
+    /** The length of useful data in buf
+     */
+    private int bufLen = 0;
+
     /** The position in the buffer at which last error was reported
      */
     private int bp;
@@ -256,6 +260,7 @@
      */
     protected void setBuf(char[] newBuf) {
         buf = newBuf;
+        bufLen = buf.length;
         bp = 0;
         lineStart = 0;
         line = 1;
@@ -324,7 +329,7 @@
             return;
 
         int lineEnd = lineStart;
-        while (lineEnd < buf.length && buf[lineEnd] != CR && buf[lineEnd] != LF)
+        while (lineEnd < bufLen && buf[lineEnd] != CR && buf[lineEnd] != LF)
             lineEnd++;
         if (lineEnd - lineStart == 0)
             return;
@@ -336,12 +341,15 @@
         writer.flush();
     }
 
-    protected static char[] getCharContent(JavaFileObject fileObject) throws IOException {
+    protected void initBuf(JavaFileObject fileObject) throws IOException {
         CharSequence cs = fileObject.getCharContent(true);
         if (cs instanceof CharBuffer) {
-            return JavacFileManager.toArray((CharBuffer)cs);
+            CharBuffer cb = (CharBuffer) cs;
+            buf = JavacFileManager.toArray(cb);
+            bufLen = cb.limit();
         } else {
-            return cs.toString().toCharArray();
+            buf = cs.toString().toCharArray();
+            bufLen = buf.length;
         }
     }
 
@@ -353,7 +361,7 @@
             return false;
         try {
             if (buf == null) {
-                buf = getCharContent(currentSource());
+                initBuf(currentSource());
                 lineStart = 0;
                 line = 1;
             } else if (lineStart > pos) { // messages don't come in order
@@ -361,10 +369,10 @@
                 line = 1;
             }
             bp = lineStart;
-            while (bp < buf.length && bp < pos) {
+            while (bp < bufLen && bp < pos) {
                 switch (buf[bp++]) {
                 case CR:
-                    if (bp < buf.length && buf[bp] == LF) bp++;
+                    if (bp < bufLen && buf[bp] == LF) bp++;
                     line++;
                     lineStart = bp;
                     break;
@@ -374,7 +382,7 @@
                     break;
                 }
             }
-            return bp <= buf.length;
+            return bp <= bufLen;
         } catch (IOException e) {
             //e.printStackTrace();
             // FIXME: include e.getLocalizedMessage() in error message
@@ -704,7 +712,7 @@
         if (findLine(pos)) {
             int column = 0;
             for (bp = lineStart; bp < pos; bp++) {
-                if (bp >= buf.length)
+                if (bp >= bufLen)
                     return 0;
                 if (buf[bp] == '\t')
                     column = (column / TabInc * TabInc) + TabInc;
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Paths.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Paths.java	Sun May 04 07:05:42 2008 -0700
@@ -38,13 +38,8 @@
 import java.util.LinkedHashSet;
 import java.util.Iterator;
 import java.util.StringTokenizer;
-import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 import com.sun.tools.javac.code.Lint;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.Log;
-import com.sun.tools.javac.util.Options;
-import com.sun.tools.javac.util.Position;
 import java.util.ArrayList;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.locks.Lock;
@@ -70,7 +65,10 @@
     protected static final Context.Key<Paths> pathsKey =
         new Context.Key<Paths>();
 
-    /** Get the Paths instance for this context. */
+    /** Get the Paths instance for this context.
+     *  @param context the context
+     *  @return the Paths instance for this context
+     */
     public static Paths instance(Context context) {
         Paths instance = context.get(pathsKey);
         if (instance == null)
@@ -89,7 +87,7 @@
 
     private static boolean NON_BATCH_MODE = System.getProperty("nonBatchMode") != null;// TODO: Use -XD compiler switch for this.
     private static Map<File, PathEntry> pathExistanceCache = new ConcurrentHashMap<File, PathEntry>();
-    private static Map<File, java.util.List<String>> manifestEntries = new ConcurrentHashMap<File, java.util.List<String>>();
+    private static Map<File, java.util.List<File>> manifestEntries = new ConcurrentHashMap<File, java.util.List<File>>();
     private static Map<File, Boolean> isDirectory = new ConcurrentHashMap<File, Boolean>();
     private static Lock lock = new ReentrantLock();
 
@@ -369,13 +367,13 @@
         // filenames, but if we do, we should redo all path-related code.
         private void addJarClassPath(File jarFile, boolean warn) {
             try {
-                java.util.List<String> manifestsList = manifestEntries.get(jarFile);
+                java.util.List<File> manifestsList = manifestEntries.get(jarFile);
                 if (!NON_BATCH_MODE) {
                     lock.lock();
                     try {
                         if (manifestsList != null) {
-                            for (String entr : manifestsList) {
-                                addFile(new File(entr), warn);
+                            for (File entr : manifestsList) {
+                                addFile(entr, warn);
                             }
                             return;
                         }
@@ -386,7 +384,7 @@
                 }
 
                 if (!NON_BATCH_MODE) {
-                    manifestsList = new ArrayList<String>();
+                    manifestsList = new ArrayList<File>();
                     manifestEntries.put(jarFile, manifestsList);
                 }
 
@@ -412,7 +410,7 @@
                         if (!NON_BATCH_MODE) {
                             lock.lock();
                             try {
-                                manifestsList.add(elt);
+                                manifestsList.add(f);
                             }
                             finally {
                                 lock.unlock();
--- a/langtools/src/share/opensource/javac/Makefile	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,275 +0,0 @@
-#
-# Copyright 2006-2007 Sun Microsystems, Inc.  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.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-# Simple Makefile for javac
-
-BUILD = build
-BUILD_BOOTCLASSES = $(BUILD)/bootclasses
-BUILD_CLASSES = $(BUILD)/classes
-BUILD_JAVAC_SRCFILES = $(BUILD)/javac.srcfiles
-GENSRCDIR = $(BUILD)/gensrc
-DIST = dist
-DIST_JAVAC = $(DIST)
-ABS_DIST_JAVAC = $(shell cd $(DIST_JAVAC) ; pwd)
-SRC_BIN = src/bin
-SRC_CLASSES = src/share/classes
-
-#--------------------------------------------------------------------------------
-#
-# version info for generated compiler
-
-JDK_VERSION = 1.7.0
-RELEASE=$(JDK_VERSION)-opensource
-BUILD_NUMBER = b00
-USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
-FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
-
-#--------------------------------------------------------------------------------
-
-CAT	= /bin/cat
-CHMOD	= /bin/chmod
-CP	= /bin/cp
-MKDIR 	= /bin/mkdir
-RM 	= /bin/rm
-SED 	= /bin/sed
-
-
-SYSTEM_UNAME := $(shell uname)
-
-# Platform settings specific to Solaris
-ifeq ($(SYSTEM_UNAME), SunOS)
-  # Intrinsic unix command, with backslash-escaped character interpretation
-  #   (not using -e  will cause build failure when using /bin/bash)
-  #   (using -e breaks something else)
-  ECHO           = /usr/bin/echo
-  PLATFORM       = solaris
-endif
-
-# Platform settings specific to Linux
-ifeq ($(SYSTEM_UNAME), Linux)
-  # Intrinsic unix command, with backslash-escaped character interpretation
-  ECHO           = echo -e
-  PLATFORM       = linux
-endif
-
-
-# Set BOOTDIR to specify the JDK used to build the compiler
-ifdef	BOOTDIR
-JAR	= $(BOOTDIR)/bin/jar
-JAVA	= $(BOOTDIR)/bin/java
-JAVAC	= $(BOOTDIR)/bin/javac
-JAVADOC = $(BOOTDIR)/bin/javadoc
-else
-JAR	= jar
-JAVA	= java
-JAVAC	= javac
-JAVADOC = javadoc
-endif
-
-ifndef JTREG
-ifdef JTREG_HOME
-JTREG   = $(JTREG_HOME)/$(PLATFORM)/bin/jtreg
-else
-JTREG	= jtreg
-endif
-endif
-
-ifndef	JTREG_OPTS
-JTREG_OPTS = -s -verbose:summary
-endif
-
-ifndef	JTREG_TESTS
-JTREG_TESTS = test/tools/javac
-endif
-
-# Set this to the baseline version of JDK used for the tests
-# TESTJDKHOME = 
-
-COMPILER_SOURCE_LEVEL = 1.5
-
-#--------------------------------------------------------------------------------
-SCM_DIRS = -name .hg -o -name .svn -o -name CVS -o -name RCS -o -name SCCS
-JAVAC_SRCS = $(shell find \
-        $(SRC_CLASSES)/javax/annotation/processing \
-        $(SRC_CLASSES)/javax/lang/model \
-        $(SRC_CLASSES)/javax/tools \
-        $(SRC_CLASSES)/com/sun/source \
-        $(SRC_CLASSES)/com/sun/tools/javac \
-	\( $(SCM_DIRS) -o -name \*-template.\* \) -prune -o -name \*.java -print )
-
-JAVAC_RESOURCES = $(shell ls $(SRC_CLASSES)/com/sun/tools/javac/resources/*.properties | $(SED) -e 's/-template//' )
-
-
-#--------------------------------------------------------------------------------
-
-default: build
-
-all: build docs
-
-clean:
-	$(RM) -rf $(BUILD) $(DIST)
-
-build:	sanity $(DIST_JAVAC)/lib/javac.jar $(DIST_JAVAC)/bin/javac 
-
-
-# javac.jar
-
-$(DIST_JAVAC)/lib/javac.jar: \
-		$(JAVAC_SRCS) \
-		$(patsubst $(SRC_CLASSES)/%,$(BUILD_BOOTCLASSES)/%,$(JAVAC_RESOURCES)) \
-		$(patsubst $(SRC_CLASSES)/%,$(BUILD_CLASSES)/%,$(JAVAC_RESOURCES)) 
-	@$(ECHO) $(JAVAC_SRCS) > $(BUILD_JAVAC_SRCFILES)
-	$(JAVAC) -d $(BUILD_BOOTCLASSES) -source $(COMPILER_SOURCE_LEVEL) -g:source,lines @$(BUILD_JAVAC_SRCFILES)
-	$(JAVA) -cp $(BUILD_BOOTCLASSES) com.sun.tools.javac.Main \
-		-d $(BUILD_CLASSES) -g:source,lines @$(BUILD_JAVAC_SRCFILES)
-	( $(ECHO) "Main-Class: com.sun.tools.javac.Main" ; \
-	  $(ECHO) "Built-By: $$USER" ; \
-	  $(ECHO) "Built-At: `date`" ) > $(BUILD)/javac.MF
-	$(MKDIR) -p $(DIST_JAVAC)/lib
-	$(JAR) -cmf $(BUILD)/javac.MF $(DIST_JAVAC)/lib/javac.jar -C ${BUILD_CLASSES} .
-
-
-# javac resources
-
-$(BUILD_BOOTCLASSES)/com/sun/tools/javac/resources/version.properties \
-$(BUILD_CLASSES)/com/sun/tools/javac/resources/version.properties: \
-		$(SRC_CLASSES)/com/sun/tools/javac/resources/version-template.properties
-	$(MKDIR) -p $(@D)
-	$(SED) 	-e 's/$$(JDK_VERSION)/$(JDK_VERSION)/'  \
-		-e 's/$$(FULL_VERSION)/$(FULL_VERSION)/' \
-		-e 's/$$(RELEASE)/$(RELEASE)/' \
-		< $< > $@
-
-$(BUILD_BOOTCLASSES)/com/sun/tools/javac/resources/%.properties: \
-		$(SRC_CLASSES)/com/sun/tools/javac/resources/%.properties
-	$(MKDIR) -p $(@D)
-	$(CP) $^ $@
-
-$(BUILD_CLASSES)/com/sun/tools/javac/resources/%.properties: \
-		$(SRC_CLASSES)/com/sun/tools/javac/resources/%.properties
-	$(MKDIR) -p $(@D)
-	$(CP) $^ $@
-
-
-# javac wrapper script
-
-$(DIST_JAVAC)/bin/javac: $(SRC_BIN)/javac.sh
-	$(MKDIR) -p $(@D)
-	$(CP) $^ $@
-	$(CHMOD) +x $@
-
-# javadoc
-
-JLS3_URL = http://java.sun.com/docs/books/jls/
-JLS3_CITE = <a href="$(JLS3_URL)"> \
-		The Java Language Specification, Third Edition</a>
-TAG_JLS3 = -tag 'jls3:a:See <cite>$(JLS3_CITE)</cite>:'
-
-TAGS = $(IGNORED_TAGS:%=-tag %:X) $(TAG_JLS3)
-
-docs:	
-	$(JAVADOC) -sourcepath $(SRC_CLASSES) -d $(DIST_JAVAC)/doc/api \
-	    $(TAGS) \
-            -subpackages javax.annotation.processing:javax.lang.model:javax.tools:com.sun.source:com.sun.tools.javac
-
-#--------------------------------------------------------------------------------
-
-test: test-sanity $(DIST_JAVAC)/lib/javac.jar
-	$(JTREG) $(JTREG_OPTS) -noshell \
-		-jdk:$(TESTJDKHOME) \
-		-Xbootclasspath/p:$(ABS_DIST_JAVAC)/lib/javac.jar \
-		-w:$(BUILD)/jtreg/work \
-		-r:$(BUILD)/jtreg/report \
-		$(JTREG_TESTS)
-
-#--------------------------------------------------------------------------------
-
-ifndef ERROR_FILE
-  ERROR_FILE   = $(BUILD)/sanityCheckErrors.txt
-endif
-
-presanity:
-	@$(RM) -f $(ERROR_FILE)
-	@$(MKDIR) -p `dirname $(ERROR_FILE)`
-
-######################################################
-# CLASSPATH cannot be set, unless you are insane.
-######################################################
-sane-classpath:
-ifdef CLASSPATH
-	@$(ECHO) "ERROR: Your CLASSPATH environment variable is set.  This will \n" \
-	   "      most likely cause the build to fail.  Please unset it \n" \
-	   "      and start your build again. \n" \
-	   "" >> $(ERROR_FILE)
-endif
-
-######################################################
-# JAVA_HOME cannot be set, unless you are insane.
-######################################################
-sane-java_home:
-ifdef JAVA_HOME
-	@$(ECHO) "ERROR: Your JAVA_HOME environment variable is set.  This will \n" \
-	   "      most likely cause the build to fail.  Please unset it \n" \
-	   "      and start your build again. \n" \
-	   "" >> $(ERROR_FILE)
-endif
-
-
-######################################################
-# TESTJDKHOME needs to be set to run tests
-######################################################
-sane-testjdk:
-ifndef TESTJDKHOME
-	@$(ECHO) "ERROR: TESTJDKHOME needs to be set to the baseline version \n" \
-	   "     version of JDK used to run the compiler tests.\n" \
-	   "" >> $(ERROR_FILE)
-endif
-
-
-sane-lastrule:
-	@if [ -r $(ERROR_FILE) ]; then \
-	  if [ "x$(INSANE)" = x ]; then \
-	    $(ECHO) "Exiting because of the above error(s). \n" \
-	      "">> $(ERROR_FILE); \
-	  fi ; \
-	  $(CAT) $(ERROR_FILE) ; \
-	  if [ "x$(INSANE)" = x ]; then \
-	    exit 1 ; \
-	  fi ; \
-	fi
-
-sanity \
-build-sanity: presanity sane-classpath sane-java_home sane-lastrule
-
-test-sanity: presanity sane-classpath sane-java_home sane-testjdk sane-lastrule
-
-
-
-
-#--------------------------------------------------------------------------------
-
-.PHONY: all build clean default docs prep test \
-	presanity sanity build-sanity test-sanity \
-	sane-classpath sane-java_home sane-testjdk sane-lastrule 
--- a/langtools/src/share/opensource/javac/README-template.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta name="jdk-version" content="$(JDK_VERSION)">
-        <meta name="full-version" content="$(FULL_VERSION)">
-        <meta name="release" content="$(RELEASE)">
-        <meta name="date" content="$(BUILD_DATE)">
-        <link href="doc/document.css" rel="stylesheet">
-        <title>OpenJDK: javac -- README</title>
-        <style type="text/css">
-            p.noteX { margin-left:18pt; text-indent:-18pt }
-        </style>
-    </head>
-    <body>
-        <table width="100%" cellspacing="0" cellpadding="0" border="0" 
-            summary="This table is for formatting purposes only.">
-            <tr>
-                <td class="sun-darkblue">&nbsp;</td>
-            </tr>
-            <tr>
-                <td class="sun-darkblue">
-                    <h1>README</h1>
-
-                    <h2>Open JDK&#8482; Java programming language compiler (<code>javac</code>)<br>
-                    Version $(RELEASE)
-                    <!--$(FULL_VERSION)--></h2>
-                    <h4>$(BUILD_DATE)</h4>
-                </td>
-            </tr>
-            <tr>
-                <td class="sun-lightblue">&nbsp;</td>
-            </tr>
-        </table>
-        
-        <a name="top"></a>
-
-        <!--<p class="nav-link">[<a href="#intro">Skip TOC</a>]</p>-->
-
-        <h2>Table of Contents</h2>
-        
-        <ul>
-            <li><a href="#intro">Introduction</a></li>
-            <li><a href="#files">Files and Directories</a></li>
-            <li><a href="#specs">Specifications</a></li>
-            <li><a href="#build">Building the compiler</a></li>
-            <li><a href="#run">Running the compiler</a></li>
-            <li><a href="#test">Testing the compiler</a></li>
-        </ul>
-        
-        <h2><a name="intro">Introduction</a></h2>
-        <p>This bundle contains the source code for <code>javac</code>, a compiler for
-        the Java&trade; programming language.
-        Build files are provided for use with 
-        <a href="http://www.netbeans.org">NetBeans</a>,
-        <a href="http://ant.apache.org/">Apache Ant</a> or
-        <a href="http://www.gnu.org/software/make/">GNU make</a>.
-        The bundle also contains a set of compiler tests, for use with the
-        <a href="https://openjdk.dev.java.net/jtreg/">jtreg</a> test harness.
-        
-        
-        <h2><a name="files">Files and Directories</a></h2>
-        When you install the compiler bundle, a directory named 
-        <code>compiler</code> will be created, containing the following:
-        <table>
-            <thead>
-                <tr><th>Name<th>Description
-            </thead>
-            <tbody>
-                <tr>
-                    <td>README.html</td>
-                    <td>This file.</td>
-                </tr>
-	        <tr>
-	            <td>nbproject/project.xml</td>
-	            <td>A NetBeans project file.
-	        </tr>
-                <tr>
-                    <td>src/share/classes/</td>
-                    <td>The source files for the compiler.</td>
-                </tr>
-                <tr>
-                    <td>build.xml</td>
-                    <td>A build file for building the compiler, suitable for 
-                    use with NetBeans and Apache Ant.</td>
-                </tr>
-                <tr>
-                    <td>build.properties</td>
-                    <td>Build properties, used by build.xml.</td>
-                </tr>
-                <tr>
-                    <td>Makefile</td>
-                    <td>A Makefile for building the compiler, suitable for use 
-                    with GNU make.</td>
-                </tr>
-                <tr>
-                    <td>test/tools/javac/</td>
-                    <td>Regression tests for the compiler, for use with the JDK regression 
-                    test harness, jtreg.</td>
-                </tr>
-                <tr>
-                    <td><a href="doc">doc/</a></td>
-                    <td>Additional notes about the compiler.</td>
-                </tr>
-            </tbody>
-        </table>
-        
-        <h2><a name="specs">Specifications</a></h2>
-        <p>The compiler is a program for compiling source code written in the Java 
-        programming language into class files suitable for execution on a Java
-        virtual machine. It also provides API for annotation processing,
-        and invoking the compiler programmatically.
-        <p>These behaviors are governed by the following specifications:
-        <ul>
-            <li>Java Language Specification (JLS)</li>
-            <li>Java Virtual Machine Specification (JVMS)</li>
-            <li>Java Compiler API (JSR 199)</li>
-            <li>Pluggable Annotation Processing API (JSR 269)</li>
-        </ul>
-        <p>For more details on these specifications, see the
-        <a href="http://download.java.net/jdk6/docs/technotes/guides/javac/index.html">javac Guide</a>.
-        </p>
-
-        <p>These specifications are controlled by the Java Community Process 
-        (<a href="http://jcp.org/">JCP</a>.) All implementations of these specifications
-        must pass the appropriate test suites.</p>
-
-        <p><b>Notice regarding JSR 199 and JSR 269:</b>
-        This is an implementation of an early-draft
-        specification developed under the Java Community Process (JCP)
-        and is made available for testing and evaluation purposes only.
-        The code is not compatible with any specification of the JCP.
-                
-        <h2><a name="build">Building the compiler</a></h2>
-
-        <h3>System Requirements</h3>
-        <p><code>javac</code> is written in the Java programming language. 
-        As a general rule, it can normally be compiled using tools in the 
-        latest released version of the JDK. 
-        (That is, a development version of <code>javac</code> version 7 
-        can be built with JDK version 6, etc.)
-        To <a href="#bootstrap">bootstrap</a> the compiler, you should also have 
-        a copy of the target JDK.</p>
-
-        <p>You can build <code>javac</code> using 
-        <a href="#build.netbeans">NetBeans</a>,
-        <a href="#build.ant">Apache Ant</a>,
-        or <a href="#build.make">GNU make</a>.
-        </p>
-
-        <p>To run the compiler tests, you will need the 
-        <a href="https://openjdk.dev.java.net/jtreg/">jtreg test harness</a>.
-
-        <h3><a name="bootstrap">Bootstrapping the compiler</a></h3>
-
-        <p>The source for the compiler is such that it can be compiled using the latest
-        publicly released version of the JDK.In practice, it is typically desirable
-        to compile it first using the latest publicly released version of the JDK,
-        and then again using itself, and the target platform on which it will be run.
-        This not only provides a good initial test of the newly built compiler, it
-        also means the compiler is built with the latest compiler sources, against
-        the target libraries.
-
-        <h3><a name="build.netbeans">Building with NetBeans</a></h3>
-        <p>The installation directory for the compiler is set up as a free-form NetBeans project,
-        so to build the compiler using NetBeans, you just have to open the
-        project and build it in the normal way, for example, by using the operations
-        on the <code>Build</code> menu.
-        <p>To run the tests, you will have to edit properties in the 
-        <code>build.properties</code> file, to specify where you have installed
-        the <code>jtreg</code> harness and, possibly, a different version of
-        JDK to use when running the tests.
-
-        <h3><a name="build.ant">Building with Apache Ant</a></h3>
-        <p>To build the compiler, go to the compiler installation directory, and run "ant".</p>
-        <pre>
-        % cd <i>install-dir</i>
-        % ant       
-        </pre>
-        <p>To run the tests, you will have to edit properties in the 
-        <code>build.properties</code> file, to specify where you have installed
-        the <code>jtreg</code> harness and, possibly, a different version of
-        JDK to use when running the tests. Then, you can run the tests using the
-        "test" target.
-        
-        <h3><a name="build.make">Building with GNU make</a></h3>
-        <p>To build the compiler, go to the compiler installation directory, and type "make".</p>
-        You should not have CLASSPATH and JAVAHOME environment variables set when you
-        do this.
-        <pre>
-        % cd <i>install-dir</i>
-        % make      
-        </pre>
-        <p>To run the tests, you will have to specify where you have installed
-        the <code>jtreg</code> harness and, possibly, a different version of
-        JDK to use when running the tests. Then, you can run the tests using the
-        "test" target. You can specify the values by giving them on the command
-        line when you run <code>make</code> or by editing the values into the Makefile.
-        
-        <h3>What gets built?</h3>
-        <p>Whichever build tool you use, the results are put in the <code>dist</code>
-        subdirectory of your installation directory. The following files will be built.
-        <table>
-            <thead>
-                <tr><th>Name<th>Description
-            </thead>
-            <tbody>
-                <tr>
-                    <td>dist/lib/javac.jar</td>
-                    <td>This is an executable jar file containing the compiler.</td>
-                </tr>
-                <tr>
-                    <td>dist/bin/javac</td>
-                    <td>This is a simple shell script to invoke the compiler.</td>
-                </tr>
-            </tbody>
-        </table>
-        
-        <h3>Notes</h3>
-        
-        <p class="note"><i>Property files:</i>
-        It is possible to compile the resource property files into equivalent 
-        class files, for a minor performance improvement. For simplicity, that
-        feature is not included here.</p>
-        
-        <p class="note"><i>The launcher:</i>
-        JDK uses a program informally called "the launcher" which is used as
-        a wrapper for all JDK tools, including <code>java</code>, 
-        <code>javac</code>, <code>javadoc</code>, and so on. The program is a deployed
-        as a platform-dependent binary, thus obviating the need for a shell
-        script to invoke the tools. Again for simplicity, and because that program
-        is not normally considered part of <code>javac</code>, that program is
-        not included here.</p
-        
-        <h2><a name="run">Running the compiler</a></h2>
-        <p>Once you have built the compiler, you can run it in a number of ways.
-        <ul>
-            <li>
-                <p>Use the generated script, perhaps by putting it on your shell's
-                command execution path.</p>
-                <pre>    % <i>install-dir</i>/dist/bin/javac HelloWorld.java</pre>
-                <p>or</p>
-                <pre>    % javac HelloWorld.java</pre>
-            </li>
-            <li><p>Execute javac.jar with the <code>java</code> command.</p>
-                <pre>    % java -jar <i>install-dir</i>/dist/lib/javac.jar HelloWorld.java</pre>
-            </li>
-            <li><p>Execute javac.jar directly. Depending on your operating system,
-                you may be able to execute the jar file directly.</p>
-                <pre>    % <i>install-dir</i>/dist/lib/javac.jar HelloWorld.java</pre>
-                <p>See the 
-                <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jarGuide.html">Jar File Overview</a> 
-                for details.</p>
-            </li>
-        </ul>
-        
-        <h2><a name="test">Testing the compiler with <code>jtreg</code></h2>
-        <p>This bundle contains a large test suite of unit and regression tests
-        used to test <code>javac</code>. They are part of the JDK Regression Test
-        Suite, which uses the 
-        <a href="https://openjdk.dev.java.net/jtreg/">jtreg test harness</a>. 
-        This harness is
-        designed to run both API-style tests, and command-line tests, such as
-        found in the tests for <code>javac</code>.</p>
-
-        <p>The simplest way to run the tests is to prepend the newly created
-        copy of <code>javac.jar</code> to the bootstrap class path of a 
-        compatible version of JDK (meaning, it must accept the class file 
-        versions of newly compiled classes.)  To do this, you can use
-        the <code>-Xbootclasspath/p:</code><i>&lt;path&gt;</i> option
-        for <code>jtreg</code>. This option is similar to the equivalent
-        option for the <code>java</code> command.
-
-        <p><i><b>Note:</b>Some of the tests, written as shell tests, do not yet
-        support this mode of operation. You should use the 
-        <code>-noshell</code> to disable these tests for the time being.
-        This restriction will be lifted in the near future.</i>
-
-        <p><i><b>Note:</b>Four additional tests are ignored, using the <code>jtreg</code>
-	<code>@ignore</code> tag, because of problems caused by bugs that have not yet
-	been addressed.
-        
-        <p>You can run the compiler tests with a command such as the following:</p>
-        
-        <pre>    % jtreg -jdk:<i>jdk</i> -Xbootclasspath/p:<i>my-javac.jar</i> -verbose -noshell test/tools/javac</pre>
-
-        <p>Depending on the verbose options used, some amount of detail of the result
-        of each test is written to the console.  In addition, an HTML report about the
-        entire test run is written to a report directory, and a results file is written for
-        each test, in a "work" directory. The location of these directories can be
-        specified on the <code>jtreg</code> command line; the actual locations used
-        are reported to the console at the conclusion of the test run.
-        
-        <p>For more information on <code>jtreg</code>, use the 
-        the <code>-help</code> option for command-line help, or
-        the <code>-onlineHelp</code> option for the built-in online help.
-        Both of these options may optionally be followed by search
-        keywords</p>
-        
-        <p><code>jtreg</code> can also be run from Ant. See
-        <code>jtreg&nbsp;-onlineHelp&nbsp;ant</code> for details.</p>
-
-        <p>Both <code>build.xml</code> and <code>Makefile</code> contain "test" targets for running the tests. 
-        
-    </body>
-</html>
--- a/langtools/src/share/opensource/javac/build.properties	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-build.jdk.version = 1.7.0
-build.release = ${build.jdk.version}-opensource
-build.number = b00
-build.user.release.suffix = ${user.name}_${build.fullversion.time}
-build.full.version = ${build.release}-${build.user.release.suffix}-${build.number}
-
-# Set jtreg.home to jtreg installation directory
-# jtreg.home = 
-
-# Set test.jdk.home to baseline JDK used to run the tests
-# test.jdk.home =
-
-compiler.source.level = 1.5
--- a/langtools/src/share/opensource/javac/build.xml	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-<!--
- Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
- particular file as subject to the "Classpath" exception as provided
- by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- CA 95054 USA or visit www.sun.com if you need additional information or
- have any questions.
--->
-
-<project name="os-javac" default="build" basedir=".">
-    <property name="src" value="src"/>
-    <property name="src.bin" value="${src}/bin"/>
-    <property name="src.classes" value="${src}/share/classes"/>
-    <property name="build" value ="build"/>
-    <property name="build.bootclasses" value="${build}/bootclasses"/>
-    <property name="build.classes" value="${build}/classes"/>
-    <property name="build.jtreg" value="${build}/jtreg"/>
-    <property name="dist" value="dist"/>
-    <property name="dist.javac" value="${dist}"/>
-    
-    <patternset id="src.javac">
-        <include name="javax/annotation/processing/**/*.java"/>
-        <include name="javax/lang/model/**/*.java"/>
-        <include name="javax/tools/**/*.java"/>
-        <include name="com/sun/source/**/*.java"/>
-        <include name="com/sun/tools/javac/**/*.java"/>
-    </patternset>
-
-    <fileset id="javac.resources" dir="${src.classes}">
-        <include name="com/sun/tools/javac/resources/*.properties"/>
-        <exclude name="**/*-template.*"/>
-    </fileset>
-    
-    <target name="prep">
-        <mkdir dir="${build.bootclasses}"/>
-        <mkdir dir="${build.classes}"/>
-        <mkdir dir="${dist.javac}/bin"/>
-        <mkdir dir="${dist.javac}/lib"/>
-        <tstamp>
-            <format property="build.time" pattern="MM/dd/yyyy hh:mm aa"/>
-            <format property="build.fullversion.time" pattern="MM/dd/yyyy_HH_mm"/>
-        </tstamp>
-        <property file="build.properties"/>
-    </target>
-    
-    <target name="check-javac.isuptodate">
-        <uptodate targetfile="${dist.javac}/lib/javac.jar" property="javac.is.uptodate">
-            <srcfiles dir="${src.classes}">
-                <patternset refid="src.javac"/>
-                <include name="${src.classes}/com/sun/tools/javac/resources/*.properties"/>
-            </srcfiles>
-        </uptodate>
-    </target>
-    
-    <target name="build" depends="prep,build-lib.javac.jar,build-bin.javac"/>
-
-    <target name="build-lib.javac.jar" depends="check-javac.isuptodate" unless="javac.is.uptodate">
-        <!-- to compile javac, set includeAntRuntime=no to prevent javac's 
-        own tools.jar incorrectly appearing on the classpath -->
-        <javac srcdir="${src.classes}" destdir="${build.bootclasses}"
-            source="${compiler.source.level}"  debug="true" debuglevel="source,lines"
-            includeAntRuntime="no">
-            <patternset refid="src.javac"/>
-        </javac>
-        <copy todir="${build.bootclasses}">
-            <fileset refid="javac.resources"/>
-        </copy>
-        <echo message="recompiling compiler with itself"/>
-        <pathconvert pathsep=" " property="src.javac.files">
-            <path>
-                <fileset dir="${src.classes}">
-                    <patternset refid="src.javac"/>
-                </fileset>
-            </path>
-        </pathconvert>
-        <java fork="true" classpath="${build.bootclasses}" classname="com.sun.tools.javac.Main">
-            <arg value="-sourcepath"/>
-            <arg value=""/>
-            <arg value="-d"/>
-            <arg file="${build.classes}"/>
-            <arg value="-g:source,lines"/>
-            <arg line="${src.javac.files}"/>
-        </java>
-        <copy todir="${build.classes}">
-            <fileset refid="javac.resources"/>
-        </copy>
-        <copy file="${src.classes}/com/sun/tools/javac/resources/version-template.properties"
-            tofile="${build.classes}/com/sun/tools/javac/resources/version.properties">
-            <filterset begintoken="$(" endtoken=")">
-                <filter token="JDK_VERSION"  value="${build.jdk.version}"/>
-                <filter token="RELEASE"      value="${build.release}"/>
-                <filter token="FULL_VERSION" value="${build.full.version}"/>
-            </filterset>
-        </copy>
-        <jar destfile="${dist.javac}/lib/javac.jar" basedir="${build.classes}">
-            <manifest>
-                <attribute name="Built-By" value="${user.name}"/>
-                <attribute name="Built-At" value="${build.time}"/>
-                <attribute name="Main-Class" value="com.sun.tools.javac.Main"/>
-            </manifest>
-        </jar>
-    </target>
-    
-    <target name="build-bin.javac">
-        <copy tofile="${dist.javac}/bin/javac" file="${src.bin}/javac.sh"/>
-        <chmod file="${dist.javac}/bin/javac" perm="+x"/>
-    </target>
-    
-    <property name="javadoc.jls3.url" value="http://java.sun.com/docs/books/jls/"/>
-    <property name="javadoc.jls3.cite" value="&lt;a href=&quot;${javadoc.jls3.url}&quot;&gt;The Java Language Specification, Third Edition&lt;/a&gt;"/>
-    
-    <target name="docs" depends="prep">
-        <javadoc sourcepath="${src.classes}" destdir="${dist}/doc/api"
-            bootclasspath="${java.home}/lib/rt.jar" classpath="">
-            <package name="javax.annotation.processing.*"/>
-            <package name="javax.lang.model.*"/>
-            <package name="javax.tools.*"/>
-            <package name="com.sun.source.*"/>
-            <package name="com.sun.tools.javac.*"/>
-            <arg value="-tag"/>
-            <arg value="jls3:a:See &lt;cite&gt;${javadoc.jls3.cite}&lt;/cite&gt;:"/>
-        </javadoc>
-    </target>
-    
-    <target name="test" depends="xtest" />
-
-    <!-- can't call it test, because NetBeans associates that with JUnit -->
-    <target name="xtest" depends="build">
-        <fail unless="jtreg.home" message="Property 'jtreg.home' needs to be set to the jtreg installation directory."/>
-        <taskdef name="jtreg" classpath="${jtreg.home}/lib/jtreg.jar" classname="com.sun.javatest.regtest.Main$$Ant"/>
-        <fail unless="test.jdk.home" message="Property 'test.jdk.home' needs to be set to the baseline JDK to be used to run the tests"/>
-        <jtreg dir="test" samevm="true" verbose="summary"
-                jdk="${test.jdk.home}"
-                workDir="${build.jtreg}/work" 
-                reportDir="${build.jtreg}/report">
-            <arg value="-noshell"/>
-            <arg value="-Xbootclasspath/p:${dist.javac}/lib/javac.jar"/>
-            <include name="tools/javac"/>
-        </jtreg>
-    </target>
-    
-    <target name="clean">
-        <delete dir="${build}"/>
-        <delete dir="${dist}"/>
-    </target>
-   
-</project>
--- a/langtools/src/share/opensource/javac/doc/document.css	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/*
- * Copyright īŋŊ 2005 Sun Microsystems, Inc. All rights reserved. 
- * Use is subject to license terms.
- *
- */
-
-body { background-color: #FFFFFF; font-family: Arial, Helvetica, sans-serif;
-       border-top-width: 0px; border-right-width: 0px; 
-       border-bottom-width: 0px; border-left-width: 0px}
-h1 { font-family: Arial, Helvetica, sans-serif}
-h2 { font-family: Arial, Helvetica, sans-serif; padding-top: 25px}
-h3 { font-family: Arial, Helvetica, sans-serif}
-h4 { font-family: Arial, Helvetica, sans-serif} 
-li { font-family: Arial, Helvetica, sans-serif}
-table { font-family: Arial, Helvetica, sans-serif;
-        background-color: #FFFFFF;
-        margin-top: 0px; padding-top: 0px;
-		border-top-width: 0px; border-right-width: 0px;
-		border-bottom-width: 0px; border-left-width: 0px;
-		margin-bottom: 10px; margin-left: 0px; 
-		padding-bottom: 5px; padding-left: 5px}
-td {  vertical-align: top; font-family: Arial, Helvetica, sans-serif}
-td h1 {  text-align: center}
-td h2 {  text-align: center; padding-top: 0px}
-td h4 {  text-align: center}
-th { font-family: Arial, Helvetica, sans-serif; text-align: left;
-     padding-top: 10px; padding-right: 10px; padding-bottom: 0px;
-	 padding-left: 10px; white-space: nowrap} 
-
-.sun-darkblue { font-family: Arial, Helvetica, sans-serif ;
-                color: #FFFFFF; background-color: #666699}
-.sun-lightblue { background-color: #9999CC}
-.nav-link {  font-family: Arial, Helvetica, sans-serif; font-size: x-small}
-code {  font-family: Courier, serif}
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/Context.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel=stylesheet href="style.css">
-        <title>com.sun.tools.javac.comp.Enter</title>
-    </head>
-    <body>
-
-        <h3>com.sun.tools.javac.util.Context</h3>
-
-        <p>Contexts provides a way to share data between the different parts of 
-        the compiler.</p>
-
-        <p>They provide support for an abstract context, modelled loosely after 
-        ThreadLocal but using a user-provided context instead of the current 
-        thread.</p>
- 
-        <p>Within the compiler, a single Context is used for each
-        invocation of the compiler.  The context is then used to ensure a
-        single copy of each compiler phase exists per compiler invocation.</p>
- 
-        <p>The context can be used to assist in extending the compiler by
-        extending its components.  To do that, the extended component must
-        be registered before the base component.  We break initialization
-        cycles by (1) registering a factory for the component rather than
-        the component itself, and (2) a convention for a pattern of usage
-        in which each base component registers itself by calling an
-        instance method that is overridden in extended components.  A base
-        phase supporting extension would look something like this:</p>
- 
-        <pre>
-   public class Phase {
-       protected static final Context.Key&lt;Phase&gt; phaseKey =
- 	   new Context.Key&lt;Phase&gt;();
- 
-       public static Phase instance(Context context) {
- 	   Phase instance = context.get(phaseKey);
- 	   if (instance == null)
- 	       // the phase has not been overridden
- 	       instance = new Phase(context);
- 	   return instance;
-       }
- 
-       protected Phase(Context context) {
- 	   context.put(phaseKey, this);
- 	   // other intitialization follows...
-       }
-   }
-        </pre>
- 
-        <p>In the compiler, we simply use Phase.instance(context) to get
-        the reference to the phase.  But in extensions of the compiler, we
-        must register extensions of the phases to replace the base phase,
-        and this must be done before any reference to the phase is accessed
-        using Phase.instance().  An extended phase might be declared thus:</p>
- 
-        <pre>
-   public class NewPhase extends Phase {
-       protected NewPhase(Context context) {
- 	   super(context);
-       }
-       public static void preRegister(final Context context) {
-           context.put(phaseKey, new Context.Factory&lt;Phase&gt;() {
- 	       public Phase make() {
- 		   return new NewPhase(context);
- 	       }
-           });
-       }
-   }
-        </pre>
- 
-        <p>And is registered early in the extended compiler like this:</p>
- 
-        <pre>
-       NewPhase.preRegister(context);
-        </pre>
- 
-
-    </body>
-</html>
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/Enter.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel=stylesheet href="style.css">
-        <title>com.sun.tools.javac.comp.Enter</title>
-    </head>
-    <body>
-
-        <h3>com.sun.tools.javac.comp.Enter</h3>
-
-        This enters symbols for all encountered definitions into
-        the symbol table. The pass consists of two phases, organized as
-        follows:
-
-        <ol>
-            <li><p>In the first phase, all class symbols are entered into their
-            enclosing scope, descending recursively down the tree for classes
-            which are members of other classes. The class symbols are given a
-            MemberEnter object as completer.</p></li>
-  
-            <p><a name="package-info"></a>In addition, 
-                if any <span class=code>package-info.java</span> files are found, 
-                containing package annotations, then the TopLevel tree node for 
-                the package-info.java file is put on the "to do" as well.
-            </p>
-
-            <li><p>In the second phase, classes are completed using
-            MemberEnter.complete().  Completion might occur on demand, but
-            any classes that are not completed that way will be eventually
-            completed by processing the `uncompleted' queue.  Completion
-            entails 
-            <ul><li>(1) determination of a class's parameters, supertype and
-                interfaces, as well as <li>(2) entering all symbols defined in the
-                class into its scope, with the exception of class symbols which
-                have been entered in phase 1.</li>
-            </ul>
-            (2) depends on (1) having been
-            completed for a class and all its superclasses and enclosing
-            classes. That's why, after doing (1), we put classes in a
-            `halfcompleted' queue. Only when we have performed (1) for a class
-            and all it's superclasses and enclosing classes, we proceed to
-            (2).</p></li>
-        </ol>
- 
-        <p>Whereas the first phase is organized as a sweep through all
-        compiled syntax trees, the second phase is demand. Members of a
-        class are entered when the contents of a class are first
-        accessed. This is accomplished by installing completer objects in
-        class symbols for compiled classes which invoke the member-enter
-        phase for the corresponding class tree.</p>
- 
-        <p>Classes migrate from one phase to the next via queues:</p>
- 
-        <pre>
-    class enter -> (Enter.uncompleted)         --> member enter (1)
- 		-> (MemberEnter.halfcompleted) --> member enter (2)
- 		-> (Todo)	               --> attribute
- 						(only for toplevel classes)
-        </pre>
-
-    </body>
-</html>
-
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/JavaCompiler.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel=stylesheet href="style.css">
-        <title>JavaCompiler</title>
-    </head>
-    <body>
-
-        <h3>com.sun.tools.javac.main.JavaCompiler</h3>
-        <p>
-            <code>JavaCompiler</code> provides (and enforces) a use-once method to compile a list of source files. 
-            It invokes the various phases of the compiler to cause those source files to be compiled.
-        </p>
-        <ul>
-            <li>All the files given on the command line are parsed, to build a
-                list of parse trees. Lexing and parsing are done with
-                <a href="../../src/share/classes/com/sun/tools/javac/parser/Scanner.java" class=code>Scanner</a>    and
-                <a href="../../src/share/classes/com/sun/tools/javac/parser/Parser.java" class=code>Parser</a>.
-                Lexical and syntax errors will be detected here.
-                <p class=note>
-                    Note: Additional files may be parsed later, if they are found on the class/source path, and if they are newer than their matching class file.
-                </p>
-            </li>
-
-            <li>For each of the parse trees, their symbols are "entered", using
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/Enter.java" class=code>Enter</a>.  This will also set up a "to do" list of additional work to be done to compile those parse trees.
-                <i>(<a href="Enter.html">more...</a>)</i>
-            </li>
-
-            <li>If source code or stub code will be generated, a list is made
-                (in rootClasses) of all the top level classes defined in the parse trees. This will be used later, to check whether a class being processed was directly provided on the command line or not.
-            </li>
-
-            <li>Then, for as long as there is work on the "to do" list,
-                <code>JavaCompiler</code> processes entries from the "to do" list.
-                In so doing, the compiler might find additional classes that need to be
-                processed, which may result in additional entries being added to the
-                "to do" list. <i>(<a href="ToDo.html">more...</a>)</i>
-            </li>
-
-            <li>Print final messages.</li>
-
-            <li>Return a list of class symbols, perhaps just those from
-                final lower (may not include top level classes)
-            </li>
-        </ul>
-
-
- 
-    </body>
-</html>
-
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/Main.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel="stylesheet" href="style.css">
-        <title>Main</title>
-    </head>
-    <body>
-
-        <h3>com.sun.tools.javac.main.Main</h3>
-
-        <p>
-            The normal main entry point is
-            <a href="../../src/share/classes/com/sun/tools/javac/main/Main.java" class=code>com.sun.tools.javac.main.Main</a>,
-            with a public API entry point at
-            <a href="../../src/share/classes/com/sun/tools/javac/Main.java" class=code>com.sun.tools.javac.Main</a> which just calls down to <code>com.sun.tools.javac.main.Main</code>.
-        </p>
-
-        <p>The various parts of the compiler share common information by means of a 
-        <a href="../../src/share/classes/com/sun/tools/javac/util/Context.java" class=code>Context</a>.
-        Every invocation of the compiler must have its own Context.
-
-        <p>
-            <code>com.sun.tools.javac.main.Main</code> does command line processing to determine the list of files to be compiled, and any applicable options. There are four types of options: 
-            <ul>
-                <li>standard public options, e.g. <code>-classpath</code>
-                <li>extended public options, beginning -X, e.g. <code>-Xlint</code>
-                <li>hidden options -- not public or documented, e.g. -fullversion
-                <li>even more hidden options -- typically for debugging the compiler, beginning -XD, e.g. -XDrawDiagnostics
-            </ul>
-
-            If there are files to be compiled, <code>Main</code> invokes
-            <a href="../../src/share/classes/com/sun/tools/javac/main/JavaCompiler.java" class=code>JavaCompiler</a> <i>(<a href="JavaCompiler.html">more...</a>)</i>
-            After <code>JavaCompiler</code> completes, the list of class symbols that was returned is discarded.
-        </p>
-
-        <p>
-        Any and all exceptions are caught and handled, and a return code is
-        determined. Finally, the compiler exits.
-        <p>
-    </body>
-</html>
-
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/ToDo.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel=stylesheet href="style.css">
-        <title>JavaCompiler's "to do" list</title>
-    </head>
-    <body>
-
-        <h3>com.sun.tools.javac.main.JavaCompiler's "to do" list</h3>
-
-        <p>
-            After the source files have been parsed, and their symbols entered 
-            in the symbol table, the top level classes and some other items end 
-            up on JavaCompiler's "to do" list.
-        </p>
-
-        <p>
-            For each entry on the "to do" list, <code>JavaCompiler</code>
-            processes it as follows:
-        </p>
-
-        <ul>
-            <li><p>Some parts of the compilation involve modifying the parse tree,
-                so a copy of the root of the tree is kept prior to such manipulation.
-            </p>
-            <p class="note">
-                Note: this copy is just used to check whether the class is one of those
-                found in a compilation unit on the command line (i.e. in rootClasses).
-            </p>
-
-            <li><p>The top level classes are "attributed", using
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/Attr.java" class="code">Attr</a>,
-                meaning that names and other elements within the parse tree are resolved
-                and associated with the corresponding types and symbols. Many semantic
-                errors may be detected here, either by <code>Attr</code>, or by
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/Check.java" class="code">Check</a>.
-            </p>
-                <p>While attributing the tree, class files will be read as necessary.
-                    In addition, if a class is required, and a source file for the class is found
-                    that is newer than the class file, the source file will be automatically parsed
-                    and put on the "to do" list. This is done by registering JavaCompiler as an
-                    implementation of 
-                    <a href="../../src/share/classes/com/sun/tools/javac/comp/Attr.java" class="code">Attr</a><span class=code>.SourceCompleter</span>.
-                </p>
-                <p class=note>
-                    Note: there is a hidden option <code>-attrparseonly</code> which can be used to skip
-                    the rest of the processing for this file. In so doing, it "breaks" the
-                    protocol use to save and restore the source file used to report error
-                    messages (Log.useSource). There is a "try finally" block which
-                    could reasonably be used/extended to restore the source file correctly.
-                </p>
-            </li>
-
-            <li><p>If there are no errors so far, flow analysis will be done for the class, using
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/Flow.java" class="code">Flow</a>.
-                Flow analysis is used to check for definite assignment to variables,
-                and unreachable statements, which may result in additional errors.
-            </p>
-                <p class="note">Note: flow analysis can be suppressed with the hidden
-                    option <code>-relax</code>.
-                </p>
-            </li>
-
-            <li>If the "to do" item is a TopLevel tree, it will be the contents of a
-            <span class="code">package-info.java</span> file, containing annotations for a package.
-            (See notes for <a href="Enter.html#package-info">Enter</a>.) 
-            <ul>
-                <li>Syntactic sugar is processed, using
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/Lower.java" class="code">Lower</a>.
-                <code>Lower</code> is defined to return a list of trees for the translated classes
-                and all the translated inner classes.</li>
-                <li>If <code>Lower</code> returns a non-empty list, there is an assertion that
-                    the list has a single element, in which case, code is generated, using 
-                    <a href="../../src/share/classes/com/sun/tools/javac/jvm/Gen.java" class="code">Gen</a>,
-                    and the resulting code is written out using 
-                    <a href="../../src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java" class="code">ClassWriter</a>.
-                </li>
-                <li>No further processing is done on this "to do" item.<br>
-                </li>
-            </ul>
-            <p class=note>Note that <a href="Enter.html">Enter</a> will have processed all other TopLevel 
-                putting the individual classes that it finds there on the "to do" 
-                (and not the TopLevel node itself.)
-            </p>
-
-            <li>If stub outputs have been requested, with the hidden <code>-stubs</code> option,
-            <ul>
-                <li>If the class was one of those mentioned on the command line and is in 
-                <span class=code>java.lang</span>,
-                pretty print the source with no method bodies.</li>
-                <li>No further processing is done on this "to do" item. </li>
-            </ul>
-
-            <li>Code involving generic types is translated to code without generic types, using 
-                <a href="../../src/share/classes/com/sun/tools/javac/comp/TransTypes.java" class="code">TransTypes</a>.
-            </li>
-
-            <li>If source output has been requested, with the hidden <code>-s</code> option
-            <ul>
-                <li>If the original tree was from command line, pretty print the source code
-                </li>
-                <li>No further processing is done on this "to do" item.</li>
-            </ul>
-
-            <li>Syntactic sugar is processed, using 
-            <a href="../../src/share/classes/com/sun/tools/javac/comp/Lower.java" class="code">Lower</a>.
-            This takes care of inner classes, class literals, assertions, foreach
-            loops, etc.
-            <code>Lower</code> is defined to return a list of trees for the translated classes
-            and all the translated inner classes.</li>
-
-            <p class=note>
-            Note: see also the use of <code>Lower</code> earlier in the loop, when processing
-            TopLevel trees.</p>
-
-            <li>For each class returned by <code>Lower</code><br>
-            <ul>
-                <li>If source has been requestion with the hidden <code>-printflat</code>
-                option, the source of the class is printed.
-                <li>Otherwise, code for the class is generated, using 
-                <a href="../../src/share/classes/com/sun/tools/javac/jvm/Gen.java" class="code">Gen</a>,
-                and the resulting code is written out using 
-                <a href="../../src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java" class="code">ClassWriter</a>.
-            </ul>
-
-        </ul>
-
-        <h4>Issues</h4>
-        The "to do" list is mostly organized by top level classes, and not by 
-        compilation units. This means that if a compilation unit contains several 
-        classes, it is possible for code to be generated for some of the classes 
-        in the file, at which point at error may be detected for one of the 
-        remaining classes, preventing code from being generated for that and any 
-        subsequent classes. This means that the compilation unit will be partially 
-        compiled, with some but not all of the class files being generated. 
-        (Bug <a href="http://monaco.sfbay.sun.com/detail.jsf?cr=5011101">5011101</a>)
-
-    </body>
-</html>
-
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/contents.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-<head>
-    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-    <meta name="author" content="Jonathan Gibbons">
-    <link type="text/css" rel="stylesheet" href="style.css">
-    <title>com.sun.tools.javac.comp.Enter</title>
-</head>
-<body class="contents">
-    <a target=main href="packages.html">Packages</a><br>
-    <br>
-    Classes<br>
-    <a target=main href="Context.html">Context</a><br>
-    <a target=main href="Enter.html">Enter</a><br>
-    <a target=main href="JavaCompiler.html">JavaCompiler</a><br>
-    <a target=main href="Main.html">Main</a><br>
-    <a target=main href="ToDo.html">ToDo</a><br>
-</body>
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/index.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
-<!--
-Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-particular file as subject to the "Classpath" exception as provided
-by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
--->
-
-<html>
-    <head>
-        <title>javac life cycle</title>
-    </head>
-    <frameset cols="150,*" border="0" frameborder="0" framespacing="0">
-        <frame name="contents" scrolling="no" frameborder="0" src="contents.html">
-        <frame name="main" scrolling="auto" frameborder="0" src="packages.html">
-        <noframes>
-            <body>
-                <p>This page uses frames, but your browser doesn't support them.</p>
-            </body>
-        </noframes>
-    </frameset>
-</html>
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/packages.html	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
- Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
- particular file as subject to the "Classpath" exception as provided
- by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- CA 95054 USA or visit www.sun.com if you need additional information or
- have any questions.
-  
--->
-<html>
-    <head>
-        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-        <meta name="author" content="Jonathan Gibbons">
-        <link type="text/css" rel="stylesheet" href="style.css">
-        <title>Packages</title>
-        <style type="text/css">
-            th { text-align:left }
-        </style>
-    </head>
-    <body>
-
-        <h3>javac Packages</h3>
-
-        <p>With the exception of a publicly supported entry point at
-            <a href="../../src/share/classes/com/sun/tools/javac/Main.java" class="code">com.sun.tools.javac.Main</a>,
-            javac is organized as a set of packages under 
-            <span class="code">com.sun.tools.javac</span>.
-        </p>
-
-        <table>
-        <tr><th>Sub-package<th>Description
-        <tr>
-        <td valign=top><span class=code>code</code>
-        <td>Classes to represent the internal semantics of a Java program -- 
-        types, symbols, etc.
-
-        <tr>
-        <td valign=top><span class=code>comp</code>
-        <td>Classes that analyse and annotate the parse tree with semantic 
-        details, such as determining the types and symbols referred to by identifiers.
-
-        <tr>
-        <td valign=top><span class=code>jvm</code>
-        <td>Back end classes to read and write class files.
-
-        <tr>
-        <td valign=top><span class=code>main</code>
-        <td>Top-level driver classes. The standard entry point to the compiler is
-        <a href="../../src/share/classes/com/sun/tools/javac/main/Main.java" class="code">com.sun.tools.javac.main.Main</a> <i>(<a href="Main.html">more...</a>)</i>
-
-        <tr>
-        <td valign=top><span class=code>parser</code>
-        <td>Classes to read a Java source file and create a corresponding parse tree.
-
-        <tr>
-        <td valign=top><span class=code>resources</code>
-        <td>Resource classes for messages generated by the compiler. Two of the 
-        three classes are automagically generated by a "property file compiler" 
-        from a property source file; the third is automagically generated during 
-        the build to contain build version information.
-
-        <tr>
-        <td valign=top><span class=code>tree</code>
-        <td>Classes representing an annotated syntax tree for a Java program. 
-        The top level node, representing the contents of a source file is 
-        <span sclass="code">Tree.TopLevel</code>.
-
-        <tr>
-        <td valign=top><span class=code>util</code>
-        <td>Utility classes used throughout the compiler, providing support for 
-        diagnostics, access to the file system, and javac's collection classes.
-
-    </body>
-</html>
--- a/langtools/src/share/opensource/javac/doc/javac_lifecycle/style.css	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-body { color: black; background-color: #eeffee }
-body.contents {  background-color: #ddffdd } 
-
-li { margin-top:10px }
-p.note { font-size:smaller }
-
-.code { font-family:monospace }
-
--- a/langtools/src/share/opensource/javac/nbproject/project.xml	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
- particular file as subject to the "Classpath" exception as provided
- by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- CA 95054 USA or visit www.sun.com if you need additional information or
- have any questions.
--->
-
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.ant.freeform</type>
-    <configuration>
-        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
-            <!-- Do not use Project Properties customizer when editing this file manually. -->
-            <name>openjdk-javac</name>
-            <properties/>
-            <folders>
-                <source-folder>
-                    <label>src/share/classes</label>
-                    <type>java</type>
-                    <location>src/share/classes</location>
-                </source-folder>
-            </folders>
-            <ide-actions>
-                <action name="build">
-                    <target>build</target>
-                </action>
-                <action name="clean">
-                    <target>clean</target>
-                </action>
-                <action name="javadoc">
-                    <target>docs</target>
-                </action>
-                <action name="rebuild">
-                    <target>clean</target>
-                    <target>build</target>
-                </action>
-                <action name="test">
-                    <target>xtest</target>
-                </action>
-            </ide-actions>
-            <view>
-                <items>
-                    <source-folder style="packages">
-                        <label>src/share/classes</label>
-                        <location>src/share/classes</location>
-                    </source-folder>
-                    <source-file>
-                        <location>build.properties</location>
-                    </source-file>
-                    <source-file>
-                        <location>build.xml</location>
-                    </source-file>
-                </items>
-                <context-menu>
-                    <ide-action name="build"/>
-                    <ide-action name="clean"/>
-                    <ide-action name="javadoc"/>
-                    <ide-action name="rebuild"/>
-                </context-menu>
-            </view>
-        </general-data>
-        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
-            <compilation-unit>
-                <package-root>src/share/classes</package-root>
-                <source-level>1.5</source-level>
-            </compilation-unit>
-        </java-data>
-    </configuration>
-</project>
--- a/langtools/src/share/opensource/javac/src/bin/javac.sh	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright 2006 Sun Microsystems, Inc.  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.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-mydir="`dirname $0`"
-
-java -jar "${mydir}"/../lib/javac.jar "$@"
--- a/langtools/test/tools/javac/6304921/T6304921.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/test/tools/javac/6304921/T6304921.java	Sun May 04 07:05:42 2008 -0700
@@ -1,8 +1,6 @@
 /*
  * @test (important: no SCCS keywords to affect offsets in golden file.)  /nodynamiccopyright/
  * @bug 6304921
- * @ignore
- *    Need to fix this test post whitespace normalization
  * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -Xjcov -Xlint:all,-path -Werror T6304921.java
  */
 
--- a/langtools/test/tools/javac/6304921/T6304921.out	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/test/tools/javac/6304921/T6304921.out	Sun May 04 07:05:42 2008 -0700
@@ -1,20 +1,20 @@
-T6304921.java:569/569/584: warning: [unchecked] unchecked conversion
+T6304921.java:667/667/682: warning: [unchecked] unchecked conversion
 found   : java.util.ArrayList
 required: java.util.List<java.lang.Integer>
         List<Integer> list = new ArrayList();
                              ^
-T6304921.java:410/410/418: warning: [fallthrough] possible fall-through into case
+T6304921.java:445/445/453: warning: [fallthrough] possible fall-through into case
         default:
         ^
-T6304921.java:452/522/523: warning: [finally] finally clause cannot complete normally
+T6304921.java:522/613/614: warning: [finally] finally clause cannot complete normally
         }
         ^
-T6304921.java:622/628/632: cannot find symbol
+T6304921.java:727/733/737: cannot find symbol
 symbol  : variable orr
 location: class java.lang.System
         System.orr.println("abc"); // name not found
               ^
-T6304921.java:700/704/710: operator + cannot be applied to int,boolean
+T6304921.java:812/816/822: operator + cannot be applied to int,boolean
         return 123 + true; // bad binary expression
                    ^
 2 errors
--- a/langtools/test/tools/javac/6341866/T6341866.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/test/tools/javac/6341866/T6341866.java	Sun May 04 07:05:42 2008 -0700
@@ -186,7 +186,7 @@
     }
 
     static void error(String msg) {
-        System.err.println(msg);
+        System.err.println("ERROR: " + msg);
     }
 
     static File services(Class<?> service) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badClass/A.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package q;
+
+class A { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badClass/B.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,7 @@
+/*
+ * /nodynamiccopyright/
+ */
+
+class B {
+    p.A a;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badClass/Test.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6668794 6668796
+ * @summary javac puts localized text in raw diagnostics
+ *      bad diagnostic "bad class file" given for source files
+ */
+
+import java.io.*;
+import java.util.*;
+import javax.tools.*;
+
+public class Test {
+    public static void main(String[] args) throws Exception {
+        new Test().run();
+    }
+
+    void run() throws Exception {
+
+        // compile q.A then move it to p.A
+        compile("A.java");
+
+        File p = new File("p");
+        p.mkdirs();
+        new File("q/A.class").renameTo(new File("p/A.class"));
+
+        // compile B against p.A
+        String[] out = compile("B.java");
+        if (out.length == 0)
+            throw new Error("no diagnostics generated");
+
+        String expected = "B.java:6:6: compiler.err.cant.access: p.A, " +
+            "(- compiler.misc.bad.class.file.header: A.class, " +
+            "(- compiler.misc.class.file.wrong.class: q.A))";
+
+        if (!out[0].equals(expected)) {
+            System.err.println("expected: " + expected);
+            System.err.println("   found: " + out[0]);
+            throw new Error("test failed");
+        }
+    }
+
+    String[] compile(String file) {
+        String[] options = {
+            "-XDrawDiagnostics",
+            "-d", ".",
+            "-classpath", ".",
+            new File(testSrc, file).getPath()
+        };
+
+        System.err.println("compile: " + Arrays.asList(options));
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(options, out);
+        out.close();
+
+        String outText = sw.toString();
+        System.err.println(outText);
+
+        return sw.toString().split("[\\r\\n]+");
+    }
+
+    File testSrc = new File(System.getProperty("test.src", "."));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badSource/Test.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,11 @@
+/*
+ * @test /nodynamiccopyight/
+ * @bug 6668794 6668796
+ * @summary javac puts localized text in raw diagnostics
+ *      bad diagnostic "bad class file" given for source files
+ * @compile/fail/ref=Test.out -XDrawDiagnostics Test.java
+ */
+
+class Test {
+    p.A a;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badSource/Test.out	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,1 @@
+Test.java:10:6: compiler.err.cant.access: p.A, (- compiler.misc.bad.source.file.header: A.java, (- compiler.misc.file.doesnt.contain.class: p.A))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/6668794/badSource/p/A.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package q;
+
+class A { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Paths/6638501/HelloLib/test/HelloImpl.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package test;
+
+public class HelloImpl {
+
+ public void Hello() {
+    java.lang.System.out.println("Hello");
+ }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Paths/6638501/JarFromManifestFailure.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6638501
+ * @summary REGRESSION:  Java Compiler cannot find jar files referenced by other
+ * @run main JarFromManifestFailure
+ */
+
+import java.io.*;
+import java.nio.*;
+import java.util.*;
+import java.util.jar.*;
+import javax.tools.*;
+import javax.tools.StandardJavaFileManager.*;
+
+public class JarFromManifestFailure {
+    static File testSrc = new File(System.getProperty("test.src", "."));
+    static File testClasses = new File(System.getProperty("test.classes", "."));
+
+    public static void main(String... args) throws Exception {
+        compile(testClasses, null, new File(testSrc, "HelloLib/test/HelloImpl.java"), new File(testSrc, "WsCompileExample.java"));
+        File libFile = new File(testClasses, "lib");
+        libFile.mkdir();
+        jar(new File(libFile, "HelloLib.jar"), new ArrayList(), testClasses, new File("test"));
+
+        ArrayList arList = new ArrayList();
+        arList.add(new File("HelloLib.jar"));
+        jar(new File(libFile, "JarPointer.jar"), arList, testClasses);
+
+        String[] args1 = {
+            "-d", ".",
+            "-cp", new File(libFile, "JarPointer.jar").getPath().replace('\\', '/'),
+            new File(testSrc, "test/SayHello.java").getPath().replace('\\', '/')
+        };
+        System.err.println("First compile!!!");
+        if (com.sun.tools.javac.Main.compile(args1) != 0) {
+            throw new AssertionError("Failure in first compile!");
+        }
+
+        System.err.println("Second compile!!!");
+
+        args1 = new String[] {
+            "-d", ".",
+            "-cp", new File(libFile, "JarPointer.jar").getPath().replace('\\', '/'),
+            new File(testSrc, "test1/SayHelloToo.java").getPath().replace('\\', '/')
+        };
+        if (com.sun.tools.javac.Main.compile(args1) != 0) {
+            throw new AssertionError("Failure in second compile!");
+        }
+    }
+
+    static void compile(File classOutDir, Iterable<File> classPath, File... files) {
+        System.err.println("compile...");
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null);
+        Iterable<? extends JavaFileObject> fileObjects =
+                    fm.getJavaFileObjectsFromFiles(Arrays.asList(files));
+
+        List<String> options = new ArrayList<String>();
+        if (classOutDir != null) {
+            options.add("-d");
+            options.add(classOutDir.getPath());
+        }
+        if (classPath != null) {
+            options.add("-classpath");
+            options.add(join(classPath, File.pathSeparator));
+        }
+        options.add("-verbose");
+
+        JavaCompiler.CompilationTask task =
+            compiler.getTask(null, fm, null, options, null, fileObjects);
+        if (!task.call())
+            throw new AssertionError("compilation failed");
+    }
+
+    static void jar(File jar, Iterable<File> classPath, File base, File... files)
+            throws IOException {
+        System.err.println("jar...");
+        Manifest m = new Manifest();
+        if (classPath != null) {
+            Attributes mainAttrs = m.getMainAttributes();
+            mainAttrs.put(Attributes.Name.MANIFEST_VERSION, "1.0");
+            mainAttrs.put(Attributes.Name.CLASS_PATH, join(classPath, " "));
+        }
+        OutputStream out = new BufferedOutputStream(new FileOutputStream(jar));
+        JarOutputStream j = new JarOutputStream(out, m);
+        add(j, base, files);
+        j.close();
+    }
+
+    static void add(JarOutputStream j, File base, File... files) throws IOException {
+        if (files == null)
+            return;
+
+        for (File f: files)
+            add(j, base, f);
+    }
+
+    static void add(JarOutputStream j, File base, File file) throws IOException {
+        File f = new File(base, file.getPath());
+        if (f.isDirectory()) {
+            JarEntry e = new JarEntry(new String(file.getPath() + File.separator).replace('\\', '/'));
+            e.setSize(file.length());
+            j.putNextEntry(e);
+            String[] children = f.list();
+            if (children != null) {
+                for (String c: children) {
+                    add(j, base, new File(file, c));
+                }
+            }
+        } else {
+            JarEntry e = new JarEntry(file.getPath().replace('\\', '/'));
+            e.setSize(f.length());
+            j.putNextEntry(e);
+            j.write(read(f));
+            j.closeEntry();
+        }
+
+    }
+
+    static byte[] read(File f) throws IOException {
+        byte[] buf = new byte[(int) f.length()];
+        BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
+        int offset = 0;
+        while (offset < buf.length) {
+            int n = in.read(buf, offset, buf.length - offset);
+            if (n < 0)
+                throw new EOFException();
+            offset += n;
+        }
+        return buf;
+    }
+
+    static <T> Iterable<T> iterable(T single) {
+        return Collections.singleton(single);
+    }
+
+    static <T> String join(Iterable<T> iter, String sep) {
+        StringBuilder p = new StringBuilder();
+        for (T t: iter) {
+            if (p.length() > 0)
+                p.append(' ');
+            p.append(t);
+        }
+        return p.toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Paths/6638501/WsCompileExample.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+//for CompilerHelper
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+
+
+public class WsCompileExample {
+    File destDir;
+    File srcDir;
+    protected boolean compilerDebug = false;
+    protected boolean compilerOptimize = false;
+    protected String userClasspath = null;
+
+    public static void main(String[] args) {
+        new WsCompileExample().do_main(args);
+    }
+
+    public void do_main(String[] args) {
+        if(!args[0].equals("-s")) {
+            throw new RuntimeException("specify -s for src");
+        }
+
+        //run it once
+        srcDir =  new File(args[1]);
+        if(!args[2].equals("-d")) {
+            throw new RuntimeException("specify -d for dest");
+        }
+        destDir =  new File(args[3]);
+        if(!destDir.exists())
+            destDir.mkdirs();
+        System.out.println("----test compile 1-----");
+        compileGeneratedClasses();
+
+        //run it twice
+         srcDir = new File(args[1]+"1");
+         destDir =  new File(args[3]+"1");
+        if(!destDir.exists())
+            destDir.mkdirs();
+        System.out.println("----test compile 2-----");
+        compileGeneratedClasses();
+
+    }
+    protected void compileGeneratedClasses() {
+        List sourceFiles = new ArrayList();
+
+        for (File f: srcDir.listFiles()) {
+            if (f.getName().endsWith(".java")) {
+                sourceFiles.add(f.getAbsolutePath());
+            }
+        }
+
+        if (sourceFiles.size() > 0) {
+                                String classDir = destDir.getAbsolutePath();
+            String classpathString = createClasspathString();
+            System.out.println("classpathString: " + classpathString);
+
+                                String[] args = new String[4 + (compilerDebug == true ? 1 : 0) +
+                (compilerOptimize == true ? 1 : 0) +
+                sourceFiles.size()];
+            args[0] = "-d";
+            args[1] = classDir;
+            args[2] = "-classpath";
+            args[3] = classpathString;
+//                              args[4]="-DnonBatchMode";
+            int baseIndex = 4;
+            if (compilerDebug) {
+                args[baseIndex++] = "-g";
+            }
+            if (compilerOptimize) {
+                args[baseIndex++] = "-O";
+            }
+            for (int i = 0; i < sourceFiles.size(); ++i) {
+                args[baseIndex + i] = (String)sourceFiles.get(i);
+            }
+
+            // ByteArrayOutputStream javacOutput = new ByteArrayOutputStream();
+            JavaCompilerHelper compilerHelper = new JavaCompilerHelper(System.out);
+            boolean result = compilerHelper.compile(args);
+            if (!result) {
+                System.out.println("wscompile.compilation Failed");
+            }
+        }
+    }
+
+    protected String createClasspathString() {
+        if (userClasspath == null) {
+            userClasspath = "";
+        }
+                          String jcp = userClasspath + File.pathSeparator + System.getProperty("java.class.path");
+                  return jcp;
+    }
+}
+///////////////////////////////////////////////////////////////////
+class JavaCompilerHelper {
+    public JavaCompilerHelper(OutputStream out) {
+                this.out = out;
+        }
+
+        public boolean compile(String[] args) {
+                return internalCompile(args);
+        }
+
+        protected boolean internalCompile(String[] args) {
+
+                System.out.println("Args: ");
+                for(String arg : args){
+                        System.out.print(arg+" ");
+                }
+        System.out.println();
+                ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                Class comSunToolsJavacMainClass = null;
+                try {
+                        /* try to use the new compiler */
+                        comSunToolsJavacMainClass =
+                                cl.loadClass("com.sun.tools.javac.Main");
+                        try {
+                                Method compileMethod =
+                                        comSunToolsJavacMainClass.getMethod(
+                                                "compile",
+                                                compile141MethodSignature);
+                                try {
+                                        Object result =
+                                                compileMethod.invoke(
+                                                        null,
+                                                        new Object[] { args, new PrintWriter(out)});
+                                        if (!(result instanceof Integer)) {
+                                                return false;
+                                        }
+                                        return ((Integer) result).intValue() == 0;
+                                } catch (IllegalAccessException e3) {
+                                        return false;
+                                } catch (IllegalArgumentException e3) {
+                                        return false;
+                                } catch (InvocationTargetException e3) {
+                                        return false;
+                                }
+                        } catch (NoSuchMethodException e2) {
+              System.out.println("ERROR: Compile failed with error:" + e2.toString() );
+                        }
+                } catch (ClassNotFoundException e) {
+                        e.printStackTrace();
+                        return false;
+                } catch (SecurityException e) {
+                        return false;
+                }
+                return true;
+        }
+
+        protected String getGenericErrorMessage() {return "javacompiler.error"; }
+        protected void run() {  }
+        protected boolean parseArguments(String[] args) {return false;}
+        protected OutputStream out;
+
+        protected static final Class[] compile141MethodSignature;
+        static
+        {
+                compile141MethodSignature = new Class[2];
+                compile141MethodSignature[0] = (new String[0]).getClass();
+                compile141MethodSignature[1] = PrintWriter.class;
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Paths/6638501/test/SayHello.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import test.HelloImpl;
+
+public class SayHello extends HelloImpl {
+  public static void main(String... args) {
+    new SayHello().Hello();
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/Paths/6638501/test1/SayHelloToo.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2007-2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+import test.HelloImpl;
+
+public class SayHelloToo extends HelloImpl {
+  public static void main(String... args) {
+    new SayHelloToo().Hello();
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringConversion2.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 4741726
+ * @summary allow Object += String
+ */
+
+public class StringConversion2
+{
+    public static void main(String[] args) {
+        Object o = "Hello ";
+        String s = "World!";
+        o += s;
+        if (!o.equals("Hello World!"))
+            throw new Error("test failed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6663588.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6663588
+ * @summary Compiler goes into infinite loop for Cyclic Inheritance test case
+ * @author Maurizio Cimadamore
+ * @compile/fail T6663588.java
+ */
+
+public class T6663588<T extends T6663588.Inner> extends T6663588 {
+     class Inner extends T6663588.Inner {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6668802.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6668802
+ * @summary javac handles diagnostics for last line badly, if line not terminated by newline
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class T6668802
+{
+    public static void main(String[] args) throws Exception {
+        new T6668802().run();
+    }
+
+    void run() throws Exception {
+        String test = "public class Test {";
+        File f = writeTestFile("Test.java", test);
+        String[] out = compileBadFile(f);
+        for (String line: out)
+            System.err.println(">>>" + line + "<<<");
+        if (!out[1].equals(test)) {
+            show("expected", test);
+            show("  actual", out[1]);
+            throw new Error("test failed");
+        }
+    }
+
+    File writeTestFile(String path, String contents) throws IOException {
+        File f = new File(path);
+        FileWriter out = new FileWriter(f);
+        out.write(contents);
+        out.close();
+        return f;
+    }
+
+    String[] compileBadFile(File file) throws IOException {
+        List<String> options = new ArrayList<String>();
+        options.add(file.getPath());
+        System.err.println("compile: " + options);
+        String[] opts = options.toArray(new String[options.size()]);
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+        int rc = com.sun.tools.javac.Main.compile(opts, out);
+        if (rc == 0)
+            throw new Error("compilation succeeded unexpectedly");
+        out.close();
+        return sw.toString().split("[\n\r]+");
+    }
+
+    void show(String prefix, String text) {
+        System.err.println(prefix + ": (" + text.length() + ") " + text);
+    }
+}
--- a/langtools/test/tools/javac/api/6431257/T6431257.java	Wed Apr 23 14:35:26 2008 +0400
+++ b/langtools/test/tools/javac/api/6431257/T6431257.java	Sun May 04 07:05:42 2008 -0700
@@ -27,6 +27,7 @@
  * @summary JSR 199: Changes to JavaFileManager to support JSR 269 Filer API
  * @author  Peter von der Ah\u00e9
  * @library ../lib
+ * @ignore  Need to fix this test when 6508981 is fixed.
  * @compile T6431257.java package-info.java
  * @run main T6431257 foo.bar.baz foo/bar/baz
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/api/6608214/T6608214.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6608214
+ * @summary Exception throw while analysing a file with error
+ * @author  Maurizio Cimadamore
+ */
+
+import com.sun.source.util.JavacTask;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+import static javax.tools.JavaFileObject.Kind;
+
+public class T6608214 {
+    public static void main(String[] args) throws IOException {
+        JavaFileObject sfo = new SimpleJavaFileObject(URI.create(""),Kind.SOURCE) {
+            public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+                return "class Test<S> { <T extends S & Runnable> void test(){}}";
+            }
+        };
+        List<? extends JavaFileObject> files = Arrays.asList(sfo);
+        String bootPath = System.getProperty("sun.boot.class.path");
+        List<String> opts = Arrays.asList("-bootclasspath",  bootPath, "-Xjcov");
+        JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        JavacTask ct = (JavacTask)tool.getTask(null, null, null,opts,null,files);
+        ct.analyze();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/boxing/T6614974.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6614974
+ * @summary javac successfully compiles code that throws java.lang.VerifyError when run
+ * @author  mcimadamore
+ */
+public class T6614974<T> {
+
+    private T n;
+
+    public void error() {
+        T6614974<Integer> val = new T6614974<Integer>();
+        val.n = 0;
+        Integer.toString(val.n++);
+    }
+
+    public static void main(String[] args) {
+        T6614974.class.getMethods();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/enum/T6509042.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6509042
+ *
+ * @summary javac rejects class literals in enum constructors
+ * @author Maurizio Cimadamore
+ *
+ * @compile T6509042.java
+ */
+enum T6509042 {
+     A, B;
+
+     Class<T6509042> cl = T6509042.class;
+
+     T6509042() {
+         Class<T6509042> cl2 = T6509042.class;
+     }
+}
--- a/langtools/test/tools/javac/expression/ObjectAppend.java	Wed Apr 23 14:35:26 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright 2002 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/*
- * @test
- * @bug 4642850
- * @summary compiler allows Object += String
- * @author gafter
- *
- * @compile/fail ObjectAppend.java
- */
-
-class ObjectAppend {{
-    Object o = null;
-    o += "string";
-}}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6531090/T6531090a.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6531090
+ *
+ * @summary Cannot access methods/fields of a captured type belonging to an intersection type
+ * @author Maurizio Cimadamore
+ *
+ */
+public class T6531090a {
+
+    static class E {}
+
+    static class F extends E implements I1 {}
+
+    static interface I {}
+
+    static interface I1 {}
+
+    static class G extends F implements I {}
+
+    static class C<T extends E & I> {
+        T field;
+    }
+
+    public static void main(String... args) {
+        test(new C<G>());
+    }
+
+    static <W extends F> void test(C<? extends W> arg) {
+        F vf = arg.field;
+        I vi = arg.field;
+        I1 vi1 = arg.field;
+        E ve = arg.field;
+        W vt = arg.field;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6531090/T6531090b.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6531090
+ *
+ * @summary Cannot access methods/fields of a captured type belonging to an intersection type
+ * @author Maurizio Cimadamore
+ *
+ */
+public class T6531090b {
+
+    static class A {
+        public void a() {}
+        public A a;
+    }
+    static class B extends A {
+        public void b(){}
+        public B b;
+    }
+    static interface I{
+        void i();
+    }
+    static interface I1{
+        void i1();
+    }
+    static class E extends B implements I, I1{
+        public void i() {}
+        public void i1() {}
+    }
+    static class C<W extends B & I1, T extends W>{
+        T t;
+        W w;
+        C(W w, T t) {
+            this.w = w;
+            this.t = t;
+        }
+    }
+
+    public static void main(String... args) {
+        C<E,E> c = new C<E,E>(new E(), new E());
+        testMemberMethods(c);
+        testMemberFields(c);
+    }
+
+    static void testMemberMethods(C<? extends A, ? extends I> arg) {
+        arg.t.a();
+        arg.t.b();
+        arg.t.i1();
+        arg.w.a();
+        arg.w.b();
+        arg.w.i1();
+    }
+
+    static void testMemberFields(C<? extends A, ? extends I> arg) {
+        A ta = arg.t.a;
+        B tb = arg.t.b;
+        A wa = arg.w.a;
+        B wb = arg.w.b;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T6660289.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6660289
+ * @summary declared bound in inner class referring a type variable of the outer class
+ * @author Maurizio Cimadamore
+ * @compile T6660289.java
+ */
+
+public class T6660289<E> {
+     class Inner<S extends E> {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/6569789/T6569789.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug     6569789
+ * @summary Compiler test lang/TYPE/type153/type15304/type15304.html fails since jdk7 b05
+ * @compile T6569789.java
+ */
+
+class C {}
+interface I {}
+interface I1 {}
+interface I2 {}
+class CT extends C implements I, I1, I2 {}
+
+public class T6569789 {
+    public static void m() {
+        CT ct = new CT();
+        testMethod(ct);
+    }
+
+    static <W extends C & I & I1 & I2, T extends W> void testMethod(T t) {}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/6611449/T6611449.java	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/**
+ * @test
+ * @bug 6611449
+ * @summary Internal Error thrown during generic method/constructor invocation
+ * @compile/fail/ref=T6611449.out -XDstdout -XDrawDiagnostics T6611449.java
+ */
+public class T6611449<S> {
+
+    T6611449() {this(1);}
+
+    <T extends S> T6611449(T t1) {this(t1, 1);}
+
+    <T extends S> T6611449(T t1, T t2) {}
+
+    <T extends S> void m(T t1) {}
+
+    <T extends S> void m(T t1, T t2) {}
+
+    void test() {
+        m1(1);
+        m2(1, 1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/6611449/T6611449.out	Sun May 04 07:05:42 2008 -0700
@@ -0,0 +1,5 @@
+T6611449.java:32:17: compiler.err.cant.resolve.location: (- compiler.misc.kindname.constructor), T6611449, (int), , (- compiler.misc.kindname.class), T6611449<S>
+T6611449.java:34:35: compiler.err.cant.resolve.location: (- compiler.misc.kindname.constructor), T6611449, (T,int), , (- compiler.misc.kindname.class), T6611449<S>
+T6611449.java:43:9: compiler.err.cant.resolve.location: (- compiler.misc.kindname.method), m1, (int), , (- compiler.misc.kindname.class), T6611449<S>
+T6611449.java:44:9: compiler.err.cant.resolve.location: (- compiler.misc.kindname.method), m2, (int,int), , (- compiler.misc.kindname.class), T6611449<S>
+4 errors
--- a/make/Defs-internal.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/make/Defs-internal.gmk	Sun May 04 07:05:42 2008 -0700
@@ -28,6 +28,12 @@
 # not contain rules.
 #
 
+ifdef OPENJDK
+  ifneq ($(OPENJDK),true)
+    x:=$(error "OPENJDK (if defined) can only be set to true")
+  endif
+endif
+
 # Define absolute paths to TOPDIRs
 ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
@@ -96,10 +102,8 @@
 endif
 ifeq ($(JDK_SRC_AVAILABLE),true)
   JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
-  ifndef OPENJDK
-    ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
-      OPENJDK = true
-    endif
+  ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
+    OPENJDK = true
   endif
 endif
 
@@ -150,8 +154,8 @@
   SKIP_OPENJDK_BUILD = true
 else
   ifndef SKIP_OPENJDK_BUILD
-    SKIP_OPENJDK_BUILD = false
-    # FIXUP: until freetype fixed on linux and solaris rmi build fixed
+    #SKIP_OPENJDK_BUILD = false
+    # Until 6675289 is resolved, or this feature is removed.
     SKIP_OPENJDK_BUILD = true
   endif
 endif
--- a/make/jdk-rules.gmk	Wed Apr 23 14:35:26 2008 +0400
+++ b/make/jdk-rules.gmk	Sun May 04 07:05:42 2008 -0700
@@ -121,11 +121,3 @@
 
 .PHONY: jdk jdk-build jdk-clobber jdk-sanity 
 
-# FIXUP: Old j2se target names
-j2se-build: jdk-build
-j2se-clobber:: jdk-clobber
-j2se-sanity:: jdk-sanity
-j2se: jdk
-
-.PHONY: j2se j2se-build j2se-clobber j2se-sanity 
-