changeset 4685:b0641c559aa1

Merge from main OpenJDK Update 2 repository
author Greg Lewis <glewis@eyesbeyond.com>
date Sun, 26 Feb 2012 16:05:10 -0800
parents 0870207843e2 58ad18490a50
children 4b5540e8d2d9
files make/com/oracle/net/Makefile make/common/Defs-linux.gmk make/common/Defs-solaris.gmk make/common/Defs.gmk make/common/Release.gmk make/java/java/Makefile make/java/nio/Makefile make/java/redist/Makefile src/share/classes/sun/awt/FontConfiguration.java src/share/native/java/lang/fdlibm/include/fdlibm.h src/share/native/java/lang/fdlibm/include/jfdlibm.h src/share/native/sun/awt/libpng/pnggccrd.c src/share/native/sun/awt/libpng/pngvcrd.c src/solaris/demo/jvmti/hprof/hprof_md.c src/solaris/native/java/util/TimeZone_md.c src/solaris/native/sun/awt/fontpath.c
diffstat 723 files changed, 28801 insertions(+), 23441 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Sep 11 10:51:01 2011 -0700
+++ b/.hgtags	Sun Feb 26 16:05:10 2012 -0800
@@ -121,4 +121,23 @@
 23bdcede4e3945894574892e80b848bd9f15b5f3 jdk7-b144
 1e04b38b3824a4a1d197ef681a302e6813e53f8b jdk7-b145
 539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146
+69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01
 f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147
+2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02
+a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03
+b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04
+2d10aa9d772a47475ae9e51d5f8073012a91bce3 jdk7u1-b05
+9b8c96f96a0f9a5801b55530a387fefbe50482a3 jdk7u2-b01
+449f7f1bb73563a3858e18a46f6e1d63fd7ac39e jdk7u2-b04
+775d67f1d144692888a63a9268d55f69f7d01e9d jdk7u2-b05
+1da81fa43d480272440052f3f254eb2f0dc30da4 jdk7u2-b06
+d26cd028ee0b241175b8a31fb6c28a52993e288e jdk7u2-b07
+fb110f661e8c466d32097b42735328db39752940 jdk7u2-b08
+d8e7315e4c9129fa58ee1d90a7a39f0d4f6eeeff jdk7u2-b09
+14d8cc19f227266add915ffdf0da761e02c68e73 jdk7u1-b06
+11f7d603acee6bbd5824aa2577b63fd462ae7dc0 jdk7u1-b07
+50d739b0c45631b386af3f2cb6235f137c1a6e91 jdk7u1-b08
+b5090771e19b2b20670bef60a84de95797cb01be jdk7u2-b11
+79c8c4608f60e1f981b17ba4077dfcaa2ed67be4 jdk7u2-b12
+fb2980d7c9439e3d62ab12f40506a2a2db2df0f4 jdk7u2-b13
+24e42f1f9029f9f5a9b1481d523facaf09452e5b jdk7u2-b21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.jcheck/conf	Sun Feb 26 16:05:10 2012 -0800
@@ -0,0 +1,2 @@
+project=jdk7
+bugids=dup
--- a/THIRD_PARTY_README	Sun Sep 11 10:51:01 2011 -0700
+++ b/THIRD_PARTY_README	Sun Feb 26 16:05:10 2012 -0800
@@ -216,15 +216,16 @@
 is included with JRE 7, JDK 7, and OpenJDK 7.
 
 You are receiving a copy of the Elliptic Curve Cryptography library in source
-form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7
-runtime.
-
-The terms of the Oracle license do NOT apply to the Elliptic Curve
-Cryptography library program; it is licensed under the following license,
-separately from the Oracle programs you receive. If you do not wish to install
-this program, you may delete the library named libsunec.so (on Solaris and
-Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory
-reserved for native libraries.
+form with the JDK 7 and OpenJDK7 source distributions, and as object code in
+the JRE 7 & JDK 7 runtimes.
+
+In the case of the JRE 7 & JDK 7 runtimes, the terms of the Oracle license do
+NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
+following license, separately from Oracle's JDK & JRE.  If you do not wish to
+install the Elliptic Curve Cryptography library, you may delete the library
+named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
+systems) from the JRE bin directory reserved for native libraries.
+
 
 --- begin of LICENSE ---
 
@@ -1000,7 +1001,7 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to libpng 1.2.18, which is 
+%% This notice is provided with respect to libpng 1.5.4, which is 
 included with JRE 7, JDK 7, and OpenJDK 7.
 
 --- begin of LICENSE ---
@@ -1014,8 +1015,10 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are
-Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
+This code is released under the libpng license.
+
+libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
+Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
 
@@ -1112,7 +1115,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-May 15, 2007
+July 7, 2011
 
 --- end of LICENSE ---
 
--- a/make/com/oracle/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/com/oracle/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,13 @@
 PRODUCT = oracle
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = net
-include $(BUILDDIR)/common/Subdirs.gmk
+#
+# Files to compile
+#
+AUTO_FILES_JAVA_DIRS = com/oracle
 
-all build clean clobber::
-	$(SUBDIRS-loop)
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
+
--- a/make/com/oracle/net/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BUILDDIR = ../../..
-PRODUCT = oracle
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files to compile
-#
-AUTO_FILES_JAVA_DIRS = com/oracle/net
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Classes.gmk
-
--- a/make/common/Defs-embedded.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Defs-embedded.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -60,5 +60,10 @@
   endif
 endif
 
+# NIO Platform specific source file location
+ifdef CROSS_COMPILE_ARCH
+  NIO_PLATFORM_CLASSES_ROOT_DIR = $(CLOSED_PLATFORM_SRC)/classes/
+endif
+
 endif # JAVASE_EMBEDDED
 
--- a/make/common/Defs-linux.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Defs-linux.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -74,6 +74,57 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
+# Default OBJCOPY comes from GNU Binutils on Linux:
+DEF_OBJCOPY=/usr/bin/objcopy
+ifdef CROSS_COMPILE_ARCH
+  # don't try to generate .debuginfo files when cross compiling
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
+      "skipping .debuginfo generation.")
+  OBJCOPY=
+else
+  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+  ifneq ($(ALT_OBJCOPY),)
+    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+  endif
+endif
+
+ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+# The setting of OBJCOPY above enables the JDK build to import
+# .debuginfo files from the HotSpot build. However, adding FDS
+# support to the JDK build will occur in phases so a different
+# make variable is used to indicate that a particular library
+# supports FDS.
+
+ifeq ($(OBJCOPY),)
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+else
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+  # Library stripping policies for .debuginfo configs:
+  #   all_strip - strips everything from the library
+  #   min_strip - strips most stuff from the library; leaves minimum symbols
+  #   no_strip  - does not strip the library at all
+  #
+  # Oracle security policy requires "all_strip". A waiver was granted on
+  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+  #
+  DEF_STRIP_POLICY="min_strip"
+  ifeq ($(ALT_STRIP_POLICY),)
+    STRIP_POLICY=$(DEF_STRIP_POLICY)
+  else
+    STRIP_POLICY=$(ALT_STRIP_POLICY)
+  endif
+
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+endif
+endif
+
 #
 # Default optimization
 #
@@ -322,6 +373,7 @@
 override LIBPOSIX4               =
 override LIBSOCKET               =
 override LIBNSL                  =
+override LIBSCF                  =
 override LIBTHREAD               =
 override LIBDL                   = -ldl
 override MOOT_PRIORITIES         = true
@@ -361,6 +413,7 @@
 # Settings for the JDI - Serviceability Agent binding.
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
 
 # The JDI - Serviceability Agent binding is not currently supported
 # on Linux-ia64.
--- a/make/common/Defs-solaris.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Defs-solaris.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -74,6 +74,69 @@
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
 CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
+ifdef ENABLE_FULL_DEBUG_SYMBOLS
+# Only check for Full Debug Symbols support on Solaris if it is
+# specifically enabled. Hopefully, it can be enabled by default
+# once the .debuginfo size issues are worked out.
+
+# Default OBJCOPY comes from the SUNWbinutils package:
+DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
+ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
+  # On Solaris AMD64/X64, gobjcopy is not happy and fails:
+  #
+  # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
+  # BFD: stKPaiop: Not enough room for program headers, try linking with -N
+  # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
+  OBJCOPY=
+else
+  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+  ifneq ($(ALT_OBJCOPY),)
+    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+  endif
+endif
+
+ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+# The setting of OBJCOPY above enables the JDK build to import
+# .debuginfo files from the HotSpot build. However, adding FDS
+# support to the JDK build will occur in phases so a different
+# make variable is used to indicate that a particular library
+# supports FDS.
+
+ifeq ($(OBJCOPY),)
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+else
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+  # Library stripping policies for .debuginfo configs:
+  #   all_strip - strips everything from the library
+  #   min_strip - strips most stuff from the library; leaves minimum symbols
+  #   no_strip  - does not strip the library at all
+  #
+  # Oracle security policy requires "all_strip". A waiver was granted on
+  # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+  #
+  DEF_STRIP_POLICY="min_strip"
+  ifeq ($(ALT_STRIP_POLICY),)
+    STRIP_POLICY=$(DEF_STRIP_POLICY)
+  else
+    STRIP_POLICY=$(ALT_STRIP_POLICY)
+  endif
+  _JUNK_ := $(shell \
+    echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+endif
+endif
+endif
+
 #
 # Java default optimization (-x04/-O2) etc.  Applies to the VM.
 #
@@ -651,6 +714,9 @@
 # Dynamic Loading library
 LIBDL = -ldl
 
+# service configuration facility library
+LIBSCF = -lscf
+
 # GLOBAL_KPIC: If set means all libraries are PIC, position independent code
 #    EXCEPT for select compiles
 #    If a .o file is compiled non-PIC then it should be forced
@@ -687,5 +753,6 @@
 # Settings for the JDI - Serviceability Agent binding.
 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
 SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
 INCLUDE_SA=true
 
--- a/make/common/Defs.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Defs.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -348,6 +348,9 @@
 #where the demo source can be found
 DEMOSRCDIR          = $(SHARE_SRC)/demo
 
+#where the sample source can be found
+SAMPLESRCDIR          = $(SHARE_SRC)/sample
+
 # An attempt is made to generate unique enough directories for the
 # generated files to not have name collisisons. Most build units
 # defines PRODUCT (except Release.gmk), but then they may or may 
--- a/make/common/Release-embedded.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Release-embedded.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -161,6 +161,9 @@
 	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man
 	$(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES
 
+	@# Copy back in the attach library
+	$(CP) $(JDK_IMAGE_DIR)/jre/lib/$(LIBARCH)/$(LIB_PREFIX)attach.$(LIB_SUFFIX) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)
+
 	@$(ECHO) Done Creating Reduced JRE
 
 #
--- a/make/common/Release.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/Release.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -60,7 +60,8 @@
 # with a new module system (being discussed for JDK 8).
 #
 EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
-                        com.oracle.net
+                        com.oracle.net \
+                        com.oracle.nio
 
 # 64-bit solaris has a few special cases. We define the variable
 # SOLARIS64 for use in this Makefile to easily test those cases
@@ -81,11 +82,13 @@
   SHARE_JRE_DOC_SRC = $(JDK_TOPDIR)
   # Same files for jdk and jre, no name changes
   IMAGE_DOCLIST_JDK = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
+  IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES =
   IMAGE_DOCLIST_JRE = LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README
 else
   # make/closed/common/Defs.gmk for closed location of SHARE_JDK_DOC_SRC
 
   IMAGE_DOCLIST_JDK = COPYRIGHT README.html  LICENSE THIRDPARTYLICENSEREADME.txt
+  IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES = demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
   IMAGE_DOCLIST_JRE = COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
   ifeq ($(PLATFORM), windows)
     IMAGE_DOCLIST_JRE += README.txt
@@ -97,6 +100,7 @@
 # Paths to these files we need
 JDK_DOCFILES   = $(IMAGE_DOCLIST_JDK:%=$(JDK_IMAGE_DIR)/%)
 JRE_DOCFILES   = $(IMAGE_DOCLIST_JRE:%=$(JRE_IMAGE_DIR)/%)
+JDK_DEMOS_AND_SAMPLES_DOCFILES = $(IMAGE_DOCLIST_JDK_DEMOS_AND_SAMPLES:%=$(JDK_IMAGE_DIR)/%)
 
 # absolute directory names: note, these must exist prior to build
 # time - they are created in the main Makefile.
@@ -494,6 +498,12 @@
 $(JDK_IMAGE_DIR)/%: $(SHARE_JDK_DOC_SRC)/%
 	$(process-doc-file)
 
+$(JDK_IMAGE_DIR)/demo/DEMOS_LICENSE: $(SHARE_JDK_DOC_SRC)/DEMOS_LICENSE
+	$(process-doc-file)
+
+$(JDK_IMAGE_DIR)/sample/SAMPLES_LICENSE: $(SHARE_JDK_DOC_SRC)/SAMPLES_LICENSE
+	$(process-doc-file)
+
 # JRE files 
 $(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/%
 	$(process-doc-file)
@@ -921,7 +931,8 @@
 # Standard jdk image
 initial-image-jdk:: initial-image-jdk-setup \
 		    initial-image-jdk-db \
-		    $(JDK_DOCFILES)
+		    $(JDK_DOCFILES) \
+		    $(JDK_DEMOS_AND_SAMPLES_DOCFILES)
 	$(MKDIR) $(JDK_IMAGE_DIR)/lib
 	@#
 	@# Copy in the jars in lib that only belong in the JDK
--- a/make/common/shared/Defs-control.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/common/shared/Defs-control.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -75,9 +75,11 @@
 SRC_BUNDLEDIR       = $(OUTPUTDIR)/source-bundles
 ABS_SRC_BUNDLEDIR   = $(ABS_OUTPUTDIR)/source-bundles
 BIN_BUNDLEDIR       = $(OUTPUTDIR)/bundles
+BIN_DEMOS_BUNDLEDIR = $(OUTPUTDIR)/demos-bundles
 ABS_BIN_BUNDLEDIR   = $(ABS_OUTPUTDIR)/bundles
 
 dummy := $(shell $(MKDIR) -p $(BIN_BUNDLEDIR))
+dummy := $(shell $(MKDIR) -p $(BIN_DEMOS_BUNDLEDIR) )
 dummy := $(shell $(MKDIR) -p $(SRC_BUNDLEDIR) )
 
 TEMP_DIR = $(OUTPUTDIR)/tmp
--- a/make/java/fdlibm/FILES_c.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/fdlibm/FILES_c.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -30,21 +30,13 @@
 	k_sin.c \
 	k_tan.c \
 	e_acos.c \
-	e_acosh.c \
 	e_asin.c \
 	e_atan2.c \
 	e_atanh.c \
 	e_cosh.c \
 	e_exp.c \
 	e_fmod.c \
-	e_gamma.c \
-	e_gamma_r.c \
 	e_hypot.c \
-	e_j0.c \
-	e_j1.c \
-	e_jn.c \
-	e_lgamma.c \
-	e_lgamma_r.c \
 	e_log.c \
 	e_log10.c \
 	e_pow.c \
@@ -54,21 +46,13 @@
 	e_sinh.c \
 	e_sqrt.c \
 	w_acos.c \
-	w_acosh.c \
 	w_asin.c \
 	w_atan2.c \
 	w_atanh.c \
 	w_cosh.c \
 	w_exp.c \
 	w_fmod.c \
-	w_gamma.c \
-	w_gamma_r.c \
 	w_hypot.c \
-	w_j0.c \
-	w_j1.c \
-	w_jn.c \
-	w_lgamma.c \
-	w_lgamma_r.c \
 	w_log.c \
 	w_log10.c \
 	w_pow.c \
@@ -76,13 +60,11 @@
 	w_scalb.c \
 	w_sinh.c \
 	w_sqrt.c \
-	s_asinh.c \
 	s_atan.c \
 	s_cbrt.c \
 	s_ceil.c \
 	s_copysign.c \
 	s_cos.c \
-	s_erf.c \
 	s_expm1.c \
 	s_fabs.c \
 	s_finite.c \
--- a/make/java/java/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/java/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -207,7 +207,7 @@
 		       -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib \
 		       shell32.lib delayimp.lib /DELAYLOAD:shell32.dll
 else
-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBDL) \
+OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBSCF) $(LIBDL) \
 		-L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
 endif
 
--- a/make/java/nio/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/nio/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -255,7 +255,7 @@
 	sun/nio/fs/LinuxWatchService.java \
 	sun/nio/fs/UnixCopyFile.java \
 	sun/nio/fs/UnixNativeDispatcher.java
-	
+
 FILES_gen += \
 	sun/nio/fs/UnixConstants.java
 endif # PLATFORM = linux
@@ -840,7 +840,7 @@
 #
 
 GEN_EX_SH = genExceptions.sh
- 
+
 GEN_EX_CMD = NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_EX_SH)
 
 $(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions
@@ -889,14 +889,19 @@
 
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
 	$(prep-target)
-	($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS) $(LDDFLAGS) \
+	($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \
 	   -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
 
+ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
+$(SCH_GEN)/SocketOptionRegistry.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/ch/SocketOptionRegistry-$(PLATFORM)-$(ARCH).java
+	$(prep-target)
+	$(CP) $< $@
+else 
 $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@
 	$(GENSOR_EXE) >> $@
-
+endif
 #
 # Generated sun.nio.cs SingleByte classes
 #
@@ -920,12 +925,18 @@
 
 $(GENUC_EXE) : $(GENUC_SRC)
 	$(prep-target)
-	$(HOST_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
+	$(CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
 
+ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
+$(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
+	$(prep-target)
+	$(CP) $< $@
+else
 $(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@
 	$(GENUC_EXE) >> $@
+endif
 
 GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c
 
@@ -936,11 +947,17 @@
 
 $(GENSC_EXE) : $(GENSC_SRC)
 	$(prep-target)
-	$(HOST_CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
+	$(CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
 
+ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
+$(SFS_GEN)/SolarisConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/SolarisConstants-$(PLATFORM)-$(ARCH).java
+	$(prep-target)
+	$(CP) $< $@
+else
 $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@
 	$(GENSC_EXE) >> $@
+endif
 
 .PHONY: sources 
--- a/make/java/redist/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/redist/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -58,6 +58,11 @@
 JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
 JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
 
+JVM_DEBUGINFO_NAME       = $(LIB_PREFIX)jvm.debuginfo
+LIBJSIG_DEBUGINFO_NAME   = $(LIB_PREFIX)jsig.debuginfo
+JVMDB_DEBUGINFO_NAME     = $(LIB_PREFIX)jvm$(DB_SUFFIX).debuginfo
+JVMDTRACE_DEBUGINFO_NAME = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).debuginfo
+
 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
 
 # Needed to do file copy
@@ -79,6 +84,12 @@
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
                 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME)
+    endif
+  endif
 else
   IMPORT_LIST =
 endif
@@ -88,6 +99,12 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
                  $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME)
+    endif
+  endif
 endif
 endif
 
@@ -157,16 +174,40 @@
 #  NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  NOT Windows
 
 IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) 
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain .debuginfo files
+  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+  endif
+endif
 ifndef BUILD_CLIENT_ONLY
   IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain the target of the symlink
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+    endif
+  endif
 endif
 
 ifeq ($(PLATFORM), solaris)
   ifndef BUILD_CLIENT_ONLY
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+      endif
+    endif
     # The conditional can be removed when import JDKs contain these files.
     ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),)
       IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME)
+      ifneq ($(OBJCOPY),)
+        # the import JDK may not contain .debuginfo files
+        ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+          IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+        endif
+      endif
     else
       $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
     endif 
@@ -177,17 +218,37 @@
 ifeq ($(ARCH_DATA_MODEL), 32)
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain the target of the symlink
+  ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME)
+  endif
+endif
 
 ifeq ($(PLATFORM), solaris)
 #  solaris   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  solaris
 
 IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
+ifneq ($(OBJCOPY),)
+  # the import JDK may not contain .debuginfo files
+  ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)),)
+    IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME)
+  endif
+endif
 
 # The conditional can be removed when import JDKs contain these files.
 ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)),)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
   IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME)
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+      IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+  endif
+  endif
 else
   $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
 endif
@@ -196,6 +257,12 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME)
+      endif
+    endif
   else
     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
   endif
@@ -203,6 +270,12 @@
   # The conditional can be removed when import JDKs contain these files.
   ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),)
     IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME)
+    ifneq ($(OBJCOPY),)
+      # the import JDK may not contain .debuginfo files
+      ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)),)
+        IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+      endif
+    endif
   else
     $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
  endif
@@ -229,6 +302,11 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME)
 	$(install-file)
 	@$(call binary_file_verification,$@)
@@ -237,15 +315,33 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME) \
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
+	@$(prep-target)
+	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
+endif
 else
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME):
 	@$(prep-target)
 	$(call install-sym-link, ../$(LIBJSIG_NAME))
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_DEBUGINFO_NAME):
+	@$(prep-target)
+	$(call install-sym-link, ../$(LIBJSIG_DEBUGINFO_NAME))
+endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
@@ -256,6 +352,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
 	$(install-import-file)
@@ -264,6 +368,14 @@
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
+
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
 endif
 
 $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
@@ -274,6 +386,14 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 ifndef BUILD_CLIENT_ONLY
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
 	$(install-import-file)
@@ -287,6 +407,17 @@
 	$(install-import-file)
 	@$(call binary_file_verification,$@)
 
+ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_DEBUGINFO_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_DEBUGINFO_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_DEBUGINFO_NAME)
+	$(install-import-file)
+endif
+
 $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
 	$(install-import-file)
 endif
--- a/make/java/redist/sajdi/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/redist/sajdi/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -56,6 +56,12 @@
     IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
                    $(LIB_LOCATION)/$(SAPDB_NAME)
   endif
+  ifneq ($(OBJCOPY),)
+    # the import JDK may not contain .debuginfo files
+    ifneq ($(wildcard $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(SA_DEBUGINFO_NAME)),)
+      IMPORT_LIST += $(LIB_LOCATION)/$(SA_DEBUGINFO_NAME)
+    endif
+  endif
 endif # INCLUDE_SA
 
 
@@ -79,6 +85,11 @@
 $(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
 	$(install-import-file)
 endif # windows
+
+  ifneq ($(OBJCOPY),)
+$(LIB_LOCATION)/$(SA_DEBUGINFO_NAME): $(HOTSPOT_SALIB_PATH)/$(SA_DEBUGINFO_NAME)
+	$(install-import-file)
+  endif
 endif # INCLUDE_SA
 
 all: $(IMPORT_LIST)
--- a/make/java/util/FILES_properties.gmk	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/java/util/FILES_properties.gmk	Sun Feb 26 16:05:10 2012 -0800
@@ -151,6 +151,7 @@
         sun/util/resources/CurrencyNames_es_CL.properties \
         sun/util/resources/CurrencyNames_es_CO.properties \
         sun/util/resources/CurrencyNames_es_CR.properties \
+        sun/util/resources/CurrencyNames_es_CU.properties \
         sun/util/resources/CurrencyNames_es_DO.properties \
         sun/util/resources/CurrencyNames_es_EC.properties \
         sun/util/resources/CurrencyNames_es_ES.properties \
--- a/make/mkdemo/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/mkdemo/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -39,9 +39,14 @@
 
 include $(BUILDDIR)/common/Subdirs.gmk
 
+TOPLEVEL_FILES =							\
+	$(DEMODIR)/README
+
 all build:: nbproject
 	$(SUBDIRS-loop)
 
+all build:: $(TOPLEVEL_FILES)
+
 nbproject:
 	$(RM) -r $(DEMODIR)/nbproject
 	$(MKDIR) -p $(DEMODIR)
@@ -54,8 +59,10 @@
 	  ( $(CD) $(DEMODIR) && $(TAR) -xf - )
 endif
 
+$(DEMODIR)/%: $(DEMOSRCDIR)/%
+	$(install-file)
+
 clean clobber::
 	$(SUBDIRS-loop)
 	$(RM) -r $(DEMODIR)
 	$(RM) -r $(DEMOCLASSDIR)
-
--- a/make/mksample/Makefile	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/mksample/Makefile	Sun Feb 26 16:05:10 2012 -0800
@@ -49,8 +49,16 @@
 
 include $(BUILDDIR)/common/Subdirs.gmk
 
+TOPLEVEL_FILES =							\
+	$(SAMPLEDIR)/README
+
 all build clean clobber::
 	$(SUBDIRS-loop)
 
+all build:: $(TOPLEVEL_FILES)
+
+$(SAMPLEDIR)/%: $(SAMPLESRCDIR)/%
+	$(install-file)
+
 clobber clean ::
 	$(RM) -r $(SAMPLEDIR)
--- a/make/sun/javazic/tzdata/VERSION	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/VERSION	Sun Feb 26 16:05:10 2012 -0800
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2011g
+tzdata2011l
--- a/make/sun/javazic/tzdata/africa	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/africa	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -80,7 +81,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -418,7 +419,7 @@
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -979,6 +980,11 @@
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -988,7 +994,7 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1114,7 +1120,7 @@
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia
--- a/make/sun/javazic/tzdata/antarctica	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/antarctica	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)antarctica	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -41,18 +42,6 @@
 # I made up all time zone abbreviations mentioned here; corrections welcome!
 # FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
 
-# These rules are stolen from the `europe' file.
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	RussAQ	1981	1984	-	Apr	 1	 0:00	1:00	S
-Rule	RussAQ	1981	1983	-	Oct	 1	 0:00	0	-
-Rule	RussAQ	1984	1991	-	Sep	lastSun	 2:00s	0	-
-Rule	RussAQ	1985	1991	-	Mar	lastSun	 2:00s	1:00	S
-Rule	RussAQ	1992	only	-	Mar	lastSat	 23:00	1:00	S
-Rule	RussAQ	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	RussAQ	1993	max	-	Mar	lastSun	 2:00s	1:00	S
-Rule	RussAQ	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	RussAQ	1996	max	-	Oct	lastSun	 2:00s	0	-
-
 # These rules are stolen from the `southamerica' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	ArgAQ	1964	1966	-	Mar	 1	0:00	0	-
--- a/make/sun/javazic/tzdata/asia	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/asia	Sun Feb 26 16:05:10 2012 -0800
@@ -21,6 +21,7 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -99,6 +100,10 @@
 Rule RussiaAsia	1993	1995	-	Sep	lastSun	 2:00s	0	-
 Rule RussiaAsia	1996	max	-	Oct	lastSun	 2:00s	0	-
 
+# From Arthur David Olson (2011-06-15):
+# While Russia abandoned DST in 2011, Armenia may choose to
+# follow Russia's "old" rules.
+
 # Afghanistan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Kabul	4:36:48 -	LMT	1890
@@ -2212,7 +2217,47 @@
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # </a>
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=416217">
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# </a>
+# Additional info:
+# <a href="http://www.timeanddate.com/news/time/palestine-dst-2011.html">
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# </a>
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# <a href="http://www.jpost.com/MiddleEast/Article.aspx?id=235650">
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# </a>
+# or
+# <a href="http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html">
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# </a>
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# <a href="http://www.maannews.net/eng/ViewDetails.aspx?ID=424808">
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# </a>
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2228,19 +2273,37 @@
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information
--- a/make/sun/javazic/tzdata/australasia	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/australasia	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -318,6 +319,18 @@
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # </a>
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155">
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# </a>
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -325,6 +338,8 @@
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -521,7 +536,7 @@
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # </a>
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # <a href="http://www.mcil.gov.ws">
 # http://www.mcil.gov.ws
@@ -531,7 +546,7 @@
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # <a href="http://www.mcil.gov.ws">
 # www.mcil.gov.ws
@@ -551,12 +566,74 @@
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# <a href="http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963">
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# </a>
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# <a href="http://www.mcil.gov.ws/mcil_publications.html">
+# http://www.mcil.gov.ws/mcil_publications.html
+# </a>
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1228,7 +1305,7 @@
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1354,7 +1431,7 @@
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 
--- a/make/sun/javazic/tzdata/backward	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/backward	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)backward	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/etcetera	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/etcetera	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)etcetera	8.3
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/europe	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/europe	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -583,9 +584,28 @@
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
+
+# From Alexander Krivenyshev (2011-06-14):
+# According to Kremlin press service, Russian President Dmitry Medvedev
+# signed a federal law "On calculation of time" on June 9, 2011.
+# According to the law Russia is abolishing daylight saving time.
+# 
+# Medvedev signed a law "On the Calculation of Time" (in russian): 
+# <a href="http://bmockbe.ru/events/?ID=7583">
+# http://bmockbe.ru/events/?ID=7583
+# </a>
+# 
+# Medvedev signed a law on the calculation of the time (in russian):
+# <a href="http://www.regnum.ru/news/polit/1413906.html">
+# http://www.regnum.ru/news/polit/1413906.html
+# </a>
+
+# From Arthur David Olson (2011-06-15):
+# Take "abolishing daylight saving time" to mean that time is now considered
+# to be standard.
 
 # These are for backward compatibility with older versions.
 
@@ -691,6 +711,23 @@
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# <a href="http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html">
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# </a>
+# 2.
+# <a href="http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/">
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# </a>
+# 3.
+# <a href="http://news.tut.by/society/250578.html">
+# http://news.tut.by/society/250578.html
+# </a>
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -702,7 +739,8 @@
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2035,7 +2073,8 @@
 			 1:00	C-Eur	CE%sT	1945
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
-			 2:00	Russia	EE%sT
+			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2064,7 +2103,8 @@
 			 2:00	-	EET	1930 Jun 21
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	1992 Jan 19 2:00s
-			 3:00	Russia	MSK/MSD
+			 3:00	Russia	MSK/MSD	2011 Mar 27 2:00s
+			 4:00	-	MSK
 #
 # Astrakhanskaya oblast', Kirovskaya oblast', Saratovskaya oblast',
 # Volgogradskaya oblast'.  Shanks & Pottenger say Kirov is still at +0400
@@ -2077,7 +2117,8 @@
 			 4:00	Russia	VOL%sT	1989 Mar 26 2:00s # Volgograd T
 			 3:00	Russia	VOL%sT	1991 Mar 31 2:00s
 			 4:00	-	VOLT	1992 Mar 29 2:00s
-			 3:00	Russia	VOL%sT
+			 3:00	Russia	VOL%sT	2011 Mar 27 2:00s
+			 4:00	-	VOLT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Samarskaya oblast', Udmyrtskaya respublika
@@ -2089,7 +2130,8 @@
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
 			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
-			 3:00	Russia	SAM%sT
+			 3:00	Russia	SAM%sT	2011 Mar 27 2:00s
+			 4:00	-	SAMT
 
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
@@ -2102,7 +2144,8 @@
 			 4:00	-	SVET	1930 Jun 21 # Sverdlovsk Time
 			 5:00	Russia	SVE%sT	1991 Mar 31 2:00s
 			 4:00	Russia	SVE%sT	1992 Jan 19 2:00s
-			 5:00	Russia	YEK%sT	# Yekaterinburg Time
+			 5:00	Russia	YEK%sT	2011 Mar 27 2:00s
+			 6:00	-	YEKT	# Yekaterinburg Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Altaj, Altajskij kraj, Omskaya oblast'.
@@ -2110,7 +2153,8 @@
 			 5:00	-	OMST	1930 Jun 21 # Omsk TIme
 			 6:00	Russia	OMS%sT	1991 Mar 31 2:00s
 			 5:00	Russia	OMS%sT	1992 Jan 19 2:00s
-			 6:00	Russia	OMS%sT
+			 6:00	Russia	OMS%sT	2011 Mar 27 2:00s
+			 7:00	-	OMST
 #
 # From Paul Eggert (2006-08-19): I'm guessing about Tomsk here; it's
 # not clear when it switched from +7 to +6.
@@ -2120,7 +2164,8 @@
 			 7:00	Russia	NOV%sT	1991 Mar 31 2:00s
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
-			 6:00	Russia	NOV%sT
+			 6:00	Russia	NOV%sT	2011 Mar 27 2:00s
+			 7:00	-	NOVT
 
 # From Alexander Krivenyshev (2009-10-13):
 # Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
@@ -2153,7 +2198,8 @@
 			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
 			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
 			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
-			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+			 6:00	Russia	NOV%sT	2011 Mar 27 2:00s
+			 7:00	-	NOVT # Novosibirsk/Novokuznetsk Time
 
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
@@ -2164,7 +2210,8 @@
 			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
 			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
 			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
-			 7:00	Russia	KRA%sT
+			 7:00	Russia	KRA%sT	2011 Mar 27 2:00s
+			 8:00	-	KRAT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Buryatiya, Irkutskaya oblast',
@@ -2174,14 +2221,15 @@
 			 7:00	-	IRKT	1930 Jun 21 # Irkutsk Time
 			 8:00	Russia	IRK%sT	1991 Mar 31 2:00s
 			 7:00	Russia	IRK%sT	1992 Jan 19 2:00s
-			 8:00	Russia	IRK%sT
+			 8:00	Russia	IRK%sT	2011 Mar 27 2:00s
+			 9:00	-	IRKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2197,7 +2245,8 @@
 			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
 			 9:00	Russia	YAK%sT	1991 Mar 31 2:00s
 			 8:00	Russia	YAK%sT	1992 Jan 19 2:00s
-			 9:00	Russia	YAK%sT
+			 9:00	Russia	YAK%sT	2011 Mar 27 2:00s
+			 10:00	-	YAKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
@@ -2210,7 +2259,8 @@
 			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
 			10:00	Russia	VLA%sT	1991 Mar 31 2:00s
 			 9:00	Russia	VLA%sST	1992 Jan 19 2:00s
-			10:00	Russia	VLA%sT
+			10:00	Russia	VLA%sT	2011 Mar 27 2:00s
+			11:00	-	VLAT
 #
 # Sakhalinskaya oblast'.
 # The Zone name should be Yuzhno-Sakhalinsk, but that's too long.
@@ -2220,7 +2270,8 @@
 			11:00	Russia	SAK%sT	1991 Mar 31 2:00s # Sakhalin T.
 			10:00	Russia	SAK%sT	1992 Jan 19 2:00s
 			11:00	Russia	SAK%sT	1997 Mar lastSun 2:00s
-			10:00	Russia	SAK%sT
+			10:00	Russia	SAK%sT	2011 Mar 27 2:00s
+			11:00	-	SAKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Magadanskaya oblast', Respublika Sakha (Yakutiya).
@@ -2233,7 +2284,8 @@
 			10:00	-	MAGT	1930 Jun 21 # Magadan Time
 			11:00	Russia	MAG%sT	1991 Mar 31 2:00s
 			10:00	Russia	MAG%sT	1992 Jan 19 2:00s
-			11:00	Russia	MAG%sT
+			11:00	Russia	MAG%sT	2011 Mar 27 2:00s
+			12:00	-	MAGT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Kamchatskaya oblast', Koryakskij avtonomnyj okrug.
@@ -2244,7 +2296,8 @@
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
 			12:00	Russia	PET%sT	2010 Mar 28 2:00s
-			11:00	Russia	PET%sT
+			11:00	Russia	PET%sT	2011 Mar 27 2:00s
+			12:00	-	PETT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2253,7 +2306,8 @@
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
 			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
-			11:00	Russia	ANA%sT
+			11:00	Russia	ANA%sT	2011 Mar 27 2:00s
+			12:00	-	ANAT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2599,6 +2653,28 @@
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# <a href="http://news.mail.ru/politics/6861560/">
+# http://news.mail.ru/politics/6861560/
+# </a>
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# <a href="http://www.segodnya.ua/news/14290482.html">
+# http://www.segodnya.ua/news/14290482.html
+# </a>
+#
+# Deputies cancelled the winter time (in Russian)
+# <a href="http://www.pravda.com.ua/rus/news/2011/09/20/6600616/">
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# </a>
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2612,7 +2688,8 @@
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2626,7 +2703,8 @@
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2639,7 +2717,8 @@
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2664,7 +2743,8 @@
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 
--- a/make/sun/javazic/tzdata/factory	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/factory	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)factory	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/iso3166.tab	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/iso3166.tab	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)iso3166.tab	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 # ISO 3166 alpha-2 country codes
@@ -43,6 +44,9 @@
 #
 # Lines beginning with `#' are comments.
 #
+# From Arthur David Olson (2011-08-17):
+# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
+#
 #country-
 #code	country name
 AD	Andorra
@@ -52,7 +56,6 @@
 AI	Anguilla
 AL	Albania
 AM	Armenia
-AN	Netherlands Antilles
 AO	Angola
 AQ	Antarctica
 AR	Argentina
@@ -75,6 +78,7 @@
 BM	Bermuda
 BN	Brunei
 BO	Bolivia
+BQ	Bonaire Sint Eustatius & Saba
 BR	Brazil
 BS	Bahamas
 BT	Bhutan
@@ -97,6 +101,7 @@
 CR	Costa Rica
 CU	Cuba
 CV	Cape Verde
+CW	Curacao
 CX	Christmas Island
 CY	Cyprus
 CZ	Czech Republic
@@ -251,8 +256,10 @@
 SN	Senegal
 SO	Somalia
 SR	Suriname
+SS	South Sudan
 ST	Sao Tome & Principe
 SV	El Salvador
+SX	Sint Maarten
 SY	Syria
 SZ	Swaziland
 TC	Turks & Caicos Is
--- a/make/sun/javazic/tzdata/leapseconds	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/leapseconds	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)leapseconds	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/northamerica	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/northamerica	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -490,6 +491,10 @@
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -501,7 +506,7 @@
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -515,7 +520,7 @@
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -615,8 +620,8 @@
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1185,12 +1190,29 @@
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# <a href="http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm">
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# </a>
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1200,7 +1222,8 @@
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1214,7 +1237,8 @@
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1946,20 +1970,69 @@
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
 #
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# <a href="http://www.uphere.ca/node/493">
+# http://www.uphere.ca/node/493
+# </a>
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1987,14 +2060,12 @@
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
--- a/make/sun/javazic/tzdata/pacificnew	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/pacificnew	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)pacificnew	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/solar87	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/solar87	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)solar87	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/solar88	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/solar88	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)solar88	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/solar89	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/solar89	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)solar89	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/southamerica	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/southamerica	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)southamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -819,6 +820,26 @@
 # <a href="http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html">
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # </a>
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# <a href="http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html">
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+# </a> and
+# <a href="http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html">
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# </a>
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# <a href="http://pcdsh01.on.br/">http://pcdsh01.on.br/</a> the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
@@ -1057,6 +1078,9 @@
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
@@ -1298,6 +1322,14 @@
 			-4:30	-	ANT	1965 # Netherlands Antilles Time
 			-4:00	-	AST
 
+# From Arthur David Olson (2011-06-15):
+# At least for now, use links for places with new iso3166 codes.
+# The name "Lower Prince's Quarter" is both longer than fourteen charaters
+# and contains an apostrophe; use "Lower_Princes" below.
+
+Link	America/Curacao	America/Lower_Princes # Sint Maarten
+Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
+
 # Ecuador
 #
 # From Paul Eggert (2007-03-04):
--- a/make/sun/javazic/tzdata/systemv	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/systemv	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)systemv	8.2
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
--- a/make/sun/javazic/tzdata/zone.tab	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/sun/javazic/tzdata/zone.tab	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,7 @@
 # questions.
 #
 # <pre>
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -54,7 +55,6 @@
 AI	+1812-06304	America/Anguilla
 AL	+4120+01950	Europe/Tirane
 AM	+4011+04430	Asia/Yerevan
-AN	+1211-06900	America/Curacao
 AO	-0848+01314	Africa/Luanda
 AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
 AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
@@ -109,6 +109,7 @@
 BM	+3217-06446	Atlantic/Bermuda
 BN	+0456+11455	Asia/Brunei
 BO	-1630-06809	America/La_Paz
+BQ	+120903-0681636	America/Kralendijk
 BR	-0351-03225	America/Noronha	Atlantic islands
 BR	-0127-04829	America/Belem	Amapa, E Para
 BR	-0343-03830	America/Fortaleza	NE Brazil (MA, PI, CE, RN, PB)
@@ -142,7 +143,7 @@
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -177,6 +178,7 @@
 CR	+0956-08405	America/Costa_Rica
 CU	+2308-08222	America/Havana
 CV	+1455-02331	Atlantic/Cape_Verde
+CW	+1211-06900	America/Curacao
 CX	-1025+10543	Indian/Christmas
 CY	+3510+03322	Asia/Nicosia
 CZ	+5005+01426	Europe/Prague
@@ -340,7 +342,8 @@
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -382,8 +385,10 @@
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
+SX	+180305-0630250	America/Lower_Princes
 SY	+3330+03618	Asia/Damascus
 SZ	-2618+03106	Africa/Mbabane
 TC	+2128-07108	America/Grand_Turk
--- a/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,7 @@
     private static int[] specialCaseOldCurrenciesNumericCode = new int[maxSpecialCases];
     private static int[] specialCaseNewCurrenciesNumericCode = new int[maxSpecialCases];
 
-    private static final int maxOtherCurrencies = 65;
+    private static final int maxOtherCurrencies = 70;
     private static int otherCurrenciesCount = 0;
     private static StringBuffer otherCurrencies = new StringBuffer();
     private static int[] otherCurrenciesDefaultFractionDigits = new int[maxOtherCurrencies];
--- a/make/tools/src/build/tools/javazic/Mappings.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/make/tools/src/build/tools/javazic/Mappings.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,6 @@
 package build.tools.javazic;
 
 import  java.util.ArrayList;
-import  java.util.HashMap;
-import  java.util.HashSet;
-import  java.util.Iterator;
 import  java.util.LinkedList;
 import  java.util.List;
 import  java.util.Map;
@@ -79,8 +76,8 @@
             // If the GMT offset of this Zone will change in some
             // future time, this Zone is added to the exclude list.
             boolean isExcluded = false;
-            if (zone.size() > 1) {
-                ZoneRec zrec = zone.get(zone.size()-2);
+            for (int i = 0; i < zone.size(); i++) {
+                ZoneRec zrec = zone.get(i);
                 if ((zrec.getGmtOffset() != rawOffset)
                     && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
                     if (excludeList == null) {
@@ -88,6 +85,7 @@
                     }
                     excludeList.add(zone.getName());
                     isExcluded = true;
+                    break;
                 }
             }
 
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Sun Feb 26 16:05:10 2012 -0800
@@ -81,19 +81,22 @@
             else {
                 Rectangle   beginRect = getPathBounds(tree, getPathForRow
                                                       (tree, beginRow));
-                Rectangle   testRect = beginRect;
-                int         beginY = beginRect.y;
-                int         maxY = beginY + visRect.height;
+                if (beginRect != null) {
+                    Rectangle   testRect = beginRect;
+                    int         beginY = beginRect.y;
+                    int         maxY = beginY + visRect.height;
 
-                for(int counter = beginRow + 1; counter <= endRow; counter++) {
-                    testRect = getPathBounds(tree,
-                                             getPathForRow(tree, counter));
-                    if((testRect.y + testRect.height) > maxY)
-                        counter = endRow;
+                    for(int counter = beginRow + 1; counter <= endRow; counter++) {
+                        testRect = getPathBounds(tree,
+                                                 getPathForRow(tree, counter));
+                        if(testRect != null && (testRect.y + testRect.height) > maxY) {
+                            counter = endRow;
+                        }
+                    }
+                    tree.scrollRectToVisible(new Rectangle(visRect.x, beginY, 1,
+                                                      testRect.y + testRect.height-
+                                                      beginY));
                 }
-                tree.scrollRectToVisible(new Rectangle(visRect.x, beginY, 1,
-                                                  testRect.y + testRect.height-
-                                                  beginY));
             }
         }
     }
--- a/src/share/classes/com/sun/jndi/ldap/Filter.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/Filter.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -632,15 +632,17 @@
         }
     }
 
+    // The complex filter types look like:
+    //     "&(type=val)(type=val)"
+    //     "|(type=val)(type=val)"
+    //     "!(type=val)"
+    //
+    // The filtOffset[0] pointing to the '&', '|', or '!'.
+    //
     private static void encodeComplexFilter(BerEncoder ber, byte[] filter,
         int filterType, int filtOffset[], int filtEnd)
         throws IOException, NamingException {
 
-        //
-        // We have a complex filter of type "&(type=val)(type=val)"
-        // with filtOffset[0] pointing to the &
-        //
-
         if (dbg) {
             dprint("encComplexFilter: ", filter, filtOffset[0], filtEnd);
             dprint(", type: " + Integer.toString(filterType, 16));
@@ -652,7 +654,7 @@
         ber.beginSeq(filterType);
 
             int[] parens = findRightParen(filter, filtOffset, filtEnd);
-            encodeFilterList(ber, filter, parens[0], parens[1]);
+            encodeFilterList(ber, filter, filterType, parens[0], parens[1]);
 
         ber.endSeq();
 
@@ -706,7 +708,7 @@
     // Encode filter list of type "(filter1)(filter2)..."
     //
     private static void encodeFilterList(BerEncoder ber, byte[] filter,
-        int start, int end) throws IOException, NamingException {
+        int filterType, int start, int end) throws IOException, NamingException {
 
         if (dbg) {
             dprint("encFilterList: ", filter, start, end);
@@ -714,12 +716,16 @@
         }
 
         int filtOffset[] = new int[1];
-
-        for (filtOffset[0] = start; filtOffset[0] < end;
-                                                            filtOffset[0]++) {
+        int listNumber = 0;
+        for (filtOffset[0] = start; filtOffset[0] < end; filtOffset[0]++) {
             if (Character.isSpaceChar((char)filter[filtOffset[0]]))
                 continue;
 
+            if ((filterType == LDAP_FILTER_NOT) && (listNumber > 0)) {
+                throw new InvalidSearchFilterException(
+                    "Filter (!) cannot be followed by more than one filters");
+            }
+
             if (filter[filtOffset[0]] == '(') {
                 continue;
             }
@@ -733,6 +739,8 @@
             newfilter[0] = (byte)'(';
             newfilter[len+1] = (byte)')';
             encodeFilter(ber, newfilter, 0, newfilter.length);
+
+            listNumber++;
         }
 
         if (dbg) {
--- a/src/share/classes/com/sun/net/ssl/HttpsURLConnection.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/net/ssl/HttpsURLConnection.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -179,6 +179,12 @@
             throw new IllegalArgumentException(
                 "no SSLSocketFactory specified");
         }
+
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkSetFactory();
+        }
+
         sslSocketFactory = sf;
     }
 
--- a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java	Sun Feb 26 16:05:10 2012 -0800
@@ -29,6 +29,7 @@
 import sun.org.mozilla.javascript.internal.*;
 import java.lang.reflect.Method;
 import java.io.*;
+import java.security.*;
 import java.util.*;
 
 
@@ -45,6 +46,8 @@
 
     private static final boolean DEBUG = false;
 
+    private AccessControlContext accCtxt;
+
     /* Scope where standard JavaScript objects and our
      * extensions to it are stored. Note that these are not
      * user defined engine level global variables. These are
@@ -63,8 +66,13 @@
 
     private static final int languageVersion = getLanguageVersion();
     private static final int optimizationLevel = getOptimizationLevel();
+
     static {
         ContextFactory.initGlobal(new ContextFactory() {
+            /**
+             * Create new Context instance to be associated with the current thread.
+             */
+            @Override
             protected Context makeContext() {
                 Context cx = super.makeContext();
                 cx.setLanguageVersion(languageVersion);
@@ -73,6 +81,40 @@
                 cx.setWrapFactory(RhinoWrapFactory.getInstance());
                 return cx;
             }
+
+            /**
+             * Execute top call to script or function. When the runtime is about to
+             * execute a script or function that will create the first stack frame
+             * with scriptable code, it calls this method to perform the real call.
+             * In this way execution of any script happens inside this function.
+             */
+            @Override
+            protected Object doTopCall(final Callable callable,
+                               final Context cx, final Scriptable scope,
+                               final Scriptable thisObj, final Object[] args) {
+                AccessControlContext accCtxt = null;
+                Scriptable global = ScriptableObject.getTopLevelScope(scope);
+                Scriptable globalProto = global.getPrototype();
+                if (globalProto instanceof RhinoTopLevel) {
+                    accCtxt = ((RhinoTopLevel)globalProto).getAccessContext();
+                }
+
+                if (accCtxt != null) {
+                    return AccessController.doPrivileged(new PrivilegedAction<Object>() {
+                        public Object run() {
+                            return superDoTopCall(callable, cx, scope, thisObj, args);
+                        }
+                    }, accCtxt);
+                } else {
+                    return superDoTopCall(callable, cx, scope, thisObj, args);
+                }
+            }
+
+            private  Object superDoTopCall(Callable callable,
+                               Context cx, Scriptable scope,
+                               Scriptable thisObj, Object[] args) {
+                return super.doTopCall(callable, cx, scope, thisObj, args);
+            }
         });
     }
 
@@ -103,6 +145,9 @@
      * Creates a new instance of RhinoScriptEngine
      */
     public RhinoScriptEngine() {
+        if (System.getSecurityManager() != null) {
+            accCtxt = AccessController.getContext();
+        }
 
         Context cx = enterContext();
         try {
@@ -360,6 +405,10 @@
         factory = fac;
     }
 
+    AccessControlContext getAccessContext() {
+        return accCtxt;
+    }
+
     Object[] wrapArguments(Object[] args) {
         if (args == null) {
             return Context.emptyArgs;
--- a/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java	Sun Feb 26 16:05:10 2012 -0800
@@ -27,6 +27,7 @@
 
 import sun.org.mozilla.javascript.internal.*;
 import javax.script.*;
+import java.security.AccessControlContext;
 
 /**
  * This class serves as top level scope for Rhino. This class adds
@@ -38,10 +39,12 @@
  */
 public final class RhinoTopLevel extends ImporterTopLevel {
     RhinoTopLevel(Context cx, RhinoScriptEngine engine) {
-        super(cx);
+        // second boolean parameter to super constructor tells whether
+        // to seal standard JavaScript objects or not. If security manager
+        // is present, we seal the standard objects.
+        super(cx, System.getSecurityManager() != null);
         this.engine = engine;
 
-
         // initialize JSAdapter lazily. Reduces footprint & startup time.
         new LazilyLoadedCtor(this, "JSAdapter",
                 "com.sun.script.javascript.JSAdapter",
@@ -152,5 +155,9 @@
         return engine;
     }
 
+    AccessControlContext getAccessContext() {
+        return engine.getAccessContext();
+    }
+
     private RhinoScriptEngine engine;
 }
--- a/src/share/classes/com/sun/security/auth/module/NTSystem.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/auth/module/NTSystem.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 public class NTSystem {
 
     private native void getCurrent(boolean debug);
+    private native long getImpersonationToken0();
 
     private String userName;
     private String domain;
@@ -132,10 +133,14 @@
      *
      * @return an impersonation token for the current NT user.
      */
-    public long getImpersonationToken() {
+    public synchronized long getImpersonationToken() {
+        if (impersonationToken == 0) {
+            impersonationToken = getImpersonationToken0();
+        }
         return impersonationToken;
     }
 
+
     private void loadNative() {
         System.loadLibrary("jaas_nt");
     }
--- a/src/share/classes/com/sun/security/ntlm/Client.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/ntlm/Client.java	Sun Feb 26 16:05:10 2012 -0800
@@ -69,14 +69,16 @@
      * This method does not make any modification to this parameter, it neither
      * needs to access the content of this parameter after this method call,
      * so you are free to modify or nullify this parameter after this call.
-     * @throws NullPointerException if {@code username} or {@code password} is null.
-     * @throws NTLMException if {@code version} is illegal
+     * @throws NTLMException if {@code username} or {@code password} is null,
+     * or {@code version} is illegal.
+     *
      */
     public Client(String version, String hostname, String username,
             String domain, char[] password) throws NTLMException {
         super(version);
         if ((username == null || password == null)) {
-            throw new NullPointerException("username/password cannot be null");
+            throw new NTLMException(NTLMException.PROTOCOL,
+                    "username/password cannot be null");
         }
         this.hostname = hostname;
         this.username = username;
@@ -117,13 +119,13 @@
      * @param nonce random 8-byte array to be used in message generation,
      * must not be null except for original NTLM v1
      * @return the message generated
-     * @throws NullPointerException if {@code type2} or {@code nonce} is null
-     * for NTLM v1.
-     * @throws NTLMException if the incoming message is invalid
+     * @throws NTLMException if the incoming message is invalid, or
+     * {@code nonce} is null for NTLM v1.
      */
     public byte[] type3(byte[] type2, byte[] nonce) throws NTLMException {
         if (type2 == null || (v != Version.NTLM && nonce == null)) {
-            throw new NullPointerException("type2 and nonce cannot be null");
+            throw new NTLMException(NTLMException.PROTOCOL,
+                    "type2 and nonce cannot be null");
         }
         debug("NTLM Client: Type 2 received\n");
         debug(type2);
--- a/src/share/classes/com/sun/security/ntlm/NTLMException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/ntlm/NTLMException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -64,6 +64,11 @@
      */
     public final static int BAD_VERSION = 5;
 
+    /**
+     * Protocol errors.
+     */
+    public final static int PROTOCOL = 6;
+
     private int errorCode;
 
     /**
--- a/src/share/classes/com/sun/security/ntlm/Server.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/ntlm/Server.java	Sun Feb 26 16:05:10 2012 -0800
@@ -62,12 +62,13 @@
      * is selected, authentication succeeds if one of LM (or LMv2) or
      * NTLM (or NTLMv2) is verified.
      * @param domain the domain, must not be null
-     * @throws NullPointerException if {@code domain} is null.
+     * @throws NTLMException if {@code domain} is null.
      */
     public Server(String version, String domain) throws NTLMException {
         super(version);
         if (domain == null) {
-            throw new NullPointerException("domain cannot be null");
+            throw new NTLMException(NTLMException.PROTOCOL,
+                    "domain cannot be null");
         }
         this.allVersion = (version == null);
         this.domain = domain;
@@ -80,12 +81,13 @@
      * @param nonce the random 8-byte array to be used in message generation,
      * must not be null
      * @return the message generated
-     * @throws NullPointerException if type1 or nonce is null
-     * @throws NTLMException if the incoming message is invalid
+     * @throws NTLMException if the incoming message is invalid, or
+     * {@code nonce} is null.
      */
-    public byte[] type2(byte[] type1, byte[] nonce) {
+    public byte[] type2(byte[] type1, byte[] nonce) throws NTLMException {
         if (nonce == null) {
-            throw new NullPointerException("nonce cannot be null");
+            throw new NTLMException(NTLMException.PROTOCOL,
+                    "nonce cannot be null");
         }
         debug("NTLM Server: Type 1 received\n");
         if (type1 != null) debug(type1);
@@ -105,13 +107,14 @@
      * @param type3 the incoming Type3 message from client, must not be null
      * @param nonce the same nonce provided in {@link #type2}, must not be null
      * @return username and hostname of the client in a byte array
-     * @throws NullPointerException if {@code type3} or {@code nonce} is null
-     * @throws NTLMException if the incoming message is invalid
+     * @throws NTLMException if the incoming message is invalid, or
+     * {@code nonce} is null.
      */
     public String[] verify(byte[] type3, byte[] nonce)
             throws NTLMException {
         if (type3 == null || nonce == null) {
-            throw new NullPointerException("type1 or nonce cannot be null");
+            throw new NTLMException(NTLMException.PROTOCOL,
+                    "type1 or nonce cannot be null");
         }
         debug("NTLM Server: Type 3 received\n");
         if (type3 != null) debug(type3);
--- a/src/share/classes/com/sun/security/sasl/ntlm/FactoryImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/sasl/ntlm/FactoryImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -70,6 +70,12 @@
             if (mechs[i].equals("NTLM") &&
                     PolicyUtils.checkPolicy(mechPolicies[0], props)) {
 
+                if (cbh == null) {
+                    throw new SaslException(
+                        "Callback handler with support for " +
+                        "RealmCallback, NameCallback, and PasswordCallback " +
+                        "required");
+                }
                 return new NTLMClient(mechs[i], authorizationId,
                     protocol, serverName, props, cbh);
             }
@@ -98,9 +104,9 @@
              }
              if (cbh == null) {
                  throw new SaslException(
-                        "Callback handler with support for AuthorizeCallback, "+
-                        "RealmCallback, NameCallback, and PasswordCallback " +
-                        "required");
+                     "Callback handler with support for " +
+                     "RealmCallback, NameCallback, and PasswordCallback " +
+                     "required");
              }
              return new NTLMServer(mech, protocol, serverName, props, cbh);
          }
--- a/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java	Sun Feb 26 16:05:10 2012 -0800
@@ -107,7 +107,7 @@
      * @param protocol non-null for Sasl, useless for NTLM
      * @param serverName non-null for Sasl, but can be null for NTLM
      * @param props can be null
-     * @param cbh can be null for Sasl, but will throw NPE for NTLM
+     * @param cbh can be null for Sasl, already null-checked in factory
      * @throws SaslException
      */
     NTLMClient(String mech, String authzid, String protocol, String serverName,
@@ -166,7 +166,7 @@
                     pcb.getPassword());
         } catch (NTLMException ne) {
             throw new SaslException(
-                    "NTLM: Invalid version string: " + version, ne);
+                    "NTLM: client creation failure", ne);
         }
     }
 
@@ -183,17 +183,20 @@
     @Override
     public byte[] unwrap(byte[] incoming, int offset, int len)
             throws SaslException {
-        throw new UnsupportedOperationException("Not supported.");
+        throw new IllegalStateException("Not supported.");
     }
 
     @Override
     public byte[] wrap(byte[] outgoing, int offset, int len)
             throws SaslException {
-        throw new UnsupportedOperationException("Not supported.");
+        throw new IllegalStateException("Not supported.");
     }
 
     @Override
     public Object getNegotiatedProperty(String propName) {
+        if (!isComplete()) {
+            throw new IllegalStateException("authentication not complete");
+        }
         if (propName.equals(Sasl.QOP)) {
             return "auth";
         } else if (propName.equals(NTLM_DOMAIN)) {
--- a/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	Sun Feb 26 16:05:10 2012 -0800
@@ -106,7 +106,7 @@
      * @param serverName not null for Sasl, can be null in NTLM. If non-null,
      * might be used as domain if not provided in props
      * @param props can be null
-     * @param cbh can be null for Sasl, but will throw NPE in auth for NTLM
+     * @param cbh can be null for Sasl, already null-checked in factory
      * @throws SaslException
      */
     NTLMServer(String mech, String protocol, String serverName,
@@ -131,7 +131,7 @@
             domain = serverName;
         }
         if (domain == null) {
-            throw new NullPointerException("Domain must be provided as"
+            throw new SaslException("Domain must be provided as"
                     + " the serverName argument or in props");
         }
 
@@ -158,7 +158,7 @@
             };
         } catch (NTLMException ne) {
             throw new SaslException(
-                    "NTLM: Invalid version string: " + version, ne);
+                    "NTLM: server creation failure", ne);
         }
         nonce = new byte[8];
     }
@@ -181,8 +181,8 @@
                 hostname = out[1];
                 return null;
             }
-        } catch (GeneralSecurityException ex) {
-            throw new SaslException("", ex);
+        } catch (NTLMException ex) {
+            throw new SaslException("NTLM: generate response failure", ex);
         }
     }
 
@@ -193,23 +193,29 @@
 
     @Override
     public String getAuthorizationID() {
+        if (!isComplete()) {
+            throw new IllegalStateException("authentication not complete");
+        }
         return authzId;
     }
 
     @Override
     public byte[] unwrap(byte[] incoming, int offset, int len)
             throws SaslException {
-        throw new UnsupportedOperationException("Not supported yet.");
+        throw new IllegalStateException("Not supported yet.");
     }
 
     @Override
     public byte[] wrap(byte[] outgoing, int offset, int len)
             throws SaslException {
-        throw new UnsupportedOperationException("Not supported yet.");
+        throw new IllegalStateException("Not supported yet.");
     }
 
     @Override
     public Object getNegotiatedProperty(String propName) {
+        if (!isComplete()) {
+            throw new IllegalStateException("authentication not complete");
+        }
         if (propName.equals(Sasl.QOP)) {
             return "auth";
         } else if (propName.equals(NTLM_HOSTNAME)) {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class AmbiguousMethodException extends Exception
--- a/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public abstract class BreakpointSpec extends EventRequestSpec {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class EvaluationException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpecList.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpecList.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.ReferenceType;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/InputListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/InputListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public interface InputListener {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class LineNotFoundException extends Exception
--- a/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 class MalformedMemberNameException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class MethodNotFoundException extends Exception
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class NoSessionException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class NoThreadException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/OutputListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/OutputListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public interface OutputListener {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ParseException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ParseException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 // dummy placeholder for javaCC-generated code.
--- a/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/Session.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/Session.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.VirtualMachine;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/SessionListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/SessionListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import java.util.EventObject;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class SpecErrorEvent extends SpecEvent {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import java.util.EventObject;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/SpecListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/SpecListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import java.util.EventListener;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.ThreadGroupReference;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 import com.sun.jdi.ThreadGroupReference;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;   //### does it belong here?
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class VMLaunchFailureException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public class VMNotInterruptedException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.bdi;
 
 public abstract class WatchpointSpec extends EventRequestSpec {
--- a/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 /**
--- a/src/share/classes/com/sun/tools/example/debug/event/JDIListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/JDIListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import java.util.EventListener;
--- a/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.event;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ASCII_UCodeESC_CharStream.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. ASCII_UCodeESC_CharStream.java Version 0.7pre6 */
 
 package com.sun.tools.example.debug.expr;
--- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. ExpressionParser.java */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserConstants.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. ExpressionParserConstants.java */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/expr/LValue.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/LValue.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.expr;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 0.7pre6 */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/expr/Token.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/Token.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. Token.java Version 0.7pre3 */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 0.7pre2 */
 package com.sun.tools.example.debug.expr;
 
--- a/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/ClassManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ClassManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 public class ClassManager {
--- a/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.util.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/ContextListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ContextListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 public interface ContextListener {
--- a/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/Environment.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/Environment.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/GUI.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/GUI.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/Icons.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/Icons.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.Icon;
--- a/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.File;
--- a/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.util.List;
--- a/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.util.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/OutputSink.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/OutputSink.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.tree.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 public interface SourceListener {
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.util.EventObject;
--- a/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import javax.swing.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.util.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.awt.*;
--- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import com.sun.tools.example.debug.bdi.OutputListener;
--- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.gui;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 public class AmbiguousMethodException extends Exception
--- a/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/Commands.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Commands.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/Env.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Env.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/EventNotifier.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.event.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.request.EventRequest;
--- a/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.ReferenceType;
--- a/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 public class LineNotFoundException extends Exception
--- a/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 class MalformedMemberNameException extends Exception {
--- a/src/share/classes/com/sun/tools/example/debug/tty/MessageOutput.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/MessageOutput.java	Sun Feb 26 16:05:10 2012 -0800
@@ -22,6 +22,15 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
 package com.sun.tools.example.debug.tty;
 
 import java.util.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.Location;
--- a/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 /**
--- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 /**
--- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 /**
--- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.ThreadGroupReference;
--- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.ThreadReference;
--- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.ThreadGroupReference;
--- a/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 public class VMNotConnectedException extends RuntimeException {
--- a/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.debug.tty;
 
 abstract class WatchpointSpec extends EventRequestSpec {
--- a/src/share/classes/com/sun/tools/example/trace/EventThread.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/trace/EventThread.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.trace;
 
 import com.sun.jdi.*;
--- a/src/share/classes/com/sun/tools/example/trace/StreamRedirectThread.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/trace/StreamRedirectThread.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.trace;
 
 import java.io.*;
--- a/src/share/classes/com/sun/tools/example/trace/Trace.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/com/sun/tools/example/trace/Trace.java	Sun Feb 26 16:05:10 2012 -0800
@@ -23,6 +23,15 @@
  * questions.
  */
 
+/*
+ * This source code is provided to illustrate the usage of a given feature
+ * or technique and has been deliberately simplified. Additional steps
+ * required for a production-quality application, such as security checks,
+ * input validation and proper error handling, might not be present in
+ * this sample code.
+ */
+
+
 package com.sun.tools.example.trace;
 
 import com.sun.jdi.VirtualMachine;
--- a/src/share/classes/java/awt/AWTKeyStroke.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/awt/AWTKeyStroke.java	Sun Feb 26 16:05:10 2012 -0800
@@ -25,6 +25,7 @@
 package java.awt;
 
 import java.awt.event.KeyEvent;
+import sun.awt.AppContext;
 import java.awt.event.InputEvent;
 import java.util.Collections;
 import java.util.HashMap;
@@ -66,9 +67,6 @@
 public class AWTKeyStroke implements Serializable {
     static final long serialVersionUID = -6430539691155161871L;
 
-    private static Map cache;
-    private static AWTKeyStroke cacheKey;
-    private static Constructor ctor = getCtor(AWTKeyStroke.class);
     private static Map modifierKeywords;
     /**
      * Associates VK_XXX (as a String) with code (as Integer). This is
@@ -77,6 +75,26 @@
      */
     private static VKCollection vks;
 
+    //A key for the collection of AWTKeyStrokes within AppContext.
+    private static Object APP_CONTEXT_CACHE_KEY = new Object();
+    //A key withing the cache
+    private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
+
+    /*
+     * Reads keystroke class from AppContext and if null, puts there the
+     * AWTKeyStroke class.
+     * Must be called under locked AWTKeyStroke.class
+     */
+    private static Class getAWTKeyStrokeClass() {
+        AppContext appContext = AppContext.getAppContext();
+        Class clazz = (Class)appContext.get(AWTKeyStroke.class);
+        if (clazz == null) {
+            clazz = AWTKeyStroke.class;
+            appContext.put(AWTKeyStroke.class, AWTKeyStroke.class);
+        }
+        return clazz;
+    }
+
     private char keyChar = KeyEvent.CHAR_UNDEFINED;
     private int keyCode = KeyEvent.VK_UNDEFINED;
     private int modifiers;
@@ -164,9 +182,13 @@
         if (subclass == null) {
             throw new IllegalArgumentException("subclass cannot be null");
         }
-        if (AWTKeyStroke.ctor.getDeclaringClass().equals(subclass)) {
-            // Already registered
-            return;
+        AppContext appContext = AppContext.getAppContext();
+        synchronized (AWTKeyStroke.class) {
+            Class keyStrokeClass = (Class)appContext.get(AWTKeyStroke.class);
+            if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){
+                // Already registered
+                return;
+            }
         }
         if (!AWTKeyStroke.class.isAssignableFrom(subclass)) {
             throw new ClassCastException("subclass is not derived from AWTKeyStroke");
@@ -197,9 +219,9 @@
         }
 
         synchronized (AWTKeyStroke.class) {
-            AWTKeyStroke.ctor = ctor;
-            cache = null;
-            cacheKey = null;
+            appContext.put(AWTKeyStroke.class, subclass);
+            appContext.remove(APP_CONTEXT_CACHE_KEY);
+            appContext.remove(APP_CONTEXT_KEYSTROKE_KEY);
         }
     }
 
@@ -229,13 +251,20 @@
     private static synchronized AWTKeyStroke getCachedStroke
         (char keyChar, int keyCode, int modifiers, boolean onKeyRelease)
     {
+        AppContext appContext = AppContext.getAppContext();
+        Map cache = (Map)appContext.get(APP_CONTEXT_CACHE_KEY);
+        AWTKeyStroke cacheKey = (AWTKeyStroke)appContext.get(APP_CONTEXT_KEYSTROKE_KEY);
+
         if (cache == null) {
             cache = new HashMap();
+            appContext.put(APP_CONTEXT_CACHE_KEY, cache);
         }
 
         if (cacheKey == null) {
             try {
-                cacheKey = (AWTKeyStroke)ctor.newInstance((Object[]) null);
+                Class clazz = getAWTKeyStrokeClass();
+                cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null);
+                appContext.put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
             } catch (InstantiationException e) {
                 assert(false);
             } catch (IllegalAccessException e) {
@@ -253,9 +282,8 @@
         if (stroke == null) {
             stroke = cacheKey;
             cache.put(stroke, stroke);
-            cacheKey = null;
+            appContext.remove(APP_CONTEXT_KEYSTROKE_KEY);
         }
-
         return stroke;
     }
 
@@ -777,12 +805,11 @@
      */
     protected Object readResolve() throws java.io.ObjectStreamException {
         synchronized (AWTKeyStroke.class) {
-            Class newClass = getClass();
-            if (!newClass.equals(ctor.getDeclaringClass())) {
-                registerSubclass(newClass);
+            if (getClass().equals(getAWTKeyStrokeClass())) {
+                return  getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
             }
-            return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
         }
+        return this;
     }
 
     private static int mapOldModifiers(int modifiers) {
--- a/src/share/classes/java/awt/Component.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/awt/Component.java	Sun Feb 26 16:05:10 2012 -0800
@@ -666,9 +666,10 @@
      * can lead to a deadlock if client code also uses synchronization
      * by a component object. For every such situation revealed we should
      * consider possibility of replacing "this" with the package private
-     * objectLock object introduced below. So far there're 2 issues known:
+     * objectLock object introduced below. So far there're 3 issues known:
      * - CR 6708322 (the getName/setName methods);
-     * - CR 6608764 (the PropertyChangeListener machinery).
+     * - CR 6608764 (the PropertyChangeListener machinery);
+     * - CR 7108598 (the Container.paint/KeyboardFocusManager.clearMostRecentFocusOwner methods).
      *
      * Note: this field is considered final, though readObject() prohibits
      * initializing final fields.
@@ -7910,7 +7911,7 @@
                 res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
             }
         }
-        if (!res) {
+        if (clearOnFailure && !res) {
             if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.finer("clear global focus owner");
             }
--- a/src/share/classes/java/awt/Container.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/awt/Container.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1950,7 +1950,7 @@
      */
     public void paint(Graphics g) {
         if (isShowing()) {
-            synchronized (this) {
+            synchronized (getObjectLock()) {
                 if (printing) {
                     if (printingThreads.contains(Thread.currentThread())) {
                         return;
@@ -2004,7 +2004,7 @@
         if (isShowing()) {
             Thread t = Thread.currentThread();
             try {
-                synchronized (this) {
+                synchronized (getObjectLock()) {
                     if (printingThreads == null) {
                         printingThreads = new HashSet();
                     }
@@ -2013,7 +2013,7 @@
                 }
                 super.print(g);  // By default, Component.print() calls paint()
             } finally {
-                synchronized (this) {
+                synchronized (getObjectLock()) {
                     printingThreads.remove(t);
                     printing = !printingThreads.isEmpty();
                 }
--- a/src/share/classes/java/beans/Beans.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/beans/Beans.java	Sun Feb 26 16:05:10 2012 -0800
@@ -32,7 +32,6 @@
 import java.applet.AppletStub;
 import java.applet.AudioClip;
 
-import java.awt.GraphicsEnvironment;
 import java.awt.Image;
 
 import java.beans.beancontext.BeanContext;
@@ -53,15 +52,11 @@
 import java.util.Iterator;
 import java.util.Vector;
 
-import sun.awt.AppContext;
-
 /**
  * This class provides some general purpose beans control methods.
  */
 
 public class Beans {
-    private static final Object DESIGN_TIME = new Object();
-    private static final Object GUI_AVAILABLE = new Object();
 
     /**
      * <p>
@@ -395,8 +390,7 @@
      * @see DesignMode
      */
     public static boolean isDesignTime() {
-        Object value = AppContext.getAppContext().get(DESIGN_TIME);
-        return (value instanceof Boolean) && (Boolean) value;
+        return ThreadGroupContext.getContext().isDesignTime();
     }
 
     /**
@@ -413,8 +407,7 @@
      *
      */
     public static boolean isGuiAvailable() {
-        Object value = AppContext.getAppContext().get(GUI_AVAILABLE);
-        return (value instanceof Boolean) ? (Boolean) value : !GraphicsEnvironment.isHeadless();
+        return ThreadGroupContext.getContext().isGuiAvailable();
     }
 
     /**
@@ -440,7 +433,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        AppContext.getAppContext().put(DESIGN_TIME, Boolean.valueOf(isDesignTime));
+        ThreadGroupContext.getContext().setDesignTime(isDesignTime);
     }
 
     /**
@@ -466,7 +459,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        AppContext.getAppContext().put(GUI_AVAILABLE, Boolean.valueOf(isGuiAvailable));
+        ThreadGroupContext.getContext().setGuiAvailable(isGuiAvailable);
     }
 }
 
--- a/src/share/classes/java/beans/Encoder.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/beans/Encoder.java	Sun Feb 26 16:05:10 2012 -0800
@@ -195,7 +195,13 @@
      */
     public PersistenceDelegate getPersistenceDelegate(Class<?> type) {
         PersistenceDelegate pd = this.finder.find(type);
-        return (pd != null) ? pd : MetaData.getPersistenceDelegate(type);
+        if (pd == null) {
+            pd = MetaData.getPersistenceDelegate(type);
+            if (pd != null) {
+                this.finder.register(type, pd);
+            }
+        }
+        return pd;
     }
 
     /**
--- a/src/share/classes/java/beans/Introspector.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/beans/Introspector.java	Sun Feb 26 16:05:10 2012 -0800
@@ -26,7 +26,6 @@
 package java.beans;
 
 import com.sun.beans.WeakCache;
-import com.sun.beans.finder.BeanInfoFinder;
 import com.sun.beans.finder.ClassFinder;
 
 import java.awt.Component;
@@ -44,9 +43,7 @@
 import java.util.EventObject;
 import java.util.List;
 import java.util.TreeMap;
-import java.util.WeakHashMap;
 
-import sun.awt.AppContext;
 import sun.reflect.misc.ReflectUtil;
 
 /**
@@ -98,10 +95,7 @@
     public final static int IGNORE_ALL_BEANINFO        = 3;
 
     // Static Caches to speed up introspection.
-    private static WeakCache<Class<?>, Method[]> declaredMethodCache =
-            new WeakCache<Class<?>, Method[]>();
-
-    private static final Object BEANINFO_CACHE = new Object();
+    private static final WeakCache<Class<?>, Method[]> declaredMethodCache = new WeakCache<>();
 
     private Class beanClass;
     private BeanInfo explicitBeanInfo;
@@ -134,8 +128,6 @@
     static final String SET_PREFIX = "set";
     static final String IS_PREFIX = "is";
 
-    private static final Object FINDER_KEY = new Object();
-
     //======================================================================
     //                          Public methods
     //======================================================================
@@ -160,20 +152,15 @@
         if (!ReflectUtil.isPackageAccessible(beanClass)) {
             return (new Introspector(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
         }
-        Map<Class<?>, BeanInfo> beanInfoCache;
+        ThreadGroupContext context = ThreadGroupContext.getContext();
         BeanInfo beanInfo;
-        synchronized (BEANINFO_CACHE) {
-            beanInfoCache = (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
-            if (beanInfoCache == null) {
-                beanInfoCache = new WeakHashMap<Class<?>, BeanInfo>();
-                AppContext.getAppContext().put(BEANINFO_CACHE, beanInfoCache);
-            }
-            beanInfo = beanInfoCache.get(beanClass);
+        synchronized (declaredMethodCache) {
+            beanInfo = context.getBeanInfo(beanClass);
         }
         if (beanInfo == null) {
             beanInfo = new Introspector(beanClass, null, USE_ALL_BEANINFO).getBeanInfo();
-            synchronized (BEANINFO_CACHE) {
-                beanInfoCache.put(beanClass, beanInfo);
+            synchronized (declaredMethodCache) {
+                context.putBeanInfo(beanClass, beanInfo);
             }
         }
         return beanInfo;
@@ -306,7 +293,7 @@
      */
 
     public static String[] getBeanInfoSearchPath() {
-        return getFinder().getPackages();
+        return ThreadGroupContext.getContext().getBeanInfoFinder().getPackages();
     }
 
     /**
@@ -330,7 +317,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        getFinder().setPackages(path);
+        ThreadGroupContext.getContext().getBeanInfoFinder().setPackages(path);
     }
 
 
@@ -342,11 +329,8 @@
      */
 
     public static void flushCaches() {
-        synchronized (BEANINFO_CACHE) {
-            Map beanInfoCache = (Map) AppContext.getAppContext().get(BEANINFO_CACHE);
-            if (beanInfoCache != null) {
-                beanInfoCache.clear();
-            }
+        synchronized (declaredMethodCache) {
+            ThreadGroupContext.getContext().clearBeanInfoCache();
             declaredMethodCache.clear();
         }
     }
@@ -370,11 +354,8 @@
         if (clz == null) {
             throw new NullPointerException();
         }
-        synchronized (BEANINFO_CACHE) {
-            Map beanInfoCache = (Map) AppContext.getAppContext().get(BEANINFO_CACHE);
-            if (beanInfoCache != null) {
-                beanInfoCache.put(clz, null);
-            }
+        synchronized (declaredMethodCache) {
+            ThreadGroupContext.getContext().removeBeanInfo(clz);
             declaredMethodCache.put(clz, null);
         }
     }
@@ -452,7 +433,7 @@
      * @return Instance of an explicit BeanInfo class or null if one isn't found.
      */
     private static BeanInfo findExplicitBeanInfo(Class beanClass) {
-        return getFinder().find(beanClass);
+        return ThreadGroupContext.getContext().getBeanInfoFinder().find(beanClass);
     }
 
     /**
@@ -1275,7 +1256,7 @@
         if (!ReflectUtil.isPackageAccessible(clz)) {
             return new Method[0];
         }
-        synchronized (BEANINFO_CACHE) {
+        synchronized (declaredMethodCache) {
             Method[] result = declaredMethodCache.get(clz);
             if (result == null) {
                 result = clz.getMethods();
@@ -1426,17 +1407,6 @@
         return false;
     }
 
-    private static BeanInfoFinder getFinder() {
-        AppContext context = AppContext.getAppContext();
-        Object object = context.get(FINDER_KEY);
-        if (object instanceof BeanInfoFinder) {
-            return (BeanInfoFinder) object;
-        }
-        BeanInfoFinder finder = new BeanInfoFinder();
-        context.put(FINDER_KEY, finder);
-        return finder;
-    }
-
     /**
      * Try to create an instance of a named class.
      * First try the classloader of "sibling", then try the system
--- a/src/share/classes/java/beans/PropertyEditorManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/beans/PropertyEditorManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -25,9 +25,6 @@
 
 package java.beans;
 
-import com.sun.beans.finder.PropertyEditorFinder;
-import sun.awt.AppContext;
-
 /**
  * The PropertyEditorManager can be used to locate a property editor for
  * any given type name.  This property editor must support the
@@ -55,8 +52,6 @@
 
 public class PropertyEditorManager {
 
-    private static final Object FINDER_KEY = new Object();
-
     /**
      * Registers an editor class to edit values of the given target class.
      * If the editor class is {@code null},
@@ -81,7 +76,7 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        getFinder().register(targetType, editorClass);
+        ThreadGroupContext.getContext().getPropertyEditorFinder().register(targetType, editorClass);
     }
 
     /**
@@ -92,7 +87,7 @@
      * The result is null if no suitable editor can be found.
      */
     public static PropertyEditor findEditor(Class<?> targetType) {
-        return getFinder().find(targetType);
+        return ThreadGroupContext.getContext().getPropertyEditorFinder().find(targetType);
     }
 
     /**
@@ -104,7 +99,7 @@
      *         e.g. Sun implementation initially sets to  {"sun.beans.editors"}.
      */
     public static String[] getEditorSearchPath() {
-        return getFinder().getPackages();
+        return ThreadGroupContext.getContext().getPropertyEditorFinder().getPackages();
     }
 
     /**
@@ -125,17 +120,6 @@
         if (sm != null) {
             sm.checkPropertiesAccess();
         }
-        getFinder().setPackages(path);
-    }
-
-    private static PropertyEditorFinder getFinder() {
-        AppContext context = AppContext.getAppContext();
-        Object object = context.get(FINDER_KEY);
-        if (object instanceof PropertyEditorFinder) {
-            return (PropertyEditorFinder) object;
-        }
-        PropertyEditorFinder finder = new PropertyEditorFinder();
-        context.put(FINDER_KEY, finder);
-        return finder;
+        ThreadGroupContext.getContext().getPropertyEditorFinder().setPackages(path);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/beans/ThreadGroupContext.java	Sun Feb 26 16:05:10 2012 -0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.beans;
+
+import com.sun.beans.finder.BeanInfoFinder;
+import com.sun.beans.finder.PropertyEditorFinder;
+
+import java.awt.GraphicsEnvironment;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+/**
+ * The {@code ThreadGroupContext} is an application-dependent
+ * context referenced by the specific {@link ThreadGroup}.
+ * This is a replacement for the {@link sun.awt.AppContext}.
+ *
+ * @author  Sergey Malenkov
+ */
+final class ThreadGroupContext {
+
+    private static final Map<ThreadGroup, ThreadGroupContext> contexts = new WeakHashMap<>();
+
+    /**
+     * Returns the appropriate {@code AppContext} for the caller,
+     * as determined by its {@code ThreadGroup}.
+     *
+     * @return  the application-dependent context
+     */
+    static ThreadGroupContext getContext() {
+        ThreadGroup group = Thread.currentThread().getThreadGroup();
+        synchronized (contexts) {
+            ThreadGroupContext context = contexts.get(group);
+            if (context == null) {
+                context = new ThreadGroupContext();
+                contexts.put(group, context);
+            }
+            return context;
+        }
+    }
+
+    private volatile boolean isDesignTime;
+    private volatile Boolean isGuiAvailable;
+
+    private Map<Class<?>, BeanInfo> beanInfoCache;
+    private BeanInfoFinder beanInfoFinder;
+    private PropertyEditorFinder propertyEditorFinder;
+
+
+    boolean isDesignTime() {
+        return this.isDesignTime;
+    }
+
+    void setDesignTime(boolean isDesignTime) {
+        this.isDesignTime = isDesignTime;
+    }
+
+
+    boolean isGuiAvailable() {
+        Boolean isGuiAvailable = this.isGuiAvailable;
+        return (isGuiAvailable != null)
+                ? isGuiAvailable.booleanValue()
+                : !GraphicsEnvironment.isHeadless();
+    }
+
+    void setGuiAvailable(boolean isGuiAvailable) {
+        this.isGuiAvailable = Boolean.valueOf(isGuiAvailable);
+    }
+
+
+    BeanInfo getBeanInfo(Class<?> type) {
+        return (this.beanInfoCache != null)
+                ? this.beanInfoCache.get(type)
+                : null;
+    }
+
+    BeanInfo putBeanInfo(Class<?> type, BeanInfo info) {
+        if (this.beanInfoCache == null) {
+            this.beanInfoCache = new WeakHashMap<>();
+        }
+        return this.beanInfoCache.put(type, info);
+    }
+
+    void removeBeanInfo(Class<?> type) {
+        if (this.beanInfoCache != null) {
+            this.beanInfoCache.remove(type);
+        }
+    }
+
+    void clearBeanInfoCache() {
+        if (this.beanInfoCache != null) {
+            this.beanInfoCache.clear();
+        }
+    }
+
+
+    synchronized BeanInfoFinder getBeanInfoFinder() {
+        if (this.beanInfoFinder == null) {
+            this.beanInfoFinder = new BeanInfoFinder();
+        }
+        return this.beanInfoFinder;
+    }
+
+    synchronized PropertyEditorFinder getPropertyEditorFinder() {
+        if (this.propertyEditorFinder == null) {
+            this.propertyEditorFinder = new PropertyEditorFinder();
+        }
+        return this.propertyEditorFinder;
+    }
+}
--- a/src/share/classes/java/io/InputStream.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/io/InputStream.java	Sun Feb 26 16:05:10 2012 -0800
@@ -44,10 +44,9 @@
  */
 public abstract class InputStream implements Closeable {
 
-    // SKIP_BUFFER_SIZE is used to determine the size of skipBuffer
-    private static final int SKIP_BUFFER_SIZE = 2048;
-    // skipBuffer is initialized in skip(long), if needed.
-    private static byte[] skipBuffer;
+    // MAX_SKIP_BUFFER_SIZE is used to determine the maximum buffer size to
+    // use when skipping.
+    private static final int MAX_SKIP_BUFFER_SIZE = 2048;
 
     /**
      * Reads the next byte of data from the input stream. The value byte is
@@ -212,18 +211,15 @@
 
         long remaining = n;
         int nr;
-        if (skipBuffer == null)
-            skipBuffer = new byte[SKIP_BUFFER_SIZE];
-
-        byte[] localSkipBuffer = skipBuffer;
 
         if (n <= 0) {
             return 0;
         }
 
+        int size = (int)Math.min(MAX_SKIP_BUFFER_SIZE, remaining);
+        byte[] skipBuffer = new byte[size];
         while (remaining > 0) {
-            nr = read(localSkipBuffer, 0,
-                      (int) Math.min(SKIP_BUFFER_SIZE, remaining));
+            nr = read(skipBuffer, 0, (int)Math.min(size, remaining));
             if (nr < 0) {
                 break;
             }
--- a/src/share/classes/java/lang/invoke/AdapterMethodHandle.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/lang/invoke/AdapterMethodHandle.java	Sun Feb 26 16:05:10 2012 -0800
@@ -53,7 +53,7 @@
         // JVM might update VM-specific bits of conversion (ignore)
         MethodHandleNatives.init(this, target, convArgPos(conv));
     }
-    private AdapterMethodHandle(MethodHandle target, MethodType newType,
+    AdapterMethodHandle(MethodHandle target, MethodType newType,
                 long conv) {
         this(target, newType, conv, null);
     }
@@ -427,7 +427,7 @@
                 insertStackMove(stackMove)
                 );
     }
-    private static long makeConv(int convOp) {
+    static long makeConv(int convOp) {
         assert(convOp == OP_RETYPE_ONLY || convOp == OP_RETYPE_RAW);
         return ((long)-1 << 32) | (convOp << CONV_OP_SHIFT);   // stackMove, src, dst all zero
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/CountingMethodHandle.java	Sun Feb 26 16:05:10 2012 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.invoke;
+
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+
+/**
+ * This method handle is used to optionally provide a count of how
+ * many times it was invoked.
+ *
+ * @author never
+ */
+class CountingMethodHandle extends AdapterMethodHandle {
+    private int vmcount;
+
+    private CountingMethodHandle(MethodHandle target) {
+        super(target, target.type(), AdapterMethodHandle.makeConv(OP_RETYPE_ONLY));
+    }
+
+    /** Wrap the incoming MethodHandle in a CountingMethodHandle if they are enabled */
+    static MethodHandle wrap(MethodHandle mh) {
+        if (MethodHandleNatives.COUNT_GWT) {
+            return new CountingMethodHandle(mh);
+        }
+        return mh;
+    }
+}
--- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1071,8 +1071,8 @@
             assert(target.type().equals(fallback.type()));
             MethodHandle tailcall = MethodHandles.exactInvoker(target.type());
             MethodHandle select = selectAlternative();
-            select = bindArgument(select, 2, fallback);
-            select = bindArgument(select, 1, target);
+            select = bindArgument(select, 2, CountingMethodHandle.wrap(fallback));
+            select = bindArgument(select, 1, CountingMethodHandle.wrap(target));
             // select(z: boolean) => (z ? target : fallback)
             MethodHandle filter = filterArgument(tailcall, 0, select);
             assert(filter.type().parameterType(0) == boolean.class);
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Sun Feb 26 16:05:10 2012 -0800
@@ -120,6 +120,8 @@
 
     static final int OP_ROT_ARGS_DOWN_LIMIT_BIAS;
 
+    static final boolean COUNT_GWT;
+
     private static native void registerNatives();
     static {
         registerNatives();
@@ -131,6 +133,7 @@
         k                           = getConstant(Constants.GC_OP_ROT_ARGS_DOWN_LIMIT_BIAS);
         OP_ROT_ARGS_DOWN_LIMIT_BIAS = (k != 0) ? (byte)k : -1;
         HAVE_RICOCHET_FRAMES        = (CONV_OP_IMPLEMENTED_MASK & (1<<OP_COLLECT_ARGS)) != 0;
+        COUNT_GWT                   = getConstant(Constants.GC_COUNT_GWT) != 0;
         //sun.reflect.Reflection.registerMethodsToFilter(MethodHandleImpl.class, "init");
     }
 
@@ -143,7 +146,8 @@
                 GC_JVM_PUSH_LIMIT = 0,
                 GC_JVM_STACK_MOVE_UNIT = 1,
                 GC_CONV_OP_IMPLEMENTED_MASK = 2,
-                GC_OP_ROT_ARGS_DOWN_LIMIT_BIAS = 3;
+                GC_OP_ROT_ARGS_DOWN_LIMIT_BIAS = 3,
+                GC_COUNT_GWT = 4;
         static final int
                 ETF_HANDLE_OR_METHOD_NAME = 0, // all available data (immediate MH or method)
                 ETF_DIRECT_HANDLE         = 1, // ultimate method handle (will be a DMH, may be self)
--- a/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -66,8 +66,8 @@
      * Creates a datagram socket
      */
     protected synchronized void create() throws SocketException {
+        ResourceManager.beforeUdpCreate();
         fd = new FileDescriptor();
-        ResourceManager.beforeUdpCreate();
         try {
             datagramSocketCreate();
         } catch (SocketException ioe) {
--- a/src/share/classes/java/net/AbstractPlainSocketImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/net/AbstractPlainSocketImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -71,7 +71,7 @@
 
    /* whether this Socket is a stream (TCP) socket or not (UDP)
     */
-    private boolean stream;
+    protected boolean stream;
 
     /**
      * Load net library into runtime.
@@ -86,10 +86,11 @@
      * is a stream socket (true) or an unconnected UDP socket (false).
      */
     protected synchronized void create(boolean stream) throws IOException {
-        fd = new FileDescriptor();
         this.stream = stream;
         if (!stream) {
             ResourceManager.beforeUdpCreate();
+            // only create the fd after we know we will be able to create the socket
+            fd = new FileDescriptor();
             try {
                 socketCreate(false);
             } catch (IOException ioe) {
@@ -98,6 +99,7 @@
                 throw ioe;
             }
         } else {
+            fd = new FileDescriptor();
             socketCreate(true);
         }
         if (socket != null)
--- a/src/share/classes/java/net/URI.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/net/URI.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1711,6 +1711,8 @@
                     i++;
                     continue;
                 }
+                if (d != '%')
+                    return false;
                 i++;
                 if (toLower(s.charAt(i)) != toLower(t.charAt(i)))
                     return false;
--- a/src/share/classes/java/nio/Bits.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/nio/Bits.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -699,6 +699,14 @@
                         }
                     };
                 }
+                @Override
+                public ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
+                    return new DirectByteBuffer(addr, cap, ob);
+                }
+                @Override
+                public void truncate(Buffer buf) {
+                    buf.truncate();
+                }
         });
     }
 
--- a/src/share/classes/java/nio/Buffer.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/nio/Buffer.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -543,6 +543,13 @@
         return mark;
     }
 
+    final void truncate() {                             // package-private
+        mark = -1;
+        position = 0;
+        limit = 0;
+        capacity = 0;
+    }
+
     final void discardMark() {                          // package-private
         mark = -1;
     }
--- a/src/share/classes/java/nio/Direct-X-Buffer.java.template	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/nio/Direct-X-Buffer.java.template	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,12 +58,13 @@
     // NOTE: moved up to Buffer.java for speed in JNI GetDirectBufferAddress
     //    protected long address;
 
-    // If this buffer is a view of another buffer then we keep a reference to
-    // that buffer so that its memory isn't freed before we're done with it
-    protected Object viewedBuffer = null;
+    // An object attached to this buffer. If this buffer is a view of another
+    // buffer then we use this field to keep a reference to that buffer to
+    // ensure that its memory isn't freed before we are done with it.
+    private final Object att;
 
-    public Object viewedBuffer() {
-        return viewedBuffer;
+    public Object attachment() {
+        return att;
     }
 
 #if[byte]
@@ -136,6 +137,7 @@
             address = base;
         }
         cleaner = Cleaner.create(this, new Deallocator(base, size, cap));
+        att = null;
 #else[rw]
         super(cap);
 #end[rw]
@@ -143,12 +145,24 @@
 
 #if[rw]
 
+    // Invoked to construct a direct ByteBuffer referring to the block of
+    // memory. A given arbitrary object may also be attached to the buffer.
+    //
+    Direct$Type$Buffer(long addr, int cap, Object ob) {
+        super(-1, 0, cap, cap);
+        address = addr;
+        cleaner = null;
+        att = ob;
+    }
+
+
     // Invoked only by JNI: NewDirectByteBuffer(void*, long)
     //
     private Direct$Type$Buffer(long addr, int cap) {
         super(-1, 0, cap, cap);
         address = addr;
         cleaner = null;
+        att = null;
     }
 
 #end[rw]
@@ -162,8 +176,8 @@
 #if[rw]
         super(-1, 0, cap, cap, fd);
         address = addr;
-        viewedBuffer = null;
         cleaner = Cleaner.create(this, unmapper);
+        att = null;
 #else[rw]
         super(cap, addr, fd, unmapper);
 #end[rw]
@@ -180,10 +194,10 @@
 #if[rw]
         super(mark, pos, lim, cap);
         address = db.address() + off;
-        viewedBuffer = db;
 #if[byte]
         cleaner = null;
 #end[byte]
+        att = db;
 #else[rw]
         super(db, mark, pos, lim, cap, off);
 #end[rw]
--- a/src/share/classes/java/rmi/server/UID.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/rmi/server/UID.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -118,15 +118,17 @@
                 boolean done = false;
                 while (!done) {
                     long now = System.currentTimeMillis();
-                    if (now <= lastTime) {
+                    if (now == lastTime) {
                         // wait for time to change
                         try {
-                            Thread.currentThread().sleep(1);
+                            Thread.sleep(1);
                         } catch (InterruptedException e) {
                             interrupted = true;
                         }
                     } else {
-                        lastTime = now;
+                        // If system time has gone backwards increase
+                        // original by 1ms to maintain uniqueness
+                        lastTime = (now < lastTime) ? lastTime+1 : now;
                         lastCount = Short.MIN_VALUE;
                         done = true;
                     }
--- a/src/share/classes/java/util/CurrencyData.properties	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/util/CurrencyData.properties	Sun Feb 26 16:05:10 2012 -0800
@@ -29,7 +29,7 @@
 # It is a serial number that accompanies with each amendment, such as 
 # 'MAxxx.doc'
 
-dataVersion=140
+dataVersion=151
 
 # List of all valid ISO 4217 currency codes.
 # To ensure compatibility, do not remove codes.
@@ -37,7 +37,7 @@
 all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036-\
     AWG533-AYM945-AZM031-AZN944-BAM977-BBD052-BDT050-BEF056-BGL100-BGN975-BHD048-BIF108-\
     BMD060-BND096-BOB068-BOV984-BRL986-BSD044-BTN064-BWP072-BYB112-BYR974-\
-    BZD084-CAD124-CDF976-CHF756-CLF990-CLP152-CNY156-COP170-CRC188-CSD891-CUP192-\
+    BZD084-CAD124-CDF976-CHF756-CLF990-CLP152-CNY156-COP170-CRC188-CSD891-CUP192-CUC931-\
     CVE132-CYP196-CZK203-DEM276-DJF262-DKK208-DOP214-DZD012-EEK233-EGP818-\
     ERN232-ESP724-ETB230-EUR978-FIM246-FJD242-FKP238-FRF250-GBP826-GEL981-\
     GHC288-GHS936-GIP292-GMD270-GNF324-GRD300-GTQ320-GWP624-GYD328-HKD344-HNL340-\
@@ -49,11 +49,11 @@
     NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\
     PKR586-PLN985-PTE620-PYG600-QAR634-ROL946-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
     SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
-    SRD968-SRG740-STD678-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TND788-TOP776-\
+    SRD968-SRG740-STD678-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
     TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-\
     UYU858-UZS860-VEB862-VEF937-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
     XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
-    XPT962-XTS963-XXX999-YER886-YUM891-ZAR710-ZMK894-ZWD716-ZWN942
+    XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZWD716-ZWL932-ZWN942-ZWR935
 
 
 # Mappings from ISO 3166 country codes to ISO 4217 currency codes.
@@ -124,6 +124,8 @@
 BJ=XOF
 # BERMUDA
 BM=BMD
+# Bonaire, Sint Eustatius and Saba
+BQ=USD
 # BHUTAN
 BT=BTN
 # BOLIVIA
@@ -186,6 +188,8 @@
 HR=HRK
 # CUBA
 CU=CUP
+# Cura\u00e7ao
+CW=ANG
 # CYPRUS
 CY=EUR
 # CZECH REPUBLIC
@@ -210,7 +214,7 @@
 # ERITREA
 ER=ERN
 # ESTONIA
-EE=EEK
+EE=EUR
 # ETHIOPIA
 ET=ETB
 # FALKLAND ISLANDS (MALVINAS)
@@ -476,7 +480,7 @@
 # SINGAPORE
 SG=SGD
 # SLOVAKIA
-SK=SKK
+SK=EUR
 # SLOVENIA
 SI=EUR
 # SOLOMON ISLANDS
@@ -497,6 +501,8 @@
 SR=SRD
 # SVALBARD AND JAN MAYEN
 SJ=NOK
+# Sint Maarten (Dutch part)
+SX=ANG
 # SWAZILAND
 SZ=SZL
 # SWEDEN
@@ -528,7 +534,7 @@
 # TURKEY
 TR=TRL;2004-12-31-22-00-00;TRY
 # TURKMENISTAN
-TM=TMM
+TM=TMT
 # TURKS AND CAICOS ISLANDS
 TC=USD
 # TUVALU
@@ -568,7 +574,7 @@
 # ZAMBIA
 ZM=ZMK
 # ZIMBABWE
-ZW=ZWD
+ZW=ZWL
 
 
 # List of currencies with 0, 1, OR 3 decimals for minor units, or where there
@@ -583,4 +589,4 @@
     BHD-IQD-JOD-KWD-LYD-OMR-TND
 minorUndefined=\
     XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-\
-    XPT-XTS-XXX
+    XPT-XSU-XTS-XUA-XXX
--- a/src/share/classes/java/util/LocaleISOData.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/util/LocaleISOData.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -254,6 +254,7 @@
         + "BM" + "BMU"  // Bermuda
         + "BN" + "BRN"  // Brunei Darussalam
         + "BO" + "BOL"  // Bolivia, Republic of
+        + "BQ" + "BES"  // Bonaire, Sint Eustatius and Saba
         + "BR" + "BRA"  // Brazil, Federative Republic of
         + "BS" + "BHS"  // Bahamas, Commonwealth of the
         + "BT" + "BTN"  // Bhutan, Kingdom of
@@ -277,6 +278,7 @@
 //      + "CS" + "SCG"  // Serbia and Montenegro
         + "CU" + "CUB"  // Cuba, Republic of
         + "CV" + "CPV"  // Cape Verde, Republic of
+        + "CW" + "CUW"  // Cura\u00e7ao
         + "CX" + "CXR"  // Christmas Island
         + "CY" + "CYP"  // Cyprus, Republic of
         + "CZ" + "CZE"  // Czech Republic
@@ -433,6 +435,7 @@
         + "SR" + "SUR"  // Suriname, Republic of
         + "ST" + "STP"  // Sao Tome and Principe, Democratic Republic of
         + "SV" + "SLV"  // El Salvador, Republic of
+        + "SX" + "SXM"  // Sint Maarten (Dutch part)
         + "SY" + "SYR"  // Syrian Arab Republic
         + "SZ" + "SWZ"  // Swaziland, Kingdom of
         + "TC" + "TCA"  // Turks and Caicos Islands
--- a/src/share/classes/java/util/Random.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/util/Random.java	Sun Feb 26 16:05:10 2012 -0800
@@ -118,7 +118,13 @@
      * @see   #setSeed(long)
      */
     public Random(long seed) {
-        this.seed = new AtomicLong(initialScramble(seed));
+        if (getClass() == Random.class)
+            this.seed = new AtomicLong(initialScramble(seed));
+        else {
+            // subclass might have overriden setSeed
+            this.seed = new AtomicLong();
+            setSeed(seed);
+        }
     }
 
     private static long initialScramble(long seed) {
--- a/src/share/classes/java/util/regex/Matcher.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/java/util/regex/Matcher.java	Sun Feb 26 16:05:10 2012 -0800
@@ -515,6 +515,7 @@
      * @throws  IllegalArgumentException
      *          If there is no capturing group in the pattern
      *          with the given name
+     * @since 1.7
      */
     public String group(String name) {
         if (name == null)
--- a/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/javax/net/ssl/HttpsURLConnection.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,6 +357,10 @@
                 "no SSLSocketFactory specified");
         }
 
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkSetFactory();
+        }
         sslSocketFactory = sf;
     }
 
--- a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Sun Feb 26 16:05:10 2012 -0800
@@ -810,10 +810,7 @@
             putValue(Action.ACTION_COMMAND_KEY, FilePane.ACTION_CHANGE_TO_PARENT_DIRECTORY);
         }
         public void actionPerformed(ActionEvent e) {
-            Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
-            if (focusOwner == null || !(focusOwner instanceof javax.swing.text.JTextComponent)) {
-                getFileChooser().changeToParentDirectory();
-            }
+            getFileChooser().changeToParentDirectory();
         }
     }
 
@@ -1156,10 +1153,15 @@
                 if (shellFolder.isLink()) {
                     File linkedTo = shellFolder.getLinkLocation();
 
-                    if (linkedTo != null && fc.isTraversable(linkedTo)) {
-                        dir = linkedTo;
+                    // If linkedTo is null we try to use dir
+                    if (linkedTo != null) {
+                        if (fc.isTraversable(linkedTo)) {
+                            dir = linkedTo;
+                        } else {
+                            return;
+                        }
                     } else {
-                        return;
+                        dir = shellFolder;
                     }
                 }
             } catch (FileNotFoundException ex) {
--- a/src/share/classes/javax/swing/text/html/CSS.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/javax/swing/text/html/CSS.java	Sun Feb 26 16:05:10 2012 -0800
@@ -806,15 +806,11 @@
             // translate border width into the cells, if it has non-zero value.
             AttributeSet tableAttr = elem.getParentElement().
                                      getParentElement().getAttributes();
-            int borderWidth;
-            try {
-                borderWidth = Integer.parseInt(
-                    (String) tableAttr.getAttribute(HTML.Attribute.BORDER));
-            } catch (NumberFormatException e) {
-                borderWidth = 0;
-            }
+
+            int borderWidth = getTableBorder(tableAttr);
             if (borderWidth > 0) {
-                translateAttribute(HTML.Attribute.BORDER, tableAttr, cssAttrSet);
+                // If table contains the BORDER attribute cells should have border width equals 1
+                translateAttribute(HTML.Attribute.BORDER, "1", cssAttrSet);
             }
             String pad = (String)tableAttr.getAttribute(HTML.Attribute.CELLPADDING);
             if (pad != null) {
@@ -850,6 +846,21 @@
         return cssAttrSet;
     }
 
+    private static int getTableBorder(AttributeSet tableAttr) {
+        String borderValue = (String) tableAttr.getAttribute(HTML.Attribute.BORDER);
+
+        if (borderValue == HTML.NULL_ATTRIBUTE_VALUE || "".equals(borderValue)) {
+            // Some browsers accept <TABLE BORDER> and <TABLE BORDER=""> with the same semantics as BORDER=1
+            return 1;
+        }
+
+        try {
+            return Integer.parseInt(borderValue);
+        } catch (NumberFormatException e) {
+            return 0;
+        }
+    }
+
     private static final Hashtable<String, Attribute> attributeMap = new Hashtable<String, Attribute>();
     private static final Hashtable<String, Value> valueMap = new Hashtable<String, Value>();
 
@@ -1400,17 +1411,20 @@
                         }
                     }
                 } else {
-
-                    /*
-                     * The html size attribute has a mapping in the CSS world only
-                     * if it is par of a font or base font tag.
-                     */
-
                     if (key == HTML.Attribute.SIZE && !isHTMLFontTag(tag)) {
-                        continue;
+                        /*
+                         * The html size attribute has a mapping in the CSS world only
+                         * if it is par of a font or base font tag.
+                         */
+                    } else if (tag == HTML.Tag.TABLE && key == HTML.Attribute.BORDER) {
+                        int borderWidth = getTableBorder(htmlAttrSet);
+
+                        if (borderWidth > 0) {
+                            translateAttribute(HTML.Attribute.BORDER, Integer.toString(borderWidth), cssAttrSet);
+                        }
+                    } else {
+                        translateAttribute(key, (String) htmlAttrSet.getAttribute(key), cssAttrSet);
                     }
-
-                    translateAttribute(key, htmlAttrSet, cssAttrSet);
                 }
             } else if (name instanceof CSS.Attribute) {
                 cssAttrSet.addAttribute(name, htmlAttrSet.getAttribute(name));
@@ -1419,7 +1433,7 @@
     }
 
     private void translateAttribute(HTML.Attribute key,
-                                           AttributeSet htmlAttrSet,
+                                           String htmlAttrValue,
                                            MutableAttributeSet cssAttrSet) {
         /*
          * In the case of all remaining HTML.Attribute's they
@@ -1427,8 +1441,6 @@
          */
         CSS.Attribute[] cssAttrList = getCssAttribute(key);
 
-        String htmlAttrValue = (String)htmlAttrSet.getAttribute(key);
-
         if (cssAttrList == null || htmlAttrValue == null) {
             return;
         }
--- a/src/share/classes/javax/swing/text/html/TableView.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/javax/swing/text/html/TableView.java	Sun Feb 26 16:05:10 2012 -0800
@@ -242,7 +242,8 @@
             if (lv != null) {
                 cellSpacing = (int) lv.getValue();
             } else {
-                cellSpacing = 0;
+                // Default cell spacing equals 2
+                cellSpacing = 2;
             }
             lv = (CSS.LengthValue)
                     attr.getAttribute(CSS.Attribute.BORDER_TOP_WIDTH);
@@ -251,8 +252,7 @@
             } else {
                     borderWidth = 0;
             }
-
-                }
+        }
     }
 
     /**
--- a/src/share/classes/sun/awt/FontConfiguration.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/awt/FontConfiguration.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -266,11 +266,20 @@
     private File findFontConfigFile(String javaLib) {
         String baseName = javaLib + File.separator + "fontconfig";
         File configFile;
+        String osMajorVersion = null;
         if (osVersion != null && osName != null) {
             configFile = findImpl(baseName + "." + osName + "." + osVersion);
             if (configFile != null) {
                 return configFile;
             }
+            int decimalPointIndex = osVersion.indexOf(".");
+            if (decimalPointIndex != -1) {
+                osMajorVersion = osVersion.substring(0, osVersion.indexOf("."));
+                configFile = findImpl(baseName + "." + osName + "." + osMajorVersion);
+                if (configFile != null) {
+                    return configFile;
+                }
+            }
         }
         if (osName != null) {
             configFile = findImpl(baseName + "." + osName);
@@ -283,6 +292,12 @@
             if (configFile != null) {
                 return configFile;
             }
+            if (osMajorVersion != null) {
+                configFile = findImpl(baseName + "." + osMajorVersion);
+                if (configFile != null) {
+                    return configFile;
+                }
+            }
         }
         foundOsSpecificFile = false;
 
--- a/src/share/classes/sun/launcher/LauncherHelper.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/launcher/LauncherHelper.java	Sun Feb 26 16:05:10 2012 -0800
@@ -396,7 +396,11 @@
                 if (mainAttrs == null) {
                     abort(ostream, null, "java.launcher.jar.error3", jarname);
                 }
-                return mainAttrs.getValue(MAIN_CLASS).trim();
+                String mainValue = mainAttrs.getValue(MAIN_CLASS);
+                if (mainValue == null) {
+                    abort(ostream, null, "java.launcher.jar.error3", jarname);
+                }
+                return mainValue.trim();
             } finally {
                 if (jarFile != null) {
                     jarFile.close();
--- a/src/share/classes/sun/launcher/resources/launcher.properties	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/launcher/resources/launcher.properties	Sun Feb 26 16:05:10 2012 -0800
@@ -72,7 +72,7 @@
 \                  load Java programming language agent, see java.lang.instrument\n\
 \    -splash:<imagepath>\n\
 \                  show splash screen with specified image\n\
-See http://java.sun.com/javase/reference for more details.
+See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
 
 # Translators please note do not translate the options themselves
 java.launcher.X.usage=\
--- a/src/share/classes/sun/management/ManagementFactoryHelper.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/management/ManagementFactoryHelper.java	Sun Feb 26 16:05:10 2012 -0800
@@ -171,7 +171,8 @@
             ObjectName result = objname;
             if (result == null) {
                 synchronized (this) {
-                    if (objname == null) {
+                    result = objname;
+                    if (result == null) {
                         result = Util.newObjectName(LOGGING_MXBEAN_NAME);
                         objname = result;
                     }
@@ -228,7 +229,8 @@
                 ObjectName result = objname;
                 if (result == null) {
                     synchronized (this) {
-                        if (objname == null) {
+                        result = objname;
+                        if (result == null) {
                             result = Util.newObjectName(BUFFER_POOL_MXBEAN_NAME +
                                 ",name=" + pool.getName());
                             objname = result;
--- a/src/share/classes/sun/misc/JavaNioAccess.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/misc/JavaNioAccess.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
 
 package sun.misc;
 
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
 public interface JavaNioAccess {
     /**
      * Provides access to information on buffer usage.
@@ -36,4 +39,18 @@
         long getMemoryUsed();
     }
     BufferPool getDirectBufferPool();
+
+    /**
+     * Constructs a direct ByteBuffer referring to the block of memory starting
+     * at the given memory address and and extending {@code cap} bytes.
+     * The {@code ob} parameter is an arbitrary object that is attached
+     * to the resulting buffer.
+     */
+    ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
+
+    /**
+     * Truncates a buffer by changing its capacity to 0.
+     */
+    void truncate(Buffer buf);
+
 }
--- a/src/share/classes/sun/net/ResourceManager.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/net/ResourceManager.java	Sun Feb 26 16:05:10 2012 -0800
@@ -41,13 +41,14 @@
 
     /* default maximum number of udp sockets per VM
      * when a security manager is enabled.
-     * The default is 1024 which is high enough to be useful
+     * The default is 25 which is high enough to be useful
      * but low enough to be well below the maximum number
-     * of port numbers actually available on all OSes for
-     * such sockets (5000 on some versions of windows)
+     * of port numbers actually available on all OSes
+     * when multiplied by the maximum feasible number of VM processes
+     * that could practically be spawned.
      */
 
-    private static final int DEFAULT_MAX_SOCKETS = 1024;
+    private static final int DEFAULT_MAX_SOCKETS = 25;
     private static final int maxSockets;
     private static final AtomicInteger numSockets;
 
--- a/src/share/classes/sun/net/httpserver/ServerConfig.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/net/httpserver/ServerConfig.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package sun.net.httpserver;
 
-import com.sun.net.httpserver.*;
-import com.sun.net.httpserver.spi.*;
 import java.util.logging.Logger;
 import java.security.PrivilegedAction;
 
@@ -59,48 +57,46 @@
     static long maxReqTime;
     static long maxRspTime;
     static long timerMillis;
-    static boolean debug = false;
+    static boolean debug;
+
+    // the value of the TCP_NODELAY socket-level option
+    static boolean noDelay;
 
     static {
+        java.security.AccessController.doPrivileged(
+            new PrivilegedAction<Void>() {
+                @Override
+                public Void run () {
+                    idleInterval = Long.getLong("sun.net.httpserver.idleInterval",
+                            DEFAULT_IDLE_INTERVAL) * 1000;
 
-        idleInterval = ((Long)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetLongAction(
-                "sun.net.httpserver.idleInterval",
-                DEFAULT_IDLE_INTERVAL))).longValue() * 1000;
+                    clockTick = Integer.getInteger("sun.net.httpserver.clockTick",
+                            DEFAULT_CLOCK_TICK);
 
-        clockTick = ((Integer)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetIntegerAction(
-                "sun.net.httpserver.clockTick",
-                DEFAULT_CLOCK_TICK))).intValue();
+                    maxIdleConnections = Integer.getInteger(
+                            "sun.net.httpserver.maxIdleConnections",
+                            DEFAULT_MAX_IDLE_CONNECTIONS);
 
-        maxIdleConnections = ((Integer)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetIntegerAction(
-                "sun.net.httpserver.maxIdleConnections",
-                DEFAULT_MAX_IDLE_CONNECTIONS))).intValue();
+                    drainAmount = Long.getLong("sun.net.httpserver.drainAmount",
+                            DEFAULT_DRAIN_AMOUNT);
 
-        drainAmount = ((Long)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetLongAction(
-                "sun.net.httpserver.drainAmount",
-                DEFAULT_DRAIN_AMOUNT))).longValue();
+                    maxReqTime = Long.getLong("sun.net.httpserver.maxReqTime",
+                            DEFAULT_MAX_REQ_TIME);
 
-        maxReqTime = ((Long)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetLongAction(
-                "sun.net.httpserver.maxReqTime",
-                DEFAULT_MAX_REQ_TIME))).longValue();
+                    maxRspTime = Long.getLong("sun.net.httpserver.maxRspTime",
+                            DEFAULT_MAX_RSP_TIME);
 
-        maxRspTime = ((Long)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetLongAction(
-                "sun.net.httpserver.maxRspTime",
-                DEFAULT_MAX_RSP_TIME))).longValue();
+                    timerMillis = Long.getLong("sun.net.httpserver.timerMillis",
+                            DEFAULT_TIMER_MILLIS);
 
-        timerMillis = ((Long)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetLongAction(
-                "sun.net.httpserver.timerMillis",
-                DEFAULT_TIMER_MILLIS))).longValue();
+                    debug = Boolean.getBoolean("sun.net.httpserver.debug");
 
-        debug = ((Boolean)java.security.AccessController.doPrivileged(
-                new sun.security.action.GetBooleanAction(
-                "sun.net.httpserver.debug"))).booleanValue();
+                    noDelay = Boolean.getBoolean("sun.net.httpserver.nodelay");
+
+                    return null;
+                }
+            });
+
     }
 
 
@@ -172,4 +168,8 @@
     static long getTimerMillis () {
         return timerMillis;
     }
+
+    static boolean noDelay() {
+        return noDelay;
+    }
 }
--- a/src/share/classes/sun/net/httpserver/ServerImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/net/httpserver/ServerImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,6 @@
 
 import java.net.*;
 import java.io.*;
-import java.nio.*;
-import java.security.*;
 import java.nio.channels.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -36,7 +34,6 @@
 import java.util.logging.Level;
 import javax.net.ssl.*;
 import com.sun.net.httpserver.*;
-import com.sun.net.httpserver.spi.*;
 import sun.net.httpserver.HttpConnection.State;
 
 /**
@@ -358,6 +355,12 @@
                                 continue;
                             }
                             SocketChannel chan = schan.accept();
+
+                            // Set TCP_NODELAY, if appropriate
+                            if (ServerConfig.noDelay()) {
+                                chan.socket().setTcpNoDelay(true);
+                            }
+
                             if (chan == null) {
                                 continue; /* cancel something ? */
                             }
--- a/src/share/classes/sun/net/www/http/HttpClient.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/net/www/http/HttpClient.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -599,7 +599,9 @@
             cachedHttpClient = false;
             if (!failedOnce && requests != null) {
                 failedOnce = true;
-                if (httpuc.getRequestMethod().equals("POST") && (!retryPostProp || streaming)) {
+                if (getRequestMethod().equals("CONNECT") ||
+                    (httpuc.getRequestMethod().equals("POST") &&
+                    (!retryPostProp || streaming))) {
                     // do not retry the request
                 }  else {
                     // try once more
@@ -706,7 +708,9 @@
             } else if (nread != 8) {
                 if (!failedOnce && requests != null) {
                     failedOnce = true;
-                    if (httpuc.getRequestMethod().equals("POST") && (!retryPostProp || streaming)) {
+                    if (getRequestMethod().equals("CONNECT") ||
+                        (httpuc.getRequestMethod().equals("POST") &&
+                        (!retryPostProp || streaming))) {
                         // do not retry the request
                     } else {
                         closeServer();
@@ -891,6 +895,16 @@
         return cacheRequest;
     }
 
+    String getRequestMethod() {
+        if (requests != null) {
+            String requestLine = requests.getKey(0);
+            if (requestLine != null) {
+                return requestLine.split("\\s+")[0];
+            }
+        }
+        return "";
+    }
+
     @Override
     protected void finalize() throws Throwable {
         // This should do nothing.  The stream finalizer will
--- a/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1880,14 +1880,7 @@
     private void sendCONNECTRequest() throws IOException {
         int port = url.getPort();
 
-        // setRequests == true indicates the std. request headers
-        // have been set in (previous) requests.
-        // so the first one must be the http method (GET, etc.).
-        // we need to set it to CONNECT soon, remove this one first.
-        // otherwise, there may have 2 http methods in headers
-        if (setRequests) requests.set(0, null, null);
-
-        requests.prepend(HTTP_CONNECT + " " + connectRequestURI(url)
+        requests.set(0, HTTP_CONNECT + " " + connectRequestURI(url)
                          + " " + httpVersion, null);
         requests.setIfNotSet("User-Agent", userAgent);
 
@@ -1912,8 +1905,6 @@
         }
 
         http.writeRequests(requests, null);
-        // remove CONNECT header
-        requests.set(0, null, null);
     }
 
     /**
--- a/src/share/classes/sun/nio/ch/DirectBuffer.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/nio/ch/DirectBuffer.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 
     public long address();
 
-    public Object viewedBuffer();
+    public Object attachment();
 
     public Cleaner cleaner();
 
--- a/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/nio/cs/AbstractCharsetProvider.java	Sun Feb 26 16:05:10 2012 -0800
@@ -179,7 +179,9 @@
 
                 public Charset next() {
                     String csn = i.next();
-                    return lookup(csn);
+                    synchronized (AbstractCharsetProvider.this) {
+                        return lookup(csn);
+                    }
                 }
 
                 public void remove() {
--- a/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
  * @since   1.5
  */
 class AnnotationInvocationHandler implements InvocationHandler, Serializable {
+    private static final long serialVersionUID = 6182022883658399397L;
     private final Class<? extends Annotation> type;
     private final Map<String, Object> memberValues;
 
--- a/src/share/classes/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
  * @since   1.5
  */
 class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
+    private static final long serialVersionUID = 7844069490309503934L;
     private Method member;
     private String foundType;
 
--- a/src/share/classes/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @since   1.5
  */
 public class EnumConstantNotPresentExceptionProxy extends ExceptionProxy {
+    private static final long serialVersionUID = -604662101303187330L;
     Class<? extends Enum> enumType;
     String constName;
 
--- a/src/share/classes/sun/reflect/annotation/TypeNotPresentExceptionProxy.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/reflect/annotation/TypeNotPresentExceptionProxy.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @since   1.5
  */
 public class TypeNotPresentExceptionProxy extends ExceptionProxy {
+    private static final long serialVersionUID = 5565925172427947573L;
     String typeName;
     Throwable cause;
 
--- a/src/share/classes/sun/reflect/generics/parser/SignatureParser.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/reflect/generics/parser/SignatureParser.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,17 +25,15 @@
 
 package sun.reflect.generics.parser;
 
-
 import java.lang.reflect.GenericSignatureFormatError;
 import java.util.*;
 import sun.reflect.generics.tree.*;
 
-
 /**
  * Parser for type signatures, as defined in the Java Virtual
-// Machine Specification (JVMS) chapter 4.
+ * Machine Specification (JVMS) chapter 4.
  * Converts the signatures into an abstract syntax tree (AST) representation.
-// See the package sun.reflect.generics.tree for details of the AST.
+ * See the package sun.reflect.generics.tree for details of the AST.
  */
 public class SignatureParser {
     // The input is conceptually a character stream (though currently it's
@@ -58,8 +56,8 @@
     // if (current != x {error("expected an x");
     //
     // where x is some character constant.
-    // The assertion inidcates, that, as currently written,
-    // the code should nver reach this point unless the input is an
+    // The assertion indicates, that, as currently written,
+    // the code should never reach this point unless the input is an
     // x. On the other hand, the test is there to check the legality
     // of the input wrt to a given production. It may be that at a later
     // time the code might be called directly, and if the input is
@@ -68,7 +66,7 @@
 
     private char[] input; // the input signature
     private int index = 0; // index into the input
-// used to mark end of input
+    // used to mark end of input
     private static final char EOI = ':';
     private static final boolean DEBUG = false;
 
@@ -104,6 +102,11 @@
         index++;
     }
 
+    // For debugging, prints current character to the end of the input.
+    private String remainder() {
+        return new String(input, index, input.length-index);
+    }
+
     // Match c against a "set" of characters
     private boolean matches(char c, char... set) {
         for (char e : set) {
@@ -117,11 +120,22 @@
     // Currently throws a GenericSignatureFormatError.
 
     private Error error(String errorMsg) {
-        if (DEBUG) System.out.println("Parse error:" + errorMsg);
+        if (DEBUG)
+            System.out.println("Signature Parse error: " + errorMsg +
+                               "\n\tRemaining input: " + remainder());
         return new GenericSignatureFormatError();
     }
 
     /**
+     * Verify the parse has made forward progress; throw an exception
+     * if no progress.
+     */
+    private void progress(int startingPosition) {
+        if (index <= startingPosition)
+            throw error("Failure to make progress!");
+    }
+
+    /**
      * Static factory method. Produces a parser instance.
      * @return an instance of <tt>SignatureParser</tt>
      */
@@ -163,6 +177,7 @@
     /**
      * Parses a type signature
      * and produces an abstract syntax tree representing it.
+     *
      * @param s a string representing the input type signature
      * @return An abstract syntax tree for a type signature
      * corresponding to the input string
@@ -183,38 +198,58 @@
     // and when it completes parsing, it leaves the input at the first
     // character after the input parses.
 
-    // parse a class signature based on the implicit input.
+    /*
+     * Note on grammar conventions: a trailing "*" matches zero or
+     * more occurrences, a trailing "+" matches one or more occurrences,
+     * "_opt" indicates an optional component.
+     */
+
+    /**
+     * ClassSignature:
+     *     FormalTypeParameters_opt SuperclassSignature SuperinterfaceSignature*
+     */
     private ClassSignature parseClassSignature() {
+        // parse a class signature based on the implicit input.
         assert(index == 0);
         return ClassSignature.make(parseZeroOrMoreFormalTypeParameters(),
-                                   parseClassTypeSignature(),
+                                   parseClassTypeSignature(), // Only rule for SuperclassSignature
                                    parseSuperInterfaces());
     }
 
     private FormalTypeParameter[] parseZeroOrMoreFormalTypeParameters(){
-        if (current() == '<') { return parseFormalTypeParameters();}
-        else {return new FormalTypeParameter[0];}
+        if (current() == '<') {
+            return parseFormalTypeParameters();
+        } else {
+            return new FormalTypeParameter[0];
+        }
     }
 
-
+    /**
+     * FormalTypeParameters:
+     *     "<" FormalTypeParameter+ ">"
+     */
     private FormalTypeParameter[] parseFormalTypeParameters(){
-        Collection<FormalTypeParameter> ftps =
-            new ArrayList<FormalTypeParameter>(3);
+        List<FormalTypeParameter> ftps =  new ArrayList<>(3);
         assert(current() == '<'); // should not have been called at all
-        if (current() != '<') { throw error("expected <");}
+        if (current() != '<') { throw error("expected '<'");}
         advance();
         ftps.add(parseFormalTypeParameter());
         while (current() != '>') {
+            int startingPosition = index;
             ftps.add(parseFormalTypeParameter());
+            progress(startingPosition);
         }
         advance();
-        FormalTypeParameter[] ftpa = new FormalTypeParameter[ftps.size()];
-        return ftps.toArray(ftpa);
+        return ftps.toArray(new FormalTypeParameter[ftps.size()]);
     }
 
+    /**
+     * FormalTypeParameter:
+     *     Identifier ClassBound InterfaceBound*
+     */
     private FormalTypeParameter parseFormalTypeParameter(){
         String id = parseIdentifier();
-        FieldTypeSignature[] bs = parseZeroOrMoreBounds();
+        FieldTypeSignature[] bs = parseBounds();
         return FormalTypeParameter.make(id, bs);
     }
 
@@ -229,7 +264,8 @@
             case '[':
             case ':':
             case '>':
-            case '<': return result.toString();
+            case '<':
+                return result.toString();
             default:{
                 result.append(c);
                 advance();
@@ -239,26 +275,42 @@
         }
         return result.toString();
     }
+    /**
+     * FieldTypeSignature:
+     *     ClassTypeSignature
+     *     ArrayTypeSignature
+     *     TypeVariableSignature
+     */
+    private FieldTypeSignature parseFieldTypeSignature() {
+        return parseFieldTypeSignature(true);
+    }
 
-    private FieldTypeSignature parseFieldTypeSignature() {
+    private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
         switch(current()) {
         case 'L':
            return parseClassTypeSignature();
         case 'T':
             return parseTypeVariableSignature();
         case '[':
-            return parseArrayTypeSignature();
+            if (allowArrays)
+                return parseArrayTypeSignature();
+            else
+                throw error("Array signature not allowed here.");
         default: throw error("Expected Field Type Signature");
         }
     }
 
+    /**
+     * ClassTypeSignature:
+     *     "L" PackageSpecifier_opt SimpleClassTypeSignature ClassTypeSignatureSuffix* ";"
+     */
     private ClassTypeSignature parseClassTypeSignature(){
         assert(current() == 'L');
         if (current() != 'L') { throw error("expected a class type");}
         advance();
-        List<SimpleClassTypeSignature> scts =
-            new ArrayList<SimpleClassTypeSignature>(5);
-        scts.add(parseSimpleClassTypeSignature(false));
+        List<SimpleClassTypeSignature> scts = new ArrayList<>(5);
+        scts.add(parsePackageNameAndSimpleClassTypeSignature());
+
         parseClassTypeSignatureSuffix(scts);
         if (current() != ';')
             throw error("expected ';' got '" + current() + "'");
@@ -267,25 +319,65 @@
         return ClassTypeSignature.make(scts);
     }
 
-    private SimpleClassTypeSignature parseSimpleClassTypeSignature(boolean dollar){
-            String id = parseIdentifier();
-            char c = current();
-            switch (c) {
-            case ';':
-            case '/':
-                return SimpleClassTypeSignature.make(id, dollar, new TypeArgument[0]) ;
-            case '<': {
-                return SimpleClassTypeSignature.make(id, dollar, parseTypeArguments());
+    /**
+     * PackageSpecifier:
+     *     Identifier "/" PackageSpecifier*
+     */
+    private SimpleClassTypeSignature parsePackageNameAndSimpleClassTypeSignature() {
+        // Parse both any optional leading PackageSpecifier as well as
+        // the following SimpleClassTypeSignature.
+
+        String id = parseIdentifier();
+
+        if (current() == '/') { // package name
+            StringBuilder idBuild = new StringBuilder(id);
+
+            while(current() == '/') {
+                advance();
+                idBuild.append(".");
+                idBuild.append(parseIdentifier());
             }
-            default: {throw error("expected < or ; or /");}
-            }
+            id = idBuild.toString();
+        }
+
+        switch (current()) {
+        case ';':
+            return SimpleClassTypeSignature.make(id, false, new TypeArgument[0]); // all done!
+        case '<':
+            if (DEBUG) System.out.println("\t remainder: " + remainder());
+            return SimpleClassTypeSignature.make(id, false, parseTypeArguments());
+        default:
+            throw error("expected '<' or ';' but got " + current());
+        }
     }
 
+    /**
+     * SimpleClassTypeSignature:
+     *     Identifier TypeArguments_opt
+     */
+    private SimpleClassTypeSignature parseSimpleClassTypeSignature(boolean dollar){
+        String id = parseIdentifier();
+        char c = current();
+
+        switch (c) {
+        case ';':
+        case '.':
+            return SimpleClassTypeSignature.make(id, dollar, new TypeArgument[0]) ;
+        case '<':
+            return SimpleClassTypeSignature.make(id, dollar, parseTypeArguments());
+        default:
+            throw error("expected '<' or ';' or '.', got '" + c + "'.");
+        }
+    }
+
+    /**
+     * ClassTypeSignatureSuffix:
+     *     "." SimpleClassTypeSignature
+     */
     private void parseClassTypeSignatureSuffix(List<SimpleClassTypeSignature> scts) {
-        while (current() == '/' || current() == '.') {
-            boolean dollar = (current() == '.');
+        while (current() == '.') {
             advance();
-            scts.add(parseSimpleClassTypeSignature(dollar));
+            scts.add(parseSimpleClassTypeSignature(true));
         }
     }
 
@@ -294,10 +386,14 @@
         else {return new TypeArgument[0];}
     }
 
+    /**
+     * TypeArguments:
+     *     "<" TypeArgument+ ">"
+     */
     private TypeArgument[] parseTypeArguments() {
-        Collection<TypeArgument> tas = new ArrayList<TypeArgument>(3);
+        List<TypeArgument> tas = new ArrayList<>(3);
         assert(current() == '<');
-        if (current() != '<') { throw error("expected <");}
+        if (current() != '<') { throw error("expected '<'");}
         advance();
         tas.add(parseTypeArgument());
         while (current() != '>') {
@@ -305,10 +401,14 @@
             tas.add(parseTypeArgument());
         }
         advance();
-        TypeArgument[] taa = new TypeArgument[tas.size()];
-        return tas.toArray(taa);
+        return tas.toArray(new TypeArgument[tas.size()]);
     }
 
+    /**
+     * TypeArgument:
+     *     WildcardIndicator_opt FieldTypeSignature
+     *     "*"
+     */
     private TypeArgument parseTypeArgument() {
         FieldTypeSignature[] ub, lb;
         ub = new FieldTypeSignature[1];
@@ -334,18 +434,20 @@
             ub[0] = SimpleClassTypeSignature.make("java.lang.Object", false, ta);
             return Wildcard.make(ub, lb);
         }
-        default: return parseFieldTypeSignature();
+        default:
+            return parseFieldTypeSignature();
         }
     }
 
-    // TypeVariableSignature -> T identifier
-
-    private TypeVariableSignature parseTypeVariableSignature(){
+    /**
+     * TypeVariableSignature:
+     *     "T" Identifier ";"
+     */
+    private TypeVariableSignature parseTypeVariableSignature() {
         assert(current() == 'T');
         if (current() != 'T') { throw error("expected a type variable usage");}
         advance();
-        TypeVariableSignature ts =
-            TypeVariableSignature.make(parseIdentifier());
+        TypeVariableSignature ts = TypeVariableSignature.make(parseIdentifier());
         if (current() != ';') {
             throw error("; expected in signature of type variable named" +
                   ts.getIdentifier());
@@ -354,16 +456,21 @@
         return ts;
     }
 
-        // ArrayTypeSignature -> [ TypeSignature
-
+    /**
+     * ArrayTypeSignature:
+     *     "[" TypeSignature
+     */
     private ArrayTypeSignature parseArrayTypeSignature() {
         if (current() != '[') {throw error("expected array type signature");}
         advance();
         return ArrayTypeSignature.make(parseTypeSignature());
     }
 
-    // TypeSignature -> BaseType | FieldTypeSignature
-
+    /**
+     * TypeSignature:
+     *     FieldTypeSignature
+     *     BaseType
+     */
     private TypeSignature parseTypeSignature() {
         switch (current()) {
         case 'B':
@@ -373,8 +480,11 @@
         case 'I':
         case 'J':
         case 'S':
-        case 'Z':return parseBaseType();
-        default: return parseFieldTypeSignature();
+        case 'Z':
+            return parseBaseType();
+
+        default:
+            return parseFieldTypeSignature();
         }
     }
 
@@ -408,12 +518,18 @@
             assert(false);
             throw error("expected primitive type");
         }
-    }
+        }
     }
 
-    private FieldTypeSignature[] parseZeroOrMoreBounds() {
-        Collection<FieldTypeSignature> fts =
-            new ArrayList<FieldTypeSignature>(3);
+    /**
+     * ClassBound:
+     *     ":" FieldTypeSignature_opt
+     *
+     * InterfaceBound:
+     *     ":" FieldTypeSignature
+     */
+    private FieldTypeSignature[] parseBounds() {
+        List<FieldTypeSignature> fts = new ArrayList<>(3);
 
         if (current() == ':') {
             advance();
@@ -430,24 +546,31 @@
                 advance();
                 fts.add(parseFieldTypeSignature());
             }
-        }
+        } else
+            error("Bound expected");
 
-        FieldTypeSignature[] fta = new FieldTypeSignature[fts.size()];
-        return fts.toArray(fta);
+        return fts.toArray(new FieldTypeSignature[fts.size()]);
     }
 
+    /**
+     * SuperclassSignature:
+     *     ClassTypeSignature
+     */
     private ClassTypeSignature[] parseSuperInterfaces() {
-        Collection<ClassTypeSignature> cts =
-            new ArrayList<ClassTypeSignature>(5);
+        List<ClassTypeSignature> cts = new ArrayList<>(5);
         while(current() == 'L') {
             cts.add(parseClassTypeSignature());
         }
-        ClassTypeSignature[] cta = new ClassTypeSignature[cts.size()];
-        return cts.toArray(cta);
+        return cts.toArray(new ClassTypeSignature[cts.size()]);
     }
 
-    // parse a method signature based on the implicit input.
+
+    /**
+     * MethodTypeSignature:
+     *     FormalTypeParameters_opt "(" TypeSignature* ")" ReturnType ThrowsSignature*
+     */
     private MethodTypeSignature parseMethodTypeSignature() {
+        // Parse a method signature based on the implicit input.
         FieldTypeSignature[] ets;
 
         assert(index == 0);
@@ -457,19 +580,19 @@
                                         parseZeroOrMoreThrowsSignatures());
     }
 
-    // (TypeSignature*)
+    // "(" TypeSignature* ")"
     private TypeSignature[] parseFormalParameters() {
-        if (current() != '(') {throw error("expected (");}
+        if (current() != '(') {throw error("expected '('");}
         advance();
         TypeSignature[] pts = parseZeroOrMoreTypeSignatures();
-        if (current() != ')') {throw error("expected )");}
+        if (current() != ')') {throw error("expected ')'");}
         advance();
         return pts;
     }
 
-        // TypeSignature*
+    // TypeSignature*
     private TypeSignature[] parseZeroOrMoreTypeSignatures() {
-        Collection<TypeSignature> ts = new ArrayList<TypeSignature>();
+        List<TypeSignature> ts = new ArrayList<>();
         boolean stop = false;
         while (!stop) {
             switch(current()) {
@@ -484,47 +607,46 @@
             case 'L':
             case 'T':
             case '[': {
-                    ts.add(parseTypeSignature());
-                    break;
-                }
+                ts.add(parseTypeSignature());
+                break;
+            }
             default: stop = true;
             }
         }
-        /*      while( matches(current(),
-                       'B', 'C', 'D', 'F', 'I', 'J', 'S', 'Z', 'L', 'T', '[')
-               ) {
-            ts.add(parseTypeSignature());
-            }*/
-        TypeSignature[] ta = new TypeSignature[ts.size()];
-        return ts.toArray(ta);
+        return ts.toArray(new TypeSignature[ts.size()]);
     }
 
-    // ReturnType -> V | TypeSignature
-
+    /**
+     * ReturnType:
+     *     TypeSignature
+     *     VoidDescriptor
+     */
     private ReturnType parseReturnType(){
-        if  (current() == 'V') {
+        if (current() == 'V') {
             advance();
             return VoidDescriptor.make();
-        } else return parseTypeSignature();
+        } else
+            return parseTypeSignature();
     }
 
     // ThrowSignature*
     private FieldTypeSignature[] parseZeroOrMoreThrowsSignatures(){
-        Collection<FieldTypeSignature> ets =
-            new ArrayList<FieldTypeSignature>(3);
+        List<FieldTypeSignature> ets = new ArrayList<>(3);
         while( current() == '^') {
             ets.add(parseThrowsSignature());
         }
-        FieldTypeSignature[] eta = new FieldTypeSignature[ets.size()];
-        return ets.toArray(eta);
+        return ets.toArray(new FieldTypeSignature[ets.size()]);
     }
 
-    // ThrowSignature -> ^ FieldTypeSignature
-
+    /**
+     * ThrowsSignature:
+     *     "^" ClassTypeSignature
+     *     "^" TypeVariableSignature
+     */
     private FieldTypeSignature parseThrowsSignature() {
         assert(current() == '^');
         if (current() != '^') { throw error("expected throws signature");}
         advance();
-        return parseFieldTypeSignature();
+        return parseFieldTypeSignature(false);
     }
  }
--- a/src/share/classes/sun/rmi/registry/RegistryImpl.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/rmi/registry/RegistryImpl.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 import java.util.Hashtable;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.io.FilePermission;
 import java.io.IOException;
 import java.net.*;
 import java.rmi.*;
@@ -38,8 +39,17 @@
 import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.CodeSource;
+import java.security.Policy;
 import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.ProtectionDomain;
 import java.text.MessageFormat;
+import sun.rmi.server.LoaderHandler;
 import sun.rmi.server.UnicastServerRef;
 import sun.rmi.server.UnicastServerRef2;
 import sun.rmi.transport.LiveRef;
@@ -334,11 +344,19 @@
 
             Thread.currentThread().setContextClassLoader(cl);
 
-            int regPort = Registry.REGISTRY_PORT;
-            if (args.length >= 1) {
-                regPort = Integer.parseInt(args[0]);
+            final int regPort = (args.length >= 1) ? Integer.parseInt(args[0])
+                                                   : Registry.REGISTRY_PORT;
+            try {
+                registry = AccessController.doPrivileged(
+                    new PrivilegedExceptionAction<RegistryImpl>() {
+                        public RegistryImpl run() throws RemoteException {
+                            return new RegistryImpl(regPort);
+                        }
+                    }, getAccessControlContext());
+            } catch (PrivilegedActionException ex) {
+                throw (RemoteException) ex.getException();
             }
-            registry = new RegistryImpl(regPort);
+
             // prevent registry from exiting
             while (true) {
                 try {
@@ -358,4 +376,46 @@
         }
         System.exit(1);
     }
+
+    /**
+     * Generates an AccessControlContext with minimal permissions.
+     * The approach used here is taken from the similar method
+     * getAccessControlContext() in the sun.applet.AppletPanel class.
+     */
+    private static AccessControlContext getAccessControlContext() {
+        // begin with permissions granted to all code in current policy
+        PermissionCollection perms = AccessController.doPrivileged(
+            new java.security.PrivilegedAction<PermissionCollection>() {
+                public PermissionCollection run() {
+                    CodeSource codesource = new CodeSource(null,
+                        (java.security.cert.Certificate[]) null);
+                    Policy p = java.security.Policy.getPolicy();
+                    if (p != null) {
+                        return p.getPermissions(codesource);
+                    } else {
+                        return new Permissions();
+                    }
+                }
+            });
+
+        /*
+         * Anyone can connect to the registry and the registry can connect
+         * to and possibly download stubs from anywhere. Downloaded stubs and
+         * related classes themselves are more tightly limited by RMI.
+         */
+        perms.add(new SocketPermission("*", "connect,accept"));
+
+        perms.add(new RuntimePermission("accessClassInPackage.sun.*"));
+
+        perms.add(new FilePermission("<<ALL FILES>>", "read"));
+
+        /*
+         * Create an AccessControlContext that consists of a single
+         * protection domain with only the permissions calculated above.
+         */
+        ProtectionDomain pd = new ProtectionDomain(
+            new CodeSource(null,
+                (java.security.cert.Certificate[]) null), perms);
+        return new AccessControlContext(new ProtectionDomain[] { pd });
+    }
 }
--- a/src/share/classes/sun/rmi/server/LoaderHandler.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/rmi/server/LoaderHandler.java	Sun Feb 26 16:05:10 2012 -0800
@@ -1031,9 +1031,9 @@
      * loader.  A given permission is only added to the collection if
      * it is not already implied by the collection.
      */
-    private static void addPermissionsForURLs(URL[] urls,
-                                              PermissionCollection perms,
-                                              boolean forLoader)
+    public static void addPermissionsForURLs(URL[] urls,
+                                             PermissionCollection perms,
+                                             boolean forLoader)
     {
         for (int i = 0; i < urls.length; i++) {
             URL url = urls[i];
--- a/src/share/classes/sun/rmi/server/UnicastServerRef.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/rmi/server/UnicastServerRef.java	Sun Feb 26 16:05:10 2012 -0800
@@ -390,6 +390,12 @@
             ObjectInput in;
             try {
                 in = call.getInputStream();
+                try {
+                    Class<?> clazz = Class.forName("sun.rmi.transport.DGCImpl_Skel");
+                    if (clazz.isAssignableFrom(skel.getClass())) {
+                        ((MarshalInputStream)in).useCodebaseOnly();
+                    }
+                } catch (ClassNotFoundException ignore) { }
                 hash = in.readLong();
             } catch (Exception readEx) {
                 throw new UnmarshalException("error unmarshalling call header",
--- a/src/share/classes/sun/security/krb5/EncryptionKey.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/EncryptionKey.java	Sun Feb 26 16:05:10 2012 -0800
@@ -151,11 +151,36 @@
     }
 
     /**
+     * Obtains a key for a given etype of a principal with possible new salt
+     * and s2kparams
+     * @param cname NOT null
+     * @param password NOT null
+     * @param etype
+     * @param snp can be NULL
+     * @returns never null
+     */
+    public static EncryptionKey acquireSecretKey(PrincipalName cname,
+            char[] password, int etype, PAData.SaltAndParams snp)
+            throws KrbException {
+        String salt;
+        byte[] s2kparams;
+        if (snp != null) {
+            salt = snp.salt != null ? snp.salt : cname.getSalt();
+            s2kparams = snp.params;
+        } else {
+            salt = cname.getSalt();
+            s2kparams = null;
+        }
+        return acquireSecretKey(password, salt, etype, s2kparams);
+    }
+
+    /**
      * Obtains a key for a given etype with salt and optional s2kparams
      * @param password NOT null
      * @param salt NOT null
      * @param etype
      * @param s2kparams can be NULL
+     * @returns never null
      */
     public static EncryptionKey acquireSecretKey(char[] password,
             String salt, int etype, byte[] s2kparams)
--- a/src/share/classes/sun/security/krb5/KrbAsRep.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/KrbAsRep.java	Sun Feb 26 16:05:10 2012 -0800
@@ -131,13 +131,11 @@
             KrbAsReq asReq, PrincipalName cname)
             throws KrbException, Asn1Exception, IOException {
         int encPartKeyType = rep.encPart.getEType();
-        PAData.SaltAndParams snp =
-                PAData.getSaltAndParams(encPartKeyType, rep.pAData);
-        EncryptionKey dkey = null;
-        dkey = EncryptionKey.acquireSecretKey(password,
-                snp.salt == null ? cname.getSalt() : snp.salt,
+        EncryptionKey dkey = EncryptionKey.acquireSecretKey(
+                cname,
+                password,
                 encPartKeyType,
-                snp.params);
+                PAData.getSaltAndParams(encPartKeyType, rep.pAData));
         decrypt(dkey, asReq);
     }
 
--- a/src/share/classes/sun/security/krb5/KrbAsReqBuilder.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/KrbAsReqBuilder.java	Sun Feb 26 16:05:10 2012 -0800
@@ -169,34 +169,44 @@
              * from a keytab on acceptor, but unfortunately (?) Java supports
              * acceptor using password. In this case, if the service ticket is
              * encrypted using an etype which we don't have PA-DATA new salt,
-             * using the default salt is normally wrong (say, case-insensitive
+             * using the default salt might be wrong (say, case-insensitive
              * user name). Instead, we would use the new salt of another etype.
              */
 
             String salt = null;     // the saved new salt
-            for (int i=0; i<eTypes.length; i++) {
-                PAData.SaltAndParams snp =
-                        PAData.getSaltAndParams(eTypes[i], paList);
-                // First round, only calculate those with new salt
-                if (snp.salt != null) {
-                    salt = snp.salt;
-                    result[i] = EncryptionKey.acquireSecretKey(password,
-                            snp.salt,
-                            eTypes[i],
-                            snp.params);
-                }
-            }
-            if (salt == null) salt = cname.getSalt();
-            for (int i=0; i<eTypes.length; i++) {
-                // Second round, calculate those with no new salt
-                if (result[i] == null) {
+            try {
+                for (int i=0; i<eTypes.length; i++) {
+                    // First round, only calculate those have a PA entry
                     PAData.SaltAndParams snp =
                             PAData.getSaltAndParams(eTypes[i], paList);
-                    result[i] = EncryptionKey.acquireSecretKey(password,
-                            salt,
-                            eTypes[i],
-                            snp.params);
+                    if (snp != null) {
+                        // Never uses a salt for rc4-hmac, it does not use
+                        // a salt at all
+                        if (eTypes[i] != EncryptedData.ETYPE_ARCFOUR_HMAC &&
+                                snp.salt != null) {
+                            salt = snp.salt;
+                        }
+                        result[i] = EncryptionKey.acquireSecretKey(cname,
+                                password,
+                                eTypes[i],
+                                snp);
+                    }
                 }
+                // No new salt from PA, maybe empty, maybe only rc4-hmac
+                if (salt == null) salt = cname.getSalt();
+                for (int i=0; i<eTypes.length; i++) {
+                    // Second round, calculate those with no PA entry
+                    if (result[i] == null) {
+                        result[i] = EncryptionKey.acquireSecretKey(password,
+                                salt,
+                                eTypes[i],
+                                null);
+                    }
+                }
+            } catch (IOException ioe) {
+                KrbException ke = new KrbException(Krb5.ASN1_PARSE_ERROR);
+                ke.initCause(ioe);
+                throw ke;
             }
             return result;
         } else {
@@ -315,27 +325,19 @@
                     }
                     preAuthFailedOnce = true;
                     KRBError kerr = ke.getError();
+                    int paEType = PAData.getPreferredEType(kerr.getPA(),
+                            EType.getDefaults("default_tkt_enctypes")[0]);
                     if (password == null) {
                         EncryptionKey[] ks = Krb5Util.keysFromJavaxKeyTab(ktab, cname);
-                        pakey = EncryptionKey.findKey(kerr.getEType(), ks);
+                        pakey = EncryptionKey.findKey(paEType, ks);
                         if (pakey != null) pakey = (EncryptionKey)pakey.clone();
                         for (EncryptionKey k: ks) k.destroy();
                     } else {
-                        PAData.SaltAndParams snp = PAData.getSaltAndParams(
-                                kerr.getEType(), kerr.getPA());
-                        if (kerr.getEType() == 0) {
-                            // Possible if PA-PW-SALT is in KRB-ERROR. RFC
-                            // does not recommend this
-                            pakey = EncryptionKey.acquireSecretKey(password,
-                                    snp.salt == null ? cname.getSalt() : snp.salt,
-                                    EType.getDefaults("default_tkt_enctypes")[0],
-                                    null);
-                        } else {
-                            pakey = EncryptionKey.acquireSecretKey(password,
-                                    snp.salt == null ? cname.getSalt() : snp.salt,
-                                    kerr.getEType(),
-                                    snp.params);
-                        }
+                        pakey = EncryptionKey.acquireSecretKey(cname,
+                                password,
+                                paEType,
+                                PAData.getSaltAndParams(
+                                    paEType, kerr.getPA()));
                     }
                     paList = kerr.getPA();  // Update current paList
                 } else {
--- a/src/share/classes/sun/security/krb5/PrincipalName.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/PrincipalName.java	Sun Feb 26 16:05:10 2012 -0800
@@ -173,12 +173,6 @@
 
     boolean equalsWithoutRealm(PrincipalName other) {
 
-
-        if (nameType != KRB_NT_UNKNOWN &&
-            other.nameType != KRB_NT_UNKNOWN &&
-            nameType != other.nameType)
-            return false;
-
         if ((nameStrings != null && other.nameStrings == null) ||
             (nameStrings == null && other.nameStrings != null))
             return false;
--- a/src/share/classes/sun/security/krb5/internal/KRBError.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/internal/KRBError.java	Sun Feb 26 16:05:10 2012 -0800
@@ -99,7 +99,6 @@
     private Checksum eCksum; //optional
 
     private PAData[] pa;    // PA-DATA in eData
-    private int pa_eType;   // The 1st etype appeared in salt-related PAData
 
     private static boolean DEBUG = Krb5.DEBUG;
 
@@ -266,50 +265,8 @@
             DerValue tmp = derPA.data.getDerValue();
             PAData pa_data = new PAData(tmp);
             paList.add(pa_data);
-            int pa_type = pa_data.getType();
-            byte[] pa_value = pa_data.getValue();
             if (DEBUG) {
-                System.out.println(">>>Pre-Authentication Data:");
-                System.out.println("\t PA-DATA type = " + pa_type);
-            }
-
-            switch(pa_type) {
-                case Krb5.PA_ENC_TIMESTAMP:
-                    if (DEBUG) {
-                        System.out.println("\t PA-ENC-TIMESTAMP");
-                    }
-                    break;
-                case Krb5.PA_ETYPE_INFO:
-                    if (pa_value != null) {
-                        DerValue der = new DerValue(pa_value);
-                        while (der.data.available() > 0) {
-                            DerValue value = der.data.getDerValue();
-                            ETypeInfo info = new ETypeInfo(value);
-                            if (pa_eType == 0) pa_eType = info.getEType();
-                            if (DEBUG) {
-                                System.out.println("\t PA-ETYPE-INFO etype = " + info.getEType());
-                                System.out.println("\t PA-ETYPE-INFO salt = " + info.getSalt());
-                            }
-                        }
-                    }
-                    break;
-                case Krb5.PA_ETYPE_INFO2:
-                    if (pa_value != null) {
-                        DerValue der = new DerValue(pa_value);
-                        while (der.data.available() > 0) {
-                            DerValue value = der.data.getDerValue();
-                            ETypeInfo2 info2 = new ETypeInfo2(value);
-                            if (pa_eType == 0) pa_eType = info2.getEType();
-                            if (DEBUG) {
-                                System.out.println("\t PA-ETYPE-INFO2 etype = " + info2.getEType());
-                                System.out.println("\t PA-ETYPE-INFO2 salt = " + info2.getSalt());
-                            }
-                        }
-                    }
-                    break;
-                default:
-                    // Unknown Pre-auth type
-                    break;
+                System.out.println(pa_data);
             }
         }
         pa = paList.toArray(new PAData[paList.size()]);
@@ -340,10 +297,6 @@
         return pa;
     }
 
-    public final int getEType() {
-        return pa_eType;
-    }
-
     public final String getErrorString() {
         return eText;
     }
--- a/src/share/classes/sun/security/krb5/internal/PAData.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/krb5/internal/PAData.java	Sun Feb 26 16:05:10 2012 -0800
@@ -139,9 +139,56 @@
     }
 
     /**
+     * Gets the preferred etype from the PAData array.
+     * 1. ETYPE-INFO2-ENTRY with unknown s2kparams ignored
+     * 2. ETYPE-INFO2 preferred to ETYPE-INFO
+     * 3. multiple entries for same etype in one PA-DATA, use the first one.
+     * 4. Multiple PA-DATA with same type, choose the last one
+     * (This is useful when PA-DATAs from KRB-ERROR and AS-REP are combined).
+     * @return the etype, or defaultEType if not enough info
+     * @throws Asn1Exception|IOException if there is an encoding error
+     */
+    public static int getPreferredEType(PAData[] pas, int defaultEType)
+            throws IOException, Asn1Exception {
+
+        if (pas == null) return defaultEType;
+
+        DerValue d = null, d2 = null;
+        for (PAData p: pas) {
+            if (p.getValue() == null) continue;
+            switch (p.getType()) {
+                case Krb5.PA_ETYPE_INFO:
+                    d = new DerValue(p.getValue());
+                    break;
+                case Krb5.PA_ETYPE_INFO2:
+                    d2 = new DerValue(p.getValue());
+                    break;
+            }
+        }
+        if (d2 != null) {
+            while (d2.data.available() > 0) {
+                DerValue value = d2.data.getDerValue();
+                ETypeInfo2 tmp = new ETypeInfo2(value);
+                if (tmp.getParams() == null) {
+                    // we don't support non-null s2kparams
+                    return tmp.getEType();
+                }
+            }
+        }
+        if (d != null) {
+            while (d.data.available() > 0) {
+                DerValue value = d.data.getDerValue();
+                ETypeInfo tmp = new ETypeInfo(value);
+                return tmp.getEType();
+            }
+        }
+        return defaultEType;
+    }
+
+    /**
      * A place to store a pair of salt and s2kparams.
-     * An empty salt is changed to null, to be interopable
-     * with Windows 2000 server.
+     * An empty salt is changed to null, to be interoperable
+     * with Windows 2000 server. This is in fact not correct.
      */
     public static class SaltAndParams {
         public final String salt;
@@ -155,57 +202,120 @@
 
     /**
      * Fetches salt and s2kparams value for eType in a series of PA-DATAs.
-     * The preference order is PA-ETYPE-INFO2 > PA-ETYPE-INFO > PA-PW-SALT.
-     * If multiple PA-DATA for the same etype appears, use the last one.
+     * 1. ETYPE-INFO2-ENTRY with unknown s2kparams ignored
+     * 2. PA-ETYPE-INFO2 preferred to PA-ETYPE-INFO preferred to PA-PW-SALT.
+     * 3. multiple entries for same etype in one PA-DATA, use the first one.
+     * 4. Multiple PA-DATA with same type, choose the last one
      * (This is useful when PA-DATAs from KRB-ERROR and AS-REP are combined).
-     * @return salt and s2kparams. never null, its field might be null.
+     * @return salt and s2kparams. can be null if not found
      */
     public static SaltAndParams getSaltAndParams(int eType, PAData[] pas)
-            throws Asn1Exception, KrbException {
+            throws Asn1Exception, IOException {
 
-        if (pas == null || pas.length == 0) {
-            return new SaltAndParams(null, null);
-        }
+        if (pas == null) return null;
 
+        DerValue d = null, d2 = null;
         String paPwSalt = null;
-        ETypeInfo2 info2 = null;
-        ETypeInfo info = null;
 
         for (PAData p: pas) {
-            if (p.getValue() != null) {
-                try {
-                    switch (p.getType()) {
-                        case Krb5.PA_PW_SALT:
-                            paPwSalt = new String(p.getValue(),
-                                    KerberosString.MSNAME?"UTF8":"8859_1");
-                            break;
-                        case Krb5.PA_ETYPE_INFO:
-                            DerValue der = new DerValue(p.getValue());
-                            while (der.data.available() > 0) {
-                                DerValue value = der.data.getDerValue();
-                                ETypeInfo tmp = new ETypeInfo(value);
-                                if (tmp.getEType() == eType) info = tmp;
-                            }
-                            break;
-                        case Krb5.PA_ETYPE_INFO2:
-                            der = new DerValue(p.getValue());
-                            while (der.data.available() > 0) {
-                                DerValue value = der.data.getDerValue();
-                                ETypeInfo2 tmp = new ETypeInfo2(value);
-                                if (tmp.getEType() == eType) info2 = tmp;
-                            }
-                            break;
-                    }
-                } catch (IOException ioe) {
-                    // Ignored
+            if (p.getValue() == null) continue;
+            switch (p.getType()) {
+                case Krb5.PA_PW_SALT:
+                    paPwSalt = new String(p.getValue(),
+                            KerberosString.MSNAME?"UTF8":"8859_1");
+                    break;
+                case Krb5.PA_ETYPE_INFO:
+                    d = new DerValue(p.getValue());
+                    break;
+                case Krb5.PA_ETYPE_INFO2:
+                    d2 = new DerValue(p.getValue());
+                    break;
+            }
+        }
+        if (d2 != null) {
+            while (d2.data.available() > 0) {
+                DerValue value = d2.data.getDerValue();
+                ETypeInfo2 tmp = new ETypeInfo2(value);
+                if (tmp.getParams() == null && tmp.getEType() == eType) {
+                    // we don't support non-null s2kparams
+                    return new SaltAndParams(tmp.getSalt(), tmp.getParams());
                 }
             }
         }
-        if (info2 != null) {
-            return new SaltAndParams(info2.getSalt(), info2.getParams());
-        } else if (info != null) {
-            return new SaltAndParams(info.getSalt(), null);
+        if (d != null) {
+            while (d.data.available() > 0) {
+                DerValue value = d.data.getDerValue();
+                ETypeInfo tmp = new ETypeInfo(value);
+                if (tmp.getEType() == eType) {
+                    return new SaltAndParams(tmp.getSalt(), null);
+                }
+            }
         }
-        return new SaltAndParams(paPwSalt, null);
+        if (paPwSalt != null) {
+            return new SaltAndParams(paPwSalt, null);
+        }
+        return null;
+    }
+
+    @Override
+    public String toString(){
+        StringBuilder sb = new StringBuilder();
+        sb.append(">>>Pre-Authentication Data:\n\t PA-DATA type = ")
+                .append(pADataType).append('\n');
+
+        switch(pADataType) {
+            case Krb5.PA_ENC_TIMESTAMP:
+                sb.append("\t PA-ENC-TIMESTAMP");
+                break;
+            case Krb5.PA_ETYPE_INFO:
+                if (pADataValue != null) {
+                    try {
+                        DerValue der = new DerValue(pADataValue);
+                        while (der.data.available() > 0) {
+                            DerValue value = der.data.getDerValue();
+                            ETypeInfo info = new ETypeInfo(value);
+                            sb.append("\t PA-ETYPE-INFO etype = ")
+                                    .append(info.getEType())
+                                    .append(", salt = ")
+                                    .append(info.getSalt())
+                                    .append('\n');
+                        }
+                    } catch (IOException|Asn1Exception e) {
+                        sb.append("\t <Unparseable PA-ETYPE-INFO>\n");
+                    }
+                }
+                break;
+            case Krb5.PA_ETYPE_INFO2:
+                if (pADataValue != null) {
+                    try {
+                        DerValue der = new DerValue(pADataValue);
+                        while (der.data.available() > 0) {
+                            DerValue value = der.data.getDerValue();
+                            ETypeInfo2 info2 = new ETypeInfo2(value);
+                            sb.append("\t PA-ETYPE-INFO2 etype = ")
+                                    .append(info2.getEType())
+                                    .append(", salt = ")
+                                    .append(info2.getSalt())
+                                    .append(", s2kparams = ");
+                            byte[] s2kparams = info2.getParams();
+                            if (s2kparams == null) {
+                                sb.append("null\n");
+                            } else if (s2kparams.length == 0) {
+                                sb.append("empty\n");
+                            } else {
+                                sb.append(new sun.misc.HexDumpEncoder()
+                                        .encodeBuffer(s2kparams));
+                            }
+                        }
+                    } catch (IOException|Asn1Exception e) {
+                        sb.append("\t <Unparseable PA-ETYPE-INFO>\n");
+                    }
+                }
+                break;
+            default:
+                // Unknown Pre-auth type
+                break;
+        }
+        return sb.toString();
     }
 }
--- a/src/share/classes/sun/security/pkcs11/Config.java	Sun Sep 11 10:51:01 2011 -0700
+++ b/src/share/classes/sun/security/pkcs11/Config.java	Sun Feb 26 16:05:10 2012 -0800
@@ -192,6 +192,11 @@
     // works only for NSS providers created via the Secmod API
     private boolean nssUseSecmodTrust = false;
 
+    // Flag to indicate whether the X9.63 encoding for EC points shall be used
+    // (true) or whether that encoding shall be wrapped in an ASN.1 OctetString
+    // (false).
+    private boolean useEcX963Encoding = false;
+
     private Config(String filename, InputStream in) throws IOException {
         if (in == null) {
             if (filename.startsWith("--")) {